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

Last change on this file since 20115 was 14962, checked in by Jens Buss, 12 years ago
bootstapping>: bin values extracted from bincenter
File size: 4.3 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 MedianOfH1(
57 TH1D* 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 numBootstrapIt,
119 int verbosityLevel
120 );
121
122bool
123WritePixelTemplateToCsv(
124 Pixel* CurrentPixel,
125 TString path,
126 TString overlayMethod,
127 int order,
128 int verbosityLevel
129 );
130
131//void
132//FitMaxPropabilityPuls(
133// TH1F* hMaximumTemp,
134// int verbosityLevel
135// );
136
137//double
138//PolExp(
139// double* x,
140// double* par
141// );
142
143//void
144//FitFallingEdge(
145// TString name,
146// TH1F* histo,
147// double xMin,
148// double xMax,
149// double* parameters
150// );
151
152//double
153//template_function(
154// double* input_x,
155// double* par);
156
157//double
158//NegPolExp(
159// double* x,
160// double* par
161// );
162
163//void
164//FitRisingEdge(
165// TString name,
166// TH1F* histo,
167// double xMin,
168// double xMax,
169// double* parameters
170// );
171
172//double
173//ChargeDiode(
174// double time,
175// double chargeVoltage,
176// double impedance,
177// double capacity
178// );
179
180//double
181//UnChargeDiode(
182// double* time,
183// double* chargeVoltage,
184// double* timeConstant
185// );
186
187void ShiftHistoInX(
188 TH1* histo,
189 float shift
190 );
191void ShiftStartOfHistoInXTo(
192 TH1* histo,
193 float value
194 );
195
196#endif // TEMPLATEEXTRACTORS_H
197
Note: See TracBrowser for help on using the repository browser.