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

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