LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
Public Types | |
using | ModuleType = EDProducer |
template<typename UserConfig , typename KeysToIgnore = void> | |
using | Table = Modifier::Table< UserConfig, KeysToIgnore > |
Public Member Functions | |
LArPandoraExternalEventBuilding (fhicl::ParameterSet const &pset) | |
LArPandoraExternalEventBuilding (LArPandoraExternalEventBuilding const &)=delete | |
LArPandoraExternalEventBuilding (LArPandoraExternalEventBuilding &&)=delete | |
LArPandoraExternalEventBuilding & | operator= (LArPandoraExternalEventBuilding const &)=delete |
LArPandoraExternalEventBuilding & | operator= (LArPandoraExternalEventBuilding &&)=delete |
void | produce (art::Event &evt) override |
void | doBeginJob (SharedResources const &resources) |
void | doEndJob () |
void | doRespondToOpenInputFile (FileBlock const &fb) |
void | doRespondToCloseInputFile (FileBlock const &fb) |
void | doRespondToOpenOutputFiles (FileBlock const &fb) |
void | doRespondToCloseOutputFiles (FileBlock const &fb) |
bool | doBeginRun (RunPrincipal &rp, ModuleContext const &mc) |
bool | doEndRun (RunPrincipal &rp, ModuleContext const &mc) |
bool | doBeginSubRun (SubRunPrincipal &srp, ModuleContext const &mc) |
bool | doEndSubRun (SubRunPrincipal &srp, ModuleContext const &mc) |
bool | doEvent (EventPrincipal &ep, ModuleContext const &mc, std::atomic< std::size_t > &counts_run, std::atomic< std::size_t > &counts_passed, std::atomic< std::size_t > &counts_failed) |
void | fillProductDescriptions () |
void | registerProducts (ProductDescriptions &productsToRegister) |
ModuleDescription const & | moduleDescription () const |
void | setModuleDescription (ModuleDescription const &) |
std::array< std::vector< ProductInfo >, NumBranchTypes > const & | getConsumables () const |
void | sortConsumables (std::string const ¤t_process_name) |
std::unique_ptr< Worker > | makeWorker (WorkerParams const &wp) |
template<typename T , BranchType BT> | |
ViewToken< T > | consumesView (InputTag const &tag) |
template<typename T , BranchType BT> | |
ViewToken< T > | mayConsumeView (InputTag const &tag) |
Protected Member Functions | |
ConsumesCollector & | consumesCollector () |
template<typename T , BranchType = InEvent> | |
ProductToken< T > | consumes (InputTag const &) |
template<typename Element , BranchType = InEvent> | |
ViewToken< Element > | consumesView (InputTag const &) |
template<typename T , BranchType = InEvent> | |
void | consumesMany () |
template<typename T , BranchType = InEvent> | |
ProductToken< T > | mayConsume (InputTag const &) |
template<typename Element , BranchType = InEvent> | |
ViewToken< Element > | mayConsumeView (InputTag const &) |
template<typename T , BranchType = InEvent> | |
void | mayConsumeMany () |
Private Types | |
typedef std::map< art::Ptr< recob::PFParticle >, art::Ptr< larpandoraobj::PFParticleMetadata > > | PFParticleToMetadata |
Private Member Functions | |
void | CollectPFParticles (const art::Event &evt, PFParticleToMetadata &particlesToMetadata, PFParticleVector &particles) const |
Collect PFParticles from the ART event and their mapping to metadata objects. More... | |
void | BuildPFParticleMap (const PFParticleToMetadata &particlesToMetadata, PFParticleMap &particleMap) const |
Build mapping from ID to PFParticle for fast navigation through the hierarchy. More... | |
void | CollectClearCosmicRays (const PFParticleVector &allParticles, const PFParticleToMetadata &particlesToMetadata, const PFParticleMap &particleMap, PFParticleVector &clearCosmics) const |
Collect PFParticles that have been identified as clear cosmic ray muons by pandora. More... | |
void | CollectSlices (const PFParticleVector &allParticles, const PFParticleToMetadata &particlesToMetadata, const PFParticleMap &particleMap, SliceVector &slices) const |
Collect slices. More... | |
void | CollectConsolidatedParticles (const PFParticleVector &allParticles, const PFParticleVector &clearCosmics, const SliceVector &slices, PFParticleVector &consolidatedParticles) const |
Get the consolidated collection of particles based on the slice ids. More... | |
float | GetMetadataValue (const art::Ptr< larpandoraobj::PFParticleMetadata > &metadata, const std::string &key) const |
Query a metadata object for a given key and return the corresponding value. More... | |
bool | IsTarget (const art::Ptr< larpandoraobj::PFParticleMetadata > &metadata) const |
Query a metadata object to see if it is a target particle. More... | |
Private Attributes | |
std::string | m_inputProducerLabel |
Label for the Pandora instance that produced the collections we want to consolidated. More... | |
std::string | m_trackProducerLabel |
Label for the track producer using the Pandora instance that produced the collections we want to consolidate. More... | |
std::string | m_showerProducerLabel |
Label for the shower producer using the Pandora instance that produced the collections we want to consolidate. More... | |
std::string | m_hitProducerLabel |
Label for the hit producer that was used as input to the Pandora instance specified. More... | |
bool | m_shouldProduceT0s |
If we should produce T0s (relevant when stitching over multiple drift volumes) More... | |
art::InputTag | m_pandoraTag |
The input tag for the pandora producer. More... | |
std::unique_ptr< SliceIdBaseTool > | m_sliceIdTool |
The slice id tool. More... | |
bool | m_useTestBeamMode |
If we should expect a test-beam (instead of a neutrino) slice. More... | |
std::string | m_targetKey |
The metadata key for a PFParticle to determine if it is the target. More... | |
std::string | m_scoreKey |
The metadata key for the score of the target slice from Pandora. More... | |
Definition at line 31 of file LArPandoraExternalEventBuilding_module.cc.
|
inherited |
Definition at line 17 of file EDProducer.h.
|
private |
Definition at line 44 of file LArPandoraExternalEventBuilding_module.cc.
|
inherited |
Definition at line 26 of file Producer.h.
|
explicit |
Definition at line 153 of file LArPandoraExternalEventBuilding_module.cc.
References m_hitProducerLabel, m_inputProducerLabel, m_pandoraTag, m_scoreKey, m_shouldProduceT0s, m_showerProducerLabel, m_sliceIdTool, m_targetKey, m_trackProducerLabel, and m_useTestBeamMode.
|
delete |
|
delete |
|
private |
Build mapping from ID to PFParticle for fast navigation through the hierarchy.
particlesToMetadata | the input mapping from PFParticles to their metadata |
particleMap | the output mapping from ID to PFParticle |
Definition at line 261 of file LArPandoraExternalEventBuilding_module.cc.
Referenced by produce().
|
private |
Collect PFParticles that have been identified as clear cosmic ray muons by pandora.
allParticles | input vector of all particles |
particlesToMetadata | the input mapping from PFParticles to their metadata |
particleMap | the input mapping from ID to PFParticle |
clearCosmics | the output vector of clear cosmic rays |
Definition at line 274 of file LArPandoraExternalEventBuilding_module.cc.
References GetMetadataValue(), lar_pandora::LArPandoraHelper::GetParentPFParticle(), and part.
Referenced by produce().
|
private |
Get the consolidated collection of particles based on the slice ids.
allParticles | input vector of all particles |
clearCosmics | the input vector of clear cosmic ray muons |
slices | the input vector of slices |
consolidatedParticles | the output vector of particles to include in the consolidated output |
Definition at line 398 of file LArPandoraExternalEventBuilding_module.cc.
References part.
Referenced by produce().
|
private |
Collect PFParticles from the ART event and their mapping to metadata objects.
evt | the ART event |
particlesToMetadata | the output mapping from PFParticles to their metadata |
particles | the output vector of particles |
Definition at line 229 of file LArPandoraExternalEventBuilding_module.cc.
References art::ProductRetriever::getByLabel(), art::Ptr< T >::key(), m_pandoraTag, and part.
Referenced by produce().
|
private |
Collect slices.
allParticles | input vector of all particles |
particlesToMetadata | the input mapping from PFParticles to their metadata |
particleMap | the input mapping from ID to PFParticle |
slices | the output vector of slices |
Definition at line 301 of file LArPandoraExternalEventBuilding_module.cc.
References GetMetadataValue(), lar_pandora::LArPandoraHelper::GetParentPFParticle(), IsTarget(), m_scoreKey, and part.
Referenced by produce().
|
protectedinherited |
Definition at line 61 of file ModuleBase.h.
References art::ModuleBase::collector_, and art::ConsumesCollector::consumes().
|
protectedinherited |
|
protectedinherited |
Definition at line 75 of file ModuleBase.h.
References art::ModuleBase::collector_, and art::ConsumesCollector::consumesMany().
|
protectedinherited |
|
inherited |
Definition at line 68 of file ModuleBase.h.
References art::ModuleBase::collector_, and art::ConsumesCollector::consumesView().
|
inherited |
Definition at line 22 of file Producer.cc.
References art::detail::Producer::beginJobWithFrame(), and art::detail::Producer::setupQueues().
|
inherited |
Definition at line 65 of file Producer.cc.
References art::detail::Producer::beginRunWithFrame(), art::RangeSet::forRun(), art::RunPrincipal::makeRun(), r, art::RunPrincipal::runID(), and art::ModuleContext::scheduleID().
|
inherited |
Definition at line 85 of file Producer.cc.
References art::detail::Producer::beginSubRunWithFrame(), art::RangeSet::forSubRun(), art::SubRunPrincipal::makeSubRun(), art::ModuleContext::scheduleID(), and art::SubRunPrincipal::subRunID().
|
inherited |
Definition at line 30 of file Producer.cc.
References art::detail::Producer::endJobWithFrame().
|
inherited |
Definition at line 75 of file Producer.cc.
References art::detail::Producer::endRunWithFrame(), art::RunPrincipal::makeRun(), r, art::ModuleContext::scheduleID(), and art::Principal::seenRanges().
|
inherited |
Definition at line 95 of file Producer.cc.
References art::detail::Producer::endSubRunWithFrame(), art::SubRunPrincipal::makeSubRun(), art::ModuleContext::scheduleID(), and art::Principal::seenRanges().
|
inherited |
Definition at line 105 of file Producer.cc.
References art::detail::Producer::checkPutProducts_, e, art::EventPrincipal::makeEvent(), art::detail::Producer::produceWithFrame(), and art::ModuleContext::scheduleID().
|
inherited |
Definition at line 44 of file Producer.cc.
References art::detail::Producer::respondToCloseInputFileWithFrame().
|
inherited |
Definition at line 58 of file Producer.cc.
References art::detail::Producer::respondToCloseOutputFilesWithFrame().
|
inherited |
Definition at line 37 of file Producer.cc.
References art::detail::Producer::respondToOpenInputFileWithFrame().
|
inherited |
Definition at line 51 of file Producer.cc.
References art::detail::Producer::respondToOpenOutputFilesWithFrame().
|
inherited |
Definition at line 10 of file Modifier.cc.
References art::ProductRegistryHelper::fillDescriptions(), and art::ModuleBase::moduleDescription().
|
inherited |
Definition at line 43 of file ModuleBase.cc.
References art::ModuleBase::collector_, and art::ConsumesCollector::getConsumables().
|
private |
Query a metadata object for a given key and return the corresponding value.
metadata | the metadata object to query |
key | the key to search for |
Definition at line 382 of file LArPandoraExternalEventBuilding_module.cc.
References larpandoraobj::PFParticleMetadata::GetPropertiesMap().
Referenced by CollectClearCosmicRays(), CollectSlices(), and IsTarget().
|
private |
Query a metadata object to see if it is a target particle.
metadata | the metadata object to query |
Definition at line 424 of file LArPandoraExternalEventBuilding_module.cc.
References GetMetadataValue(), and m_targetKey.
Referenced by CollectSlices().
|
inherited |
Definition at line 37 of file ModuleBase.cc.
References art::ModuleBase::doMakeWorker(), and art::NumBranchTypes.
|
protectedinherited |
Definition at line 82 of file ModuleBase.h.
References art::ModuleBase::collector_, and art::ConsumesCollector::mayConsume().
|
protectedinherited |
Definition at line 96 of file ModuleBase.h.
References art::ModuleBase::collector_, and art::ConsumesCollector::mayConsumeMany().
|
protectedinherited |
|
inherited |
Definition at line 89 of file ModuleBase.h.
References art::ModuleBase::collector_, and art::ConsumesCollector::mayConsumeView().
|
inherited |
Definition at line 13 of file ModuleBase.cc.
References art::errors::LogicError.
Referenced by art::OutputModule::doRespondToOpenInputFile(), art::OutputModule::doWriteEvent(), art::Modifier::fillProductDescriptions(), art::OutputModule::makePlugins_(), art::OutputWorker::OutputWorker(), reco::shower::LArPandoraModularShowerCreation::produce(), art::Modifier::registerProducts(), and art::OutputModule::registerProducts().
|
delete |
|
delete |
|
overridevirtual |
Implements art::EDProducer.
Definition at line 199 of file LArPandoraExternalEventBuilding_module.cc.
References BuildPFParticleMap(), CollectClearCosmicRays(), CollectConsolidatedParticles(), CollectPFParticles(), CollectSlices(), m_hitProducerLabel, m_inputProducerLabel, m_shouldProduceT0s, m_showerProducerLabel, m_sliceIdTool, m_trackProducerLabel, tca::slices, and lar_pandora::LArPandoraEvent::WriteToEvent().
|
inherited |
Definition at line 16 of file Modifier.cc.
References art::ModuleBase::moduleDescription(), and art::ProductRegistryHelper::registerProducts().
|
inherited |
|
inherited |
Definition at line 49 of file ModuleBase.cc.
References art::ModuleBase::collector_, and art::ConsumesCollector::sortConsumables().
|
private |
Label for the hit producer that was used as input to the Pandora instance specified.
Definition at line 132 of file LArPandoraExternalEventBuilding_module.cc.
Referenced by LArPandoraExternalEventBuilding(), and produce().
|
private |
Label for the Pandora instance that produced the collections we want to consolidated.
Definition at line 126 of file LArPandoraExternalEventBuilding_module.cc.
Referenced by LArPandoraExternalEventBuilding(), and produce().
|
private |
The input tag for the pandora producer.
Definition at line 135 of file LArPandoraExternalEventBuilding_module.cc.
Referenced by CollectPFParticles(), and LArPandoraExternalEventBuilding().
|
private |
The metadata key for the score of the target slice from Pandora.
Definition at line 139 of file LArPandoraExternalEventBuilding_module.cc.
Referenced by CollectSlices(), and LArPandoraExternalEventBuilding().
|
private |
If we should produce T0s (relevant when stitching over multiple drift volumes)
Definition at line 134 of file LArPandoraExternalEventBuilding_module.cc.
Referenced by LArPandoraExternalEventBuilding(), and produce().
|
private |
Label for the shower producer using the Pandora instance that produced the collections we want to consolidate.
Definition at line 130 of file LArPandoraExternalEventBuilding_module.cc.
Referenced by LArPandoraExternalEventBuilding(), and produce().
|
private |
The slice id tool.
Definition at line 136 of file LArPandoraExternalEventBuilding_module.cc.
Referenced by LArPandoraExternalEventBuilding(), and produce().
|
private |
The metadata key for a PFParticle to determine if it is the target.
Definition at line 138 of file LArPandoraExternalEventBuilding_module.cc.
Referenced by IsTarget(), and LArPandoraExternalEventBuilding().
|
private |
Label for the track producer using the Pandora instance that produced the collections we want to consolidate.
Definition at line 128 of file LArPandoraExternalEventBuilding_module.cc.
Referenced by LArPandoraExternalEventBuilding(), and produce().
|
private |
If we should expect a test-beam (instead of a neutrino) slice.
Definition at line 137 of file LArPandoraExternalEventBuilding_module.cc.
Referenced by LArPandoraExternalEventBuilding().