StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StGammaFilterMaker.h
1 // //
3 // StGammaFilterMaker //
4 // //
5 // Michael Betancourt //
6 // Massachusetts Institute of Technology //
7 // //
8 // Maker designed for use with StEvent to abort //
9 // events without clusters that would eventually //
10 // produce StGammaCandidates. The filter can be //
11 // run on either the BEMC or the EEMC. //
12 // //
13 // IMPORTANT: This code will not run with the default //
14 // BFC as the BFC does not load the StSpinPool //
15 // libraries. The BFC will fail if the "FiltGamma" //
16 // chain option is selected. Instead use //
17 // gammaFilterBfc.C, which wraps the BFC in a macro //
18 // providing the necessary shared libraries in //
19 // addition to chain manipulation. //
20 // //
22 
23 #ifndef STAR_StGammaFilterMaker
24 #define STAR_StGammaFilterMaker
25 
26 #include "StMaker.h"
27 
28 using namespace std;
29 
30 // Forward class declarations
31 class StEmcCollection;
32 class StEmcGeom;
33 class StEmcPosition;
35 class StMcCalorimeterHit;
36 class TVector3;
37 
38 class TFile;
39 class TTree;
40 class StPythiaEvent;
41 
42 // Calorimeter geometry globals
43 const unsigned int nModules = 120;
44 const unsigned int nBemcTowers = 4800;
45 
47 {
48 
49  public:
50 
51  StGammaFilterMaker(const char *name = "gammaFilterMaker");
53 
54  virtual Int_t Init();
55  virtual Int_t Make();
56  virtual Int_t Finish();
57  virtual void Clear(const Option_t* = "");
58 
59  virtual const char *GetCVS() const
60  {
61  static const char cvs[]=" StGammaFilterMaker.h, v1.0 2008/06/25 00:00:00 betan";
62  return cvs;
63  }
64 
65  void setThresholds(double seed, double cluster);
66  double BEMCSamplingMultiplier(double eta);
67 
68  Int_t makeBEMC(StMcEmcHitCollection *mcEmcCollection, double zVertex);
69 
70  private:
71 
72  TVector3 *mMomentum;
73 
74  // Filter thresholds
75  double mSeedEnergyThreshold;
76  double mClusterEtThreshold;
77 
78  StMcCalorimeterHit *mBemcTowerHits[nBemcTowers + 1];
79 
80  StEmcGeom *mBemcGeom;
81  StEmcPosition *mPosition;
82 
83  // Filter counters
84  bool mFirst;
85 
86  unsigned int mTotal;
87  unsigned int mAccepted;
88 
89  // Pythia output
90  TString mPythiaName;
91  TFile *mPythiaFile;
92  TTree *mPythiaTree;
93  StPythiaEvent *mPythiaEvent;
94 
95  void fStorePythia();
96 
97  ClassDef(StGammaFilterMaker, 0);
98 
99 };
100 
101 #endif