Changeset 14814 for fact/tools/rootmacros/PulseTemplates
- Timestamp:
- 01/31/13 12:35:57 (12 years ago)
- Location:
- fact/tools/rootmacros/PulseTemplates
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
fact/tools/rootmacros/PulseTemplates/pulse.C
r14780 r14814 52 52 mOptions += options; 53 53 mType = type; 54 Fit(mName, mOptions, mType); 55 } 56 57 Pulse::Pulse(TString name, TH1* histo, TString options, int type, int order) 58 { 59 InitMembers(); 60 mName = name; 61 mHisto = histo; 62 mOptions += options; 63 mType = type; 64 mOrder = order; 54 65 Fit(mName, mOptions, mType); 55 66 } … … 178 189 double tau = 30.0; 179 190 double bsl = 0.8; //shall be around 0 191 double gain = 10; //startvalue for gain 180 192 181 193 int first_bin = mHisto->GetXaxis()->GetFirst(); … … 189 201 double amplitude = mHisto->GetBinContent(stop); 190 202 double start = stop-10; //pos 10 slices before maximum 191 int phe = amplitude/10; 203 int phe = 0; 204 if (mOrder < 0) 205 { 206 phe = (amplitude-bsl)/gain; 207 } 208 else 209 { 210 phe = mOrder+1; 211 } 192 212 // ====================================================================== 193 213 … … 233 253 // Calculate startvaues for fit 234 254 double tau = 30.0; 235 double bsl = 0; //MW der ersten zehn slices236 255 double bsl = 0; //MW der ersten zehn slices 256 double gain = 10; //startvalue for gain 237 257 int first_bin = mHisto->GetXaxis()->GetFirst(); 238 258 … … 245 265 double amplitude= mHisto->GetBinContent(stop); 246 266 double start = stop-10; //pos 10 slices before maximum 247 int phe = amplitude/10; 267 int phe = 0; 268 if (mOrder < 0) 269 { 270 phe = (amplitude-bsl)/gain; 271 } 272 else 273 { 274 phe = mOrder+1; 275 } 248 276 // ====================================================================== 249 277 -
fact/tools/rootmacros/PulseTemplates/pulse.h
r14762 r14814 54 54 Pulse(TString name, TH1* histo, TString options ); 55 55 Pulse(TString name, TH1* histo, TString options, int type); 56 Pulse(TString name, TH1* histo, TString options, int type, int order); 56 57 57 58 // /** Copy constructor.
Note:
See TracChangeset
for help on using the changeset viewer.