MergeSimSources.h
Go to the documentation of this file.
1 #ifndef MERGESIMSOURCES_H
2 #define MERGESIMSOURCES_H
3 
4 /*!
5  * Title: MergeSimSources Utility Class
6  * Author: Wes Ketchum (wketchum@lanl.gov)
7  *
8  * Description:
9  * Class that merges different simulation sources together to created a combined sim list.
10  * Typically just merges vectors/maps/etc together. But, if anything as a G4 trackID, applies
11  * a user-defined offset to those IDs.
12  *
13 */
14 
16 
22 
23 namespace sim{
24 
26 
27  public:
28 
29  MergeSimSourcesUtility(std::vector<int> const&);
30 
31  void Reset();
32 
33  void MergeMCParticles( std::vector<simb::MCParticle>&,
34  const std::vector<simb::MCParticle>&,
35  size_t);
36 
37  void MergeSimChannels( std::vector<sim::SimChannel>&,
38  const std::vector<sim::SimChannel>&,
39  size_t);
40 
41  void MergeAuxDetSimChannels( std::vector<sim::AuxDetSimChannel>&,
42  const std::vector<sim::AuxDetSimChannel>&,
43  size_t);
44 
45  void MergeSimPhotons( std::vector<sim::SimPhotons>&,
46  const std::vector<sim::SimPhotons>&);
47 
48  void MergeSimPhotonsLite( std::vector<sim::SimPhotonsLite>&,
49  const std::vector<sim::SimPhotonsLite>&);
50 
51  void MergeSimEnergyDeposits( std::vector<sim::SimEnergyDeposit>&,
52  const std::vector<sim::SimEnergyDeposit>&, size_t) const;
53 
54  void MergeAuxDetHits( std::vector<sim::AuxDetHit>&,
55  const std::vector<sim::AuxDetHit>&, size_t) const;
56 
57  const std::vector< std::vector<size_t> >& GetMCParticleListMap() { return fMCParticleListMap; }
58 
59  private:
60 
61  std::vector<int> fG4TrackIDOffsets;
62  std::vector< std::pair<int,int> > fG4TrackIDRanges;
63 
64  std::vector< std::vector<size_t> > fMCParticleListMap;
65 
66  void UpdateG4TrackIDRange(std::pair<int,int>,size_t);
67 
69  (sim::SimEnergyDeposit const&, int);
70 
72  (sim::AuxDetHit const&, int);
73 
74  }; //end MergeSimSourcesUtility class
75 
76 } //end namespace sim
77 
78 #endif
void MergeSimPhotonsLite(std::vector< sim::SimPhotonsLite > &, const std::vector< sim::SimPhotonsLite > &)
void MergeSimChannels(std::vector< sim::SimChannel > &, const std::vector< sim::SimChannel > &, size_t)
void UpdateG4TrackIDRange(std::pair< int, int >, size_t)
MergeSimSourcesUtility(std::vector< int > const &)
void MergeSimPhotons(std::vector< sim::SimPhotons > &, const std::vector< sim::SimPhotons > &)
static sim::SimEnergyDeposit offsetSimEnergyDepositTrackID(sim::SimEnergyDeposit const &, int)
Particle class.
void MergeAuxDetSimChannels(std::vector< sim::AuxDetSimChannel > &, const std::vector< sim::AuxDetSimChannel > &, size_t)
void MergeAuxDetHits(std::vector< sim::AuxDetHit > &, const std::vector< sim::AuxDetHit > &, size_t) const
Simulation objects for optical detectors.
const std::vector< std::vector< size_t > > & GetMCParticleListMap()
std::vector< int > fG4TrackIDOffsets
std::vector< std::pair< int, int > > fG4TrackIDRanges
Code to link reconstructed objects back to the MC truth information.
void MergeMCParticles(std::vector< simb::MCParticle > &, const std::vector< simb::MCParticle > &, size_t)
contains information for a single step in the detector simulation
static sim::AuxDetHit offsetAuxDetHitTrackID(sim::AuxDetHit const &, int)
Energy deposition in the active material.
void MergeSimEnergyDeposits(std::vector< sim::SimEnergyDeposit > &, const std::vector< sim::SimEnergyDeposit > &, size_t) const
std::vector< std::vector< size_t > > fMCParticleListMap