28std::tuple<int, const ldmx::SimParticle *>
getRecoil(
29 const std::map<int, ldmx::SimParticle> &particleMap) {
31 for (
const auto &[trackID, particle] : particleMap) {
32 if (particle.getPdgID() == 11 and
33 particle.getProcessType() ==
34 ldmx::SimParticle::ProcessType::eDarkBrem) {
35 return {trackID, &particle};
41 return {1, &(particleMap.at(1))};
50 const std::map<int, ldmx::SimParticle> &particleMap) {
52 if (particleMap.find(daughterID) != std::end(particleMap)) {
53 const auto daughter{particleMap.at(daughterID)};
54 const auto processType{daughter.getProcessType()};
55 if (processType == ldmx::SimParticle::ProcessType::photonNuclear) {
65 const std::map<int, ldmx::SimParticle> &particleMap,
68 for (
auto recoilDaughterID : recoilDaughters) {
70 if (particleMap.find(recoilDaughterID) != std::end(particleMap)) {
71 auto recoilDaughter{particleMap.at(recoilDaughterID)};
73 if (recoilDaughter.getPdgID() == 22) {
75 if (recoilDaughter.getEnergy() >= energyThreshold) {
78 return &particleMap.at(recoilDaughterID);
const ldmx::SimParticle * getPNGamma(const std::map< int, ldmx::SimParticle > &particleMap, const ldmx::SimParticle *recoil, const float &energyThreshold)
Get a pointer to the sim particle associated with the photon that underwent a photo-nuclear reaction.
std::tuple< int, const ldmx::SimParticle * > getRecoil(const std::map< int, ldmx::SimParticle > &particleMap)
Find and return the sim particle associated with the recoil electron.
Class representing a simulated particle.
std::vector< int > getDaughters() const
Get a vector containing the track IDs of all daughter particles.