StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StEmcCalibrationMaker.h
1 #ifndef STAR_StEmcCalibrationMaker
2 #define STAR_StEmcCalibrationMaker
3 
4 #include <TH2.h>
5 #include <TH1.h>
6 #include <TString.h>
7 
8 #include <StMaker.h>
9 
10 class StEvent;
11 class StEmcCollection;
12 class StEmcFilter;
13 class StEmcPosition;
14 class StEmcGeom;
15 class StEmcCluster;
16 class StTrack;
17 class StBemcData;
18 
19 #define MAXTRACK 10000
20 #define MAXBEMC 4
21 #define MAXCHANNEL 18000
22 
24 {
25  private:
26  short mADC[MAXBEMC][MAXCHANNEL];
27  short mADCPedSub[MAXBEMC][MAXCHANNEL];
28  float mPed[MAXBEMC][MAXCHANNEL];
29  float mPedRms[MAXBEMC][MAXCHANNEL];
30  unsigned char mCap[MAXBEMC][MAXCHANNEL];
31  unsigned char mNTracksTower[MAXCHANNEL];
32  bool mIsIsolatedTower[MAXCHANNEL];
33  bool mHasDetector[MAXBEMC];
34 
35  int mNChannel[MAXBEMC];
36 
37  StTrack *mTrack[MAXTRACK];
38  float mTrackP[MAXTRACK];
39  float mTrackPt[MAXTRACK];
40  short mTrackTower[MAXTRACK];
41  short mTrackTowerExit[MAXTRACK];
42  short mTrackNPoints[MAXTRACK];
43  int mNTracks;
44  bool mL3Tracks;
45  bool mIsTriggerOk;
46 
47  float mVx;
48  float mVy;
49  float mVz;
50 
51  long mCTBSum;
52  long mZDCSum;
53 
54  StEvent *mStEvent;
55  StBemcData *mBemcData;
56  StEmcCollection *mEmcCol;
57  StEmcGeom *mGeom[MAXBEMC];
58  StEmcPosition *mPosition;
59 
60  bool mDebug;
61 
62  float mField;
63 
64  void fillEmcArrays();
65  void fillTrackArrays();
66 
67 
68  public:
69 
70  StEmcCalibrationMaker(const char *name="Calib");
71  virtual ~StEmcCalibrationMaker();
72  virtual Int_t Init();
73  virtual Int_t Make();
74  virtual Int_t Finish();
75  virtual void zeroAll();
76 
77  int getADC(int det,int id) { return (int)mADC[det-1][id-1]; }
78  int getADCPedSub(int det,int id) { return (int)mADCPedSub[det-1][id-1]; }
79  int getPed(int det,int id) { return (int)mPed[det-1][id-1]; }
80  float getPedRms(int det,int id) { return mPedRms[det-1][id-1]; }
81  unsigned int getCap(int det,int id) { return (unsigned int)mCap[det-1][id-1]; }
82  int getNTracksInTower(int id) { return (int)mNTracksTower[id-1]; }
83  bool isIsolatedTower(int id) { return mIsIsolatedTower[id-1]; }
84  bool hasDetector(int det) { return mHasDetector[det-1];}
85 
86  float getTrackP(int track) { return mTrackP[track]; }
87  float getTrackPt(int track) { return mTrackPt[track]; }
88  int getTrackNPoints(int track) { return (int)mTrackNPoints[track]; }
89  int getTrackTower(int track) { return (int)mTrackTower[track]; }
90  int getTrackTowerExit(int track) { return (int)mTrackTowerExit[track]; }
91  StTrack* getTrack(int track) { return mTrack[track]; }
92  int getNTracks() { return mNTracks; }
93  bool isL3() { return (int)mL3Tracks; }
94  bool isTriggerOk() { return mIsTriggerOk;}
95  float vx() { return mVx; }
96  float vy() { return mVy; }
97  float vz() { return mVz; }
98  float field() { return mField; }
99  StEvent* event() { return mStEvent; }
100  StEmcCollection* emc() { return mEmcCol; }
101  long getCTBSum() { return mCTBSum;}
102  long getZDCSum() { return mZDCSum;}
103 
104  void makeStatus(bool,bool,bool,bool);
105 
106 
107  ClassDef(StEmcCalibrationMaker, 1)
108 };
109 
110 #endif