Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
lar_pandora::LArPandora Class Reference

LArPandora class. More...

#include <LArPandora.h>

Inheritance diagram for lar_pandora::LArPandora:
lar_pandora::ILArPandora art::EDProducer art::detail::Producer art::detail::LegacyModule art::Modifier art::ModuleBase art::ProductRegistryHelper lar_pandora::StandardPandora

Public Member Functions

 LArPandora (fhicl::ParameterSet const &pset)
 Constructor. More...
 
void beginJob ()
 
void produce (art::Event &evt)
 
- Public Member Functions inherited from lar_pandora::ILArPandora
 ILArPandora (fhicl::ParameterSet const &pset)
 Constructor. More...
 
virtual ~ILArPandora ()
 Destructor. More...
 
- Public Member Functions inherited from art::EDProducer
 EDProducer (fhicl::ParameterSet const &pset)
 
template<typename Config >
 EDProducer (Table< Config > const &config)
 
std::string workerType () const
 
- Public Member Functions inherited from art::detail::Producer
virtual ~Producer () noexcept
 
 Producer (fhicl::ParameterSet const &)
 
 Producer (Producer const &)=delete
 
 Producer (Producer &&)=delete
 
Produceroperator= (Producer const &)=delete
 
Produceroperator= (Producer &&)=delete
 
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)
 
- Public Member Functions inherited from art::Modifier
 ~Modifier () noexcept
 
 Modifier ()
 
 Modifier (Modifier const &)=delete
 
 Modifier (Modifier &&)=delete
 
Modifieroperator= (Modifier const &)=delete
 
Modifieroperator= (Modifier &&)=delete
 
- Public Member Functions inherited from art::ModuleBase
virtual ~ModuleBase () noexcept
 
 ModuleBase ()
 
ModuleDescription const & moduleDescription () const
 
void setModuleDescription (ModuleDescription const &)
 
std::array< std::vector< ProductInfo >, NumBranchTypes > const & getConsumables () const
 
void sortConsumables (std::string const &current_process_name)
 
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

void CreatePandoraInput (art::Event &evt, IdToHitMap &idToHitMap)
 Create pandora input hits, mc particles etc. More...
 
void ProcessPandoraOutput (art::Event &evt, const IdToHitMap &idToHitMap)
 Process pandora output particle flow objects. More...
 
- Protected Member Functions inherited from lar_pandora::ILArPandora
virtual void CreatePandoraInstances ()=0
 Create pandora instances. More...
 
virtual void ConfigurePandoraInstances ()=0
 Configure pandora instances. More...
 
virtual void DeletePandoraInstances ()=0
 Delete pandora instances. More...
 
virtual void RunPandoraInstances ()=0
 Run all associated pandora instances. More...
 
virtual void ResetPandoraInstances ()=0
 Reset all associated pandora instances. More...
 
- Protected Member Functions inherited from art::ModuleBase
ConsumesCollectorconsumesCollector ()
 
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 ()
 

Protected Attributes

std::string m_configFile
 The config file. More...
 
bool m_shouldRunAllHitsCosmicReco
 Steering: whether to run all hits cosmic-ray reconstruction. More...
 
bool m_shouldRunStitching
 Steering: whether to stitch cosmic-ray muons crossing between volumes. More...
 
bool m_shouldRunCosmicHitRemoval
 Steering: whether to remove hits from tagged cosmic-rays. More...
 
bool m_shouldRunSlicing
 Steering: whether to slice events into separate regions for processing. More...
 
bool m_shouldRunNeutrinoRecoOption
 Steering: whether to run neutrino reconstruction for each slice. More...
 
bool m_shouldRunCosmicRecoOption
 Steering: whether to run cosmic-ray reconstruction for each slice. More...
 
bool m_shouldPerformSliceId
 Steering: whether to identify slices and select most appropriate pfos. More...
 
bool m_shouldProduceAllOutcomes
 Steering: whether to produce all reconstruction outcomes. More...
 
bool m_printOverallRecoStatus
 Steering: whether to print current operation status messages. More...
 
std::string m_generatorModuleLabel
 The generator module label. More...
 
std::string m_geantModuleLabel
 The geant module label. More...
 
std::string m_simChannelModuleLabel
 The SimChannel producer module label. More...
 
std::string m_hitfinderModuleLabel
 The hit finder module label. More...
 
std::string m_backtrackerModuleLabel
 The back tracker module label. More...
 
std::string m_allOutcomesInstanceLabel
 The instance label for all outcomes. More...
 
bool m_enableProduction
 Whether to persist output products. More...
 
bool m_enableDetectorGaps
 Whether to pass detector gap information to Pandora instances. More...
 
bool m_enableMCParticles
 Whether to pass mc information to Pandora instances to aid development. More...
 
bool m_disableRealDataCheck
 Whether to check if the input file contains real data before accessing MC information. More...
 
bool m_lineGapsCreated
 Book-keeping: whether line gap creation has been called. More...
 
LArPandoraInput::Settings m_inputSettings
 The lar pandora input settings. More...
 
LArPandoraOutput::Settings m_outputSettings
 The lar pandora output settings. More...
 
LArDriftVolumeMap m_driftVolumeMap
 The map from volume id to drift volume. More...
 
- Protected Attributes inherited from lar_pandora::ILArPandora
const pandora::Pandora * m_pPrimaryPandora
 The address of the primary pandora instance. More...
 

Additional Inherited Members

- Public Types inherited from art::EDProducer
using ModuleType = EDProducer
 
using WorkerType = WorkerT< EDProducer >
 
- Public Types inherited from art::detail::Producer
template<typename UserConfig , typename KeysToIgnore = void>
using Table = Modifier::Table< UserConfig, KeysToIgnore >
 
- Public Types inherited from art::Modifier
template<typename UserConfig , typename UserKeysToIgnore = void>
using Table = ProducerTable< UserConfig, detail::ModuleConfig, UserKeysToIgnore >
 
- Static Public Member Functions inherited from art::EDProducer
static void commitEvent (EventPrincipal &ep, Event &e)
 

Detailed Description

LArPandora class.

Definition at line 24 of file LArPandora.h.

Constructor & Destructor Documentation

lar_pandora::LArPandora::LArPandora ( fhicl::ParameterSet const &  pset)

Constructor.

Parameters
psetthe parameter set

Definition at line 44 of file LArPandora.cxx.

45  : ILArPandora(pset)
46  , m_configFile(pset.get<std::string>("ConfigFile"))
47  , m_shouldRunAllHitsCosmicReco(pset.get<bool>("ShouldRunAllHitsCosmicReco"))
48  , m_shouldRunStitching(pset.get<bool>("ShouldRunStitching"))
49  , m_shouldRunCosmicHitRemoval(pset.get<bool>("ShouldRunCosmicHitRemoval"))
50  , m_shouldRunSlicing(pset.get<bool>("ShouldRunSlicing"))
51  , m_shouldRunNeutrinoRecoOption(pset.get<bool>("ShouldRunNeutrinoRecoOption"))
52  , m_shouldRunCosmicRecoOption(pset.get<bool>("ShouldRunCosmicRecoOption"))
53  , m_shouldPerformSliceId(pset.get<bool>("ShouldPerformSliceId"))
54  , m_shouldProduceAllOutcomes(pset.get<bool>("ProduceAllOutcomes", false))
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_simChannelModuleLabel(pset.get<std::string>("SimChannelModuleLabel", m_geantModuleLabel))
59  , m_hitfinderModuleLabel(pset.get<std::string>("HitFinderModuleLabel"))
60  , m_backtrackerModuleLabel(pset.get<std::string>("BackTrackerModuleLabel", ""))
61  , m_allOutcomesInstanceLabel(pset.get<std::string>("AllOutcomesInstanceLabel", "allOutcomes"))
62  , m_enableProduction(pset.get<bool>("EnableProduction", true))
63  , m_enableDetectorGaps(pset.get<bool>("EnableLineGaps", true))
64  , m_enableMCParticles(pset.get<bool>("EnableMCParticles", false))
65  , m_disableRealDataCheck(pset.get<bool>("DisableRealDataCheck", false))
66  , m_lineGapsCreated(false)
67  {
68  m_inputSettings.m_useHitWidths = pset.get<bool>("UseHitWidths", true);
69  m_inputSettings.m_useBirksCorrection = pset.get<bool>("UseBirksCorrection", false);
70  m_inputSettings.m_useActiveBoundingBox = pset.get<bool>("UseActiveBoundingBox", false);
71  m_inputSettings.m_uidOffset = pset.get<int>("UidOffset", 100000000);
72  m_inputSettings.m_dx_cm = pset.get<double>("DefaultHitWidth", 0.5);
73  m_inputSettings.m_int_cm = pset.get<double>("InteractionLength", 84.);
74  m_inputSettings.m_rad_cm = pset.get<double>("RadiationLength", 14.);
75  m_inputSettings.m_dEdX_mip = pset.get<double>("dEdXmip", 2.);
76  m_inputSettings.m_mips_max = pset.get<double>("MipsMax", 50.);
77  m_inputSettings.m_mips_if_negative = pset.get<double>("MipsIfNegative", 0.);
78  m_inputSettings.m_mips_to_gev = pset.get<double>("MipsToGeV", 3.5e-4);
79  m_inputSettings.m_recombination_factor = pset.get<double>("RecombinationFactor", 0.63);
81  m_outputSettings.m_shouldProduceSlices = pset.get<bool>("ShouldProduceSlices", true);
83  pset.get<bool>("ShouldProduceTestBeamInteractionVertices", false);
85  "TestBeamInteractionVerticesInstanceLabel", "testBeamInteractionVertices");
89 
90  if (m_enableProduction) {
91  // Set up the instance names to produces
92  std::vector<std::string> instanceNames({""});
93  if (m_shouldProduceAllOutcomes) instanceNames.push_back(m_allOutcomesInstanceLabel);
94 
95  for (const std::string& instanceName : instanceNames) {
96  produces<std::vector<recob::PFParticle>>(instanceName);
97  produces<std::vector<recob::SpacePoint>>(instanceName);
98  produces<std::vector<recob::Cluster>>(instanceName);
99  produces<std::vector<recob::Vertex>>(instanceName);
100  produces<std::vector<larpandoraobj::PFParticleMetadata>>(instanceName);
101 
102  produces<art::Assns<recob::PFParticle, larpandoraobj::PFParticleMetadata>>(instanceName);
103  produces<art::Assns<recob::PFParticle, recob::SpacePoint>>(instanceName);
104  produces<art::Assns<recob::PFParticle, recob::Cluster>>(instanceName);
105  produces<art::Assns<recob::PFParticle, recob::Vertex>>(instanceName);
106  produces<art::Assns<recob::SpacePoint, recob::Hit>>(instanceName);
107  produces<art::Assns<recob::Cluster, recob::Hit>>(instanceName);
108 
110  // ATTN: Test beam interaction vertex instance label appended to current instance name to preserve unique label in multiple instance case
111  produces<std::vector<recob::Vertex>>(
113  produces<art::Assns<recob::PFParticle, recob::Vertex>>(
115  }
116 
118  produces<std::vector<anab::T0>>(instanceName);
119  produces<art::Assns<recob::PFParticle, anab::T0>>(instanceName);
120  }
121 
123  produces<std::vector<recob::Slice>>(instanceName);
124  produces<art::Assns<recob::Slice, recob::Hit>>(instanceName);
125  produces<art::Assns<recob::PFParticle, recob::Slice>>(instanceName);
126  }
127  }
128  }
129  }
std::string m_allOutcomesInstanceLabel
The instance label for all outcomes.
Definition: LArPandora.h:64
std::string string
Definition: nybbler.cc:12
bool m_shouldRunAllHitsCosmicReco
Steering: whether to run all hits cosmic-ray reconstruction.
Definition: LArPandora.h:43
std::string m_testBeamInteractionVerticesInstanceLabel
The label for the test beam interaction vertices.
bool m_disableRealDataCheck
Whether to check if the input file contains real data before accessing MC information.
Definition: LArPandora.h:71
bool m_shouldProduceAllOutcomes
Steering: whether to produce all reconstruction outcomes.
Definition: LArPandora.h:55
bool m_isNeutrinoRecoOnlyNoSlicing
If we are running the neutrino reconstruction only with no slicing.
std::string m_backtrackerModuleLabel
The back tracker module label.
Definition: LArPandora.h:62
bool m_lineGapsCreated
Book-keeping: whether line gap creation has been called.
Definition: LArPandora.h:72
bool m_shouldRunCosmicHitRemoval
Steering: whether to remove hits from tagged cosmic-rays.
Definition: LArPandora.h:46
std::string m_hitfinderModuleLabel
The hit finder module label.
bool m_shouldRunNeutrinoRecoOption
Steering: whether to run neutrino reconstruction for each slice.
Definition: LArPandora.h:50
bool m_printOverallRecoStatus
Steering: whether to print current operation status messages.
Definition: LArPandora.h:56
std::string m_generatorModuleLabel
The generator module label.
Definition: LArPandora.h:58
std::string m_geantModuleLabel
The geant module label.
Definition: LArPandora.h:59
bool m_shouldRunCosmicRecoOption
Steering: whether to run cosmic-ray reconstruction for each slice.
Definition: LArPandora.h:52
bool m_shouldProduceTestBeamInteractionVertices
Whether to write the test beam interaction vertices in a separate collection.
std::string m_configFile
The config file.
Definition: LArPandora.h:40
bool m_enableDetectorGaps
Whether to pass detector gap information to Pandora instances.
Definition: LArPandora.h:67
bool m_shouldRunStitching
Steering: whether to stitch cosmic-ray muons crossing between volumes.
Definition: LArPandora.h:45
LArPandoraInput::Settings m_inputSettings
The lar pandora input settings.
Definition: LArPandora.h:74
LArPandoraOutput::Settings m_outputSettings
The lar pandora output settings.
Definition: LArPandora.h:75
bool m_shouldProduceSlices
Whether to produce output slices e.g. may not want to do this if only (re)processing single slices...
ILArPandora(fhicl::ParameterSet const &pset)
Constructor.
Definition: ILArPandora.h:88
bool m_shouldRunSlicing
Steering: whether to slice events into separate regions for processing.
Definition: LArPandora.h:48
bool m_enableMCParticles
Whether to pass mc information to Pandora instances to aid development.
Definition: LArPandora.h:69
bool m_enableProduction
Whether to persist output products.
Definition: LArPandora.h:66
std::string m_simChannelModuleLabel
The SimChannel producer module label.
Definition: LArPandora.h:60
bool m_shouldPerformSliceId
Steering: whether to identify slices and select most appropriate pfos.
Definition: LArPandora.h:54
std::string m_hitfinderModuleLabel
The hit finder module label.
Definition: LArPandora.h:61

Member Function Documentation

void lar_pandora::LArPandora::beginJob ( )
virtual

Reimplemented from art::EDProducer.

Definition at line 134 of file LArPandora.cxx.

135  {
136  LArDriftVolumeList driftVolumeList;
139 
140  this->CreatePandoraInstances();
141 
142  if (!m_pPrimaryPandora)
143  throw cet::exception("LArPandora")
144  << " LArPandora::beginJob - failed to create primary Pandora instance " << std::endl;
145 
148 
149  // Pass basic LArTPC information to pandora instances
151 
152  // If using global drift volume approach, pass details of gaps between daughter volumes to the pandora instance
153  if (m_enableDetectorGaps) {
154  LArDetectorGapList listOfGaps;
156  LArPandoraInput::CreatePandoraDetectorGaps(m_inputSettings, driftVolumeList, listOfGaps);
157  }
158 
159  // Parse Pandora settings xml files
161  }
static void CreatePandoraDetectorGaps(const Settings &settings, const LArDriftVolumeList &driftVolumeList, const LArDetectorGapList &listOfGaps)
Create pandora line gaps to cover dead regions between TPCs in a global drift volume approach...
const pandora::Pandora * m_pPrimaryPandora
static void LoadGeometry(LArDriftVolumeList &outputVolumeList, LArDriftVolumeMap &outputVolumeMap, const bool useActiveBoundingBox)
Load drift volume geometry.
std::vector< LArDriftVolume > LArDriftVolumeList
const pandora::Pandora * m_pPrimaryPandora
const pandora::Pandora * m_pPrimaryPandora
The address of the primary pandora instance.
Definition: ILArPandora.h:83
LArDriftVolumeMap m_driftVolumeMap
The map from volume id to drift volume.
Definition: LArPandora.h:77
virtual void CreatePandoraInstances()=0
Create pandora instances.
static void LoadDetectorGaps(LArDetectorGapList &listOfGaps, const bool useActiveBoundingBox)
Load the 2D gaps that go with the chosen geometry.
bool m_enableDetectorGaps
Whether to pass detector gap information to Pandora instances.
Definition: LArPandora.h:67
LArPandoraInput::Settings m_inputSettings
The lar pandora input settings.
Definition: LArPandora.h:74
static void CreatePandoraLArTPCs(const Settings &settings, const LArDriftVolumeList &driftVolumeList)
Create pandora LArTPCs to represent the different drift volumes in use.
LArPandoraOutput::Settings m_outputSettings
The lar pandora output settings.
Definition: LArPandora.h:75
std::vector< LArDetectorGap > LArDetectorGapList
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
QTextStream & endl(QTextStream &s)
virtual void ConfigurePandoraInstances()=0
Configure pandora instances.
void lar_pandora::LArPandora::CreatePandoraInput ( art::Event evt,
IdToHitMap idToHitMap 
)
protectedvirtual

Create pandora input hits, mc particles etc.

Parameters
evtthe art event
idToHitMapto receive the populated pandora hit id to art hit map

Implements lar_pandora::ILArPandora.

Definition at line 178 of file LArPandora.cxx.

179  {
180  // ATTN Should complete gap creation in begin job callback, but channel status service functionality unavailable at that point
183  m_lineGapsCreated = true;
184  }
185 
186  HitVector artHits;
187  SimChannelVector artSimChannels;
188  HitsToTrackIDEs artHitsToTrackIDEs;
189  MCParticleVector artMCParticleVector;
190  RawMCParticleVector generatorArtMCParticleVector;
191  MCTruthToMCParticles artMCTruthToMCParticles;
192  MCParticlesToMCTruth artMCParticlesToMCTruth;
193 
194  bool areSimChannelsValid(false);
195 
197 
199  LArPandoraHelper::CollectMCParticles(evt, m_geantModuleLabel, artMCParticleVector);
200 
201  if (!m_generatorModuleLabel.empty())
203  evt, m_generatorModuleLabel, generatorArtMCParticleVector);
204 
206  evt, m_geantModuleLabel, artMCTruthToMCParticles, artMCParticlesToMCTruth);
207 
209  evt, m_simChannelModuleLabel, artSimChannels, areSimChannelsValid);
210  if (!artSimChannels.empty()) {
211  LArPandoraHelper::BuildMCParticleHitMaps(evt, artHits, artSimChannels, artHitsToTrackIDEs);
212  }
213  else if (!areSimChannelsValid) {
214  if (m_backtrackerModuleLabel.empty())
215  throw cet::exception("LArPandora")
216  << "LArPandora::CreatePandoraInput - Can't build MCParticle to Hit map." << std::endl
217  << "No SimChannels found with label \"" << m_simChannelModuleLabel
218  << "\", and BackTrackerModuleLabel isn't set in FHiCL." << std::endl;
219 
221  evt, m_hitfinderModuleLabel, m_backtrackerModuleLabel, artHitsToTrackIDEs);
222  }
223  else {
224  mf::LogDebug("LArPandora")
225  << " *** LArPandora::CreatePandoraInput - empty list of sim channels found " << std::endl;
226  }
227  }
228 
230  evt, m_inputSettings, m_driftVolumeMap, artHits, idToHitMap);
231 
234  artMCTruthToMCParticles,
235  artMCParticlesToMCTruth,
236  generatorArtMCParticleVector);
237  LArPandoraInput::CreatePandoraMCLinks2D(m_inputSettings, idToHitMap, artHitsToTrackIDEs);
238  }
239  }
static void CreatePandoraMCParticles(const Settings &settings, const MCTruthToMCParticles &truthToParticles, const MCParticlesToMCTruth &particlesToTruth, const RawMCParticleVector &generatorMCParticleVector)
Create the Pandora MC particles from the MC particles.
std::map< art::Ptr< simb::MCParticle >, art::Ptr< simb::MCTruth > > MCParticlesToMCTruth
bool m_disableRealDataCheck
Whether to check if the input file contains real data before accessing MC information.
Definition: LArPandora.h:71
std::string m_backtrackerModuleLabel
The back tracker module label.
Definition: LArPandora.h:62
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.
bool m_lineGapsCreated
Book-keeping: whether line gap creation has been called.
Definition: LArPandora.h:72
std::map< art::Ptr< recob::Hit >, TrackIDEVector > HitsToTrackIDEs
bool isRealData() const
std::vector< simb::MCParticle > RawMCParticleVector
LArDriftVolumeMap m_driftVolumeMap
The map from volume id to drift volume.
Definition: LArPandora.h:77
std::map< art::Ptr< simb::MCTruth >, MCParticleVector > MCTruthToMCParticles
std::string m_generatorModuleLabel
The generator module label.
Definition: LArPandora.h:58
std::string m_geantModuleLabel
The geant module label.
Definition: LArPandora.h:59
static void CreatePandoraMCLinks2D(const Settings &settings, const HitMap &hitMap, const HitsToTrackIDEs &hitToParticleMap)
Create links between the 2D hits and Pandora MC particles.
std::vector< art::Ptr< simb::MCParticle > > MCParticleVector
static void CollectSimChannels(const art::Event &evt, const std::string &label, SimChannelVector &simChannelVector, bool &areSimChannelsValid)
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.
static void CreatePandoraReadoutGaps(const Settings &settings, const LArDriftVolumeMap &driftVolumeMap)
Create pandora line gaps to cover any (continuous regions of) bad channels.
bool m_enableDetectorGaps
Whether to pass detector gap information to Pandora instances.
Definition: LArPandora.h:67
LArPandoraInput::Settings m_inputSettings
The lar pandora input settings.
Definition: LArPandora.h:74
std::vector< art::Ptr< recob::Hit > > HitVector
std::vector< art::Ptr< sim::SimChannel > > SimChannelVector
MaybeLogger_< ELseverityLevel::ELsev_success, false > LogDebug
static void CreatePandoraHits2D(const art::Event &evt, const Settings &settings, const LArDriftVolumeMap &driftVolumeMap, const HitVector &hitVector, IdToHitMap &idToHitMap)
Create the Pandora 2D hits from the ART hits.
bool m_enableMCParticles
Whether to pass mc information to Pandora instances to aid development.
Definition: LArPandora.h:69
static void BuildMCParticleHitMaps(const art::Event &evt, const HitVector &hitVector, const SimChannelVector &simChannelVector, HitsToTrackIDEs &hitsToTrackIDEs)
Collect the links from reconstructed hits to their true energy deposits.
static void CollectMCParticles(const art::Event &evt, const std::string &label, MCParticleVector &particleVector)
Collect a vector of MCParticle objects from the ART event record.
std::string m_simChannelModuleLabel
The SimChannel producer module label.
Definition: LArPandora.h:60
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
QTextStream & endl(QTextStream &s)
std::string m_hitfinderModuleLabel
The hit finder module label.
Definition: LArPandora.h:61
void lar_pandora::LArPandora::ProcessPandoraOutput ( art::Event evt,
const IdToHitMap idToHitMap 
)
protectedvirtual

Process pandora output particle flow objects.

Parameters
evtthe art event
idToHitMapthe pandora hit id to art hit map

Implements lar_pandora::ILArPandora.

Definition at line 244 of file LArPandora.cxx.

245  {
246  if (m_enableProduction) {
249 
254  }
255  }
256  }
std::string m_allOutcomesInstanceLabel
The instance label for all outcomes.
Definition: LArPandora.h:64
std::string m_allOutcomesInstanceLabel
The label for the instance producing all outcomes.
bool m_shouldProduceAllOutcomes
Steering: whether to produce all reconstruction outcomes.
Definition: LArPandora.h:55
static void ProduceArtOutput(const Settings &settings, const IdToHitMap &idToHitMap, art::Event &evt)
Convert the Pandora PFOs into ART clusters and write into ART event.
LArPandoraOutput::Settings m_outputSettings
The lar pandora output settings.
Definition: LArPandora.h:75
bool m_shouldProduceAllOutcomes
If all outcomes should be produced in separate collections (choose false if you only require the cons...
bool m_enableProduction
Whether to persist output products.
Definition: LArPandora.h:66
void lar_pandora::LArPandora::produce ( art::Event evt)
virtual

Implements art::EDProducer.

Definition at line 166 of file LArPandora.cxx.

167  {
168  IdToHitMap idToHitMap;
169  this->CreatePandoraInput(evt, idToHitMap);
170  this->RunPandoraInstances();
171  this->ProcessPandoraOutput(evt, idToHitMap);
172  this->ResetPandoraInstances();
173  }
void CreatePandoraInput(art::Event &evt, IdToHitMap &idToHitMap)
Create pandora input hits, mc particles etc.
Definition: LArPandora.cxx:178
std::map< int, art::Ptr< recob::Hit > > IdToHitMap
Definition: ILArPandora.h:21
void ProcessPandoraOutput(art::Event &evt, const IdToHitMap &idToHitMap)
Process pandora output particle flow objects.
Definition: LArPandora.cxx:244
virtual void ResetPandoraInstances()=0
Reset all associated pandora instances.
virtual void RunPandoraInstances()=0
Run all associated pandora instances.

Member Data Documentation

std::string lar_pandora::LArPandora::m_allOutcomesInstanceLabel
protected

The instance label for all outcomes.

Definition at line 64 of file LArPandora.h.

std::string lar_pandora::LArPandora::m_backtrackerModuleLabel
protected

The back tracker module label.

Definition at line 62 of file LArPandora.h.

std::string lar_pandora::LArPandora::m_configFile
protected

The config file.

Definition at line 40 of file LArPandora.h.

bool lar_pandora::LArPandora::m_disableRealDataCheck
protected

Whether to check if the input file contains real data before accessing MC information.

Definition at line 71 of file LArPandora.h.

LArDriftVolumeMap lar_pandora::LArPandora::m_driftVolumeMap
protected

The map from volume id to drift volume.

Definition at line 77 of file LArPandora.h.

bool lar_pandora::LArPandora::m_enableDetectorGaps
protected

Whether to pass detector gap information to Pandora instances.

Definition at line 67 of file LArPandora.h.

bool lar_pandora::LArPandora::m_enableMCParticles
protected

Whether to pass mc information to Pandora instances to aid development.

Definition at line 69 of file LArPandora.h.

bool lar_pandora::LArPandora::m_enableProduction
protected

Whether to persist output products.

Definition at line 66 of file LArPandora.h.

std::string lar_pandora::LArPandora::m_geantModuleLabel
protected

The geant module label.

Definition at line 59 of file LArPandora.h.

std::string lar_pandora::LArPandora::m_generatorModuleLabel
protected

The generator module label.

Definition at line 58 of file LArPandora.h.

std::string lar_pandora::LArPandora::m_hitfinderModuleLabel
protected

The hit finder module label.

Definition at line 61 of file LArPandora.h.

LArPandoraInput::Settings lar_pandora::LArPandora::m_inputSettings
protected

The lar pandora input settings.

Definition at line 74 of file LArPandora.h.

bool lar_pandora::LArPandora::m_lineGapsCreated
protected

Book-keeping: whether line gap creation has been called.

Definition at line 72 of file LArPandora.h.

LArPandoraOutput::Settings lar_pandora::LArPandora::m_outputSettings
protected

The lar pandora output settings.

Definition at line 75 of file LArPandora.h.

bool lar_pandora::LArPandora::m_printOverallRecoStatus
protected

Steering: whether to print current operation status messages.

Definition at line 56 of file LArPandora.h.

bool lar_pandora::LArPandora::m_shouldPerformSliceId
protected

Steering: whether to identify slices and select most appropriate pfos.

Definition at line 54 of file LArPandora.h.

bool lar_pandora::LArPandora::m_shouldProduceAllOutcomes
protected

Steering: whether to produce all reconstruction outcomes.

Definition at line 55 of file LArPandora.h.

bool lar_pandora::LArPandora::m_shouldRunAllHitsCosmicReco
protected

Steering: whether to run all hits cosmic-ray reconstruction.

Definition at line 43 of file LArPandora.h.

bool lar_pandora::LArPandora::m_shouldRunCosmicHitRemoval
protected

Steering: whether to remove hits from tagged cosmic-rays.

Definition at line 46 of file LArPandora.h.

bool lar_pandora::LArPandora::m_shouldRunCosmicRecoOption
protected

Steering: whether to run cosmic-ray reconstruction for each slice.

Definition at line 52 of file LArPandora.h.

bool lar_pandora::LArPandora::m_shouldRunNeutrinoRecoOption
protected

Steering: whether to run neutrino reconstruction for each slice.

Definition at line 50 of file LArPandora.h.

bool lar_pandora::LArPandora::m_shouldRunSlicing
protected

Steering: whether to slice events into separate regions for processing.

Definition at line 48 of file LArPandora.h.

bool lar_pandora::LArPandora::m_shouldRunStitching
protected

Steering: whether to stitch cosmic-ray muons crossing between volumes.

Definition at line 45 of file LArPandora.h.

std::string lar_pandora::LArPandora::m_simChannelModuleLabel
protected

The SimChannel producer module label.

Definition at line 60 of file LArPandora.h.


The documentation for this class was generated from the following files: