00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049 #ifndef STAR_StSvtSimulationMaker
00050 #define STAR_StSvtSimulationMaker
00052 // //
00053
00054
00056 #ifndef StMaker_H
00057 #include "StMaker.h"
00058 #endif
00059
00060 #include "StThreeVector.hh"
00061
00062 class StChain;
00063 class TFile;
00064
00065 class TNtuple;
00066 class TString;
00067
00068
00069 class StSvtGeometry;
00070
00071 class StSvtHybridCollection;
00072 class StSvtData;
00073 class StSvtHybridData;
00074 class StSvtConfig;
00075 class StSvtGeantHits;
00076 class StSvtHybridPixelsC;
00077 class StSvtHybridPixelsD;
00078 class StSvtSimulation;
00079 class StSvtElectronCloud;
00080 class StSvtAngles;
00081 class StSvtWaferCoordinate;
00082 class StSvtCoordinateTransform;
00083 class StSvtT0;
00084
00095 class StSvtSimulationMaker : public StMaker
00096 {
00097 public:
00098 StSvtSimulationMaker(const char* name = "SvtSimulator");
00099 virtual ~StSvtSimulationMaker();
00100
00102 Int_t setOptions(int SigOption);
00103 Int_t setConst(double timBinSize, double anodeSize);
00104
00106 virtual Int_t Init();
00107 virtual Int_t Make();
00108 virtual void Clear(const char *opt);
00109 virtual Int_t Finish();
00110 virtual Int_t InitRun(int runumber);
00111 virtual Int_t FinishRun(int oldrunumber);
00112
00114 void setElectronLifeTime(double tLife);
00115 void setTrappingConst(double trapConst);
00116 void setDiffusionConst(double diffConst);
00117
00118 void setSvtPixelData();
00119 void setGeantData();
00120
00121 void resetPixelData();
00122
00123 void FillGeantHit(int barrel, int ladder, int wafer, int hybrid,
00124 StSvtWaferCoordinate* waferCoord,StThreeVector<double>* VecG,
00125 StThreeVector<double>* VecL, double peak,int idtrk);
00126
00127
00128 Int_t getConfig();
00129 Int_t getSvtGeometry();
00130 Int_t getSvtDriftSpeeds();
00131 Int_t getSvtT0();
00132 Int_t getPedestalOffset();
00133
00134
00135
00136 Int_t GetNumOfHybrids(){return mNumOfHybrids;}
00137 TNtuple* GetNTuple(){return mNTuple;}
00138
00139 private:
00140
00141 ClassDef(StSvtSimulationMaker,4)
00142
00143 Int_t ideal2RealTranslation(StThreeVector<double> *pos, StThreeVector<double> *mtm, double charge, int *wafId);
00144
00145
00146 double mLifeTime;
00147 double mTrapConst;
00148 double mDiffusionConst;
00149 double mTimeBinSize;
00150 double mAnodeSize;
00151 int mPedOffset;
00152
00153 Int_t mSigOption;
00154
00155 Int_t mNumOfHybrids;
00156 double mDefaultDriftVelocity;
00157 double mBField;
00158
00160 StSvtConfig *mConfig;
00161 Bool_t mDoEmbedding;
00162
00164 StSvtAngles *mSvtAngles;
00165 StSvtElectronCloud *mElectronCloud;
00166 StSvtSimulation *mSvtSimulation;
00167 StSvtCoordinateTransform *mCoordTransform;
00168
00169
00170 StSvtGeometry *mSvtGeom;
00171 StSvtHybridCollection *mDriftSpeedColl;
00172 StSvtT0 *mT0;
00173
00174
00176 StSvtData *mSvtSimPixelColl;
00177 StSvtData *mSvt8bitPixelColl;
00178 StSvtData *mSvtGeantHitColl;
00179
00181 int *counter;
00182 TFile *mNtFile;
00183 TNtuple *mNTuple;
00184
00185
00186
00187
00188 virtual const char* GetCVS() const
00189 {static const char cvs[]="Tag $Name: $ $Id: StSvtSimulationMaker.h,v 1.18 2007/12/24 17:37:20 fisyak Exp $ built "__DATE__" "__TIME__; return cvs;}
00190
00191
00192
00193 };
00194
00195 #endif