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(daughter_id) != std::end(particleMap)) {
53 const auto daughter{particleMap.at(daughter_id)};
54 const auto process_type{daughter.getProcessType()};
55 if (process_type == ldmx::SimParticle::ProcessType::photonNuclear) {
65 const std::map<int, ldmx::SimParticle> &particleMap,
68 for (
auto recoil_daughter_id : recoil_daughters) {
70 if (particleMap.find(recoil_daughter_id) != std::end(particleMap)) {
71 auto recoil_daughter{particleMap.at(recoil_daughter_id)};
73 if (recoil_daughter.getPdgID() == 22) {
75 if (recoil_daughter.getEnergy() >= energyThreshold) {
78 return &particleMap.at(recoil_daughter_id);
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.