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

Last change on this file since 14742 was 14707, checked in by Jens Buss, 13 years ago
implemented error calculation for median
File size: 3.7 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_t MedianOfH1withRndSlices (
61 TH1* inputHisto, //histogram from which median will be calculated
62 vector<int> *position //array with random slice numbers
63 );
64
65void
66PlotMedianOfSlice(
67 Pixel* CurrentPixel,
68 TString overlayType,
69 int verbosityLevel
70 );
71
72void
73PlotMeanOfSlice(
74 Pixel* CurrentPixel,
75 TString overlayType,
76 int verbosityLevel
77 );
78
79void
80MedianOfTH2Slices(
81 TH2* inputHisto,
82 TH1* outputHisto,
83 int verbosityLevel
84 );
85
86void
87ErrorMedianOfTH2Slices(
88 TH2* inputHisto,
89 TH1* outputHisto,
90 int numIterations,
91 int verbosityLevel
92 );
93
94void
95ExtractPulseTemplate(
96 Pixel* CurrentPixel,
97 TString overlayType,
98 int order,
99 int verbosityLevel
100 );
101
102bool
103WritePixelTemplateToCsv(
104 Pixel* CurrentPixel,
105 TString path,
106 TString overlayMethod,
107 int order,
108 int verbosityLevel
109 );
110
111//void
112//FitMaxPropabilityPuls(
113// TH1F* hMaximumTemp,
114// int verbosityLevel
115// );
116
117//double
118//PolExp(
119// double* x,
120// double* par
121// );
122
123//void
124//FitFallingEdge(
125// TString name,
126// TH1F* histo,
127// double xMin,
128// double xMax,
129// double* parameters
130// );
131
132//double
133//template_function(
134// double* input_x,
135// double* par);
136
137//double
138//NegPolExp(
139// double* x,
140// double* par
141// );
142
143//void
144//FitRisingEdge(
145// TString name,
146// TH1F* histo,
147// double xMin,
148// double xMax,
149// double* parameters
150// );
151
152//double
153//ChargeDiode(
154// double time,
155// double chargeVoltage,
156// double impedance,
157// double capacity
158// );
159
160//double
161//UnChargeDiode(
162// double* time,
163// double* chargeVoltage,
164// double* timeConstant
165// );
166
167#endif // TEMPLATEEXTRACTORS_H
168
Note: See TracBrowser for help on using the repository browser.