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 "TVector3.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().