LDMX Software
AnalysisUtils.h
Go to the documentation of this file.
1
7#ifndef _ANALYSIS_UTILS_H_
8#define _ANALYSIS_UTILS_H_
9
10//----------------//
11// C++ StdLib //
12//----------------//
13#include <cmath>
14#include <map>
15#include <unordered_map>
16#include <vector>
17
18// Forward declaration for classes inside ldmx namespace
19// class FindableTrackResult;
20namespace ldmx {
21class SimParticle;
22}
23
24namespace analysis {
25
34std::tuple<int, const ldmx::SimParticle*> getRecoil(
35 const std::map<int, ldmx::SimParticle>& particleMap);
36
47std::tuple<int, const ldmx::SimParticle*> getBremPhoton(
48 const std::map<int, ldmx::SimParticle>& particleMap);
49
58 const ldmx::SimParticle& gamma,
59 const std::map<int, ldmx::SimParticle>& particleMap);
60
78 const std::map<int, ldmx::SimParticle>& particleMap,
79 const ldmx::SimParticle* recoil, const float& energyThreshold);
80
81} // namespace analysis
82
83#endif // _ANALYSIS_UTILS_H_
std::tuple< int, const ldmx::SimParticle * > getBremPhoton(const std::map< int, ldmx::SimParticle > &particleMap)
Find and return the sim particle associated with the brem photon, if any.
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.
bool doesParticleHavePNDaughters(const ldmx::SimParticle &gamma, const std::map< int, ldmx::SimParticle > &particleMap)
Helper function to getPNGamma.
Class representing a simulated particle.
Definition SimParticle.h:24