LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
anab::Calorimetry Class Reference

#include "Calorimetry.h"

Public Member Functions

 Calorimetry ()
 
 Calorimetry (float KinematicEnergy, std::vector< float > const &dEdx, std::vector< float > const &dQdx, std::vector< float > const &resRange, std::vector< float > const &deadwire, float Range, float TrkPitch, geo::PlaneID planeID)
 
 Calorimetry (float KineticEnergy, std::vector< float > const &dEdx, std::vector< float > const &dQdx, std::vector< float > const &resRange, std::vector< float > const &deadwire, float Range, std::vector< float > const &TrkPitch, geo::PlaneID planeID)
 
 Calorimetry (float KineticEnergy, std::vector< float > const &dEdx, std::vector< float > const &dQdx, std::vector< float > const &resRange, std::vector< float > const &deadwire, float Range, std::vector< float > const &TrkPitch, std::vector< Point_t > const &XYZ, geo::PlaneID planeID)
 
 Calorimetry (float KineticEnergy, std::vector< float > const &dEdx, std::vector< float > const &dQdx, std::vector< float > const &resRange, std::vector< float > const &deadwire, float Range, std::vector< float > const &TrkPitch, std::vector< Point_t > const &XYZ, std::vector< size_t > const &TpIndices, geo::PlaneID planeID)
 
const std::vector< float > & dEdx () const
 
const std::vector< float > & dQdx () const
 
const std::vector< float > & ResidualRange () const
 
const std::vector< float > & DeadWireResRC () const
 
const float & KineticEnergy () const
 
const float & Range () const
 
float TrkPitchC () const
 
const std::vector< float > & TrkPitchVec () const
 
const std::vector< Point_t > & XYZ () const
 
const std::vector< size_t > & TpIndices () const
 
const geo::PlaneIDPlaneID () const
 

Public Attributes

float fKineticEnergy
 determined kinetic energy More...
 
std::vector< float > fdEdx
 dE/dx, should be same size as fResidualRange More...
 
std::vector< float > fdQdx
 dQ/dx More...
 
std::vector< float > fResidualRange
 range from end of track More...
 
std::vector< float > fDeadWireResR
 dead wire residual range, collection plane More...
 
float fRange
 total range of track More...
 
std::vector< float > fTrkPitch
 track pitch on collection plane More...
 
std::vector< Point_tfXYZ
 coordinates of space points; for a discussion on the object type for coordinates see recob::tracking::Coord_t. More...
 
std::vector< size_t > fTpIndices
 indices of original trajectory points on track More...
 

Private Attributes

geo::PlaneID fPlaneID
 

Friends

std::ostream & operator<< (std::ostream &o, Calorimetry const &a)
 

Detailed Description

Definition at line 22 of file Calorimetry.h.

Constructor & Destructor Documentation

anab::Calorimetry::Calorimetry ( )

Definition at line 17 of file Calorimetry.cxx.

References fDeadWireResR, fdEdx, fdQdx, fResidualRange, fTpIndices, fTrkPitch, and fXYZ.

17  : fKineticEnergy(0.), fRange(0.)
18  {
19  fdEdx.clear();
20  fdQdx.clear();
21  fResidualRange.clear();
22  fDeadWireResR.clear();
23  fTrkPitch.clear();
24  fXYZ.clear();
25  fTpIndices.clear();
26  }
std::vector< float > fDeadWireResR
dead wire residual range, collection plane
Definition: Calorimetry.h:30
std::vector< size_t > fTpIndices
indices of original trajectory points on track
Definition: Calorimetry.h:35
std::vector< float > fdEdx
dE/dx, should be same size as fResidualRange
Definition: Calorimetry.h:27
float fKineticEnergy
determined kinetic energy
Definition: Calorimetry.h:26
std::vector< float > fdQdx
dQ/dx
Definition: Calorimetry.h:28
std::vector< float > fTrkPitch
track pitch on collection plane
Definition: Calorimetry.h:32
std::vector< float > fResidualRange
range from end of track
Definition: Calorimetry.h:29
float fRange
total range of track
Definition: Calorimetry.h:31
std::vector< Point_t > fXYZ
coordinates of space points; for a discussion on the object type for coordinates see recob::tracking:...
Definition: Calorimetry.h:34
anab::Calorimetry::Calorimetry ( float  KinematicEnergy,
std::vector< float > const &  dEdx,
std::vector< float > const &  dQdx,
std::vector< float > const &  resRange,
std::vector< float > const &  deadwire,
float  Range,
float  TrkPitch,
geo::PlaneID  planeID 
)

Definition at line 29 of file Calorimetry.cxx.

References fDeadWireResR, fdEdx, fdQdx, fKineticEnergy, fPlaneID, fRange, fResidualRange, fTrkPitch, fXYZ, KineticEnergy(), and Range().

37  {
38 
40  fRange = Range;
41  for (size_t i = 0; i != dQdx.size(); ++i) {
42  fTrkPitch.push_back(TrkPitch);
43  fXYZ.push_back({-999., -999., -999.});
44  }
45  if (dEdx.size() != resRange.size())
46  throw cet::exception("anab::Calorimetry") << "dE/dx and residual range vectors "
47  << "have different sizes, this is a problem.\n";
48  fdEdx.resize(dEdx.size());
49  fdQdx.resize(dQdx.size());
50  fResidualRange.resize(resRange.size());
51  for (size_t i = 0; i < dEdx.size(); ++i) {
52  fdEdx[i] = dEdx[i];
53  fdQdx[i] = dQdx[i];
54  fResidualRange[i] = resRange[i];
55  }
56 
57  fDeadWireResR.resize(deadwire.size());
58  for (size_t i = 0; i < deadwire.size(); ++i) {
59  fDeadWireResR[i] = deadwire[i];
60  }
61 
62  fPlaneID = planeID;
63  }
std::vector< float > fDeadWireResR
dead wire residual range, collection plane
Definition: Calorimetry.h:30
std::vector< float > fdEdx
dE/dx, should be same size as fResidualRange
Definition: Calorimetry.h:27
float fKineticEnergy
determined kinetic energy
Definition: Calorimetry.h:26
std::vector< float > fdQdx
dQ/dx
Definition: Calorimetry.h:28
std::vector< float > fTrkPitch
track pitch on collection plane
Definition: Calorimetry.h:32
std::vector< float > fResidualRange
range from end of track
Definition: Calorimetry.h:29
float fRange
total range of track
Definition: Calorimetry.h:31
std::vector< Point_t > fXYZ
coordinates of space points; for a discussion on the object type for coordinates see recob::tracking:...
Definition: Calorimetry.h:34
const float & KineticEnergy() const
Definition: Calorimetry.h:113
geo::PlaneID fPlaneID
Definition: Calorimetry.h:38
const float & Range() const
Definition: Calorimetry.h:117
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
anab::Calorimetry::Calorimetry ( float  KineticEnergy,
std::vector< float > const &  dEdx,
std::vector< float > const &  dQdx,
std::vector< float > const &  resRange,
std::vector< float > const &  deadwire,
float  Range,
std::vector< float > const &  TrkPitch,
geo::PlaneID  planeID 
)

Definition at line 66 of file Calorimetry.cxx.

References fDeadWireResR, fdEdx, fdQdx, fKineticEnergy, fPlaneID, fRange, fResidualRange, fTrkPitch, fXYZ, KineticEnergy(), and Range().

74  {
75 
76  fPlaneID = planeID;
78  fRange = Range;
79  fTrkPitch = TrkPitch;
80  if (dEdx.size() != resRange.size())
81  throw cet::exception("anab::Calorimetry") << "dE/dx and residual range vectors "
82  << "have different sizes, this is a problem.\n";
83  for (size_t i = 0; i != dQdx.size(); ++i) {
84  fXYZ.push_back({-999., -999., -999.});
85  }
86  fdEdx.resize(dEdx.size());
87  fdQdx.resize(dQdx.size());
88  fResidualRange.resize(resRange.size());
89  for (size_t i = 0; i < dEdx.size(); ++i) {
90  fdEdx[i] = dEdx[i];
91  fdQdx[i] = dQdx[i];
92  fResidualRange[i] = resRange[i];
93  }
94 
95  fDeadWireResR.resize(deadwire.size());
96  for (size_t i = 0; i < deadwire.size(); ++i) {
97  fDeadWireResR[i] = deadwire[i];
98  }
99  }
std::vector< float > fDeadWireResR
dead wire residual range, collection plane
Definition: Calorimetry.h:30
std::vector< float > fdEdx
dE/dx, should be same size as fResidualRange
Definition: Calorimetry.h:27
float fKineticEnergy
determined kinetic energy
Definition: Calorimetry.h:26
std::vector< float > fdQdx
dQ/dx
Definition: Calorimetry.h:28
std::vector< float > fTrkPitch
track pitch on collection plane
Definition: Calorimetry.h:32
std::vector< float > fResidualRange
range from end of track
Definition: Calorimetry.h:29
float fRange
total range of track
Definition: Calorimetry.h:31
std::vector< Point_t > fXYZ
coordinates of space points; for a discussion on the object type for coordinates see recob::tracking:...
Definition: Calorimetry.h:34
const float & KineticEnergy() const
Definition: Calorimetry.h:113
geo::PlaneID fPlaneID
Definition: Calorimetry.h:38
const float & Range() const
Definition: Calorimetry.h:117
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
anab::Calorimetry::Calorimetry ( float  KineticEnergy,
std::vector< float > const &  dEdx,
std::vector< float > const &  dQdx,
std::vector< float > const &  resRange,
std::vector< float > const &  deadwire,
float  Range,
std::vector< float > const &  TrkPitch,
std::vector< Point_t > const &  XYZ,
geo::PlaneID  planeID 
)

Definition at line 102 of file Calorimetry.cxx.

112  dEdx,
113  dQdx,
114  resRange,
115  deadwire,
116  Range,
117  TrkPitch,
118  XYZ,
119  std::vector<size_t>(),
120  planeID)
121  {}
const float & KineticEnergy() const
Definition: Calorimetry.h:113
const float & Range() const
Definition: Calorimetry.h:117
anab::Calorimetry::Calorimetry ( float  KineticEnergy,
std::vector< float > const &  dEdx,
std::vector< float > const &  dQdx,
std::vector< float > const &  resRange,
std::vector< float > const &  deadwire,
float  Range,
std::vector< float > const &  TrkPitch,
std::vector< Point_t > const &  XYZ,
std::vector< size_t > const &  TpIndices,
geo::PlaneID  planeID 
)

Definition at line 123 of file Calorimetry.cxx.

References dEdx(), dQdx(), fDeadWireResR, fdEdx, fdQdx, fKineticEnergy, fPlaneID, fRange, fResidualRange, fTpIndices, fTrkPitch, fXYZ, KineticEnergy(), Range(), TpIndices(), and XYZ().

133  {
134 
135  if (dEdx.size() != resRange.size() || dEdx.size() != dQdx.size() ||
136  dEdx.size() != TrkPitch.size() || dEdx.size() != XYZ.size() ||
137  (TpIndices.size() > 0 && dEdx.size() != TpIndices.size()))
138  throw cet::exception("anab::Calorimetry") << "Input vectors "
139  << "have different sizes, this is a problem.\n";
140  fPlaneID = planeID;
142  fRange = Range;
143  fTrkPitch = TrkPitch;
144  fdEdx = dEdx;
145  fdQdx = dQdx;
146  fResidualRange = resRange;
147  fXYZ = XYZ;
149  fDeadWireResR = deadwire;
150  }
std::vector< float > fDeadWireResR
dead wire residual range, collection plane
Definition: Calorimetry.h:30
std::vector< size_t > fTpIndices
indices of original trajectory points on track
Definition: Calorimetry.h:35
std::vector< float > fdEdx
dE/dx, should be same size as fResidualRange
Definition: Calorimetry.h:27
float fKineticEnergy
determined kinetic energy
Definition: Calorimetry.h:26
std::vector< float > fdQdx
dQ/dx
Definition: Calorimetry.h:28
const std::vector< Point_t > & XYZ() const
Definition: Calorimetry.h:132
std::vector< float > fTrkPitch
track pitch on collection plane
Definition: Calorimetry.h:32
const std::vector< float > & dQdx() const
Definition: Calorimetry.h:101
std::vector< float > fResidualRange
range from end of track
Definition: Calorimetry.h:29
const std::vector< float > & dEdx() const
Definition: Calorimetry.h:97
const std::vector< size_t > & TpIndices() const
Definition: Calorimetry.h:136
float fRange
total range of track
Definition: Calorimetry.h:31
std::vector< Point_t > fXYZ
coordinates of space points; for a discussion on the object type for coordinates see recob::tracking:...
Definition: Calorimetry.h:34
const float & KineticEnergy() const
Definition: Calorimetry.h:113
geo::PlaneID fPlaneID
Definition: Calorimetry.h:38
const float & Range() const
Definition: Calorimetry.h:117
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33

Member Function Documentation

const std::vector< float > & anab::Calorimetry::DeadWireResRC ( ) const
inline

Definition at line 109 of file Calorimetry.h.

References fDeadWireResR.

Referenced by pid::Chi2PIDAlg::DoParticleID().

110 {
111  return fDeadWireResR;
112 }
std::vector< float > fDeadWireResR
dead wire residual range, collection plane
Definition: Calorimetry.h:30
const std::vector< float > & anab::Calorimetry::dEdx ( ) const
inline

Definition at line 97 of file Calorimetry.h.

References fdEdx.

Referenced by Calorimetry(), pid::Chi2PIDAlg::DoParticleID(), and pid::PIDAAlg::RunPIDAAlg().

98 {
99  return fdEdx;
100 }
std::vector< float > fdEdx
dE/dx, should be same size as fResidualRange
Definition: Calorimetry.h:27
const std::vector< float > & anab::Calorimetry::dQdx ( ) const
inline

Definition at line 101 of file Calorimetry.h.

References fdQdx.

Referenced by Calorimetry().

102 {
103  return fdQdx;
104 }
std::vector< float > fdQdx
dQ/dx
Definition: Calorimetry.h:28
const float & anab::Calorimetry::KineticEnergy ( ) const
inline

Definition at line 113 of file Calorimetry.h.

References fKineticEnergy.

Referenced by Calorimetry(), and pid::PIDAAlg::FillPIDAProperties().

114 {
115  return fKineticEnergy;
116 }
float fKineticEnergy
determined kinetic energy
Definition: Calorimetry.h:26
const geo::PlaneID & anab::Calorimetry::PlaneID ( ) const
inline

Definition at line 140 of file Calorimetry.h.

References fPlaneID.

Referenced by pid::Chi2PIDAlg::DoParticleID(), and pid::PIDAAlg::FillPIDAProperties().

141 {
142  return fPlaneID;
143 }
geo::PlaneID fPlaneID
Definition: Calorimetry.h:38
const float & anab::Calorimetry::Range ( ) const
inline

Definition at line 117 of file Calorimetry.h.

References fRange.

Referenced by Calorimetry(), and pid::PIDAAlg::FillPIDAProperties().

118 {
119  return fRange;
120 }
float fRange
total range of track
Definition: Calorimetry.h:31
const std::vector< float > & anab::Calorimetry::ResidualRange ( ) const
inline

Definition at line 105 of file Calorimetry.h.

References fResidualRange.

Referenced by pid::Chi2PIDAlg::DoParticleID(), and pid::PIDAAlg::RunPIDAAlg().

106 {
107  return fResidualRange;
108 }
std::vector< float > fResidualRange
range from end of track
Definition: Calorimetry.h:29
const std::vector< size_t > & anab::Calorimetry::TpIndices ( ) const
inline

Definition at line 136 of file Calorimetry.h.

References fTpIndices.

Referenced by Calorimetry().

137 {
138  return fTpIndices;
139 }
std::vector< size_t > fTpIndices
indices of original trajectory points on track
Definition: Calorimetry.h:35
float anab::Calorimetry::TrkPitchC ( ) const
inline

Definition at line 125 of file Calorimetry.h.

References fTrkPitch.

126 {
127  if (fTrkPitch.size())
128  return fTrkPitch[0];
129  else
130  return 0;
131 }
std::vector< float > fTrkPitch
track pitch on collection plane
Definition: Calorimetry.h:32
const std::vector< float > & anab::Calorimetry::TrkPitchVec ( ) const
inline

Definition at line 121 of file Calorimetry.h.

References fTrkPitch.

122 {
123  return fTrkPitch;
124 }
std::vector< float > fTrkPitch
track pitch on collection plane
Definition: Calorimetry.h:32
const std::vector< anab::Point_t > & anab::Calorimetry::XYZ ( ) const
inline

Definition at line 132 of file Calorimetry.h.

References fXYZ.

Referenced by Calorimetry().

133 {
134  return fXYZ;
135 }
std::vector< Point_t > fXYZ
coordinates of space points; for a discussion on the object type for coordinates see recob::tracking:...
Definition: Calorimetry.h:34

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  o,
Calorimetry const &  a 
)
friend

Definition at line 155 of file Calorimetry.cxx.

156  {
157  o << "Kinetic Energy: " << a.fKineticEnergy << "\n Range: " << a.fRange << std::endl;
158 
159  for (size_t n = 0; n < a.fdEdx.size(); ++n)
160  o << "dE/dx=" << a.fdEdx[n] << " Residual range=" << a.fResidualRange[n]
161  << " dQ/dx=" << a.fdQdx[n] << " (x,y,z)=(" << a.fXYZ[n].X() << "," << a.fXYZ[n].Y() << ","
162  << a.fXYZ[n].Z() << ")"
163  << " pitch=" << a.fTrkPitch[n] << " planeID=(" << a.fPlaneID.Cryostat << ","
164  << a.fPlaneID.TPC << "," << a.fPlaneID.Plane << ")" << std::endl;
165 
166  return o;
167  }
Char_t n[5]

Member Data Documentation

std::vector<float> anab::Calorimetry::fDeadWireResR

dead wire residual range, collection plane

Definition at line 30 of file Calorimetry.h.

Referenced by Calorimetry(), and DeadWireResRC().

std::vector<float> anab::Calorimetry::fdEdx

dE/dx, should be same size as fResidualRange

Definition at line 27 of file Calorimetry.h.

Referenced by Calorimetry(), dEdx(), and anab::operator<<().

std::vector<float> anab::Calorimetry::fdQdx

dQ/dx

Definition at line 28 of file Calorimetry.h.

Referenced by Calorimetry(), dQdx(), and anab::operator<<().

float anab::Calorimetry::fKineticEnergy

determined kinetic energy

Definition at line 26 of file Calorimetry.h.

Referenced by Calorimetry(), KineticEnergy(), and anab::operator<<().

geo::PlaneID anab::Calorimetry::fPlaneID
private

Definition at line 38 of file Calorimetry.h.

Referenced by Calorimetry(), anab::operator<<(), and PlaneID().

float anab::Calorimetry::fRange

total range of track

Definition at line 31 of file Calorimetry.h.

Referenced by Calorimetry(), anab::operator<<(), and Range().

std::vector<float> anab::Calorimetry::fResidualRange

range from end of track

Definition at line 29 of file Calorimetry.h.

Referenced by Calorimetry(), anab::operator<<(), and ResidualRange().

std::vector<size_t> anab::Calorimetry::fTpIndices

indices of original trajectory points on track

Definition at line 35 of file Calorimetry.h.

Referenced by Calorimetry(), and TpIndices().

std::vector<float> anab::Calorimetry::fTrkPitch

track pitch on collection plane

Definition at line 32 of file Calorimetry.h.

Referenced by Calorimetry(), anab::operator<<(), TrkPitchC(), and TrkPitchVec().

std::vector<Point_t> anab::Calorimetry::fXYZ

coordinates of space points; for a discussion on the object type for coordinates see recob::tracking::Coord_t.

Definition at line 34 of file Calorimetry.h.

Referenced by Calorimetry(), anab::operator<<(), and XYZ().


The documentation for this class was generated from the following files: