All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Member Functions | List of all members
lar_pandora::StandardPandora Class Reference

StandardPandora class. More...

Inheritance diagram for lar_pandora::StandardPandora:
lar_pandora::LArPandora lar_pandora::ILArPandora

Public Member Functions

 StandardPandora (fhicl::ParameterSet const &pset)
 Constructor. More...
 
 ~StandardPandora ()
 Destructor. More...
 
- Public Member Functions inherited from lar_pandora::LArPandora
 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...
 

Private Member Functions

void CreatePandoraInstances ()
 Create pandora instances. More...
 
void ConfigurePandoraInstances ()
 Configure pandora instances. More...
 
void RunPandoraInstances ()
 Run all associated pandora instances. More...
 
void ResetPandoraInstances ()
 Reset all associated pandora instances. More...
 
void DeletePandoraInstances ()
 Delete pandora instances. More...
 
void ProvideExternalSteeringParameters (const pandora::Pandora *const pPandora) const
 Pass external steering parameters, read from fhicl parameter set, to LArMaster Pandora algorithm. More...
 

Additional Inherited Members

- Protected Member Functions inherited from lar_pandora::LArPandora
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 Attributes inherited from lar_pandora::LArPandora
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...
 

Detailed Description

StandardPandora class.

Definition at line 19 of file StandardPandora_module.cc.

Constructor & Destructor Documentation

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

Constructor.

Parameters
psetthe parameter set

Definition at line 73 of file StandardPandora_module.cc.

73  :
74  LArPandora(pset)
75 {
76 }
LArPandora(fhicl::ParameterSet const &pset)
Constructor.
Definition: LArPandora.cxx:41
lar_pandora::StandardPandora::~StandardPandora ( )

Destructor.

Definition at line 80 of file StandardPandora_module.cc.

81 {
82  this->DeletePandoraInstances();
83 }
void DeletePandoraInstances()
Delete pandora instances.

Member Function Documentation

void lar_pandora::StandardPandora::ConfigurePandoraInstances ( )
privatevirtual

Configure pandora instances.

Implements lar_pandora::ILArPandora.

Definition at line 105 of file StandardPandora_module.cc.

106 {
107  cet::search_path sp("FW_SEARCH_PATH");
108  std::string fullConfigFileName;
109 
110  if (!sp.find_file(m_configFile, fullConfigFileName))
111  throw cet::exception("StandardPandora") << " ConfigurePrimaryPandoraInstance - Failed to find xml configuration file " << m_configFile << " in FW search path";
112 
114  PANDORA_THROW_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=, PandoraApi::ReadSettings(*m_pPrimaryPandora, fullConfigFileName));
115 }
void ProvideExternalSteeringParameters(const pandora::Pandora *const pPandora) const
Pass external steering parameters, read from fhicl parameter set, to LArMaster Pandora algorithm...
const pandora::Pandora * m_pPrimaryPandora
The address of the primary pandora instance.
Definition: ILArPandora.h:83
std::string m_configFile
The config file.
Definition: LArPandora.h:38
void lar_pandora::StandardPandora::CreatePandoraInstances ( )
privatevirtual

Create pandora instances.

Implements lar_pandora::ILArPandora.

Definition at line 87 of file StandardPandora_module.cc.

88 {
89  m_pPrimaryPandora = new pandora::Pandora();
90  PANDORA_THROW_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=, LArContent::RegisterAlgorithms(*m_pPrimaryPandora));
91 #ifdef LIBTORCH_DL
92  PANDORA_THROW_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=, LArDLContent::RegisterAlgorithms(*m_pPrimaryPandora));
93 #endif
94  PANDORA_THROW_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=, LArContent::RegisterBasicPlugins(*m_pPrimaryPandora));
95 
96  // ATTN Potentially ill defined, unless coordinate system set up to ensure that all drift volumes have same wire angles and pitches
97  PANDORA_THROW_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=, PandoraApi::SetPseudoLayerPlugin(*m_pPrimaryPandora, new lar_content::LArPseudoLayerPlugin));
98  PANDORA_THROW_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=, PandoraApi::SetLArTransformationPlugin(*m_pPrimaryPandora, new lar_content::LArRotationalTransformationPlugin));
99 
101 }
const pandora::Pandora * m_pPrimaryPandora
The address of the primary pandora instance.
Definition: ILArPandora.h:83
static void AddPrimaryPandoraInstance(const pandora::Pandora *const pPrimaryPandora)
Declare a new primary pandora instance and receive the relevant multi pandora book-keeping instance...
static pandora::StatusCode RegisterBasicPlugins(const pandora::Pandora &pandora)
Register the basic lar content plugins with pandora.
Definition: LArContent.cc:466
static pandora::StatusCode RegisterAlgorithms(const pandora::Pandora &pandora)
Register all the lar content algorithms and tools with pandora.
Definition: LArContent.cc:450
static pandora::StatusCode RegisterAlgorithms(const pandora::Pandora &pandora)
Register all the lar dl content algorithms and tools with pandora.
Definition: LArDLContent.cc:91
LarPandoraPseudoLayerPlugin class.
void lar_pandora::StandardPandora::DeletePandoraInstances ( )
privatevirtual

Delete pandora instances.

Implements lar_pandora::ILArPandora.

Definition at line 133 of file StandardPandora_module.cc.

134 {
136 }
static void DeletePandoraInstances(const pandora::Pandora *const pPrimaryPandora)
Delete all pandora instances associated with (and including) a specified primary pandora instance...
const pandora::Pandora * m_pPrimaryPandora
The address of the primary pandora instance.
Definition: ILArPandora.h:83
void lar_pandora::StandardPandora::ProvideExternalSteeringParameters ( const pandora::Pandora *const  pPandora) const
private

Pass external steering parameters, read from fhicl parameter set, to LArMaster Pandora algorithm.

Parameters
pPandorathe address of the relevant pandora instance

Definition at line 140 of file StandardPandora_module.cc.

141 {
142  auto *const pEventSteeringParameters = new lar_content::MasterAlgorithm::ExternalSteeringParameters;
144  pEventSteeringParameters->m_shouldRunStitching = m_shouldRunStitching;
145  pEventSteeringParameters->m_shouldRunCosmicHitRemoval = m_shouldRunCosmicHitRemoval;
146  pEventSteeringParameters->m_shouldRunSlicing = m_shouldRunSlicing;
147  pEventSteeringParameters->m_shouldRunNeutrinoRecoOption = m_shouldRunNeutrinoRecoOption;
148  pEventSteeringParameters->m_shouldRunCosmicRecoOption = m_shouldRunCosmicRecoOption;
149  pEventSteeringParameters->m_shouldPerformSliceId = m_shouldPerformSliceId;
150  pEventSteeringParameters->m_printOverallRecoStatus = m_printOverallRecoStatus;
151  PANDORA_THROW_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=, pandora::ExternallyConfiguredAlgorithm::SetExternalParameters(*pPandora, "LArMaster", pEventSteeringParameters));
152 
153 #ifdef LIBTORCH_DL
154  auto *const pEventSettingsParametersCopy = new lar_content::MasterAlgorithm::ExternalSteeringParameters(*pEventSteeringParameters);
155  PANDORA_THROW_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=, pandora::ExternallyConfiguredAlgorithm::SetExternalParameters(*pPandora,
156  "LArDLMaster", pEventSettingsParametersCopy));
157 #endif
158 }
bool m_shouldRunAllHitsCosmicReco
Steering: whether to run all hits cosmic-ray reconstruction.
Definition: LArPandora.h:41
bool m_shouldRunCosmicHitRemoval
Steering: whether to remove hits from tagged cosmic-rays.
Definition: LArPandora.h:44
pandora::InputBool m_shouldRunAllHitsCosmicReco
Whether to run all hits cosmic-ray reconstruction.
bool m_shouldRunNeutrinoRecoOption
Steering: whether to run neutrino reconstruction for each slice.
Definition: LArPandora.h:48
bool m_printOverallRecoStatus
Steering: whether to print current operation status messages.
Definition: LArPandora.h:54
bool m_shouldRunCosmicRecoOption
Steering: whether to run cosmic-ray reconstruction for each slice.
Definition: LArPandora.h:50
bool m_shouldRunStitching
Steering: whether to stitch cosmic-ray muons crossing between volumes.
Definition: LArPandora.h:43
bool m_shouldRunSlicing
Steering: whether to slice events into separate regions for processing.
Definition: LArPandora.h:46
bool m_shouldPerformSliceId
Steering: whether to identify slices and select most appropriate pfos.
Definition: LArPandora.h:52
void lar_pandora::StandardPandora::ResetPandoraInstances ( )
privatevirtual

Reset all associated pandora instances.

Implements lar_pandora::ILArPandora.

Definition at line 126 of file StandardPandora_module.cc.

127 {
128  PANDORA_THROW_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=, PandoraApi::Reset(*m_pPrimaryPandora));
129 }
const pandora::Pandora * m_pPrimaryPandora
The address of the primary pandora instance.
Definition: ILArPandora.h:83
void lar_pandora::StandardPandora::RunPandoraInstances ( )
privatevirtual

Run all associated pandora instances.

Implements lar_pandora::ILArPandora.

Definition at line 119 of file StandardPandora_module.cc.

120 {
121  PANDORA_THROW_RESULT_IF(pandora::STATUS_CODE_SUCCESS, !=, PandoraApi::ProcessEvent(*m_pPrimaryPandora));
122 }
const pandora::Pandora * m_pPrimaryPandora
The address of the primary pandora instance.
Definition: ILArPandora.h:83

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