00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef STVPDANALYSISMAKER_H
00022 #define STVPDANALYSISMAKER_H
00023
00024 #include "TMath.h"
00025 #include "TF1.h"
00026 #include "StMaker.h"
00027
00028 #define VHRBIN2PS 24.4140625 // Very High resolution mode, pico-second per bin
00029
00030 #define HRBIN2PS 97.65625 // High resolution mode, pico-second per bin
00031
00032 #define TMAX 51200. // tdc limit
00033
00034 #include <string>
00035 #include <vector>
00036 #ifndef ST_NO_NAMESPACES
00037 using std::string;
00038 using std::vector;
00039 #endif
00040
00041 class StEvent;
00042 class StTofCollection;
00043 class StTofRawDataCollection;
00044 class StMuDst;
00045 class StMuDstMaker;
00046 class StMuEvent;
00047 #include "StTofUtil/StTofrDaqMap.h"
00048 #include "StTofUtil/StTofINLCorr.h"
00049 #include "StTofUtil/StSortTofRawData.h"
00050
00051 #if !defined(ST_NO_TEMPLATE_DEF_ARGS) || defined(__CINT__)
00052 typedef vector<Int_t> IntVec;
00053 typedef vector<Double_t> DoubleVec;
00054 #else
00055 typedef vector<Int_t, allocator<Int_t>> IntVec;
00056 typedef vector<Double_t, allocator<Double_t>> DoubleVec;
00057 #endif
00058
00059 class StVpdAnalysisMaker : public StMaker{
00060 public:
00061
00063 StVpdAnalysisMaker(const char* name="vpdAna");
00065 ~StVpdAnalysisMaker();
00066
00067 Int_t Init();
00068 Int_t InitRun(int);
00069 Int_t FinishRun(int);
00070 Int_t Make();
00071 Int_t Finish();
00072
00073 Int_t processEventYear8();
00074
00076 void resetCalibPars();
00077 void resetVpdPars();
00079 Int_t initParameters(int);
00080
00081 void setVPDHitsCut(const Int_t, const Int_t);
00082
00084 void setSlewingCorr(const bool);
00085
00087 void tsum(const Double_t *tot, const Double_t *time);
00088
00089 Int_t numberOfVpdEast() const;
00090 Int_t numberOfVpdWest() const;
00091 Double_t tstart() const;
00092 Double_t tdiff() const;
00093 Double_t vzVpd() const;
00094
00095 private:
00097 static const Int_t mNTDIG = 8;
00098 static const Int_t mNTray8 = 5;
00099 static const Int_t mNVPD = 19;
00100 static const Int_t mWestVpdTrayId = 121;
00101 static const Int_t mEastVpdTrayId = 122;
00102 static const Int_t mNValidTrays_Run8 = 5;
00103 static const Int_t mNBinMax = 60;
00104
00105 StTofINLCorr* mTofINLCorr;
00106 StTofrDaqMap* mDaqMap;
00107
00108 Double_t mVPDTotEdge[2*mNVPD][mNBinMax];
00109 Double_t mVPDTotCorr[2*mNVPD][mNBinMax];
00110 Double_t mVPDTZero[2*mNVPD];
00111
00112 Double_t mPhaseOffset8;
00113
00114 Double_t mVPDLeTime[2*mNVPD];
00115 Double_t mVPDTot[2*mNVPD];
00116
00117 Double_t mTSumEast;
00118 Double_t mTSumWest;
00119 UInt_t mVPDHitPatternEast;
00120 UInt_t mVPDHitPatternWest;
00121 Int_t mNEast;
00122 Int_t mNWest;
00123 Double_t mVPDVtxZ;
00124 Double_t mTDiff;
00125 Double_t mTStart;
00126
00127 StEvent* mEvent;
00128 StTofCollection* mTofCollection;
00129 StSortTofRawData* mSortTofRawData;
00130
00131 StMuDstMaker* mMuDstMaker;
00132 StMuDst* mMuDst;
00133 StMuEvent* mMuEvent;
00134
00135 Double_t mVertexZ;
00136 Bool_t mYear8;
00137
00138 Bool_t mValidCalibPar;
00139 Bool_t mSlewingCorr;
00140 Double_t mVPDEastHitsCut;
00141 Double_t mVPDWestHitsCut;
00142
00143 virtual const char *GetCVS() const
00144 {static const char cvs[]="Tag $Name: $ $Id: StVpdAnalysisMaker.h,v 1.1 2008/09/02 18:27:39 dongx Exp $ built "__DATE__" "__TIME__ ; return cvs;}
00145
00146 ClassDef(StVpdAnalysisMaker,1)
00147 };
00148
00149 inline void StVpdAnalysisMaker::setVPDHitsCut(const Int_t ieast, const Int_t iwest) { mVPDEastHitsCut=ieast ; mVPDWestHitsCut=iwest; }
00150
00151 inline void StVpdAnalysisMaker::setSlewingCorr(const bool val) { mSlewingCorr=val; }
00152
00153 inline Int_t StVpdAnalysisMaker::numberOfVpdEast() const { return mNEast; }
00154
00155 inline Int_t StVpdAnalysisMaker::numberOfVpdWest() const { return mNWest; }
00156
00157 inline Double_t StVpdAnalysisMaker::tstart() const { return mTStart; }
00158
00159 inline Double_t StVpdAnalysisMaker::tdiff() const { return mTDiff; }
00160
00161 inline Double_t StVpdAnalysisMaker::vzVpd() const { return mVPDVtxZ; }
00162
00163 #endif