source: fact/tools/rootmacros/PulseTemplates/pulse.h@ 14532

Last change on this file since 14532 was 14531, checked in by Jens Buss, 12 years ago
new Members
  • Property svn:executable set to *
File size: 3.3 KB
Line 
1#ifndef Pulse_H
2#define Pulse_H
3
4// SYSTEM INCLUDES
5#include <utility>
6//
7
8// PROJECT INCLUDES
9#include <TROOT.h>
10#include <TMath.h>
11#include <TProfile.h>
12#include <TH2F.h>
13#include <TH1I.h>
14#include <TH1F.h>
15#include <TF1.h>
16#include <TString.h>
17#include <TSystem.h>
18#include <TFitResult.h>
19//
20
21// LOCAL INCLUDES
22#include <parameter.h>
23//
24
25// FORWARD REFERENCES
26//
27
28/** Assignment operator.
29* @todo do me
30* @warning not implemented
31* @param from THe value to assign to this object.
32*
33* @return A reference to this object.
34*/
35
36/**
37*/
38// NON CLASS MATH FUNCTIONS
39int Heaviside(double val);
40double shapeFunc( double* t, double* par);
41double shapeFunc2( double* t, double* par);
42
43class Pulse
44{
45public:
46// LIFECYCLE
47
48 /** Default constructor.
49 */
50 Pulse( );
51 Pulse(TString name);
52 Pulse(TString name, TH1* histo );
53 Pulse(TString name, TH1* histo, int type);
54 Pulse(TString name, TH1* histo, TString options );
55 Pulse(TString name, TH1* histo, TString options, int type);
56
57 // /** Copy constructor.
58 // *
59 // * @param from The value to copy to this object.
60 // */
61 /** Destructor.
62 */
63 ~Pulse();
64
65
66// OPERATORS
67
68// /** Assignment operator.
69// *
70// * @param from THe value to assign to this object.
71// *
72// * @return A reference to this object.
73// */
74// XX& operator=(const XX& from);
75
76// OPERATIONS
77// double shapeFunc( double* x, double* par);
78 void Fit(TString fitName, TString fitOptions, int type );
79 void Fit(TString fitName, TString fitOptions, int type, int fitMin, int fitMax);
80
81private:
82 void FitSectionWise(TString fitName, TString fitOptions, int fitMin, int fitMax);
83 void FitContious(TString fitName, TString fitOptions, int fitMin, int fitMax);
84 void CalculateParameters();
85 void InitMembers();
86
87// ACCESS
88public:
89 TString GetName();
90 double GetBsl();
91 double GetHeight();
92 double GetT0();
93 double GetT1();
94 double GetTau1();
95 double GetTau2();
96 double GetIntegral();
97 double GetAmplitude();
98 int GetPhE();
99 int GetOrder();
100 int GetType();
101 int GetFitMin();
102 int GetFitMax();
103 double GetFitProb();
104 double GetFitNCalls();
105 double GetFitNdf();
106 double GetChi2();
107 double GetBslErr();
108 double GetHeightErr();
109 double GetT0Err();
110 double GetT1Err();
111 double GetTau1Err();
112 double GetTau2Err();
113 double GetIntegralErr();
114 double GetAmplitudeErr();
115 int GetPhEErr();
116
117// INQUIRY
118private:
119 TString mName;
120 TH1* mHisto;
121 TF1* mModel;
122 TString mOptions;
123 pair <double, double> mBsl;
124 pair <double, double> mHeight;
125 pair <double, double> mT0;
126 pair <double, double> mT1;
127 pair <double, double> mTau1;
128 pair <double, double> mTau2;
129 pair <double, double> mIntegral;
130 pair <double, double> mAmplitude;
131 pair <int, double> mPhE;
132 int mOrder;
133 int mType;
134 int mFitMin;
135 int mFitMax;
136 double mFitProb;
137 double mFitNCalls;
138 double mFitNdf;
139 double mChi2;
140
141 TFitResultPtr mFitResultPtr;
142};
143
144#endif // Pulse_H
Note: See TracBrowser for help on using the repository browser.