10 #include "cetlib_except/exception.h" 31 std::vector<float>
const&
dEdx,
32 std::vector<float>
const&
dQdx,
33 std::vector<float>
const& resRange,
34 std::vector<float>
const& deadwire,
42 for(
size_t i=0; i!=dQdx.size(); ++i){
44 fXYZ.push_back({-999.,-999.,-999.});
46 if(dEdx.size() != resRange.size())
47 throw cet::exception(
"anab::Calorimetry") <<
"dE/dx and residual range vectors " 48 <<
"have different sizes, this is a problem.\n";
49 fdEdx.resize(dEdx.size());
50 fdQdx.resize(dQdx.size());
52 for(
size_t i = 0; i < dEdx.size(); ++i){
59 for(
size_t i = 0; i<deadwire.size(); ++i){
69 std::vector<float>
const&
dEdx,
70 std::vector<float>
const&
dQdx,
71 std::vector<float>
const& resRange,
72 std::vector<float>
const& deadwire,
74 std::vector<float>
const& TrkPitch,
82 if(dEdx.size() != resRange.size())
83 throw cet::exception(
"anab::Calorimetry") <<
"dE/dx and residual range vectors " 84 <<
"have different sizes, this is a problem.\n";
85 for(
size_t i=0; i!=dQdx.size(); ++i){
86 fXYZ.push_back({-999.,-999.,-999.});
88 fdEdx.resize(dEdx.size());
89 fdQdx.resize(dQdx.size());
91 for(
size_t i = 0; i < dEdx.size(); ++i){
98 for(
size_t i = 0; i<deadwire.size(); ++i){
106 std::vector<float>
const&
dEdx,
107 std::vector<float>
const&
dQdx,
108 std::vector<float>
const& resRange,
109 std::vector<float>
const& deadwire,
111 std::vector<float>
const& TrkPitch,
112 std::vector<anab::Point_t>
const&
XYZ,
114 :
Calorimetry(KineticEnergy, dEdx, dQdx, resRange, deadwire, Range, TrkPitch, XYZ,
std::
vector<size_t>(),planeID) { }
117 std::vector<float>
const&
dEdx,
118 std::vector<float>
const&
dQdx,
119 std::vector<float>
const& resRange,
120 std::vector<float>
const& deadwire,
122 std::vector<float>
const& TrkPitch,
123 std::vector<anab::Point_t>
const&
XYZ,
128 if( dEdx.size() != resRange.size() ||
129 dEdx.size() != dQdx.size() ||
130 dEdx.size() != TrkPitch.size() ||
131 dEdx.size() != XYZ.size() ||
132 (TpIndices.size()>0 && dEdx.size() != TpIndices.size()) )
134 <<
"have different sizes, this is a problem.\n";
153 <<
"\n Range: " << a.
fRange << std::endl;
155 for(
size_t n = 0;
n < a.
fdEdx.size(); ++
n)
156 o <<
"dE/dx=" << a.
fdEdx[
n]
158 <<
" dQ/dx=" << a.
fdQdx[
n]
159 <<
" (x,y,z)=(" << a.
fXYZ[
n].X() <<
"," << a.
fXYZ[
n].Y() <<
"," << a.
fXYZ[
n].Z() <<
")" friend std::ostream & operator<<(std::ostream &o, Calorimetry const &a)
std::vector< float > fDeadWireResR
dead wire residual range, collection plane
std::vector< size_t > fTpIndices
indices of original trajectory points on track
std::vector< float > fdEdx
dE/dx, should be same size as fResidualRange
float fKineticEnergy
determined kinetic energy
The data type to uniquely identify a Plane.
std::vector< float > fdQdx
dQ/dx
const std::vector< Point_t > & XYZ() const
CryostatID_t Cryostat
Index of cryostat.
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
std::vector< float > fTrkPitch
track pitch on collection plane
const std::vector< float > & dQdx() const
PlaneID_t Plane
Index of the plane within its TPC.
std::vector< float > fResidualRange
range from end of track
const std::vector< float > & dEdx() const
const std::vector< size_t > & TpIndices() const
float fRange
total range of track
std::vector< Point_t > fXYZ
coordinates of space points; for a discussion on the object type for coordinates see recob::tracking:...
const float & KineticEnergy() const
TPCID_t TPC
Index of the TPC within its cryostat.
const float & Range() const
cet::coded_exception< error, detail::translate > exception