LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
TruthMatchUtils.h
Go to the documentation of this file.
1 
10 #ifndef TRUTHMATCHUTILS_H_SEEN
11 #define TRUTHMATCHUTILS_H_SEEN
12 
13 // LArSoft
14 namespace recob {
15  class Hit;
16 }
17 
18 // art
20 
21 // c++
22 #include <map>
23 #include <vector>
24 
25 namespace detinfo {
26  class DetectorClocksData;
27 }
28 
29 namespace TruthMatchUtils {
30 
31  typedef int G4ID;
32  typedef float EDeposit;
33  typedef std::map<G4ID, EDeposit> IDToEDepositMap;
34 
42  bool Valid(const G4ID g4ID) noexcept;
43 
52  G4ID TrueParticleID(detinfo::DetectorClocksData const& clockData,
53  const art::Ptr<recob::Hit>& pHit,
54  const bool rollupUnsavedIDs);
55 
65  const std::vector<art::Ptr<recob::Hit>>& pHits,
66  const bool rollupUnsavedIDs);
67 
77  const std::vector<art::Ptr<recob::Hit>>& pHits,
78  const bool rollupUnsavedIDs);
79 
89  const std::vector<art::Ptr<recob::Hit>>& pHits,
90  const bool rollupUnsavedIDs);
91 
99  void FillG4IDToEnergyDepositMap(IDToEDepositMap& idToEDepMap,
100  detinfo::DetectorClocksData const& clockData,
101  const art::Ptr<recob::Hit>& pHit,
102  const bool rollupUnsavedIDs);
103 
104 } // namespace TruthMatchUtils
105 
106 #endif // #ifndef TRUTHMATCHUTILS_H_SEEN
G4ID TrueParticleIDFromTotalRecoCharge(detinfo::DetectorClocksData const &clockData, const std::vector< art::Ptr< recob::Hit >> &pHits, const bool rollupUnsavedIDs)
The G4 ID of the true particle whose matched hits have produced the largest amount of reconstructed c...
Reconstruction base classes.
G4ID TrueParticleID(detinfo::DetectorClocksData const &clockData, const art::Ptr< recob::Hit > &pHit, const bool rollupUnsavedIDs)
The G4 ID of the true particle which deposits the most energy in the recob::Hit.
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:289
std::map< G4ID, EDeposit > IDToEDepositMap
General LArSoft Utilities.
bool Valid(const G4ID g4ID) noexcept
Test whether a G4ID returned by the TruthMatchUtils functions is valid.
void FillG4IDToEnergyDepositMap(IDToEDepositMap &idToEDepMap, detinfo::DetectorClocksData const &clockData, const art::Ptr< recob::Hit > &pHit, const bool rollupUnsavedIDs)
Fill an energy deposition map (maps G4 ID to true energy deposition) for a recob::Hit.
Contains all timing reference information for the detector.
G4ID TrueParticleIDFromTotalTrueEnergy(detinfo::DetectorClocksData const &clockData, const std::vector< art::Ptr< recob::Hit >> &pHits, const bool rollupUnsavedIDs)
The G4 ID of the true particle which deposits the most energy in a vector of recob::Hit.
G4ID TrueParticleIDFromTotalRecoHits(detinfo::DetectorClocksData const &clockData, const std::vector< art::Ptr< recob::Hit >> &pHits, const bool rollupUnsavedIDs)
The G4 ID of the true particle who has been truth-matched to the most hits in a recob::Hit vector...