StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StFgtSlowSimuMaker.h
1 // $Id: StFgtSlowSimuMaker.h,v 1.3 2014/08/06 11:42:57 jeromel Exp $
2 
3 
4 /* \class StFgtSlowSimuMaker
5 \author Jan Balewski, Wei-Ming Zang
6 
7 */
8 
9 #ifndef STAR_StFgtSlowSimuMaker
10 #define STAR_StFgtSlowSimuMaker
11 
12 #ifndef StMaker_H
13 #include "StMaker.h"
14 #endif
15 
16 #include "StFgtGeom.h"
17 #include "StFgtContainers.h"
18 
19 #include "TGeoManager.h" // for gGeoManager
20 #include "TROOT.h" // for gROOT
21 
22 class St_g2t_fgt_hit;
23 class TH2F;
24 class TH1F;
25 class TRandom3;
26 class HexLatice;
27 
28 class StFgtSlowSimuMaker : public StMaker {
29  private:
30  enum {mxH=32,eLossDim=10000};
31  TH1 *hA[mxH];
32  TObjArray *HList;
33  StFgtGeom *geom;
34  HexLatice *hexLat;
35  double *mRadStripRelativeGain;//indexed by radStripID, the same for all disks
36  double *mPhiStripRelativeGain;//indexed by phiStripID, the same for all disks
37 
38  // working arrays
39  TH2F *digXY; // 2D digitization response of one quart, local REF
40  TH1F *digPhi; // phi-strips response vector, one disk
41  TH1F *digRad; // rad-strips response vector, one disk
42 
43  // same as working arrays, but not reset for for each quad and disk WMZ
44  TH2F *digXYAll; // 2D digitization response of all quart, local REF
45  TH1F *digPhiAll; // phi-strips response vector, all disks
46  TH1F *digRadAll; // rad-strips response vector, all disks
47 
48  int mInpEve;
49  double par_2DpixAmplThres; // minimal content of considered digXY array
50  double par_stripAmplThres; // a.u., drop strips below it
51  double par_XYamplSigma; // signal smearing in X-Y
52  double par_radStripGainMean,par_radStripGainSigma; //relative gain variation: mean & sigma
53  double par_phiStripGainMean,par_phiStripGainSigma; //relative gain variation: mean & sigma
54 
55  bool par_forcePerp; // for testing only, tracks wil be perp to GEM gas
56  int par_useOnlyDisk; // 0=all , for testing only, drop response from other disks
57  int par_cutoffOfBichel; // cutoff channel of meLossTab[10000] built from BichselELossProbHighBG.dat used to reject very high and unrealistic loss value
58  double par_hexLaticePitch, par_hexLaticePhi1deg;
59  double par_transDiffusionPerPath;
60  TF1 *amplF;
61  TRandom3* mRnd;
62  void addHit(TVector3 rLocal, double ampl=1.) ;
63  void responseLinearModel(TVector3 Rloc, TVector3 Dloc); // primitive model
64  void responseFrankModel(TVector3 Rloc, TVector3 Dloc);// detailed, w/ fluct
65  double meLossTab[eLossDim];
66 
67  void InitHisto1();
68  void InitHisto2();
69  void CloseHisto();
70  void sort_g2t_hits(St_g2t_fgt_hit *);
71  bool projectQuadrant( int iquad);
72  void exportStripPlane(TH1F *h, vector<fgt_strip> &L);
73 
74  public:
75  vector<fgt_g2t_auxil> mG2tHitList[kFgtMxDisk+1][kFgtMxQuad]; // tmp for clus eval
76  vector<fgt_strip> mRadAdcList[kFgtMxDisk]; // tmp for the cluster finder
77  vector<fgt_strip> mPhiAdcList[kFgtMxDisk]; // tmp for the cluster finder
78  void setRadStripGain(double g, double s){ par_radStripGainMean=g; par_radStripGainSigma=s;}
79  void setPhiStripGain(double g, double s){ par_phiStripGainMean=g; par_phiStripGainSigma=s;}
80  void setTransDiffusion(double x) {par_transDiffusionPerPath=x;}
81 
82  StFgtSlowSimuMaker(const char *name="FgtSlowSimu");
83  virtual ~StFgtSlowSimuMaker();
84  virtual Int_t Init();
85  virtual Int_t Finish();
86  virtual Int_t Make();
87  virtual void Clear(Option_t *option="");
88  void setHList(TObjArray * x){HList=x;}
89  void saveHisto(TString fname);
90  void setStripThresh(double x) {par_stripAmplThres=x;}
91  void setHexGemLatice(double x, double y) {par_hexLaticePitch=x; par_hexLaticePhi1deg=y;}
92  void initFrankModel(TString fname="xBichselELossProbHighBG.dat");
93  void forcePerpTracks(bool x=true) {par_forcePerp=x;}
94  void useOnlyDisk(int x){par_useOnlyDisk=x;}
95  virtual const char *GetCVS() const {
96  static const char cvs[]="Tag $Name: $ $Id: StFgtSlowSimuMaker.h,v 1.3 2014/08/06 11:42:57 jeromel Exp $ built " __DATE__ " " __TIME__ ;
97  return cvs;
98  }
99  private:
100 
101  ClassDef(StFgtSlowSimuMaker,0)
102 };
103 
104 #endif
105 
106 
107 // $Log: StFgtSlowSimuMaker.h,v $
108 // Revision 1.3 2014/08/06 11:42:57 jeromel
109 // Suffix on literals need to be space (later gcc compiler makes it an error) - first wave of fixes
110 //
111 // Revision 1.2 2011/04/08 22:18:42 balewski
112 // added access to TGeo
113 //
114 // Revision 1.1 2011/04/07 19:31:22 balewski
115 // start
116 //
117 
virtual Int_t Finish()
virtual void Clear(Option_t *option="")
User defined functions.
vector< fgt_g2t_auxil > mG2tHitList[kFgtMxDisk+1][kFgtMxQuad]
accepted track segements
StFgtSlowSimuMaker(const char *name="FgtSlowSimu")