66 <<
"The number of planes does not match the size of the fcl parametes passed: Num Planes: " 86 std::vector<art::Ptr<recob::Cluster>> clusters = fmc.at(pfparticle.
key());
93 std::map<geo::PlaneID::PlaneID_t, std::vector<art::Ptr<recob::Hit>>> planeHits;
96 for (
auto const&
cluster : clusters) {
99 std::vector<art::Ptr<recob::Hit>>
hits = fmhc.at(
cluster.key());
104 planeHits[plane].insert(planeHits[plane].
end(), hits.begin(), hits.end());
109 unsigned int bestPlaneNumHits = 0;
112 std::vector<double> energyVec(
fNumPlanes, -999.);
113 std::vector<double> energyError(
fNumPlanes, -999.);
115 auto const clockData =
120 for (
auto const& [plane,
hits] : planeHits) {
122 unsigned int planeNumHits =
hits.size();
127 if (Energy > 0) energyVec.at(plane) = Energy;
129 if (planeNumHits > bestPlaneNumHits) {
131 bestPlaneNumHits = planeNumHits;
137 if (bestPlane < fGeom->Nplanes()) {
140 int bestPlaneVal(bestPlane);
155 double totalCharge = 0, totalEnergy = 0;
Declaration of signal hit object.
unsigned int PlaneID_t
Type for the ID number.
void SetElement(T &dataproduct, const std::string &Name, bool checktag=false)
double ElectronLifetime() const
Set of hits with a 2D structure.
Cluster finding and building.
decltype(auto) constexpr end(T &&obj)
ADL-aware version of std::end.
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
key_type key() const noexcept
Declaration of cluster object.
Detector simulation of raw signals on wires.
ValidHandle< PROD > getValidHandle(InputTag const &tag) const
decltype(auto) get(T &&obj)
ADL-aware version of std::to_string.
Contains all timing reference information for the detector.
unsigned int Nplanes(TPCID const &tpcid=tpc_zero) const
Returns the total number of planes in the specified TPC.
2D representation of charge deposited in the TDC/wire plane
double sampling_rate(DetectorClocksData const &data)
Returns the period of the TPC readout electronics clock.
const art::FindManyP< T1 > & GetFindManyP(const art::ValidHandle< std::vector< T2 >> &handle, const art::Event &evt, const art::InputTag &moduleTag)
cet::coded_exception< error, detail::translate > exception