All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 
15 #include "nusimdata/SimulationBase/MCParticle.h"
16 
22 
23 #include <utility> // std::pair<>
24 #include <vector>
25 
26 namespace sim{
27 
29 
30  public:
31 
32  MergeSimSourcesUtility(std::vector<int> const&);
33 
34  void Reset();
35 
36  void MergeMCParticles( std::vector<simb::MCParticle>&,
37  const std::vector<simb::MCParticle>&,
38  size_t);
39 
40  void MergeSimChannels( std::vector<sim::SimChannel>&,
41  const std::vector<sim::SimChannel>&,
42  size_t);
43 
44  void MergeAuxDetSimChannels( std::vector<sim::AuxDetSimChannel>&,
45  const std::vector<sim::AuxDetSimChannel>&,
46  size_t);
47 
48  void MergeSimPhotons( std::vector<sim::SimPhotons>&,
49  const std::vector<sim::SimPhotons>&);
50 
51  void MergeSimPhotonsLite( std::vector<sim::SimPhotonsLite>&,
52  const std::vector<sim::SimPhotonsLite>&);
53 
54  void MergeSimEnergyDeposits( std::vector<sim::SimEnergyDeposit>&,
55  const std::vector<sim::SimEnergyDeposit>&, size_t) const;
56 
57  void MergeAuxDetHits( std::vector<sim::AuxDetHit>&,
58  const std::vector<sim::AuxDetHit>&, size_t) const;
59 
60  const std::vector< std::vector<size_t> >& GetMCParticleListMap() { return fMCParticleListMap; }
61 
62  private:
63 
64  std::vector<int> fG4TrackIDOffsets;
65  std::vector< std::pair<int,int> > fG4TrackIDRanges;
66 
67  std::vector< std::vector<size_t> > fMCParticleListMap;
68 
69  void UpdateG4TrackIDRange(std::pair<int,int>,size_t);
70 
72  (sim::SimEnergyDeposit const&, int);
73 
75  (sim::AuxDetHit const&, int);
76 
77  }; //end MergeSimSourcesUtility class
78 
79 } //end namespace sim
80 
81 #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)
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.
object containing MC truth information necessary for making RawDigits and doing back tracking ...
const std::vector< std::vector< size_t > > & GetMCParticleListMap()
std::vector< int > fG4TrackIDOffsets
std::vector< std::pair< int, int > > fG4TrackIDRanges
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.
object containing MC truth information necessary for making RawDigits and doing back tracking ...
void MergeSimEnergyDeposits(std::vector< sim::SimEnergyDeposit > &, const std::vector< sim::SimEnergyDeposit > &, size_t) const
std::vector< std::vector< size_t > > fMCParticleListMap