StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StGammaMaker.h
1 // //
3 // StGammaMaker //
4 // //
5 // Michael Betancourt //
6 // Massachusetts Institute of Technology //
7 // //
8 // Wrapper for all things Gamma //
9 // //
10 // StGammaPythiaEventMaker //
11 // Gathers information from the PYTHIA and //
12 // GEANT records for later analysis. //
13 // //
14 // StGammaScheduleMaker //
15 // Sets the STAR database timestamp dynamically //
16 // while avoiding unnecessary database overhead //
17 // //
18 // StGammaEventMaker //
19 // Initializes a StGammaEvent and fills in //
20 // basic event information. Other StGamma //
21 // makers access this maker to contribute //
22 // further information. //
23 // //
24 // StGammaRawMaker //
25 // Accesses, processes, and stores raw //
26 // detector (BEMC, EEMC, and TPC) responses. //
27 // //
28 // StGammaCandidateMaker //
29 // Converts raw clusters into a unified object //
30 // (the StGammaCandidate). Associates with each //
31 // candidate all detector objects within the //
32 // cluster itself and within a surrounding cone //
33 // //
34 // StGammaTreeMaker //
35 // Creates and attends to a tree where each //
36 // StGammaEvent is stored //
37 // //
38 // //
39 // Original StGammaMaker concept and implementation //
40 // by Jason Webb (Valpo) and Pibero Djawatho (IUCF) //
41 // //
43 
44 #ifndef STAR_StGammaMaker
45 #define STAR_StGammaMaker
46 
47 #include "StMaker.h"
48 
49 #include "StGammaEventMaker.h"
50 #include "StGammaRawMaker.h"
51 #include "StGammaCandidateMaker.h"
52 #include "StGammaTreeMaker.h"
53 #include "StGammaPythiaEventMaker.h"
54 #include "StGammaScheduleMaker.h"
55 
56 #include "StBarrelEmcClusterMaker.h"
57 //#include "StEEmcPool/StEEmcClusterMaker/StEEmcGenericClusterMaker.h"
58 #include "StEEmcPool/StEEmcClusterMaker/StMyClusterMaker.h"
59 #include "StEEmcPool/StEEmcA2EMaker/StEEmcA2EMaker.h"
60 
61 #include "StSpinPool/StMCAsymMaker/StMCAsymMaker.h"
62 
63 #include "StMuDSTMaker/COMMON/StMuDstMaker.h"
64 
65 using namespace std;
66 
67 class StGammaMaker: public StMaker
68 {
69 
70  public:
71 
72  enum detectorSwitch { kBemc, kEemc, kBoth };
73  enum analysisType { kData, kSimu };
74 
75  StGammaMaker(const char *name = "gammaMaker", detectorSwitch detector = kBoth, analysisType analysis = kData);
76  ~StGammaMaker() {};
77 
78  virtual const char* GetCVS() const
79  {static const char cvs[] = "Tag $Name: $ $Id: StGammaMaker.h,v 1.6 2014/08/06 11:43:18 jeromel Exp $ built " __DATE__ " " __TIME__; return cvs; }
80 
81  // Required Maker Methods
82  Int_t Init();
83  void Clear(const Option_t* option = "") { StMaker::Clear(option); }
84  Int_t Make() { return kStOK; }
85  Int_t Finish() { return kStOK; }
86 
88  // Mutators //
90 
91  // Set StGammaTreeMaker parameters
92  void setOutputFile(const char *output) { mTreeMaker->SetFilename(output); }
93  void storeEmptyEvents() { mTreeMaker->storeEmptyEvents(); } // Be default empty events are skipped
94 
95  // Set StGammaCandidateMaker parameters
96  // MinimumEt defaults to 0.0
97  // Radius defaults to 0.7
98  // BSMD Range defaults to 0.05
99  // ESMD Range defaults to 20 cm
100  void setClusterEtThreshold(double threshold) { mCandidateMaker->SetMinimumEt(threshold); }
101  void setConeRadius(double radius) { mCandidateMaker->SetRadius(radius); }
102  void setBsmdRange(double range) { mCandidateMaker->SetBsmdRange(range); }
103  void setEsmdRange(double range) { mCandidateMaker->SetEsmdRange(range); }
104 
105  void useStrictBemcStatus() { mCandidateMaker->useStrictBemcStatus(); }
106 
107  // Set clustering thresholds
108  // In the BEMC
109  // Seed Energy Threshold defaults to 0.0
110  // Cluster Energy Threshold defaults to 0.0
111  // In the EEMC
112  // Seed Energy Threshold defaults to 0.8
113  // There is no cluster energy threshold
114  void setSeedEnergyThreshold(double threshold);
115  void setClusterEnergyThreshold(double threshold);
116 
117  // Set thresholds for adding tracks and towers to the StGammaEvent
118  // TrackCutoff defaults to 0.0
119  // TowerCutoff defaults to 0.0
120  void setTrackEtRawThreshold(double threshold) { mRawMaker->SetTrackCutoff(threshold); }
121  void setTowerEtRawThreshold(double threshold) { mRawMaker->SetTowerCutoff(threshold); }
122 
123  // Exclude any BEMC towers from the raw maker
124  void excludeBemcTower(int softId) { mRawMaker->excludeBemcTower(softId); }
125 
126  // Shift BEMC tower gain for systematic studies
127  void shiftBemcGains(double shift) { mRawMaker->shiftBemcGains(shift); }
128 
129  // Set threshold for including towers in the EEMC clustering
130  // MinimumEnergy defaults to 0.1
131  void setEemcTowerClusterThreshold(double threshold) { if(mUseEemc) mEemcClusterMaker->setMinimumEnergy(threshold); }
132 
133  // Add timestamps when running over simulation
134  void addTimestamp(int date, int time, double weight);
135 
136  // Add trigger Ids to be simulated if trigger emulation is in the chain
137  void addSimuTrigger(unsigned int triggerId) { mEventMaker->addSimuTrigger(triggerId); }
138 
139  private:
140 
141  bool mUseBemc;
142  bool mUseEemc;
143 
144  bool mSimu;
145 
146  StMuDstMaker *mMuDstMaker;
147  StEEmcA2EMaker *mEemcAnalysis;
148 
149  StGammaPythiaEventMaker *mPythiaMaker;
150  StMCAsymMaker *mAsymMaker;
151  StGammaScheduleMaker *mScheduleMaker;
152 
153  StGammaEventMaker *mEventMaker;
154  StGammaRawMaker *mRawMaker;
155 
156  StBarrelEmcClusterMaker *mBemcClusterMaker;
157  StMyClusterMaker *mEemcClusterMaker;
158 
159  StGammaCandidateMaker *mCandidateMaker;
160  StGammaTreeMaker *mTreeMaker;
161 
162  ClassDef(StGammaMaker, 1);
163 
164 };
165 
166 
167 #endif
Int_t Finish()
Definition: StGammaMaker.h:85
EEmc ADC –> energy maker.
virtual void Clear(Option_t *option="")
User defined functions.
Definition: StMaker.cxx:634
Int_t Make()
Definition: StGammaMaker.h:84
Definition: Stypes.h:40