10 #include "cetlib/cpu_timer.h" 29 #include "Api/PandoraApi.h" 47 m_configFile(pset.get<
std::string>(
"ConfigFile")),
48 m_shouldRunAllHitsCosmicReco(pset.get<bool>(
"ShouldRunAllHitsCosmicReco")),
49 m_shouldRunStitching(pset.get<bool>(
"ShouldRunStitching")),
50 m_shouldRunCosmicHitRemoval(pset.get<bool>(
"ShouldRunCosmicHitRemoval")),
51 m_shouldRunSlicing(pset.get<bool>(
"ShouldRunSlicing")),
52 m_shouldRunNeutrinoRecoOption(pset.get<bool>(
"ShouldRunNeutrinoRecoOption")),
53 m_shouldRunCosmicRecoOption(pset.get<bool>(
"ShouldRunCosmicRecoOption")),
54 m_shouldPerformSliceId(pset.get<bool>(
"ShouldPerformSliceId")),
55 m_printOverallRecoStatus(pset.get<bool>(
"PrintOverallRecoStatus", false)),
56 m_generatorModuleLabel(pset.get<
std::string>(
"GeneratorModuleLabel",
"")),
57 m_geantModuleLabel(pset.get<
std::string>(
"GeantModuleLabel",
"largeant")),
58 m_hitfinderModuleLabel(pset.get<
std::string>(
"HitFinderModuleLabel")),
59 m_backtrackerModuleLabel(pset.get<
std::string>(
"BackTrackerModuleLabel",
"")),
60 m_enableProduction(pset.get<bool>(
"EnableProduction", true)),
61 m_enableDetectorGaps(pset.get<bool>(
"EnableLineGaps", true)),
62 m_enableMCParticles(pset.get<bool>(
"EnableMCParticles", false)),
63 m_lineGapsCreated(false)
81 produces< std::vector<recob::PFParticle> >();
82 produces< std::vector<recob::SpacePoint> >();
83 produces< std::vector<recob::Cluster> >();
84 produces< std::vector<recob::Vertex> >();
85 produces< std::vector<larpandoraobj::PFParticleMetadata> >();
87 produces< art::Assns<recob::PFParticle, larpandoraobj::PFParticleMetadata> >();
88 produces< art::Assns<recob::PFParticle, recob::SpacePoint> >();
89 produces< art::Assns<recob::PFParticle, recob::Cluster> >();
90 produces< art::Assns<recob::PFParticle, recob::Vertex> >();
91 produces< art::Assns<recob::SpacePoint, recob::Hit> >();
92 produces< art::Assns<recob::Cluster, recob::Hit> >();
96 produces< std::vector<anab::T0> >();
97 produces< art::Assns<recob::PFParticle, anab::T0> >();
112 throw cet::exception(
"LArPandora") <<
" LArPandora::beginJob - failed to create primary Pandora instance " << std::endl;
174 if (!artSimChannels.empty())
181 throw cet::exception(
"LArPandora") <<
" LArPandora::CreatePandoraInput - no sim channels found, backtracker module must be set in FHiCL " << std::endl;
art::EDProducer * m_pProducer
std::map< art::Ptr< recob::Hit >, TrackIDEVector > HitsToTrackIDEs
Header file for the pfo helper class.
void CreatePandoraInput(art::Event &evt, IdToHitMap &idToHitMap)
Create pandora input hits, mc particles etc.
Base producer module for reconstructing recob::PFParticles from recob::Hits.
const pandora::Pandora * m_pPrimaryPandora
std::vector< LArDetectorGap > LArDetectorGapList
std::map< art::Ptr< simb::MCTruth >, MCParticleVector > MCTruthToMCParticles
Declaration of signal hit object.
std::vector< LArDriftVolume > LArDriftVolumeList
std::map< int, art::Ptr< recob::Hit > > IdToHitMap
Helper functions for processing outputs from pandora.
std::string m_backtrackerModuleLabel
The back tracker module label.
std::vector< art::Ptr< simb::MCParticle > > MCParticleVector
static void CollectGeneratorMCParticles(const art::Event &evt, const std::string &label, RawMCParticleVector &particleVector)
Collect a vector of MCParticle objects from the generator in the ART event record. ATTN: This function is needed as accessing generator (opposed to Geant4) level MCParticles requires use of MCTruth block.
std::map< art::Ptr< simb::MCParticle >, art::Ptr< simb::MCTruth > > MCParticlesToMCTruth
bool m_lineGapsCreated
Book-keeping: whether line gap creation has been called.
std::vector< art::Ptr< sim::SimChannel > > SimChannelVector
static void LoadGeometry(LArDriftVolumeList &outputVolumeList, LArDriftVolumeMap &outputVolumeMap)
Load drift volume geometry.
static void BuildMCParticleHitMaps(const HitVector &hitVector, const SimChannelVector &simChannelVector, HitsToTrackIDEs &hitsToTrackIDEs)
Collect the links from reconstructed hits to their true energy deposits.
const pandora::Pandora * m_pPrimaryPandora
The address of the primary pandora instance.
LArDriftVolumeMap m_driftVolumeMap
The map from volume id to drift volume.
virtual void CreatePandoraInstances()=0
Create pandora instances.
std::string m_generatorModuleLabel
The generator module label.
std::string m_geantModuleLabel
The geant module label.
T get(std::string const &key) const
void ProcessPandoraOutput(art::Event &evt, const IdToHitMap &idToHitMap)
Process pandora output particle flow objects.
static void ProduceArtOutput(const Settings &settings, const IdToHitMap &idToHitMap, art::Event &evt)
Convert the Pandora PFOs into ART clusters and write into ART event.
virtual void ResetPandoraInstances()=0
Reset all associated pandora instances.
Declaration of cluster object.
Provides recob::Track data product.
LArPandora(fhicl::ParameterSet const &pset)
Constructor.
std::vector< art::Ptr< recob::Hit > > HitVector
static void CollectSimChannels(const art::Event &evt, const std::string &label, SimChannelVector &simChannelVector)
Collect a vector of SimChannel objects from the ART event record.
static void CollectHits(const art::Event &evt, const std::string &label, HitVector &hitVector)
Collect the reconstructed Hits from the ART event record.
bool m_enableDetectorGaps
Whether to pass detector gap information to Pandora instances.
void produce(art::Event &evt)
bool m_shouldRunStitching
Steering: whether to stitch cosmic-ray muons crossing between volumes.
std::vector< simb::MCParticle > RawMCParticleVector
LArPandoraInput::Settings m_inputSettings
The lar pandora input settings.
LArPandoraOutput::Settings m_outputSettings
The lar pandora output settings.
bool m_shouldRunStitching
Header file detailing content for use with particle flow reconstruction at liquid argon time projecti...
virtual void RunPandoraInstances()=0
Run all associated pandora instances.
bool m_enableMCParticles
Whether to pass mc information to Pandora instances to aid development.
bool m_enableProduction
Whether to persist output products.
static void CollectMCParticles(const art::Event &evt, const std::string &label, MCParticleVector &particleVector)
Collect a vector of MCParticle objects from the ART event record.
helper function for LArPandoraInterface producer module
art framework interface to geometry description
cet::coded_exception< error, detail::translate > exception
std::string m_hitfinderModuleLabel
The hit finder module label.
virtual void ConfigurePandoraInstances()=0
Configure pandora instances.
static void LoadDetectorGaps(LArDetectorGapList &listOfGaps)
Load the 2D gaps that go with the chosen geometry.