StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StRHICfRecoEnergy.h
1 #ifndef StRHICfRecoEnergy_hh
2 #define StRHICfRecoEnergy_hh
3 
4 #include <TROOT.h>
5 #include <TMath.h>
6 #include <TH2D.h>
7 
8 #include "StRoot/StRHICfUtil/StRHICfFunction.h"
9 
11 {
12  public:
15 
16  void init();
17  bool calculate();
18 
19  void setRunType(int runType);
20  void setPlateEnergy(int tower, int layer, double val);
21  void setResultHitPos(int tower, int xy, double val);
22  void setResultHitNum(int tower, int val);
23  void setMultiHitPos(int tower, int layer, int xy, int order, double val);
24  void setMultiPeakHeight(int tower, int layer, int xy, int order, double val);
25  void setOverlap(int tower, int xy, bool val);
26  void setLeakageInTable(int tower, int layer, TH2D* table);
27  void setLeakageOutTablePhoton(int tower, int layer, TH2D* table);
28  void setLeakageOutTableNeutron(int tower, TH2D* table);
29 
30  int getResultHitNum(int tower);
31  double getPlateSumEnergy(int tower, bool all=true);
32  double getResultEnergy(int tower, int particle);
33  double getEnergyRatio(int tower, int order);
34 
35  private:
36  void recoPhotonEnergySimple(int tower, double& energy);
37  void recoPhotonEnergySingle(int tower);
38  void recoPhotonEnergyDouble();
39  void recoHadronEnergy(int tower);
40  void correctLightYield();
41  void getCalibrationEnergy(int tower, double posX1, double posY1, double posX2=0., double posY2=0., double firstRatio=-999., double secondRatio=-999.);
42 
43  double getSumEnergy(int tower, int startIdx, int endIdx, double* energy);
44  double getPhotonEnergyConvert(int tower, double sumEnergy);
45  double getHadronEnergyConvert(int tower, double sumEnergy);
46  double getLeakageInPhoton(int tower, int layer, double x, double y);
47  double getLeakageOutPhoton(int tower, int layer, double x, double y);
48  double getLeakageOutNeutron(int tower, double x, double y);
49 
50  TH2D* mLeakInTablePhoton[kRHICfNtower][kRHICfNplate];
51  TH2D* mLeakOutTablePhoton[kRHICfNtower][kRHICfNplate];
52  TH2D* mLeakOutTableNeutron[kRHICfNtower];
53 
54  int mRunType;
55  int mRecoHitNum[kRHICfNtower];
56  bool mOverlap[kRHICfNtower][kRHICfNxy];
57 
58  double mRecoHitPos[kRHICfNtower][kRHICfNxy];
59  double mMultiHitPos[kRHICfNtower][kRHICfNorder][kRHICfNxy][kRHICfNorder];
60  double mMultiPeakHeight[kRHICfNtower][kRHICfNorder][kRHICfNxy][kRHICfNorder];
61  double mPlateE[kRHICfNtower][kRHICfNplate];
62  double mPlateECorr[kRHICfNtower][kRHICfNplate];
63  double mSumEnergy[kRHICfNtower][kRHICfNorder];
64  double mResultEnergy[kRHICfNtower][kRHICfNorder];
65  double mEnergyRatio[kRHICfNtower][kRHICfNorder];
66 
67  const double mEnergyThreshold = 10.0;
68 };
69 
70 #endif