| 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 | int Heaviside(double val);
|
|---|
| 37 | double shapeFunc( double* t, double* par);
|
|---|
| 38 | double shapeFunc2( double* t, double* par);
|
|---|
| 39 |
|
|---|
| 40 | class Pulse
|
|---|
| 41 | {
|
|---|
| 42 | public:
|
|---|
| 43 | // LIFECYCLE
|
|---|
| 44 |
|
|---|
| 45 | /** Default constructor.
|
|---|
| 46 | */
|
|---|
| 47 | Pulse( );
|
|---|
| 48 | Pulse(TString name);
|
|---|
| 49 | Pulse(TString name, TH1* histo );
|
|---|
| 50 | Pulse(TString name, TH1* histo, int type);
|
|---|
| 51 | Pulse(TString name, TH1* histo, TString options );
|
|---|
| 52 | Pulse(TString name, TH1* histo, TString options, int type);
|
|---|
| 53 |
|
|---|
| 54 | // /** Copy constructor.
|
|---|
| 55 | // *
|
|---|
| 56 | // * @param from The value to copy to this object.
|
|---|
| 57 | // */
|
|---|
| 58 | /** Destructor.
|
|---|
| 59 | */
|
|---|
| 60 | ~Pulse();
|
|---|
| 61 |
|
|---|
| 62 |
|
|---|
| 63 | // OPERATORS
|
|---|
| 64 |
|
|---|
| 65 | // /** Assignment operator.
|
|---|
| 66 | // *
|
|---|
| 67 | // * @param from THe value to assign to this object.
|
|---|
| 68 | // *
|
|---|
| 69 | // * @return A reference to this object.
|
|---|
| 70 | // */
|
|---|
| 71 | // XX& operator=(const XX& from);
|
|---|
| 72 |
|
|---|
| 73 | // OPERATIONS
|
|---|
| 74 | // double shapeFunc( double* x, double* par);
|
|---|
| 75 | void Fit(TString fitName, TString fitOptions, int type );
|
|---|
| 76 | void Fit(TString fitName, TString fitOptions, int type, int fitMin, int fitMax);
|
|---|
| 77 |
|
|---|
| 78 | private:
|
|---|
| 79 | void FitSectionWise(TString fitName, TString fitOptions, int fitMin, int fitMax);
|
|---|
| 80 | void FitContious(TString fitName, TString fitOptions, int fitMin, int fitMax);
|
|---|
| 81 | void CalculateParameters();
|
|---|
| 82 | void InitMembers();
|
|---|
| 83 |
|
|---|
| 84 | // ACCESS
|
|---|
| 85 | public:
|
|---|
| 86 | double GetBsl();
|
|---|
| 87 | double GetHeight();
|
|---|
| 88 | double GetAvalancheStart();
|
|---|
| 89 | double GetAvalancheEnd();
|
|---|
| 90 | double GetTimeConstRising();
|
|---|
| 91 | double GetTimeConstFalling();
|
|---|
| 92 | double GetIntegral();
|
|---|
| 93 | double GetAmplitude();
|
|---|
| 94 | int GetPE();
|
|---|
| 95 |
|
|---|
| 96 | // INQUIRY
|
|---|
| 97 | TString mName;
|
|---|
| 98 | TH1* mHisto;
|
|---|
| 99 | TF1* mModel;
|
|---|
| 100 | TString mOptions;
|
|---|
| 101 | double mBsl;
|
|---|
| 102 | double mHeight;
|
|---|
| 103 | double mT0;
|
|---|
| 104 | double mT1;
|
|---|
| 105 | double mTau1;
|
|---|
| 106 | double mTau2;
|
|---|
| 107 | double mIntegral;
|
|---|
| 108 | double mAmplitude;
|
|---|
| 109 | int mPhE;
|
|---|
| 110 | int mType;
|
|---|
| 111 | int mFitMin;
|
|---|
| 112 | int mFitMax;
|
|---|
| 113 | double mFitProb;
|
|---|
| 114 | double mFitNCalls;
|
|---|
| 115 | double mFitNdf;
|
|---|
| 116 | double mChi2;
|
|---|
| 117 |
|
|---|
| 118 | TFitResultPtr mFitResultPtr;
|
|---|
| 119 | };
|
|---|
| 120 |
|
|---|
| 121 | #endif // Pulse_H
|
|---|