StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StPxlDigmapsSim.h
1 /*
2  * Author: M. Mustafa
3  *
4  */
13 #ifndef STAR_StPxlDigmapsSim
14 #define STAR_StPxlDigmapsSim
15 
16 #include "StPxlUtil/StPxlConstants.h"
17 #include "StPxlISim.h"
18 #include "TVector3.h"
19 class StPxlDb;
20 class StMcPxlHit;
21 class StMcTrack;
22 class TObject;
23 class TRandom3;
24 class TF1;
25 class DIGPlane;
26 class DIGADC;
27 class DIGTransport;
28 class DIGEvent;
29 
31 {
32  public:
33 
34  StPxlDigmapsSim(const Char_t *name = "pxlDigmapsSim");
38  virtual ~StPxlDigmapsSim();
39 
42  virtual int initRun(TDataSet const& calib_db, TObjectSet const* pxlDbDataSet, Int_t run);
43 
46  void setSeed(unsigned int seed) { mOwnRndSeed = seed; }
47 
51  virtual const char *GetCVS() const
52  {
53  static const char cvs[] = "Tag $Name: $ $Id: StPxlDigmapsSim.h,v 1.3 2018/03/15 21:37:42 dongx Exp $ built " __DATE__ " " __TIME__ ;
54  return cvs;
55  }
56 
57  private:
60  void fillDigmapsEvent(int, StMcPxlHit const*, DIGEvent&) const;
63  void calculateIncidencePositions(int, StMcPxlHit const*, TVector3&, TVector3&) const;
67  float calculateDepositedEnergy(float totalLength, float betagamma) const;
70  float betaGamma(StMcTrack const*) const;
74  double dEdxvsBGNorm(double* x, double* par);
77  bool goodPixel(int sec, int lad, int sen, int ix, int iy) const;
80  bool goodSensor(int sec, int lad, int sen) const;
87  virtual int addPxlRawHits(StMcPxlHitCollection const& in, StPxlRawHitCollection& out);
88 
90  TRandom3* mRndGen;
91  unsigned int mOwnRndSeed;
92 
93  DIGPlane* mDigPlane;
94  DIGADC* mDigAdc;
95  DIGTransport* mDigTransport;
96 
97  StPxlDb* mPxlDb;
98 
100  short mSensorGoodStatusMin;
101  short mSensorGoodStatusMax;
102 
104  short mRowColumnGoodStatus;
105 
107  float mEnergyLandauMean;
108  float mEnergyLandauSigma;
109  double mScalePar[10]; // parameters to function mdEdxvsBGNorm
110 
111  float mResAddX; // additional resolution contribution from mechanical vibration and calibration precision
112  float mResAddZ; // additional resolution contribution from mechanical vibration and calibration precision
113  // These two offset values are initialized per run according to the resolution above, fixed for each sensor in each run
114  float mOffsetX[kNumberOfPxlSectors][kNumberOfPxlLaddersPerSector][kNumberOfPxlSensorsPerLadder];
115  float mOffsetZ[kNumberOfPxlSectors][kNumberOfPxlLaddersPerSector][kNumberOfPxlSensorsPerLadder];
116  TF1* mdEdxvsBGNorm; // dEdx vs. beta*gamma function normalized to MIP - for momentum and particle species depenence
117  //
118  short mHitEffMode;
119  float mMomCut; // momentum cut for momentum depenent efficiency
120  float mHitEffInner; // single hit efficiency - 0.97 (best knowledge seen from ZF cosmic ray test)
121  float mHitEffOuter; // single hit efficiency - 0.97 (best knowledge seen from ZF cosmic ray test)
122 };
123 #endif
Definition: digadc.h:36
virtual int initRun(TDataSet const &calib_db, TObjectSet const *pxlDbDataSet, Int_t run)
initRun function to read in DB entries for slow simulator parameters and masking tables.
Monte Carlo Track class All information on a simulated track is stored in this class: kinematics...
Definition: StMcTrack.hh:144
void setSeed(unsigned int seed)
set own random seed if needed, default to use gRandom
virtual const char * GetCVS() const
Documentation method. GetCVS can be called from the chain, providing a list of all maker versions in ...
STAR wrapper for DIGMAPS package.
An abstract class (interface) for all PXL simulation algorithms.
Definition: StPxlISim.h:21
virtual ~StPxlDigmapsSim()
This class does not own any hit containers. mRandom is deleted here.