StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StIstRawHitMaker.h
1 // $Id: StIstRawHitMaker.h,v 1.26 2018/02/25 03:51:57 dongx Exp $
2 
3 #ifndef StIstRawHitMaker_hh
4 #define StIstRawHitMaker_hh
5 
6 #ifndef __CINT__
7 #include <array>
8 #include <iostream>
9 #endif
10 
11 #include <vector>
12 
13 #include "St_base/Stypes.h"
14 #include "StChain/StRTSBaseMaker.h"
15 #include "StIstUtil/StIstConsts.h"
16 
17 
18 class StIstCollection;
19 
20 
33 {
34 public:
35  StIstRawHitMaker( const char *name = "ist_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 setHitCut(double hitCut = 5.) { mHitCut = hitCut; }
44  void setCmnCorrection( bool doCmnCorrection = false ) { mDoCmnCorrection = doCmnCorrection; }
45  void setCmnCut(double cmnCut = 3.) { mCmnCut = cmnCut; }
47  void setDataType(int nDataType = 0) { mDataType = nDataType; };
48  void setDoEmbedding(Bool_t doIt) {mDoEmbedding = doIt;}
49  UChar_t getDataType() {return mDataType;} // 0 - All data; 1 - non-ZS data; 2 - ZS data; 3 - ZS first data
50 
51  // Get CVS
52  virtual const char *GetCVS() const {
53  static const char cvs[] = "Tag $Name: $ $Id: StIstRawHitMaker.h,v 1.26 2018/02/25 03:51:57 dongx Exp $ built " __DATE__ " " __TIME__ ;
54  return cvs;
55  }
56 
57 protected:
58  Bool_t mIsCaliMode;
59  Bool_t mDoEmbedding;
60  Bool_t mDoCmnCorrection;
61  //control paramters
62  double mHitCut, mCmnCut, mChanMinRmsNoiseLevel, mChanMaxRmsNoiseLevel, mApvMaxCmNoiseLevel;
63  UChar_t mALLdata, mADCdata, mZSdata, mDefaultTimeBin, mCurrentTimeBinNum;
64  UShort_t mMinNumOfRawHits, mMaxNumOfRawHits;
65 
70 
74 
75  std::vector< float > mCmnVec;
76  std::vector< float > mPedVec;
77  std::vector< float > mRmsVec;
78  std::vector< float > mGainVec;
79  std::vector< int > mMappingVec;
80  std::vector< unsigned char > mConfigVec;
81 
82 private:
83 
84  int FillRawHitCollectionFromAPVData(unsigned char dataFlag, int ntimebin, int counterAdcPerEvent[], double sumAdcPerEvent[], int apvElecId,
85  std::array< std::array<double, kIstNumTimeBins>, kIstNumApvChannels > &signalUnCorrected,
86  std::array< std::array<double, kIstNumTimeBins>, kIstNumApvChannels > &signalCorrected,
87  std::array<int, kIstNumApvChannels> &idTruth);
88 
89  int FillRawHitCollectionFromSimData();
90 
91  Int_t mDataType;
92 
93  ClassDef(StIstRawHitMaker, 0);
94 };
95 
96 #endif
Class StRTSBaseMaker - is an abstract StMaker to define the interface to access the DAQ data from the...
std::vector< float > mRmsVec
Channel elec. index, RMS noise.
void setDataType(int nDataType=0)
0 - All data; 1 - non-ZS data; 2 - ZS data; 3 - ZS first data
std::vector< float > mPedVec
Channel elec. index, pedestal.
StIstCollection * mIstCollectionPtr
std::vector< unsigned char > mConfigVec
APV chip configuration status indexed by geom. id.
std::vector< float > mCmnVec
APV chip geom. index, common mode (CM) noise.
std::vector< float > mGainVec
Channel elec. index, gain.
Int_t InitRun(Int_t runNumber)
std::vector< int > mMappingVec
Channel elec. index to geometry ID mapping.
StIstCollection * mIstCollectionSimuPtr
void Clear(Option_t *opts="")
User defined functions.