StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StPxlSimMaker.h
1 /*
2  * $Id: StPxlSimMaker.h,v 1.11 2017/11/08 23:14:36 smirnovd Exp $
3  *
4  * Author: M. Mustafa
5  *
6  *
7  **********************************************************
8  * $Log: StPxlSimMaker.h,v $
9  * Revision 1.11 2017/11/08 23:14:36 smirnovd
10  * StPxlSimMaker: Don't generate ROOT streamer. Makers are not persistent
11  *
12  * Revision 1.10 2016/04/13 19:15:06 mstftsm
13  * The choice of geometry should be mutually exclusive
14  *
15  * streamline inlined methods and define them outside the header
16  *
17  * Use one flag to control geometry source
18  *
19  * Use fundamental C++ types; this is not a persistent class
20  *
21  * Fix a logic bug
22  *
23  * fix bug: missing inline keyword
24  *
25  * The choice of geometry source shoule be mutually exclusive
26  *
27  * Revision 1.9 2015/03/13 18:45:01 perev
28  * Roll back
29  *
30  * Revision 1.7 2014/08/06 11:43:35 jeromel
31  * Suffix on literals need to be space (later gcc compiler makes it an error) - first wave of fixes
32  *
33  * Revision 1.6 2014/07/17 01:47:43 mstftsm
34  * Fix a bug in creating a new StPxlHitCollection.
35  * Random seed is set to default.
36  * DB geometry is set to default.
37  *
38  * Revision 1.5 2014/07/03 19:46:37 mstftsm
39  * Revereted the changes made for the pileup adder. That does not belong to the master branch.
40  *
41  * Revision 1.3 2014/03/13 17:00:19 mstftsm
42  * StPxlSimMaker has a method to switch on random seed for StRandom generatos in simulators. Default is not a random seed.
43  *
44  * Revision 1.1 2013/05/12 21:43:33 jeromel
45  * Initial revision, code peer review closed 2013/05/06
46  *
47  * Revision 1.4 2013/05/03 15:08:19 mstftsm
48  *
49  */
50 
64 #ifndef STAR_StPxlSimMaker
65 #define STAR_StPxlSimMaker
66 
67 #ifndef StMaker_H
68 #include "StMaker.h"
69 #endif
70 
71 class StPxlISim;
72 
73 class StPxlSimMaker : public StMaker
74 {
75  public:
76 
79  StPxlSimMaker(const Char_t *name="pxlSimMaker");
80 
83  virtual ~StPxlSimMaker();
84 
85 
90  virtual Int_t Make();
91 
94  virtual Int_t Init();
95 
98  virtual Int_t InitRun(Int_t);
99 
100  void useDIGMAPSSim();
101  void useIdealGeom(bool ideal = true);
102  void useDbGeom(bool db = true);
103  void useRandomSeed(bool use = true);
104 
108  virtual const char *GetCVS() const
109  {static const char cvs[]="Tag $Name: $ $Id: StPxlSimMaker.h,v 1.11 2017/11/08 23:14:36 smirnovd Exp $ built " __DATE__ " " __TIME__ ; return cvs;}
110 
111 private:
112  StPxlISim* mPxlSimulator;
113 
114  bool mUseFastSim;
115  bool mUseDIGMAPSSim;
116 
117  bool mUseDbGeom;
118  bool mUseRandomSeed;
119 
120 
121  ClassDef(StPxlSimMaker, 0) //StAF chain virtual base class for Makers
122 };
123 inline void StPxlSimMaker::useDIGMAPSSim() {SetAttr("useDIGMAPSSim",true);}
124 inline void StPxlSimMaker::useIdealGeom(bool ideal) { useDbGeom(!ideal); }
125 inline void StPxlSimMaker::useDbGeom(bool db) {mUseDbGeom = db;}
126 inline void StPxlSimMaker::useRandomSeed(bool use) {mUseRandomSeed = use;}
127 #endif
128 
129 /*
130  * $Id: StPxlSimMaker.h,v 1.11 2017/11/08 23:14:36 smirnovd Exp $
131  *
132  *
133  **********************************************************
134  * $Log: StPxlSimMaker.h,v $
135  * Revision 1.11 2017/11/08 23:14:36 smirnovd
136  * StPxlSimMaker: Don't generate ROOT streamer. Makers are not persistent
137  *
138  * Revision 1.10 2016/04/13 19:15:06 mstftsm
139  * The choice of geometry should be mutually exclusive
140  *
141  * streamline inlined methods and define them outside the header
142  *
143  * Use one flag to control geometry source
144  *
145  * Use fundamental C++ types; this is not a persistent class
146  *
147  * Fix a logic bug
148  *
149  * fix bug: missing inline keyword
150  *
151  * The choice of geometry source shoule be mutually exclusive
152  *
153  * Revision 1.9 2015/03/13 18:45:01 perev
154  * Roll back
155  *
156  * Revision 1.7 2014/08/06 11:43:35 jeromel
157  * Suffix on literals need to be space (later gcc compiler makes it an error) - first wave of fixes
158  *
159  * Revision 1.6 2014/07/17 01:47:43 mstftsm
160  * Fix a bug in creating a new StPxlHitCollection.
161  * Random seed is set to default.
162  * DB geometry is set to default.
163  *
164  * Revision 1.5 2014/07/03 19:46:37 mstftsm
165  * Revereted the changes made for the pileup adder. That does not belong to the master branch.
166  *
167  * Revision 1.3 2014/03/13 17:00:19 mstftsm
168  * StPxlSimMaker has a method to switch on random seed for StRandom generatos in simulators. Default is not a random seed.
169  *
170  * Revision 1.1 2013/05/12 21:43:33 jeromel
171  * Initial revision, code peer review closed 2013/05/06
172  *
173  * Revision 1.4 2013/05/03 15:08:19 mstftsm
174  *
175  */
176 
virtual Int_t Make()
calls the StPxlISim methods.
StPxlSimMaker(const Char_t *name="pxlSimMaker")
Constructor uses standard Maker text naming convention, with value "pxlSimMaker". ...
virtual const char * GetCVS() const
Documentation method. GetCVS can be called from the chain, providing a list of all maker versions in ...
virtual ~StPxlSimMaker()
StEvent will own any hits created by this maker, and is responsible for cleanup.
maker for all PXL simulators
Definition: StPxlSimMaker.h:73
virtual Int_t InitRun(Int_t)
gets the DB and initializes StPxlISim for this run.
An abstract class (interface) for all PXL simulation algorithms.
Definition: StPxlISim.h:21
virtual Int_t Init()
checks if other simulators have been requested and initializes StPxlISim accordingly.