67 <<
"The number of planes does not match the size of the fcl parametes passed: Num Planes: " 87 std::vector<art::Ptr<recob::Cluster>> clusters = fmc.at(pfparticle.
key());
94 std::map<geo::PlaneID::PlaneID_t, std::vector<art::Ptr<recob::Hit>>> planeHits;
97 for (
auto const&
cluster : clusters) {
100 std::vector<art::Ptr<recob::Hit>>
hits = fmhc.at(
cluster.key());
105 planeHits[plane].insert(planeHits[plane].
end(), hits.begin(), hits.end());
110 unsigned int bestPlaneNumHits = 0;
113 std::vector<double> energyVec(
fNumPlanes, -999.);
114 std::vector<double> energyError(
fNumPlanes, -999.);
116 auto const clockData =
121 for (
auto const& [plane,
hits] : planeHits) {
123 unsigned int planeNumHits =
hits.size();
128 if (Energy > 0) energyVec.at(plane) = Energy;
130 if (planeNumHits > bestPlaneNumHits) {
132 bestPlaneNumHits = planeNumHits;
141 int bestPlaneVal(bestPlane);
156 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
cout<< "Opened file "<< fin<< " ixs= "<< ixs<< endl;if(ixs==0) hhh=(TH1F *) fff-> Get("h1")
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.
Interface for a class providing readout channel mapping to geometry.
key_type key() const noexcept
Declaration of cluster object.
Detector simulation of raw signals on wires.
unsigned int Nplanes(TPCID const &tpcid=details::tpc_zero) const
Returns the total number of planes in the specified TPC.
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.
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