50 #ifndef STTOFPMATCHMAKER_HH
51 #define STTOFPMATCHMAKER_HH
58 #include "StThreeVectorD.hh"
63 class StSPtrVecTofData;
71 static const Int_t NTOFP = 41;
72 static const Int_t NPVPD = 6;
77 void Clear(Option_t *option=
"");
84 void createHistograms(Bool_t histos=kTRUE);
85 void setOuterTrackGeometry();
86 void setStandardTrackGeometry();
87 void setValidAdcRange(Int_t, Int_t);
88 void setValidTdcRange(Int_t, Int_t);
89 void setMinHitsPerTrack(Int_t);
90 void setMinFitPointsPerTrack(Int_t);
91 void setMaxDCA(Float_t);
92 void setHistoFileName(
const Char_t*);
94 Bool_t doPrintMemoryInfo;
95 Bool_t doPrintCpuInfo;
100 Float_t startTime(
const float);
103 Float_t mTofpAdc[NTOFP];
104 Float_t mTofpTdc[NTOFP];
105 Float_t mPvpdAdc[NPVPD];
106 Float_t mPvpdAdcLoRes[NPVPD];
107 Float_t mPvpdTdc[NPVPD];
111 Bool_t strobeEvent(StSPtrVecTofData&);
112 Int_t mStrobeTdcMin[NPVPD];
113 Int_t mStrobeTdcMax[NPVPD];
115 void bookHistograms();
116 void writeHistogramsToFile();
119 static const Int_t mTofpTrayId = 93;
126 Bool_t mOuterTrackGeometry;
127 string mHistoFileName;
129 Bool_t validAdc(
float);
130 Bool_t validTdc(
float);
133 Bool_t validTofTrack(
StTrack*);
137 Int_t mAcceptedEventCounter;
138 Int_t mTofEventCounter;
139 Int_t mTofStrobeEventCounter;
140 Int_t mAcceptAndStrobe;
141 Int_t mAcceptAndBeam;
144 Float_t mMinValidTdc;
145 Float_t mMaxValidTdc;
146 Float_t mMinValidAdc;
147 Float_t mMaxValidAdc;
148 UInt_t mMinHitsPerTrack;
149 UInt_t mMinFitPointsPerTrack;
154 TOrdCollection* mHitPosHistNames;
155 TOrdCollection* mTrackHistNames;
156 TOrdCollection* mOccupancyHistNames;
173 TH1D *hTofpSlatHitVecSize;
175 TH1D *hTofpNumberOfTrackHits;
177 TH1D *hTofpDCATrackprimVertex;
181 TH1D *hTofpNumberOfValidAdc;
182 TH1D *hTofpNumberOfValidTdc;
183 TH1D *hTofpNumberOfValidSlats;
184 TH1D *hTofpNumberOfGlobalTracks;
185 TH1D *hTofpNumberOfHitSlats;
186 TH1D *hTofpNumberOfSingleHitTracks;
187 TH1D *hTofpNumberOfSingleValidHitTracks;
190 TOrdCollection* mMatchHistNames;
191 TH2D *hTofpMatchHit[NTOFP];
192 TH2D *hTofpMatchNoHit[NTOFP];
194 virtual const char *GetCVS()
const
195 {
static const char cvs[]=
"Tag $Name: $ $Id: StTofpMatchMaker.h,v 1.9 2014/08/06 11:43:49 jeromel Exp $ built " __DATE__
" " __TIME__ ;
return cvs;}
200 inline void StTofpMatchMaker::setValidAdcRange(Int_t min, Int_t max){mMinValidAdc=min; mMaxValidAdc=max;}
201 inline void StTofpMatchMaker::setValidTdcRange(Int_t min, Int_t max){mMinValidTdc=min; mMaxValidTdc=max;}
202 inline void StTofpMatchMaker::setOuterTrackGeometry(){mOuterTrackGeometry=
true;}
203 inline void StTofpMatchMaker::setStandardTrackGeometry(){mOuterTrackGeometry=
false;}
204 inline void StTofpMatchMaker::setMinHitsPerTrack(Int_t nhits){mMinHitsPerTrack=nhits;}
205 inline void StTofpMatchMaker::setMinFitPointsPerTrack(Int_t nfitpnts){mMinFitPointsPerTrack=nfitpnts;}
206 inline void StTofpMatchMaker::setMaxDCA(Float_t maxdca){mMaxDCA=maxdca;}
207 inline void StTofpMatchMaker::setHistoFileName(
const Char_t* filename){mHistoFileName=filename;}
208 inline void StTofpMatchMaker::createHistograms(Bool_t histos){mHisto = histos;}
209 inline bool StTofpMatchMaker::validAdc(
float adc){
return((adc>=mMinValidAdc) && (adc<=mMaxValidAdc));}
210 inline bool StTofpMatchMaker::validTdc(
float tdc){
return((tdc>=mMinValidTdc) && (tdc<=mMaxValidTdc));}
Int_t storeMatchData(StTofSlatCollection *, StTofCollection *)
store local slat collection in StEvent's tofCollection
Int_t FinishRun(int)
FinishRun: clean up tofp geometry.
void Clear(Option_t *option="")
User defined functions.
StTofpMatchMaker(const Char_t *name="tofpMatch")
default constructor, set default values
Time-of-Flight Geometry Utilities.
Int_t getTofData(StTofCollection *)
create a local copy of the raw tofp data tofData in StEvent's tofCollection
Int_t Finish()
Finish: dump usage statistics and write histograms to file.
Int_t Init()
Init: inform user of parameter settings and book histograms.
Int_t InitRun(int)
InitRun: (re-)initialize the tofp geometry.
StTrackGeometry * trackGeometry(StTrack *)
returns the proper track geometry, based on a global user setting
Int_t Make()
Make: match extrapolated TPC tracks to TOFp slats.