280 auto partCol = std::make_unique<std::vector<simb::MCParticle>>();
281 auto scCol = std::make_unique<std::vector<sim::SimChannel>>();
282 auto PhotonCol = std::make_unique<std::vector<sim::SimPhotons>>();
283 auto LitePhotonCol = std::make_unique<std::vector<sim::SimPhotonsLite>>();
284 auto ReflPhotonCol = std::make_unique<std::vector<sim::SimPhotons>>();
285 auto ReflLitePhotonCol = std::make_unique<std::vector<sim::SimPhotonsLite>>();
286 auto tpassn = std::make_unique<art::Assns<simb::MCTruth, simb::MCParticle, sim::GeneratedParticleInfo>>();
287 auto adCol = std::make_unique<std::vector<sim::AuxDetSimChannel>>();
289 using edeps_t = std::vector<sim::SimEnergyDeposit>;
290 std::vector<edeps_t> edepCols;
294 using aux_det_hits_t = std::vector<sim::AuxDetHit>;
295 std::vector<aux_det_hits_t> auxdethitCols;
305 art::PtrMaker<simb::MCParticle>
const makePartPtr {
e };
306 auto const input_partCol
307 =
e.getValidHandle<std::vector<simb::MCParticle>>(input_label);
308 MergeUtility.MergeMCParticles(*partCol,*input_partCol,i_source);
311 const std::vector<size_t>& assocVectorPrimitive
312 = MergeUtility.GetMCParticleListMap().at(i_source);
313 art::FindOneP<simb::MCTruth, sim::GeneratedParticleInfo> mctAssn(input_partCol,
e,input_label);
315 tpassn->addSingle(mctAssn.at(i_p), makePartPtr(assocVectorPrimitive[i_p]), mctAssn.data(i_p).ref());
319 auto const& input_scCol
320 =
e.getProduct<std::vector<sim::SimChannel>>(input_label);
321 MergeUtility.MergeSimChannels(*scCol,input_scCol,i_source);
325 auto const& input_adCol
326 =
e.getProduct<std::vector<sim::AuxDetSimChannel>>(input_label);
327 MergeUtility.MergeAuxDetSimChannels(*adCol,input_adCol,i_source);
332 auto const& input_PhotonCol
333 =
e.getProduct<std::vector<sim::SimPhotons>>(input_label);
334 MergeUtility.MergeSimPhotons(*PhotonCol,input_PhotonCol);
337 auto const& input_LitePhotonCol
338 =
e.getProduct<std::vector<sim::SimPhotonsLite>>(input_label);
339 MergeUtility.MergeSimPhotonsLite(*LitePhotonCol,input_LitePhotonCol);
343 art::InputTag
const input_reflected_label
346 auto const& input_PhotonCol
347 =
e.getProduct<std::vector<sim::SimPhotons>>(input_reflected_label);
348 MergeUtility.MergeSimPhotons(*ReflPhotonCol,input_PhotonCol);
351 auto const& input_LitePhotonCol
352 =
e.getProduct<std::vector<sim::SimPhotonsLite>>(input_reflected_label);
353 MergeUtility.MergeSimPhotonsLite(*ReflLitePhotonCol,input_LitePhotonCol);
360 for (
auto const& [ edep_inst, edepCol ]
363 art::InputTag
const edep_tag { input_label.label(), edep_inst };
364 MergeUtility.MergeSimEnergyDeposits(edepCol,
365 e.getProduct<edeps_t>(edep_tag),
372 for (
auto const& [ auxdethit_inst, auxdethitCol ]
375 art::InputTag
const auxdethit_tag { input_label.label(), auxdethit_inst };
376 MergeUtility.MergeAuxDetHits(auxdethitCol,
377 e.getProduct<aux_det_hits_t>(auxdethit_tag),
385 e.put(std::move(partCol));
386 e.put(std::move(tpassn));
389 e.put(std::move(scCol));
392 e.put(std::move(adCol));
396 else e.put(std::move(LitePhotonCol));
404 for (
auto&& [ edep_inst, edepCol ]
407 e.put(std::make_unique<edeps_t>(move(edepCol)), edep_inst);
412 for (
auto&& [ auxdethit_inst, auxdethitCol ]
415 e.put(std::make_unique<aux_det_hits_t>(move(auxdethitCol)), auxdethit_inst);
bool const fFillSimChannels
bool const fFillMCParticles
bool const fFillSimEnergyDeposits
auto enumerate(Iterables &&...iterables)
Range-for loop helper tracking the number of iteration.
std::vector< art::InputTag > const fInputSourcesLabels
bool const fUseLitePhotons
std::vector< std::string > const fAuxDetHitsInstanceLabels
auto counter(T begin, T end)
Returns an object to iterate values from begin to end in a range-for loop.
bool const fFillSimPhotons
std::vector< int > const fTrackIDOffsets
static std::string const ReflectedLabel
bool const fStoreReflected
bool const fFillAuxDetHits
auto zip(Iterables &&...iterables)
Range-for loop helper iterating across many collections at the same time.
bool const fFillAuxDetSimChannels
std::vector< std::string > const fEnergyDepositionInstances