StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StSvtSimulationMaker.h
1 // $Id: StSvtSimulationMaker.h,v 1.19 2014/08/06 11:43:46 jeromel Exp $
2 // $Log: StSvtSimulationMaker.h,v $
3 // Revision 1.19 2014/08/06 11:43:46 jeromel
4 // Suffix on literals need to be space (later gcc compiler makes it an error) - first wave of fixes
5 //
6 // Revision 1.18 2007/12/24 17:37:20 fisyak
7 // Add protection from missing geometry
8 //
9 // Revision 1.17 2007/11/01 19:56:16 caines
10 // Added routines to move SVT hits from GEANT geometry to real geometry
11 //
12 // Revision 1.16 2005/07/23 03:37:34 perev
13 // IdTruth + Cleanup
14 //
15 // Revision 1.15 2005/02/09 14:33:36 caines
16 // New electron expansion routine
17 //
18 // Revision 1.12 2004/03/30 21:27:12 caines
19 // Remove asserts from code so doesnt crash if doesnt get parameters it just quits with kStErr
20 //
21 // Revision 1.11 2004/02/24 15:53:22 caines
22 // Read all params from database
23 //
24 // Revision 1.10 2004/01/22 16:30:47 caines
25 // Getting closer to a final simulation
26 //
27 // Revision 1.9 2003/11/30 20:51:48 caines
28 // New version of embedding maker and make OnlSeqAdj a stand alone maker
29 //
30 // Revision 1.8 2003/11/13 16:25:00 caines
31 // Further improvements to get simulator looking like reality
32 //
33 // Revision 1.6 2001/08/13 15:34:19 bekele
34 // Debugging tools added
35 //
36 // Revision 1.5 2001/03/19 22:25:53 caines
37 // Catch wrong wafer ids more elegantly
38 //
39 // Revision 1.4 2001/03/15 15:12:09 bekele
40 // added a method to fill the whole SVT hybrid with background
41 //
42 // Revision 1.3 2001/02/18 00:10:42 caines
43 // Improve and use StSvtConfig
44 //
45 // Revision 1.2 2001/02/07 19:13:51 caines
46 // Small fixes to allow to run without setup from command line
47 //
48 // Revision 1.1 2000/11/30 20:47:49 caines
49 // First version of Slow Simulator - S. Bekele
50 //
51 //
52 #ifndef STAR_StSvtSimulationMaker
53 #define STAR_StSvtSimulationMaker
54 // //
56 // StSvtSeqAdj base class //
57 // //
59 #ifndef StMaker_H
60 #include "StMaker.h"
61 #endif
62 
63 #include "StThreeVector.hh"
64 
65 class StChain;
66 class TFile;
67 //class TDirectory;
68 class TNtuple;
69 class TString;
70 
71 //class St_g2t_svt_hit;
72 class StSvtGeometry;
73 
75 class StSvtData;
76 class StSvtHybridData;
77 class StSvtConfig;
78 class StSvtGeantHits;
79 class StSvtHybridPixelsC;
80 class StSvtHybridPixelsD;
81 class StSvtSimulation;
82 class StSvtElectronCloud;
83 class StSvtAngles;
86 class StSvtT0;
87 
99 {
100  public:
101  StSvtSimulationMaker(const char* name = "SvtSimulator");
102  virtual ~StSvtSimulationMaker(); //** destructor should be virtual
103 
105  Int_t setOptions(int SigOption);
106  Int_t setConst(double timBinSize, double anodeSize);
107 
109  virtual Int_t Init();
110  virtual Int_t Make();
111  virtual void Clear(const char *opt);
112  virtual Int_t Finish();
113  virtual Int_t InitRun(int runumber);
114  virtual Int_t FinishRun(int oldrunumber);
115 
117  void setElectronLifeTime(double tLife);
118  void setTrappingConst(double trapConst);
119  void setDiffusionConst(double diffConst);
120 
121  void setSvtPixelData();
122  void setGeantData();
123 
124  void resetPixelData();
125 
126  void FillGeantHit(int barrel, int ladder, int wafer, int hybrid,
128  StThreeVector<double>* VecL, double peak,int idtrk);
129 
130 
131  Int_t getConfig();
132  Int_t getSvtGeometry();
133  Int_t getSvtDriftSpeeds();
134  Int_t getSvtT0();
135  Int_t getPedestalOffset();
136 
137 
138 //+++++++++++++++++++++++
139  Int_t GetNumOfHybrids(){return mNumOfHybrids;}
140  TNtuple* GetNTuple(){return mNTuple;}
141 
142  private:
143 
144  ClassDef(StSvtSimulationMaker,4)
145 
146  Int_t ideal2RealTranslation(StThreeVector<double> *pos, StThreeVector<double> *mtm, double charge, int *wafId);
147 
148  // initial options
149  double mLifeTime;
150  double mTrapConst;
151  double mDiffusionConst;
152  double mTimeBinSize;
153  double mAnodeSize;
154  int mPedOffset;
155 
156  Int_t mSigOption;
157 
158  Int_t mNumOfHybrids;
159  double mDefaultDriftVelocity;
160  double mBField; // z component of BField;
161 
163  StSvtConfig *mConfig;
164  Bool_t mDoEmbedding;
165 
167  StSvtAngles *mSvtAngles;
168  StSvtElectronCloud *mElectronCloud;
169  StSvtSimulation *mSvtSimulation;
170  StSvtCoordinateTransform *mCoordTransform;
171 
172  //data for each run
173  StSvtGeometry *mSvtGeom;
174  StSvtHybridCollection *mDriftSpeedColl;
175  StSvtT0 *mT0;
176 
177 
179  StSvtData *mSvtSimPixelColl;
180  StSvtData *mSvt8bitPixelColl;
181  StSvtData *mSvtGeantHitColl;
182 
184  int *counter;
185  TFile *mNtFile;
186  TNtuple *mNTuple;
187 
188 
189 
190 
191  virtual const char* GetCVS() const
192  {static const char cvs[]="Tag $Name: $ $Id: StSvtSimulationMaker.h,v 1.19 2014/08/06 11:43:46 jeromel Exp $ built " __DATE__ " " __TIME__; return cvs;}
193 
194 
195 
196 };
197 
198 #endif
virtual Int_t Init()
inherited maker routines
void setSvtPixelData()
create output data and put them into the chain
virtual Int_t InitRun(int runumber)
all database dependent data are read here
SVT Slow Simulator Simulates hits in SVT based on geant data and database information.
StSvtSimulationMaker(const char *name="SvtSimulator")
the only place where electron cloud expansioin constants are set
void setElectronLifeTime(double tLife)
only these three constants influence the physics of electron cloud expansion
Int_t setOptions(int SigOption)
seting different options and configurations - for testing purposes
SVT electron cloud expansion routines Simulates electron cloud expansion inside of the silicon wafer...