LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
ParticleID.cxx
Go to the documentation of this file.
1 //
3 // \brief Definition of ParticleID analysis object
4 //
5 // \author brebel@fnal.gov, tjyang@fnal.gov
7 
10 
11 namespace anab{
12 
13  //----------------------------------------------------------------------
15  : fPdg(0)
16  , fNdf(0)
17  , fMinChi2(0.)
18  , fDeltaChi2(0.)
19  , fChi2Proton(0.)
20  , fChi2Kaon(0.)
21  , fChi2Pion(0.)
22  , fChi2Muon(0.)
23  , fMissingE(0.)
24  , fMissingEavg(0.)
25  , fPIDA(0.)
26  {
27  }
28 
29  //----------------------------------------------------------------------
31  int Ndf,
32  double MinChi2,
33  double DeltaChi2,
34  double Chi2Proton,
35  double Chi2Kaon,
36  double Chi2Pion,
37  double Chi2Muon,
38  double MissingE,
39  double MissingEavg,
40  double PIDA,
41  geo::PlaneID planeID)
42  : fPdg(Pdg)
43  , fNdf(Ndf)
44  , fMinChi2(MinChi2)
45  , fDeltaChi2(DeltaChi2)
46  , fChi2Proton(Chi2Proton)
47  , fChi2Kaon(Chi2Kaon)
48  , fChi2Pion(Chi2Pion)
49  , fChi2Muon(Chi2Muon)
50  , fMissingE(MissingE)
51  , fMissingEavg(MissingEavg)
52  , fPIDA(PIDA)
53  {
54  fPlaneID = planeID;
55  }
56 
57  //----------------------------------------------------------------------
58  // ostream operator.
59  //
60  std::ostream& operator<< (std::ostream & o, ParticleID const& a)
61  {
62  o << "Determined particle PDG code: " << a.fPdg
63  << "\n NDF: " << a.fNdf
64  << "\n Minimal chi2: " << a.fMinChi2
65  << "\n Delta chi2: " << a.fDeltaChi2
66  << "\n chi2 with proton template: " << a.fChi2Proton
67  << "\n chi2 with kaon template: " << a.fChi2Kaon
68  << "\n chi2 with pion template: " << a.fChi2Pion
69  << "\n chi2 with muon template: " << a.fChi2Muon
70  << "\n PIDA: " << a.fPIDA
71  << "\n planeID=(" << a.fPlaneID.Cryostat << "," << a.fPlaneID.TPC << "," << a.fPlaneID.Plane << ")"
72  <<std::endl;
73 
74 
75  return o;
76  }
77 
78 }
friend std::ostream & operator<<(std::ostream &o, ParticleID const &a)
Definition: ParticleID.cxx:60
const double & Chi2Pion() const
Definition: ParticleID.h:78
const int & Pdg() const
Definition: ParticleID.h:72
double fMissingEavg
missing energy from dead wires using average dEdx
Definition: ParticleID.h:34
The data type to uniquely identify a Plane.
Definition: geo_types.h:250
double fMinChi2
Minimum reduced chi2.
Definition: ParticleID.h:27
double fChi2Muon
reduced chi2 using muon template
Definition: ParticleID.h:32
CryostatID_t Cryostat
Index of cryostat.
Definition: geo_types.h:130
const double & MissingEavg() const
Definition: ParticleID.h:81
int fNdf
ndf for chi2 test
Definition: ParticleID.h:26
const double & Chi2Kaon() const
Definition: ParticleID.h:77
double fDeltaChi2
difference between two lowest reduced chi2&#39;s
Definition: ParticleID.h:28
const double & MinChi2() const
Definition: ParticleID.h:74
const double & DeltaChi2() const
Definition: ParticleID.h:75
const double & Chi2Proton() const
Definition: ParticleID.h:76
PlaneID_t Plane
Index of the plane within its TPC.
Definition: geo_types.h:258
double fChi2Kaon
reduced chi2 using kaon template
Definition: ParticleID.h:30
int fPdg
determined particle ID
Definition: ParticleID.h:25
double fChi2Proton
reduced chi2 using proton template
Definition: ParticleID.h:29
double fPIDA
PID developed by Bruce Baller.
Definition: ParticleID.h:35
const double & MissingE() const
Definition: ParticleID.h:80
geo::PlaneID fPlaneID
Definition: ParticleID.h:36
TPCID_t TPC
Index of the TPC within its cryostat.
Definition: geo_types.h:203
double fChi2Pion
reduced chi2 using pion template
Definition: ParticleID.h:31
const double & PIDA() const
Definition: ParticleID.h:82
const double & Chi2Muon() const
Definition: ParticleID.h:79
double fMissingE
missing energy from dead wires for contained particle
Definition: ParticleID.h:33
const int & Ndf() const
Definition: ParticleID.h:73