32 class MergeSimSources;
68 throw std::runtime_error(
"ERROR in MergeSimSources: Unequal input vector sizes.");
74 else produces< std::vector<sim::SimPhotonsLite> >();
76 produces< std::vector<simb::MCParticle> >();
77 produces< std::vector<sim::SimChannel> >();
78 produces< std::vector<sim::AuxDetSimChannel> >();
79 produces< art::Assns<simb::MCTruth, simb::MCParticle> >();
86 std::unique_ptr< std::vector<simb::MCParticle> > partCol (
new std::vector<simb::MCParticle >);
87 std::unique_ptr< std::vector<sim::SimChannel> > scCol (
new std::vector<sim::SimChannel>);
88 std::unique_ptr< std::vector<sim::SimPhotons> > PhotonCol(
new std::vector<sim::SimPhotons>);
89 std::unique_ptr< std::vector<sim::SimPhotonsLite> > LitePhotonCol(
new std::vector<sim::SimPhotonsLite>);
91 std::unique_ptr< std::vector< sim::AuxDetSimChannel > > adCol (
new std::vector<sim::AuxDetSimChannel> );
101 std::vector<simb::MCParticle>
const& input_partColVector(*input_partCol);
106 for(
size_t i_p=0; i_p<mctAssn.size(); i_p++)
108 *(partCol.get()),mctAssn.at(i_p),*(tpassn.get()),
109 assocVectorPrimitive[i_source][i_p]);
127 e.
getByLabel(input_label,input_LitePhotonCol);
135 e.
put(std::move(partCol));
136 e.
put(std::move(scCol));
137 e.
put(std::move(adCol));
139 else e.
put(std::move(LitePhotonCol));
140 e.
put(std::move(tpassn));
Store parameters for running LArG4.
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 MergeSimPhotons(std::vector< sim::SimPhotons > &, const std::vector< sim::SimPhotons > &)
MergeSimSources & operator=(MergeSimSources const &)=delete
void MergeAuxDetSimChannels(std::vector< sim::AuxDetSimChannel > &, const std::vector< sim::AuxDetSimChannel > &, size_t)
ProductID put(std::unique_ptr< PROD > &&product)
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
const std::vector< std::vector< size_t > > & GetMCParticleListMap()
#define DEFINE_ART_MODULE(klass)
MergeSimSources(fhicl::ParameterSet const &p)
bool CreateAssn(PRODUCER const &prod, art::Event &evt, std::vector< T > const &a, art::Ptr< U > const &b, art::Assns< U, T > &assn, std::string a_instance, size_t indx=UINT_MAX)
Creates a single one-to-one association.
void produce(art::Event &e) override
void MergeMCParticles(std::vector< simb::MCParticle > &, const std::vector< simb::MCParticle > &, size_t)
Utility object to perform functions of association.
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
std::vector< int > fTrackIDOffsets
bool UseLitePhotons() const
std::vector< std::string > fInputSourcesLabels
MergeSimSourcesUtility fMergeUtility