StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StEmcOfflineCalibrationMaker.h
1 /*
2  * StEmcOfflineCalibrationMaker.h
3  * Update author: J. Kevin Adkins, University of Kentucky
4  * June 15, 2014
5  */
6 
7 #ifndef STAR_StEmcOfflineCalibrationMaker
8 #define STAR_StEmcOfflineCalibrationMaker
9 
10 class TFile;
11 class TTree;
12 class TH2F;
13 
18 
19 class StMuDstMaker;
20 class StEmcADCtoEMaker;
21 class StTriggerSimuMaker;
22 
23 class StBemcTables;
24 class StEmcGeom;
25 class StEmcPosition;
26 class StEmcCollection;
27 class StMuTrack;
28 
29 #include "StMaker.h"
30 
32 {
33 private:
34  const char* filename;
35  TFile* myFile;
36  TTree* calibTree;
37  TH2F *mapcheck, *towerSlopes, *preshowerSlopes, *smdeSlopes, *smdpSlopes;
39 
40  StMuDstMaker* muDstMaker;
41  StEmcADCtoEMaker* mADCtoEMaker;
42  StTriggerSimuMaker* emcTrigSimu;
43  StBemcTables* mTables;
44  StEmcPosition* mEmcPosition;
45  StEmcCollection* mEmcCollection;
46  StEmcGeom* mEmcGeom;
47  StEmcGeom* mSmdEGeom;
48  StEmcGeom* mSmdPGeom;
49 
50  vector<UInt_t> mbTriggers;
51  vector<UInt_t> htTriggers;
52 
53  Int_t mHT0threshold;
54  Int_t mHT1threshold;
55  Int_t mHT2threshold;
56  Int_t mHT3threshold;
57 
58  //tower info (0==BTOW, 1==BPRS, 2=BSMDE, 3=BSMDP)
59  Int_t mADC[2][4800];
60  Int_t mADCSmd[2][18000];
61  Float_t mPedestal[2][4800];
62  Float_t mPedRMS[2][4800];
63  Float_t mPedestalSmd[2][18000];
64  Float_t mPedRMSSmd[2][18000];
65  Int_t mStatus[2][4800];
66  Int_t mStatusSmd[2][18000];
67  UChar_t mCapacitor[4800]; //only for BPRS
68  UChar_t mCapacitorSmd[2][18000];
69 
70  void getADCs(Int_t det); //1==BTOW, 2==BPRS, 3=BSMDE, 4=BSMDP
71  pair<Int_t, pair<Float_t,Float_t> > getTrackTower(const StMuTrack* track, Bool_t useExitRadius=false, Int_t det=1);
72  Float_t getTrackDeltaR(Float_t track_eta, Float_t track_phi, Int_t id);
73  pair<Float_t, Float_t> getTrackDetaDphi(Float_t track_eta, Float_t track_phi, Int_t id, Int_t det);
74  double highestNeighbor(Int_t id);
75 
76  public:
77  StEmcOfflineCalibrationMaker(const char* name="btowCalibMaker", const char* file="test.root");
79 
80  virtual Int_t Init();
81  virtual Int_t Make();
82  virtual Int_t InitRun(Int_t run);
83  virtual Int_t Finish();
84  virtual void Clear(Option_t* option="");
85 
86  void addHighTowerTrigger(UInt_t trigId);
87 
88  ClassDef(StEmcOfflineCalibrationMaker, 5);
89 };
90 
91 #endif
virtual void Clear(Option_t *option="")
User defined functions.