source: fact/tools/rootmacros/PulseTemplates/templateextractors.h@ 14745

Last change on this file since 14745 was 14745, checked in by Jens Buss, 12 years ago
add ErrorMedianOfH1,
File size: 4.1 KB
Line 
1#ifndef TEMPLATEEXTRACTORS_H
2#define TEMPLATEEXTRACTORS_H
3
4#include <TROOT.h>
5#include <TMath.h>
6#include <TProfile.h>
7#include <TH2F.h>
8#include <TH1I.h>
9#include <TH1F.h>
10#include <TF1.h>
11#include <TString.h>
12#include <TSystem.h>
13
14#include "pixel.h"
15#include "Sample.h"
16
17/** Assignment operator.
18* @todo do me
19* @warning not implemented
20* @param from THe value to assign to this object.
21*
22* @return A reference to this object.
23*/
24
25/** CalcMaxPropabilityOfSlice(
26 TH2* inputHisto,
27 TH1* outputHisto,
28 int verbosityLevel
29 );
30* Generates a Y-Projection for each slice of a TH2 histogram
31* Then calls the Value of the bin with Maximum Value and puts it
32* into the corresponding bin of a TH1 histogram
33* @see Event::CalibrateAllPixel()
34* @see Event::CalculatePhotonCharge()
35*/
36void
37CalcMaxPropabilityOfSlice(
38 TH2* inputHisto,
39 TH1* outputHisto,
40 int verbosityLevel
41 );
42
43void
44PlotMaxPropabilityPulse(
45 Pixel* CurrentPixel,
46 TString overlayType,
47 int verbosityLevel
48 );
49
50void
51FitMaxPropabilityPulse(
52 TH1F* inputHisto,
53 int verbosityLevel
54 );
55
56Double_t MedianOfH1 (
57 TH1* inputHisto
58 );
59
60double
61ErrorMedianOfH1(
62 TH1* inputHisto,
63 int numIterations,
64 int verbosityLevel
65 );
66
67Double_t MedianOfH1withRndSlices (
68 TH1* inputHisto, //histogram from which median will be calculated
69 vector<int> *position //array with random slice numbers
70 );
71
72int ExtractTH1EnriesToVector (
73 TH1* inputHisto, //histogram from which median will be calculated
74 vector<int> *entries //array with random slice numbers
75 );
76
77void CalculateErrorsWithBootstrapping(
78 TH1* inputHisto,
79 int numIt,
80 double* par,
81 double* parErr
82 );
83
84void
85PlotMedianOfSlice(
86 Pixel* CurrentPixel,
87 TString overlayType,
88 int verbosityLevel
89 );
90
91void
92PlotMeanOfSlice(
93 Pixel* CurrentPixel,
94 TString overlayType,
95 int verbosityLevel
96 );
97
98void
99MedianOfTH2Slices(
100 TH2* inputHisto,
101 TH1* outputHisto,
102 int verbosityLevel
103 );
104
105void
106ErrorMedianOfTH2Slices(
107 TH2* inputHisto,
108 TH1* outputHisto,
109 int numIterations,
110 int verbosityLevel
111 );
112
113void
114ExtractPulseTemplate(
115 Pixel* CurrentPixel,
116 TString overlayType,
117 int order,
118 int verbosityLevel
119 );
120
121bool
122WritePixelTemplateToCsv(
123 Pixel* CurrentPixel,
124 TString path,
125 TString overlayMethod,
126 int order,
127 int verbosityLevel
128 );
129
130//void
131//FitMaxPropabilityPuls(
132// TH1F* hMaximumTemp,
133// int verbosityLevel
134// );
135
136//double
137//PolExp(
138// double* x,
139// double* par
140// );
141
142//void
143//FitFallingEdge(
144// TString name,
145// TH1F* histo,
146// double xMin,
147// double xMax,
148// double* parameters
149// );
150
151//double
152//template_function(
153// double* input_x,
154// double* par);
155
156//double
157//NegPolExp(
158// double* x,
159// double* par
160// );
161
162//void
163//FitRisingEdge(
164// TString name,
165// TH1F* histo,
166// double xMin,
167// double xMax,
168// double* parameters
169// );
170
171//double
172//ChargeDiode(
173// double time,
174// double chargeVoltage,
175// double impedance,
176// double capacity
177// );
178
179//double
180//UnChargeDiode(
181// double* time,
182// double* chargeVoltage,
183// double* timeConstant
184// );
185
186#endif // TEMPLATEEXTRACTORS_H
187
Note: See TracBrowser for help on using the repository browser.