StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StPxlFastSim.h
1 /*
2  * $Id: StPxlFastSim.h,v 1.8 2017/10/19 19:38:17 jeromel Exp $
3  *
4  * Author: M. Mustafa
5  *
6  *
7  **********************************************************
8  * $Log: StPxlFastSim.h,v $
9  * Revision 1.8 2017/10/19 19:38:17 jeromel
10  * Merging PXL201709UPD back to MAIN
11  *
12  * Revision 1.7.8.1 2017/09/11 19:20:54 jeromel
13  * No changes, checking branch
14  *
15  * Revision 1.7 2015/03/13 18:45:01 perev
16  * Roll back
17  *
18  * Revision 1.5 2015/01/27 01:31:09 smirnovd
19  * Minor refactoring of StPxlFastSim::distortHit() to include a new warning for unphysical hit position
20  *
21  * Revision 1.4 2014/08/06 11:43:35 jeromel
22  * Suffix on literals need to be space (later gcc compiler makes it an error) - first wave of fixes
23  *
24  * Revision 1.3 2014/03/13 17:00:19 mstftsm
25  * StPxlSimMaker has a method to switch on random seed for StRandom generatos in simulators. Default is not a random seed.
26  *
27  * Revision 1.1 2013/05/12 21:43:33 jeromel
28  * Initial revision, code peer review closed 2013/05/06
29  *
30  * Revision 1.4 2013/05/03 15:08:19 mstftsm
31  *
32  */
33 
48 #ifndef STAR_StPxlFastSim
49 #define STAR_StPxlFastSim
50 
51 #include "StPxlISim.h"
52 class StRandom;
53 class StPxlDb;
54 class TObjectSet;
55 
56 class StPxlFastSim: public StPxlISim
57 {
58  public:
59 
61  StPxlFastSim(const Char_t *name="pxlFastSim",Bool_t randomSeed=kFALSE): StPxlISim(name), mPxlDb(0), mRandom(0), mResXPix(0), mResYPix(0), mResZPix(0), mUseRandomSeed(randomSeed) {}
62 
66  ~StPxlFastSim();
67 
68 
74  Int_t initRun(const TDataSet& calib_db, const TObjectSet* pxlDbDataSet,const Int_t run);
75 
83 
88  virtual const char *GetCVS() const
89  {static const char cvs[]="Tag $Name: $ $Id: StPxlFastSim.h,v 1.8 2017/10/19 19:38:17 jeromel Exp $ built " __DATE__ " " __TIME__ ; return cvs;}
90 
91  private:
92  //Routine to smear hit by resolution with gaussian, mean zero and width res.
93  double distortHit(const double x, const double res, const double constraint) const;
94 
95  void localToMatser(Double_t* local,Double_t* master,Int_t sector,Int_t ladder,Int_t sensor);
96 
97  private:
98  StPxlDb* mPxlDb;
99  StRandom* mRandom;
100 
101  Double_t mResXPix;
102  Double_t mResYPix;
103  Double_t mResZPix;
104 
105  Bool_t mUseRandomSeed;
106 };
107 #endif
108 /*
109  * $Id: StPxlFastSim.h,v 1.8 2017/10/19 19:38:17 jeromel Exp $
110  *
111  * Author: M. Mustafa
112  *
113  *
114  **********************************************************
115  * $Log: StPxlFastSim.h,v $
116  * Revision 1.8 2017/10/19 19:38:17 jeromel
117  * Merging PXL201709UPD back to MAIN
118  *
119  * Revision 1.7.8.1 2017/09/11 19:20:54 jeromel
120  * No changes, checking branch
121  *
122  * Revision 1.7 2015/03/13 18:45:01 perev
123  * Roll back
124  *
125  * Revision 1.5 2015/01/27 01:31:09 smirnovd
126  * Minor refactoring of StPxlFastSim::distortHit() to include a new warning for unphysical hit position
127  *
128  * Revision 1.4 2014/08/06 11:43:35 jeromel
129  * Suffix on literals need to be space (later gcc compiler makes it an error) - first wave of fixes
130  *
131  * Revision 1.3 2014/03/13 17:00:19 mstftsm
132  * StPxlSimMaker has a method to switch on random seed for StRandom generatos in simulators. Default is not a random seed.
133  *
134  * Revision 1.1 2013/05/12 21:43:33 jeromel
135  * Initial revision, code peer review closed 2013/05/06
136  *
137  * Revision 1.4 2013/05/03 15:08:19 mstftsm
138  *
139  */
140 
Int_t addPxlHits(const StMcPxlHitCollection &, StPxlHitCollection &)
creates an StPxlHit object for every StMcPxlHit, and fills the hit StPxlHitCollection container...
StPxlFastSim(const Char_t *name="pxlFastSim", Bool_t randomSeed=kFALSE)
Constructor.
Definition: StPxlFastSim.h:61
Int_t initRun(const TDataSet &calib_db, const TObjectSet *pxlDbDataSet, const Int_t run)
A random seed is passed to mRandom PXL smearing resolutions (PixelHitError) are fetched from calib_db...
~StPxlFastSim()
This class does not own any hit containers. mRandom is deleted here.
An abstract class (interface) for all PXL simulation algorithms.
Definition: StPxlISim.h:21
virtual const char * GetCVS() const
Documentation method. GetCVS can be called from the chain, providing a list of all maker versions in ...
Definition: StPxlFastSim.h:88
Class to simulate PXL hits from Monte Carlo.
Definition: StPxlFastSim.h:56