StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StGammaRawMaker.h
1 // //
3 // StGammaRawMaker //
4 // //
5 // Process and store raw detector information //
6 // //
7 // Original concept and implementation by Jason //
8 // Webb (Valpo) and Pibero Djawatho (IUCF) //
9 // //
11 
12 #ifndef STAR_StGammaRawMaker
13 #define STAR_StGammaRawMaker
14 
15 #include "StMaker.h"
16 
17 #include "StGammaTrack.h"
18 #include "StGammaTower.h"
19 #include "StGammaStrip.h"
20 #include "StGammaEvent.h"
21 #include "StGammaEventMaker.h"
22 
23 #include "StEmcUtil/database/StBemcTables.h"
24 #include "StEEmcUtil/EEmcGeom/EEmcGeomDefs.h"
25 
26 #include <vector>
27 
28 class EEmcGeomSimple;
29 class StBemcTables;
30 class StMuTrack;
31 
32 class StGammaRawMaker: public StMaker
33 {
34 
35  public:
36 
37  StGammaRawMaker(const char *name = "gammaRawMaker");
38  ~StGammaRawMaker();
39 
40  virtual const char* GetCVS() const
41  {static const char cvs[] = "Tag $Name: $ $Id: StGammaRawMaker.h,v 1.9 2014/08/06 11:43:18 jeromel Exp $ built " __DATE__ " " __TIME__; return cvs; }
42 
43  // Required Maker Methods
44  Int_t Init();
45  Int_t Make();
46  Int_t Finish() { return kStOK; }
47  void Clear(Option_t *opts="");
48 
49  // Accessors
50  const StGammaTrackVec_t &tracks(){ return mTracks; }
51  const StGammaTowerVec_t &towers(){ return mTowers; }
52  const StGammaTowerVec_t &preshower1(){ return mPreshower1; }
53  const StGammaTowerVec_t &preshower2(){ return mPreshower2; }
54  const StGammaTowerVec_t &postshower(){ return mPostshower; }
55  const StGammaStripVec_t &strips(){ return mStrips; }
56 
57  StGammaTower *tower(Int_t id, Int_t layer);
58  StGammaStrip *strip(Int_t sector, Int_t plane, Int_t index);
59 
60  // Mutators
61  void SetTowerCutoff( Float_t t );
62  void SetTrackCutoff( Float_t t );
63 
64  void useBemc() { mUseBemc = true; }
65  void useEemc() { mUseEemc = true; }
66 
67  void AddEtaStrip(StGammaStrip *strip);
68  void AddPhiStrip(StGammaStrip *strip);
69 
70  void excludeBemcTower(int softId) { mExcludedBemcTowers.push_back(softId); }
71  void shiftBemcGains(double shift) { mBemcGainShift = shift; }
72 
73  protected:
74 
75  Float_t mTowerCutoff;
76  Float_t mTrackCutoff;
77 
78  StGammaTrackVec_t mTracks; // stores all tracks which pass QA
79  StGammaTowerVec_t mTowers; // stores all towers which pass QA
80  StGammaStripVec_t mStrips; // stores all strips which pass QA
81 
82  StGammaTowerVec_t mPreshower1;
83  StGammaTowerVec_t mPreshower2;
84  StGammaTowerVec_t mPostshower;
85 
86  void GetTracks();
87  void GetBarrel();
88  void GetEndcap();
89 
90  Bool_t Accept( StGammaTrack &track );
91  Bool_t Accept( StGammaTower &tower );
92  Bool_t Accept( StGammaStrip &strip );
93  Bool_t Accept( StMuTrack *track );
94 
95  EEmcGeomSimple *mEEmcGeometry;
96 
97  StBemcTables *mTables;
98  Bool_t mCorrupt;
99 
100  // store pointers to towers and strips for easier matching to clusters
101  StGammaTower *mEEtowers[ kEEmcNumSectors * kEEmcNumSubSectors * kEEmcNumEtas ][ 4 ];
102  StGammaStrip *mEEstrips[ kEEmcNumSectors ][ kEEmcNumSmdUVs ][ kEEmcNumStrips ];
103 
104  StGammaTower* mBarrelEmcTower[4801];
105  StGammaTower* mBarrelEmcPreshower[4801];
106 
107  map<int, StGammaStrip*> mBarrelSmdEtaStrip;
108  map<int, StGammaStrip*> mBarrelSmdPhiStrip;
109 
110  private:
111 
112  bool mUseBemc;
113  bool mUseEemc;
114 
115  double mBemcGainShift;
116 
117  vector<int> mExcludedBemcTowers;
118 
119  StMuDstMaker *mMuDstMaker;
120  StGammaEventMaker *mGammaMaker;
121  StGammaEvent *mGammaEvent;
122 
123  ClassDef(StGammaRawMaker, 3);
124 
125 };
126 
127 inline void StGammaRawMaker::SetTowerCutoff(Float_t t){ mTowerCutoff = t; }
128 inline void StGammaRawMaker::SetTrackCutoff(Float_t t){ mTrackCutoff = t; }
129 
130 #endif
void Clear(Option_t *opts="")
User defined functions.
EEMC simple geometry.
Definition: Stypes.h:40