59 std::map<int, const simb::MCParticle*> trueParticles =
61 std::map<int, std::vector<int>> showersMothers =
71 std::vector<art::Ptr<recob::Cluster>> clusters = fmc.at(pfparticle.
key());
76 std::vector<art::Ptr<recob::Hit>> showerHits;
77 for (
auto const&
cluster : clusters) {
80 std::vector<art::Ptr<recob::Hit>>
hits = fmhc.at(
cluster.key());
81 showerHits.insert(showerHits.end(), hits.begin(), hits.end());
85 auto const clockData =
88 std::pair<int, double> ShowerTrackInfo =
90 clockData, showersMothers, showerHits, 2);
92 if (ShowerTrackInfo.first == -99999) {
93 mf::LogError(
"ShowerStartPositionCheater") <<
"True Shower Not Found";
99 mf::LogError(
"ShowerDirectionCheater") <<
"True shower not found, returning";
109 double initialEnergy = trueParticle->
E();
111 for (
unsigned int trajPoint = 0; trajPoint < TrajPoints; trajPoint++) {
112 if (trueParticle->
E(trajPoint) < initialEnergy) {
double E(const int i=0) const
unsigned int NumberTrajectoryPoints() const
const TLorentzVector & Position(const int i=0) const
std::map< int, const simb::MCParticle * > GetTrueParticleMap() const
void SetElement(T &dataproduct, const std::string &Name, bool checktag=false)
::geo::Point_t toPoint(Point const &p)
Convert the specified point into a geo::Point_t.
constexpr auto abs(T v)
Returns the absolute value of the argument.
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
Cluster finding and building.
key_type key() const noexcept
std::map< int, std::vector< int > > GetTrueChain(std::map< int, const simb::MCParticle * > &trueParticles) const
Declaration of cluster object.
std::pair< int, double > TrueParticleIDFromTrueChain(detinfo::DetectorClocksData const &clockData, std::map< int, std::vector< int >> const &ShowersMothers, std::vector< art::Ptr< recob::Hit >> const &hits, int planeid) const
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.
ValidHandle< PROD > getValidHandle(InputTag const &tag) const
decltype(auto) get(T &&obj)
ADL-aware version of std::to_string.