ShowerLID.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // \file ShowerLID.h
3 // \brief A Shower class that records the log likelihood information
4 // for every shower.
5 // \version
6 // \author Kanika Sachdev (ksachdev@physics.umn.edu)
7 ////////////////////////////////////////////////////////////////////////
8 #ifndef SHOWERLID_H
9 #define SHOWERLID_H
10 
11 #include "RecoBase/PID.h"
12 
13 #include <string>
14 #include <map>
15 
16 namespace slid
17 {
18 
19  class ShowerLID : public rb::PID
20  {
21  public:
22 
23  inline ShowerLID();
25 #ifndef __GCCXML__
26  ShowerLID( const rb::PID & pid);
27 
28 
29  /// Setters
30  void SetValWithE (float in) { fPIDWithE = in; }
31  void SetEGLLL (float in) { fEGLLL = in; }
32  void SetEGLLT (float in) { fEGLLT = in; }
33  void SetEMuLLL (float in) { fEMuLLL = in; }
34  void SetEMuLLT (float in) { fEMuLLT = in; }
35  void SetEPi0LLL (float in) { fEPi0LLL = in; }
36  void SetEPi0LLT (float in) { fEPi0LLT = in; }
37  void SetEPLLL (float in) { fEPLLL = in; }
38  void SetEPLLT (float in) { fEPLLT = in; }
39  void SetENLLL (float in) { fENLLL = in; }
40  void SetENLLT (float in) { fENLLT = in; }
41  void SetEPiLLL (float in) { fEPiLLL = in; }
42  void SetEPiLLT (float in) { fEPiLLT = in; }
43  void SetGap (float in) { fGap = in; }
44  void SetPi0mass (float in) { fPi0mass = in; }
45  void SetPi0PhotonID (float in) { fPi0Id = in; }
46  void SetShowerEFrac (float in) { fShwEFrac = in; }
47  void SetCosTheta (float in) { fCosTheta = in; }
48  void SetIsMuon (bool in) { fIsMuon = in; }
49 
50 //for E/Pi0 ID
51  void SetValEPi0 (float in) { fPIDEPi0 = in; }
52  void SetValEPi0EL (float in) { fPIDEPi0EL = in; }
53 
54  void SetDedx0 (float in) { fDedx0 = in; }
55  void SetDedx1 (float in) { fDedx1 = in; }
56  void SetDedx2 (float in) { fDedx2 = in; }
57  void SetDedx3 (float in) { fDedx3 = in; }
58  void SetDedx4 (float in) { fDedx4 = in; }
59  void SetDedx5 (float in) { fDedx5 = in; }
60 
61  void SetDedxp0c0 (float in) { fDedxp0c0 = in; }
62  void SetDedxp0c1 (float in) { fDedxp0c1 = in; }
63  void SetDedxp1c0 (float in) { fDedxp1c0 = in; }
64  void SetDedxp1c1 (float in) { fDedxp1c1 = in; }
65  void SetDedxp2c0 (float in) { fDedxp2c0 = in; }
66  void SetDedxp2c1 (float in) { fDedxp2c1 = in; }
67  void SetDedxp3c0 (float in) { fDedxp3c0 = in; }
68  void SetDedxp3c1 (float in) { fDedxp3c1 = in; }
69  void SetDedxp4c0 (float in) { fDedxp4c0 = in; }
70  void SetDedxp4c1 (float in) { fDedxp4c1 = in; }
71  void SetDedxp5c0 (float in) { fDedxp5c0 = in; }
72  void SetDedxp5c1 (float in) { fDedxp5c1 = in; }
73 
74 
75 
76 // for E/cosmic ID
77  void SetValECos (float in) { fPIDECos = in; }
78 
79  void SetRadius (float in) { fRadius = in; }
80 
81  void SetInverseGLLL (float in) { fInvGLLL= in; }
82  void SetNMIPPlanes (float in) { fNMIP = in; }
83 
84  void SetVtxDoca (float in) { fVtxDoca = in; }
85 
86  /// \brief set algorithm name
87  void SetAlgName(const std::string& algName) { fAlgName = algName; }
88 
89  /// \brief set algorithm description
90  void SetAlgDescription(const std::string& algDescription) { fAlgDescription = algDescription; }
91 
92  void SetShowerDepEnergy (float in) { fShwDepE = in; }
93  void SetVertexEnergy (float in) { fVtxE = in; }
94  void SetShowerEnergy (float in) { fShwE = in; }
95  void SetNueEnergy (float in) { fNueEnergy = in; }
96  void SetHadronicEnergy (float in) { fHadE = in; }
97 
98 
99  // Getters
100  std::string AlgName () const { return fAlgName; }
102 
103  float ValueWithE () const { return fPIDWithE; }
104 
105  float EGLLL () const { return fEGLLL; }
106  float EGLLT () const { return fEGLLT; }
107  float EMuLLL () const { return fEMuLLL; }
108  float EMuLLT () const { return fEMuLLT; }
109  float EPi0LLL () const { return fEPi0LLL; }
110  float EPi0LLT () const { return fEPi0LLT; }
111  float EPLLL () const { return fEPLLL; }
112  float EPLLT () const { return fEPLLT; }
113  float ENLLL () const { return fENLLL; }
114  float ENLLT () const { return fENLLT; }
115  float EPiLLL () const { return fEPiLLL; }
116  float EPiLLT () const { return fEPiLLT; }
117  float Gap () const { return fGap; }
118  float Pi0mass () const { return fPi0mass; }
119  int Pi0PhotonID () const { return fPi0Id; }
120  float ShowerEFrac () const { return fShwEFrac; }
121  float CosTheta () const { return fCosTheta; }
122  bool IsMuon () const { return fIsMuon; }
123 
124  float ValueEPi0 () const { return fPIDEPi0; }
125  float ValueEPi0EL () const { return fPIDEPi0EL; }
126  float Dedx0 () const { return fDedx0; }
127  float Dedx1 () const { return fDedx1; }
128  float Dedx2 () const { return fDedx2; }
129  float Dedx3 () const { return fDedx3; }
130  float Dedx4 () const { return fDedx4; }
131  float Dedx5 () const { return fDedx5; }
132 
133  float Dedxp0c0 () const { return fDedxp0c0; }
134  float Dedxp0c1 () const { return fDedxp0c1; }
135  float Dedxp1c0 () const { return fDedxp1c0; }
136  float Dedxp1c1 () const { return fDedxp1c1; }
137  float Dedxp2c0 () const { return fDedxp2c0; }
138  float Dedxp2c1 () const { return fDedxp2c1; }
139  float Dedxp3c0 () const { return fDedxp3c0; }
140  float Dedxp3c1 () const { return fDedxp3c1; }
141  float Dedxp4c0 () const { return fDedxp4c0; }
142  float Dedxp4c1 () const { return fDedxp4c1; }
143  float Dedxp5c0 () const { return fDedxp5c0; }
144  float Dedxp5c1 () const { return fDedxp5c1; }
145 
146  float ValueECos () const { return fPIDECos; }
147 
148  float Radius () const { return fRadius; }
149 
150  float InverseGLLL () const { return fInvGLLL;}
151  int NMIPPlanes () const { return fNMIP; }
152 
153  float VtxDoca () const { return fVtxDoca; }
154 
155  float VertexEnergy () const { return fVtxE; }
156  float ShowerDepEnergy () const { return fShwDepE; }
157  float ShowerEnergy () const { return fShwE; }
158  float NueEnergy () const { return fNueEnergy; }
159  float HadronicEnergy () const { return fHadE; }
160 
161 #endif // __GCCXML__
162 
163  bool IsInversePhoton() const;
164  protected:
165  /// Algorithm name
167 
168  /// Algorithm description
170 
171 
172  public:
173  /// \brief training variables
174 
175  float fPIDWithE;
176 
177  float fEGLLL;
178  float fEGLLT;
179  float fEMuLLL;
180  float fEMuLLT;
181  float fEPi0LLL;
182  float fEPi0LLT;
183  float fEPLLL;
184  float fEPLLT;
185  float fENLLL;
186  float fENLLT;
187  float fEPiLLL;
188  float fEPiLLT;
189 
190 
191  float fInvGLLL;
192  int fNMIP;
193 
194  float fGap;
195  float fPi0mass;
196  int fPi0Id;
197  float fRadius;
198  bool fIsMuon;
199  float fCosTheta;
200  float fShwEFrac;
201 
202  float fVtxDoca;
203 
204 
205  float fVtxE;
206  float fShwDepE;
207  float fShwE;
208  float fNueEnergy;
209  float fHadE;
210 
211 //E/Pi0 PID
212  float fPIDEPi0;
213  float fPIDEPi0EL;
214  float fDedx0;
215  float fDedx1;
216  float fDedx2;
217  float fDedx3;
218  float fDedx4;
219  float fDedx5;
220 //E/Cosmic PID
221 
222  float fDedxp0c0;
223  float fDedxp0c1;
224  float fDedxp1c0;
225  float fDedxp1c1;
226  float fDedxp2c0;
227  float fDedxp2c1;
228  float fDedxp3c0;
229  float fDedxp3c1;
230  float fDedxp4c0;
231  float fDedxp4c1;
232  float fDedxp5c0;
233  float fDedxp5c1;
234 
235  float fPIDECos;
236 
237  /// Map of the longitudinal ll by paricle type
238  std::map<int, float> fPartLongLL;
239 
240  /// Map of the transverse ll by particle type
241  std::map<int, float> fPartTransLL;
242  std::map<int, std::map<int, float> > fVtxDedx;
243  };
244 
245 
246 
248  :
249  fPIDWithE(-5.0),
250  fEGLLL(-5.0), fEGLLT(-5.0),
251  fEMuLLL(-5.0), fEMuLLT(-5.0),
252  fEPi0LLL(-5.0), fEPi0LLT(-5.0),
253  fEPLLL(-5.0), fEPLLT(-5.0),
254  fENLLL(-5.0), fENLLT(-5.0),
255  fEPiLLL(-5.0), fEPiLLT(-5.0),
256  fInvGLLL(-5.0), fNMIP(-5), fGap(-5.0),
257  fPi0mass(-5.0), fPi0Id(-5),
258  fRadius(-5.0), fIsMuon(false),
259  fCosTheta(-5.0), fShwEFrac(-5.0),
260  fVtxDoca(-5.0),
261  fVtxE(-5.0),fShwDepE(-5.0),
262  fShwE(-5.0), fNueEnergy(-5.0),
263  fHadE(-5.0),
264  fPIDEPi0(-5.0), fPIDEPi0EL(-5.0),
265  fDedx0(-5.0), fDedx1(-5.0), fDedx2(-5.0), fDedx3(-5.0), fDedx4(-5.0), fDedx5(-5.0)
266 
267  {
268  }
269 
270  bool CompareByEnergy(const slid::ShowerLID* a,const slid::ShowerLID* b);
271 }
272 #endif
int NMIPPlanes() const
Definition: ShowerLID.h:151
void SetValEPi0(float in)
Definition: ShowerLID.h:51
void SetEPiLLL(float in)
Definition: ShowerLID.h:41
std::string AlgDescription() const
Definition: ShowerLID.h:101
int Pi0PhotonID() const
Definition: ShowerLID.h:119
void SetEMuLLT(float in)
Definition: ShowerLID.h:34
A pid value and corresponding pdg code.
Definition: PID.h:13
void SetDedx3(float in)
Definition: ShowerLID.h:57
float ValueWithE() const
Definition: ShowerLID.h:103
void SetVtxDoca(float in)
Definition: ShowerLID.h:84
float Dedx0() const
Definition: ShowerLID.h:126
void SetDedxp2c0(float in)
Definition: ShowerLID.h:65
void SetNueEnergy(float in)
Definition: ShowerLID.h:95
std::string AlgName() const
Definition: ShowerLID.h:100
float ENLLT() const
Definition: ShowerLID.h:114
float Dedxp2c1() const
Definition: ShowerLID.h:138
bool IsInversePhoton() const
Definition: ShowerLID.cxx:40
float Dedx3() const
Definition: ShowerLID.h:129
float EGLLL() const
Definition: ShowerLID.h:105
pdg code and pid value
float Dedx2() const
Definition: ShowerLID.h:128
float EPiLLT() const
Definition: ShowerLID.h:116
float Dedxp4c0() const
Definition: ShowerLID.h:141
std::map< int, float > fPartLongLL
Map of the longitudinal ll by paricle type.
Definition: ShowerLID.h:238
float Dedxp1c0() const
Definition: ShowerLID.h:135
void SetShowerEnergy(float in)
Definition: ShowerLID.h:94
void SetEMuLLL(float in)
Definition: ShowerLID.h:33
void SetDedxp0c0(float in)
Definition: ShowerLID.h:61
void SetDedx4(float in)
Definition: ShowerLID.h:58
float fPIDEPi0EL
Definition: ShowerLID.h:213
void SetDedxp3c1(float in)
Definition: ShowerLID.h:68
float EPLLL() const
Definition: ShowerLID.h:111
float Dedxp5c0() const
Definition: ShowerLID.h:143
float fPIDWithE
training variables
Definition: ShowerLID.h:175
void SetDedx2(float in)
Definition: ShowerLID.h:56
float CosTheta() const
Definition: ShowerLID.h:121
float Dedxp3c1() const
Definition: ShowerLID.h:140
bool CompareByEnergy(const slid::ShowerLID *a, const slid::ShowerLID *b)
Definition: ShowerLID.cxx:51
void SetEPi0LLL(float in)
Definition: ShowerLID.h:35
void SetShowerEFrac(float in)
Definition: ShowerLID.h:46
void SetPi0mass(float in)
Definition: ShowerLID.h:44
void SetAlgDescription(const std::string &algDescription)
set algorithm description
Definition: ShowerLID.h:90
float EPi0LLT() const
Definition: ShowerLID.h:110
float Dedxp4c1() const
Definition: ShowerLID.h:142
void SetEPiLLT(float in)
Definition: ShowerLID.h:42
void SetDedx0(float in)
Definition: ShowerLID.h:54
void SetDedxp0c1(float in)
Definition: ShowerLID.h:62
void SetShowerDepEnergy(float in)
Definition: ShowerLID.h:92
void SetEPi0LLT(float in)
Definition: ShowerLID.h:36
void SetValEPi0EL(float in)
Definition: ShowerLID.h:52
void SetRadius(float in)
Definition: ShowerLID.h:79
void SetInverseGLLL(float in)
Definition: ShowerLID.h:81
void SetENLLT(float in)
Definition: ShowerLID.h:40
void SetDedxp4c1(float in)
Definition: ShowerLID.h:70
void SetDedxp2c1(float in)
Definition: ShowerLID.h:66
std::string fAlgName
Algorithm name.
Definition: ShowerLID.h:166
const double a
bool IsMuon() const
Definition: ShowerLID.h:122
void SetENLLL(float in)
Definition: ShowerLID.h:39
float Dedxp2c0() const
Definition: ShowerLID.h:137
void SetDedxp1c0(float in)
Definition: ShowerLID.h:63
float Radius() const
Definition: ShowerLID.h:148
void SetDedx5(float in)
Definition: ShowerLID.h:59
float HadronicEnergy() const
Definition: ShowerLID.h:159
float Dedxp5c1() const
Definition: ShowerLID.h:144
float EMuLLL() const
Definition: ShowerLID.h:107
void SetIsMuon(bool in)
Definition: ShowerLID.h:48
std::string fAlgDescription
Algorithm description.
Definition: ShowerLID.h:169
std::map< int, float > fPartTransLL
Map of the transverse ll by particle type.
Definition: ShowerLID.h:241
void SetCosTheta(float in)
Definition: ShowerLID.h:47
void SetDedxp5c0(float in)
Definition: ShowerLID.h:71
void SetVertexEnergy(float in)
Definition: ShowerLID.h:93
void SetHadronicEnergy(float in)
Definition: ShowerLID.h:96
float EPi0LLL() const
Definition: ShowerLID.h:109
void SetEPLLL(float in)
Definition: ShowerLID.h:37
void SetValWithE(float in)
Setters.
Definition: ShowerLID.h:30
float ValueECos() const
Definition: ShowerLID.h:146
void SetPi0PhotonID(float in)
Definition: ShowerLID.h:45
void SetAlgName(const std::string &algName)
set algorithm name
Definition: ShowerLID.h:87
void SetValECos(float in)
Definition: ShowerLID.h:77
float EPiLLL() const
Definition: ShowerLID.h:115
float Dedx5() const
Definition: ShowerLID.h:131
void SetDedxp5c1(float in)
Definition: ShowerLID.h:72
float Pi0mass() const
Definition: ShowerLID.h:118
float NueEnergy() const
Definition: ShowerLID.h:158
float ValueEPi0EL() const
Definition: ShowerLID.h:125
float Dedxp3c0() const
Definition: ShowerLID.h:139
ifstream in
Definition: comparison.C:7
float ShowerDepEnergy() const
Definition: ShowerLID.h:156
void SetDedxp1c1(float in)
Definition: ShowerLID.h:64
float VertexEnergy() const
Definition: ShowerLID.h:155
float ShowerEnergy() const
Definition: ShowerLID.h:157
float ValueEPi0() const
Definition: ShowerLID.h:124
void SetGap(float in)
Definition: ShowerLID.h:43
float Dedxp0c0() const
Definition: ShowerLID.h:133
const hit & b
Definition: hits.cxx:21
float InverseGLLL() const
Definition: ShowerLID.h:150
float EMuLLT() const
Definition: ShowerLID.h:108
float ENLLL() const
Definition: ShowerLID.h:113
void SetDedxp3c0(float in)
Definition: ShowerLID.h:67
float VtxDoca() const
Definition: ShowerLID.h:153
void SetEGLLT(float in)
Definition: ShowerLID.h:32
float Dedx4() const
Definition: ShowerLID.h:130
Build slid::LID objects to store electron ID, if asked for, otherwise, calculate LID info and make av...
Definition: FillPIDs.h:13
float Dedxp0c1() const
Definition: ShowerLID.h:134
void SetNMIPPlanes(float in)
Definition: ShowerLID.h:82
void SetDedx1(float in)
Definition: ShowerLID.h:55
float Gap() const
Definition: ShowerLID.h:117
float fNueEnergy
Definition: ShowerLID.h:208
float EGLLT() const
Definition: ShowerLID.h:106
void SetEGLLL(float in)
Definition: ShowerLID.h:31
float Dedx1() const
Definition: ShowerLID.h:127
void SetDedxp4c0(float in)
Definition: ShowerLID.h:69
void SetEPLLT(float in)
Definition: ShowerLID.h:38
std::map< int, std::map< int, float > > fVtxDedx
Definition: ShowerLID.h:242
float ShowerEFrac() const
Definition: ShowerLID.h:120
float EPLLT() const
Definition: ShowerLID.h:112
float Dedxp1c1() const
Definition: ShowerLID.h:136
enum BeamMode string