|
LDMX Software
|
Collection of utility functions useful for analysis. More...
#include "Tools/AnalysisUtils.h"#include <string>#include <tuple>#include "Framework/Exception/Exception.h"#include "SimCore/Event/SimParticle.h"#include "Math/Vector3D.h"Go to the source code of this file.
Functions | |
| std::tuple< int, const ldmx::SimParticle * > | analysis::getRecoil (const std::map< int, ldmx::SimParticle > &particleMap) |
| Find and return the sim particle associated with the recoil electron. | |
| bool | analysis::doesParticleHavePNDaughters (const ldmx::SimParticle &gamma, const std::map< int, ldmx::SimParticle > &particleMap) |
| Helper function to getPNGamma. | |
| const ldmx::SimParticle * | analysis::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. | |
Collection of utility functions useful for analysis.
Definition in file AnalysisUtils.cxx.
| bool analysis::doesParticleHavePNDaughters | ( | const ldmx::SimParticle & | gamma, |
| const std::map< int, ldmx::SimParticle > & | particleMap ) |
Helper function to getPNGamma.
Checks if a particle has daughter particles produced by the photonNuclear process type that are present in the particle map.
Definition at line 48 of file AnalysisUtils.cxx.
References analysis::doesParticleHavePNDaughters(), and ldmx::SimParticle::getDaughters().
Referenced by analysis::doesParticleHavePNDaughters(), and analysis::getPNGamma().
| const ldmx::SimParticle * analysis::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.
Returns the first particle in the map that underwent a PN interaction and has an energy above the threshold. If more than one particle satisfied this condition, this will NOT notice.
| [in] | particleMap | Map of sim particles |
| [in] | recoil | The recoil electron |
| [in] | energyThreshold | The energy that the photon energy must be greater than. |
Definition at line 64 of file AnalysisUtils.cxx.
References analysis::doesParticleHavePNDaughters(), ldmx::SimParticle::getDaughters(), and analysis::getPNGamma().
Referenced by analysis::getPNGamma().
| std::tuple< int, const ldmx::SimParticle * > analysis::getRecoil | ( | const std::map< int, ldmx::SimParticle > & | particleMap | ) |
Find and return the sim particle associated with the recoil electron.
| [in] | particleMap | map of sim particles |
Definition at line 28 of file AnalysisUtils.cxx.
References analysis::getRecoil().
Referenced by analysis::getRecoil().