AMSDST
myEcalShowerPlus.h
Go to the documentation of this file.
1 // Authors: M.Duranti - INFN di Perugia
2 #ifndef myEcalShowerPlus_h
3 #define myEcalShowerPlus_h
4 
5 #include <map>
6 #include "myEcalShowerBase.h"
7 
8 #ifdef _WITHGBATCH_
9 #define ECALBDT
10 #define ECALESE
11 #define ECALAXIS
12 #endif //#ifdef _WITHGBATCH_
13 
14 //---------------------------------------------
15 
16 struct ecalhit {
17  UInt_t Status;
18  Double32_t ADC[3];
19  Double32_t Edep;
20 };
21 
23  public:
28 
29  protected:
30  std::map<short int, ecalhit> _ecalhitmap;
31 
32  public:
33  inline short int ComputeIndex(short int Cell, short int Plane){ return Cell + 100*Plane; }
34 
35  inline short int GetPlane(short int index) { return ((short int)(index/100)); };
36  inline short int GetCell(short int index) { return ((short int)(index%100)); };
37 
38  Float_t Energy3C[3];
39 
40  Float_t Elayer[18];
41  Float_t Elayer_corr[18];
42 
43  Float_t EcalAxis_chi2_2[18];
44  Float_t EcalAxis_chi2_8[18];
45 
46  Float_t BDT;
47  Float_t BDTs;
48  Float_t BDTE;
49  Float_t BDTEs;
50  Float_t BDT_v4;
51  Float_t BDTChi2;
52  Float_t BDTChi2s;
53  Float_t BDTChi2E;
54  Float_t BDTChi2Es;
55  Float_t BDTChi2_v2;
56 
57  Float_t ESEV2;
58  Float_t ESEV3;
59 
60 
61  Float_t ESEv3Efficiency;
62  Float_t ESEv3Rejection;
63 
73  float RecomputeBDT();
74 
91  float GetEcalBDT(unsigned int iBDTVERSION=5, int TMVAClassifier=0, int EnergyFlag=0);
97  float GetEcalBDTCHI2(unsigned int iBDTVERSION=3, int TMVAClassifier=0, int EnergyFlag=0);
98 
99  float EdepUpToLayer(int ilay);
100  float EdepUpToSuperLayer(int islay);
101 
103  float GetEcalHitADC(short int Cell, short int Plane, int component);
105  float GetEcalHitEdep(short int Cell, short int Plane);
107  unsigned int GetEcalHitStatus(short int Cell, short int Plane);
108 
110  typedef float CellArray[18][72];
111  typedef UInt_t CellStatusArray[18][72];
112  typedef float PMTArray[18][72];
113  void exportCell(float cell_arr[18][72], CellType type=EDEP);
114  void exportCellStatus(UInt_t cell_status_arr[18][72]);
115  void exportPMTADCDynode(float pmt_arr[9][36]);
116 
117  virtual void Clear(Option_t* option="");
118  private:
119  virtual void init();
120 
121  public:
123  protected:
124 #if 0
125  float edep[18][72];
126  float adc_highgain[18][72];
127  float adc_lowgain[18][72];
128  float adc_dynode[9][36];
129  float adc_dynodeC[18][72];
130  UInt_t cell_status[18][72];
131  void sync();
132 #endif
133 };
134 
135 #ifdef _WITHGBATCH_
136 
137 class myEcalShowerPlusFiller: public myEcalShowerPlus {
138  public:
140  myEcalShowerPlusFiller();
142  ~myEcalShowerPlusFiller();
143 
144  EcalShowerR* shower;
145 
146  void AddResults(EcalHitR* hit);
147 
148  virtual void Fill(EcalShowerR* _shower, bool kShort=false);
149 
150  virtual void Clear(Option_t* option="");
151 
152  private:
153  virtual void init();
154 
155  public:
156  ClassDef(myEcalShowerPlusFiller,1);
157 };
158 
159 #endif //#ifdef _WITHGBATCH_
160 
161 #endif