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

Last change on this file since 14480 was 14479, checked in by Jens Buss, 13 years ago
add getters
  • Property svn:executable set to *
File size: 2.6 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 double GetBsl();
88 double GetHeight();
89 double GetT0();
90 double GetT1();
91 double GetTau1();
92 double GetTau2();
93 double GetIntegral();
94 double GetAmplitude();
95 int GetPhe();
96 int GetType();
97 int GetFitMin();
98 int GetFitMax();
99 double GetFitProb();
100 double GetFitNCalls();
101 double GetFitNdf();
102 double GetChi2();
103
104// INQUIRY
105private:
106 TString mName;
107 TH1* mHisto;
108 TF1* mModel;
109 TString mOptions;
110 double mBsl;
111 double mHeight;
112 double mT0;
113 double mT1;
114 double mTau1;
115 double mTau2;
116 double mIntegral;
117 double mAmplitude;
118 int mPhE;
119 int mType;
120 int mFitMin;
121 int mFitMax;
122 double mFitProb;
123 double mFitNCalls;
124 double mFitNdf;
125 double mChi2;
126
127 TFitResultPtr mFitResultPtr;
128};
129
130#endif // Pulse_H
Note: See TracBrowser for help on using the repository browser.