StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StFmsFastSimulatorMaker.h
Go to the documentation of this file.
1 // $Id: StFmsFastSimulatorMaker.h,v 1.8 2017/09/28 17:07:19 akio Exp $
2 //
3 // $Log: StFmsFastSimulatorMaker.h,v $
4 // Revision 1.8 2017/09/28 17:07:19 akio
5 // addoing bitshiftgain
6 //
7 // Revision 1.7 2017/05/03 15:54:21 akio
8 // added gain scaling when attenuation was on during geant simulation
9 //
10 // Revision 1.6 2015/09/29 16:28:58 akio
11 // setFmsZS(int v) and if ADC<v, drop the hit (default=2)
12 // adding poisson distribution for FPS, with setFpsNPhotonPerMIP(float v)
13 // (default=0 for now, which turns this off. It should be around 100?)
14 //
15 // Revision 1.5 2015/09/18 18:44:28 akio
16 // uses StEnumeration
17 //
18 // Revision 1.4 2015/07/28 14:50:05 jeromel
19 // Fix string literal spacing for C++11 compliance
20 //
21 // Revision 1.3 2015/02/26 23:53:04 yuxip
22 // new update from Akio
23 //
30 #ifndef ST_FMS_SIMULATOR_MAKER_H
31 #define ST_FMS_SIMULATOR_MAKER_H
32 
33 class g2t_emc_hit_st;
34 class StFmsHit;
35 class StEvent;
36 
37 #include "StChain/StMaker.h"
38 
65  public:
73  explicit StFmsFastSimulatorMaker(const Char_t* name = "fmsSim");
74  // Note we the use default copy constructor and assignment operator produced
75  // by the compiler as we do not allocate any resources on the heap.
76 
81  Int_t Make();
82 
83  // Setting zero suppression # of channels
84  void setFmsZS(int v) {mFmsZSch=v;}
85 
86  // Set to use Bit Shift Gain from DB when digitizing
87  void setBitShiftGain(int v) {mFmsBitShiftGain=v;}
88 
89  // Setting average energy loss per MIP for FPS
90  void setFpsDEPerMIP(float v) {mFpsDEPerMIP=v;}
91 
92  // Setting average # of photon per MIP for FPS
93  void setFpsNPhotonPerMIP(float v) {mFpsNPhotonPerMIP=v;}
94 
95  // Setting FMS gain scaling when attenuation is on
96  void setAttenuationGainScale(float v) {mAttenuationGainScale=v;}
97 
101  virtual const char* GetCVS() const;
102 
103  private:
104 
105 
116  /* See StRoot/StEvent/StEnumerations.h
117  enum StFmsDetectorId {
118  kFpdNorth = 0,
119  kFpdSouth = 1,
120  kFpdNorthPreshower = 2,
121  kFpdSouthPreshower = 3,
122  kFmsNorthLarge = 8,
123  kFmsSouthLarge = 9,
124  kFmsNorthSmall = 10,
125  kFmsSouthSmall = 11,
126  kFPS = 14,
127  kFmsInvalidDetectorId = -1
128  };
129  */
130 
138  Int_t getDetectorId(const g2t_emc_hit_st& hit) const;
139 
143  void fillStEvent(StEvent* event);
144 
148  void printStEventSummary(const StEvent* event);
149 
150  Int_t mFmsZSch=1; //default set to 1 (zero suppresss adc=0 and 1) 20170925 -akio (It was 2 before)
151  Int_t mFmsBitShiftGain=1; //use BitGainShift from DB when digitize 20170925 -akio
152 
153  Float_t mFpsDEPerMIP;
154  Float_t mFpsNPhotonPerMIP;
155 
156  Int_t mAttenuation=0;
157  Float_t mAttenuationGainScale=0.35;
158 
159  ClassDef(StFmsFastSimulatorMaker, 0)
160 };
161 
162 inline const char* StFmsFastSimulatorMaker::GetCVS() const {
163  static const char cvs[]="Tag $Name: $ $Id: StFmsFastSimulatorMaker.h,v 1.8 2017/09/28 17:07:19 akio Exp $ built " __DATE__ " " __TIME__ ;
164  return cvs;
165 }
166 
167 #endif // ST_FMS_SIMULATOR_MAKER_H
virtual const char * GetCVS() const
StFmsFastSimulatorMaker(const Char_t *name="fmsSim")