StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StIstSlowSimMaker.h
1 /***************************************************************************
2 *
3 * $Id: StIstSlowSimMaker.h,v 1.2 2018/03/15 21:38:24 dongx Exp $
4 *
5 * Author: Leszek Kosarzewski, March 2014
6 ****************************************************************************
7 * Description:
8 * Slow simulation maker for IST.
9 ****************************************************************************
10 * StIstSlowSimMaker.h,v 1.1
11 * Revision 1.1 2014/08/05 10:54:12 ypwang
12 * Make it compatible with other IST software
13 * Update after tests in the BFC chain
14 ****************************************************************************
15 * StIstSlowSimMaker.h,v 1.0
16 * Revision 1.0 2014/03/07 11:25:30 lkosarz
17 * Initial version
18 ****************************************************************************/
19 
20 #ifndef STAR_StIstSlowSimMaker
21 #define STAR_StIstSlowSimMaker
22 #include <StMaker.h>
23 #include <StThreeVectorF.hh>
24 #include <StThreeVectorD.hh>
25 #include <vector>
26 
27 
28 class TRandom3;
29 class StEvent;
30 class StMcEvent;
32 class St_g2t_ist_hit;
33 class StIstDb;
34 class StIstRawHit;
35 class StMcIstHit;
36 class StIstCollection;
37 
38 class TString;
39 class TF1;
40 
49 class StIstSlowSimMaker : public StMaker {
50  public:
51 
52  StIstSlowSimMaker(const char *name="istSlowSim");
53  Int_t Make();
54  Int_t Init();
55  Int_t InitRun( Int_t runNumber );
56  void Clear( Option_t *opts = "" );
57 
58  virtual const char *GetCVS() const
59  {
60  static const char cvs[]="Tag $Name: $ $Id: StIstSlowSimMaker.h,v 1.2 2018/03/15 21:38:24 dongx Exp $ built " __DATE__ " " __TIME__ ;
61  return cvs;
62  }
63 
64  void buildIdealGeom(const Bool_t isIdealGeom) {mBuildIdealGeom = isIdealGeom;}
65 
66  protected:
67  StIstDb *mIstDb;
68  Bool_t mBuildIdealGeom;
69 
70  StIstCollection *mIstCollectionPtr;
71  TF1 *fAdc;
72 
74  UChar_t mDefaultTimeBin, mCurrentTimeBinNum;
76  typedef std::vector< Int_t > MappingGeomVec_t;
78 
80  short mHitEffMode;
81  float mMomCut;
82  float mHitEff;
83  TRandom3* mRndGen;
84 
85  void getMCHitRowAndColumn(const StMcIstHit *istMChit, UShort_t &meanColumn, UShort_t &meanRow) const;
86  void checkPadCrossing(const StThreeVectorD inPos, const StThreeVectorD outPos, StThreeVectorD mcLocalDir, Double_t dS, vector<StThreeVectorD> &cross_vec) const;
87  void transformToSensor(StThreeVectorD &hitPos) const;
88  Double_t distanceToBorder(const StThreeVectorD hitPos, const StThreeVectorD dir, const StThreeVectorD mean, StThreeVectorD &dist) const;
89  void findPad(const StThreeVectorD hitPos, UShort_t &column, UShort_t &row, Double_t &rPhiPos_mean, Double_t &zPos_mean) const;
90 
91  private:
92  void generateRawHits(const StMcIstHit *istMChit) const;
93  Double_t direction(const Double_t x) const;
94  Double_t scaleFromYvsX(const StThreeVectorD vec, const Double_t a) const;
95  Double_t scaleFromYvsZ(const StThreeVectorD vec, const Double_t a) const;
96 
97  ClassDef(StIstSlowSimMaker,0) //StAF chain virtual base class for Makers
98 };
99 
100 #endif
short mHitEffMode
single hit efficiency - tunable parameter
MappingGeomVec_t mMappingGeomVec
Geometry ID -&gt; channel elec. index.
std::vector< Int_t > MappingGeomVec_t
mapping
UChar_t mDefaultTimeBin
control paramters
void getMCHitRowAndColumn(const StMcIstHit *istMChit, UShort_t &meanColumn, UShort_t &meanRow) const
void findPad(const StThreeVectorD hitPos, UShort_t &column, UShort_t &row, Double_t &rPhiPos_mean, Double_t &zPos_mean) const
StIstSlowSimMaker(const char *name="istSlowSim")
void checkPadCrossing(const StThreeVectorD inPos, const StThreeVectorD outPos, StThreeVectorD mcLocalDir, Double_t dS, vector< StThreeVectorD > &cross_vec) const
Event data structure to hold all information from a Monte Carlo simulation. This class is the interfa...
Definition: StMcEvent.hh:169
void Clear(Option_t *opts="")
User defined functions.
Int_t InitRun(Int_t runNumber)