3 #ifndef STAR_St_pp2pp_Maker
4 #define STAR_St_pp2pp_Maker
18 #include "StRTSBaseMaker.h"
19 #include "pp2ppHit_Cluster.h"
31 class pp2ppRPpositions_st;
32 class pp2ppAcceleratorParameters_st;
33 class pp2ppPMTSkewConstants_st;
38 enum {ErrorCode = -9999,
48 typedef pair<Int_t, Double_t> HitChannel ;
50 vector<HitChannel> mValidHits[kMAXSEQ][
kMAXCHAIN] ;
51 static Bool_t hitcompare (HitChannel A,HitChannel B) {
return (A.first<B.first); }
56 unsigned char mRpStatus[kMAXSEQ] ;
62 string mPedestalPerchannelFilename ;
63 Int_t readPedestalPerchannel() ;
64 Int_t readOffsetPerplane() ;
65 Int_t readZPerplane() ;
66 pp2ppOffset_st *mOffsetTable ;
68 pp2ppRPpositions_st *mRPpositionsTable ;
69 Double_t mLVDT_pos[kMAXSEQ] ;
71 UChar_t mSiliconBunch ;
74 double mSkew_param[kMAXSEQ][2][4] ;
76 double mThetaXY_tilt[2];
77 double mDistanceFromIPtoDX[2];
79 double mBendingAngle[2];
80 double mConversion_TAC_time ;
83 Int_t readAccelerateParameter() ;
84 Int_t readSkewParameter() ;
95 const double kpitch_4svx = 9.74E-5;
97 const double kpitch_4svx2 = 9.55E-5;
99 const double kpitch_6svx = 1.050E-4;
106 virtual void Clear(Option_t *option=
"");
107 virtual Int_t
Init();
108 virtual Int_t
Make();
141 virtual Int_t InitRun (
int runumber);
146 static const char cvs[]=
"Tag $Name: $ $Id: St_pp2pp_Maker.h,v 1.27 2015/11/01 22:58:51 yipkin Exp $ built " __DATE__
" " __TIME__ ;
157 enum RP_STATIONS_PER_BRANCH { kRP1, kRP2, kStationsPerBranch };
158 enum SILICON_PLANES_PER_COORDINATE { kFirst, kSecond };
159 enum COORDINATES { kX, kY, kCoordinates, kZ = kCoordinates };
162 static const int kBranches = 4;
163 static const int kPlanesPerCoordinate =
kMAXCHAIN/2;
166 static const int kMaxClusterLength = 5;
167 const int kMaxNumberOfClusterPerPlane = 5;
168 const double kMaxPitchesToMatch;
169 static const double kEmin[kMAXSEQ][kMaxClusterLength];
170 const double kMaxPedestalTAC = 100;
173 static const int kPlanes[kCoordinates][kPlanesPerCoordinate];
174 static const int kRpInBranch[kBranches][kStationsPerBranch];
175 const double kPitch[kCoordinates];
181 int mClusterId[kPlanesPerCoordinate];
187 void formTracks( vector< StRpsTrack* > *,
const vector< StRpsTrackPoint* > * ,
const float,
const float )
const;
188 void formTrackPoints(
const StRpsCollection &, vector< StRpsTrackPoint* > * )
const;
189 vector<St_pp2pp_Maker::StRpsHit> formHits(
const StRpsRomanPot *,
const int)
const;
190 void preselectClusters(
const StRpsRomanPot *,
const int coordinate, vector<double>*, vector<int>*, vector<int>*, vector<int>*)
const;
191 Int_t classifyClustersCase(vector<double>*)
const;
192 Bool_t matchClusters(
const int,
const int,
const vector<double>*, std::vector<int>*)
const;
193 Bool_t areMatched(
const int,
const double,
const double,
double* =
nullptr)
const;
194 Double_t timeFromTAC(
const int,
const int,
const int,
const int)
const;
203 inline Double_t St_pp2pp_Maker::timeFromTAC(
const int Rp,
const int pmt,
const int Tac,
const int Adc)
const{
204 return mConversion_TAC_time * (Tac + mSkew_param[Rp][pmt][0]
205 + mSkew_param[Rp][pmt][1]*exp(-mSkew_param[Rp][pmt][2]*(Adc-mSkew_param[Rp][pmt][3])) / (Adc-mSkew_param[Rp][pmt][3]) );
For pp2pp analysis : mainly to create clusters from raw data silicon hits.
Class StRTSBaseMaker - is an abstract StMaker to define the interface to access the DAQ data from the...
virtual const char * GetCVS() const
Overload empty StMaker::InitRun.
virtual Int_t Make()
Make - this method is called in loop for each event.
Int_t MakeTracks(StRpsCollection &RpsColl, float blue_beamenergy, float yellow_beamenergy)
void SetPedestalFileName(const char *filename)
Int_t DoerPp2pp(const pp2pp_t &d, TGenericTable &hitsTable)
DoerPp2pp - this method is called as soon as next pp2pp record is read in.
virtual void Clear(Option_t *option="")
Clear - this method is called in loop for prepare the maker for the next event.
virtual Int_t Init()
Init - is a first method the top level StChain calls to initialize all its makers.
void DoClusterOrNot(Bool_t todo)