9 #include "cetlib_except/exception.h" 30 std::vector<float>
const&
dEdx,
31 std::vector<float>
const&
dQdx,
32 std::vector<float>
const& resRange,
33 std::vector<float>
const& deadwire,
41 for (
size_t i = 0; i != dQdx.size(); ++i) {
43 fXYZ.push_back({-999., -999., -999.});
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());
51 for (
size_t i = 0; i < dEdx.size(); ++i) {
58 for (
size_t i = 0; i < deadwire.size(); ++i) {
67 std::vector<float>
const&
dEdx,
68 std::vector<float>
const&
dQdx,
69 std::vector<float>
const& resRange,
70 std::vector<float>
const& deadwire,
72 std::vector<float>
const& 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.});
86 fdEdx.resize(dEdx.size());
87 fdQdx.resize(dQdx.size());
89 for (
size_t i = 0; i < dEdx.size(); ++i) {
96 for (
size_t i = 0; i < deadwire.size(); ++i) {
103 std::vector<float>
const&
dEdx,
104 std::vector<float>
const&
dQdx,
105 std::vector<float>
const& resRange,
106 std::vector<float>
const& deadwire,
108 std::vector<float>
const& TrkPitch,
109 std::vector<anab::Point_t>
const&
XYZ,
124 std::vector<float>
const&
dEdx,
125 std::vector<float>
const&
dQdx,
126 std::vector<float>
const& resRange,
127 std::vector<float>
const& deadwire,
129 std::vector<float>
const& TrkPitch,
130 std::vector<anab::Point_t>
const&
XYZ,
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()))
139 <<
"have different sizes, this is a problem.\n";
159 for (
size_t n = 0;
n < a.
fdEdx.size(); ++
n)
161 <<
" dQ/dx=" << a.
fdQdx[
n] <<
" (x,y,z)=(" << a.
fXYZ[
n].X() <<
"," << a.
fXYZ[
n].Y() <<
"," 162 << 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