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

Last change on this file since 14252 was 14082, checked in by Jens Buss, 12 years ago
implemented pulse and fit funciton
File size: 3.6 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
16/** Assignment operator.
17* @todo do me
18* @warning not implemented
19* @param from THe value to assign to this object.
20*
21* @return A reference to this object.
22*/
23
24/** CalcMaxPropabilityOfSlice(
25 TH2* inputHisto,
26 TH1* outputHisto,
27 int verbosityLevel
28 );
29* Generates a Y-Projection for each slice of a TH2 histogram
30* Then calls the Value of the bin with Maximum Value and puts it
31* into the corresponding bin of a TH1 histogram
32* @see Event::CalibrateAllPixel()
33* @see Event::CalculatePhotonCharge()
34*/
35void
36CalcMaxPropabilityOfSlice(
37 TH2* inputHisto,
38 TH1* outputHisto,
39 int verbosityLevel
40 );
41
42void
43PlotMaxPropabilityPulse(
44 Pixel* CurrentPixel,
45 TString overlayType,
46 int verbosityLevel
47 );
48
49void
50FitMaxPropabilityPulse(
51 TH1F* inputHisto,
52 int verbosityLevel
53 );
54
55Double_t MedianOfH1 (
56 TH1* inputHisto
57 );
58
59void
60PlotMedianOfSlice(
61 Pixel* CurrentPixel,
62 TString overlayType,
63 int verbosityLevel
64 );
65
66void
67PlotMeanOfSlice(
68 Pixel* CurrentPixel,
69 TString overlayType,
70 int verbosityLevel
71 );
72
73void
74ExtractPulseTemplate(
75 Pixel* CurrentPixel,
76 TString overlayType,
77 int order,
78 int verbosityLevel
79 );
80
81bool
82WritePixelTemplateToCsv(
83 Pixel* CurrentPixel,
84 TString path,
85 TString overlayMethod,
86 int order,
87 int verbosityLevel
88 );
89
90void
91FitMaxPropabilityPuls(
92 TH1F* hMaximumTemp,
93 int verbosityLevel
94 );
95
96double
97PolExp(
98 double* x,
99 double* par
100 );
101
102void
103FitFallingEdge(
104 TString name,
105 TH1F* histo,
106 double xMin,
107 double xMax,
108 double* parameters
109 );
110
111double
112template_function(
113 double* input_x,
114 double* par);
115
116double
117NegPolExp(
118 double* x,
119 double* par
120 );
121
122void
123FitRisingEdge(
124 TString name,
125 TH1F* histo,
126 double xMin,
127 double xMax,
128 double* parameters
129 );
130
131double
132ChargeDiode(
133 double* time,
134 double* chargeVoltage,
135 double* impedance,
136 double* capacity
137 );
138
139double
140UnChargeDiode(
141 double* time,
142 double* chargeVoltage,
143 double* impedance,
144 double* capacity
145 );
146
147double
148PulseFunction(
149 double* time,
150 double* baseline,
151 double* risingChargeVoltage,
152 double* risingImpedance,
153 double* risingCapacity,
154 double* fallingChargeVoltage,
155 double* fallingImpedance,
156 double* fallingCapacity
157 );
158
159void
160FitPulse(
161 TString name,
162 TH1F* histo,
163 double xMin,
164 double xMax,
165 double* parameters
166 );
167
168#endif // TEMPLATEEXTRACTORS_H
169
Note: See TracBrowser for help on using the repository browser.