StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StFstRawHitMaker.h
1 #ifndef StFstRawHitMaker_hh
2 #define StFstRawHitMaker_hh
3 
4 #ifndef __CINT__
5 #include <array>
6 #include <iostream>
7 #endif
8 
9 #include <vector>
10 
11 #include "St_base/Stypes.h"
12 #include "StChain/StRTSBaseMaker.h"
13 #include "StEvent/StFstConsts.h"
14 
15 
16 class StEvent;
17 class StFstCollection;
18 class StFstEvtCollection;
19 
20 
33 {
34 public:
35  StFstRawHitMaker( const char *name = "fst_raw_hit" );
37  Int_t Init();
38  Int_t InitRun(Int_t runNumber);
39  Int_t Make();
40  void Clear( Option_t *opts = "" );
41 
42  void setIsCalibrationMode( bool isCaliMode = false ) { mIsCaliMode = isCaliMode; }
43  void setMinHitCut(double minhitCut = 2.5) { mMinHitCut = minhitCut; }
44  void setMedHitCut(double medhitCut = 3.5) { mMedHitCut = medhitCut; }
45  void setMaxHitCut(double maxhitCut = 4.0) { mMaxHitCut = maxhitCut; }
46  void setCmnCorrection( bool doCmnCorrection = true ) { mDoCmnCorrection = doCmnCorrection; }
47  void setCmnCut(double cmnCut = 3.) { mCmnCut = cmnCut; }
49  void setDataType(int nDataType = 0) { mDataType = nDataType; };
50  void setDoEmbedding(Bool_t doIt) { mDoEmbedding = doIt; }
51  UChar_t getDataType() {return mDataType;} // 0 - All data; 1 - non-ZS data; 2 - ZS data; 3 - ZS first data
52 
53 protected:
54  Bool_t mIsCaliMode;
55  Bool_t mDoEmbedding;
56  Bool_t mDoCmnCorrection;
57  //control paramters
58  double mMinHitCut, mMedHitCut, mMaxHitCut, mCmnCut, mChanMinRmsNoiseLevel, mChanMaxRmsNoiseLevel, mApvMaxCmNoiseLevel;
59  Int_t mALLdata, mADCdata, mZSdata, mDefaultTimeBin, mCurrentTimeBinNum;
60  Int_t mMinNumOfRawHits, mMaxNumOfRawHits;
61 
66 
70 
71  std::vector< std::vector< std::vector< float > > > mCmnVec;
72  std::vector< std::vector< float > > mPedVec;
73  std::vector< std::vector< float > > mTotRmsVec;
74  std::vector< std::vector< float > > mRanRmsVec;
75  std::vector< float > mGainVec;
76  std::vector< int > mMappingVec;
77  std::vector< int > mConfigVec;
78 
79 private:
80 
81  int FillRawHitCollectionFromAPVData(unsigned char dataFlag, int ntimebin, int counterAdcPerEvent[][kFstNumTimeBins], double sumAdcPerEvent[][kFstNumTimeBins], int apvElecId,
82  std::array< std::array<double, kFstNumTimeBins>, kFstNumApvChannels > &signalUnCorrected,
83  std::array< std::array<double, kFstNumTimeBins>, kFstNumApvChannels > &signalCorrected,
84  std::array< std::array<int, kFstNumTimeBins>, kFstNumApvChannels > &seedFlag,
85  std::array<int, kFstNumApvChannels> &idTruth);
86 
87  int FillRawHitCollectionFromSimData();
88 
89  StEvent* mEvent;
90  StFstEvtCollection* mFstEvtCollection;
91 
92  Int_t mDataType;
93 
94  ClassDef(StFstRawHitMaker, 1);
95 };
96 
97 #endif
std::vector< int > mConfigVec
APV chip configuration status indexed by geom. id.
std::vector< float > mGainVec
Channel elec. index, gain.
Class StRTSBaseMaker - is an abstract StMaker to define the interface to access the DAQ data from the...
std::vector< std::vector< float > > mRanRmsVec
Channel elec. index, Random RMS noise.
StFstCollection * mFstCollectionPtr
std::vector< int > mMappingVec
Channel elec. index to geometry ID mapping.
Int_t InitRun(Int_t runNumber)
std::vector< std::vector< std::vector< float > > > mCmnVec
APV chip geom. index, common mode (CM) noise.
void setDataType(int nDataType=0)
0 - All data; 1 - non-ZS data; 2 - ZS data; 3 - ZS first data
StFstCollection * mFstCollectionSimuPtr
std::vector< std::vector< float > > mPedVec
Channel elec. index, pedestal.
void Clear(Option_t *opts="")
User defined functions.
std::vector< std::vector< float > > mTotRmsVec
Channel elec. index, Total RMS noise.