LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
lar_dl_content::DLMasterAlgorithm Class Reference

MasterAlgorithm class. More...

#include "DLMasterAlgorithm.h"

Inheritance diagram for lar_dl_content::DLMasterAlgorithm:
lar_content::MasterAlgorithm

Public Types

typedef std::unordered_map< const pandora::ParticleFlowObject *, const pandora::LArTPC * > PfoToLArTPCMap
 

Public Member Functions

 DLMasterAlgorithm ()=default
 Default constructor. More...
 
void ShiftPfoHierarchy (const pandora::ParticleFlowObject *const pParentPfo, const PfoToLArTPCMap &pfoToLArTPCMap, const float x0) const
 Shift a Pfo hierarchy by a specified x0 value. More...
 
void StitchPfos (const pandora::ParticleFlowObject *const pPfoToEnlarge, const pandora::ParticleFlowObject *const pPfoToDelete, PfoToLArTPCMap &pfoToLArTPCMap) const
 Stitch together a pair of pfos. More...
 

Protected Types

typedef std::map< unsigned int, LArTPCHitListVolumeIdToHitListMap
 
typedef std::vector< StitchingBaseTool * > StitchingToolVector
 
typedef std::vector< CosmicRayTaggingBaseTool * > CosmicRayTaggingToolVector
 
typedef std::vector< SliceIdBaseTool * > SliceIdToolVector
 
typedef std::vector< SliceSelectionBaseTool * > SliceSelectionToolVector
 

Protected Member Functions

pandora::StatusCode InitializeWorkerInstances ()
 Initialize pandora worker instances. More...
 
pandora::StatusCode CopyMCParticles () const
 Copy mc particles in the named input list to all pandora worker instances. More...
 
pandora::StatusCode GetVolumeIdToHitListMap (VolumeIdToHitListMap &volumeIdToHitListMap) const
 Get the mapping from lar tpc volume id to lists of all hits, and truncated hits. More...
 
pandora::StatusCode RunCosmicRayReconstruction (const VolumeIdToHitListMap &volumeIdToHitListMap) const
 Run the cosmic-ray reconstruction worker instances. More...
 
pandora::StatusCode RecreateCosmicRayPfos (PfoToLArTPCMap &pfoToLArTPCMap) const
 Recreate cosmic-ray pfos (created by worker instances) in the master instance. More...
 
pandora::StatusCode StitchCosmicRayPfos (PfoToLArTPCMap &pfoToLArTPCMap, PfoToFloatMap &stitchedPfosToX0Map) const
 Stitch together cosmic-ray pfos crossing between adjacent lar tpcs. More...
 
pandora::StatusCode TagCosmicRayPfos (const PfoToFloatMap &stitchedPfosToX0Map, pandora::PfoList &clearCosmicRayPfos, pandora::PfoList &ambiguousPfos) const
 Tag clear, unambiguous cosmic-ray pfos. More...
 
pandora::StatusCode RunCosmicRayHitRemoval (const pandora::PfoList &ambiguousPfos) const
 Run cosmic-ray hit removal, freeing hits in ambiguous pfos for further processing. More...
 
pandora::StatusCode RunSlicing (const VolumeIdToHitListMap &volumeIdToHitListMap, SliceVector &sliceVector) const
 Run the event slicing procedures, dividing available hits up into distinct 3D regions. More...
 
pandora::StatusCode RunSliceReconstruction (SliceVector &sliceVector, SliceHypotheses &nuSliceHypotheses, SliceHypotheses &crSliceHypotheses) const
 Process each slice under different reconstruction hypotheses. More...
 
pandora::StatusCode SelectBestSliceHypotheses (const SliceHypotheses &nuSliceHypotheses, const SliceHypotheses &crSliceHypotheses) const
 Examine slice hypotheses to identify the most appropriate to provide in final event output. More...
 
pandora::StatusCode Reset ()
 Reset all worker instances. More...
 
pandora::StatusCode Copy (const pandora::Pandora *const pPandora, const pandora::CaloHit *const pCaloHit) const
 Copy a specified calo hit to the provided pandora instance. More...
 
pandora::StatusCode Copy (const pandora::Pandora *const pPandora, const pandora::MCParticle *const pMCParticle, const LArMCParticleFactory *const pMCParticleFactory) const
 Copy a specified mc particle to the provided pandora instance. More...
 
pandora::StatusCode Recreate (const pandora::PfoList &inputPfoList, pandora::PfoList &newPfoList) const
 Recreate a specified list of pfos in the current pandora instance. More...
 
pandora::StatusCode Recreate (const pandora::ParticleFlowObject *const pInputPfo, const pandora::ParticleFlowObject *const pNewParentPfo, pandora::PfoList &newPfoList) const
 Recreate a specified pfo in the current pandora instance. More...
 
const pandora::CaloHit * CreateCaloHit (const pandora::CaloHit *const pInputCaloHit, const pandora::CaloHit *const pParentCaloHit) const
 Create a new calo hit in the current pandora instance, based upon the provided input calo hit. More...
 
const pandora::Cluster * CreateCluster (const pandora::Cluster *const pInputCluster, const pandora::CaloHitList &newCaloHitList, const pandora::CaloHitList &newIsolatedCaloHitList) const
 Create a new cluster in the current pandora instance, based upon the provided input cluster. More...
 
const pandora::Vertex * CreateVertex (const pandora::Vertex *const pInputVertex) const
 Create a new vertex in the current pandora instance, based upon the provided input vertex. More...
 
const pandora::ParticleFlowObject * CreatePfo (const pandora::ParticleFlowObject *const pInputPfo, const pandora::ClusterList &newClusterList, const pandora::VertexList &newVertexList) const
 Create a new pfo in the current pandora instance, based upon the provided input pfo. More...
 
const pandora::Pandora * CreateWorkerInstance (const pandora::LArTPC &larTPC, const pandora::DetectorGapList &gapList, const std::string &settingsFile, const std::string &name) const
 Create a pandora worker instance to handle a single LArTPC. More...
 
const pandora::Pandora * CreateWorkerInstance (const pandora::LArTPCMap &larTPCMap, const pandora::DetectorGapList &gapList, const std::string &settingsFile, const std::string &name) const
 Create a pandora worker instance to handle a number of LArTPCs. More...
 
pandora::StatusCode ReadExternalSettings (const ExternalSteeringParameters *const pExternalParameters, const pandora::InputBool inputBool, const pandora::TiXmlHandle xmlHandle, const std::string &xmlTag, bool &outputBool)
 Read settings from external steering parameters block, if present, otherwise from xml as standard. More...
 

Protected Attributes

bool m_workerInstancesInitialized
 Whether all worker instances have been initialized. More...
 
unsigned int m_larCaloHitVersion
 The LArCaloHit version for LArCaloHitFactory. More...
 
bool m_shouldRunAllHitsCosmicReco
 Whether to run all hits cosmic-ray reconstruction. More...
 
bool m_shouldRunStitching
 Whether to stitch cosmic-ray muons crossing between volumes. More...
 
bool m_shouldRunCosmicHitRemoval
 Whether to remove hits from tagged cosmic-rays. More...
 
bool m_shouldRunSlicing
 Whether to slice events into separate regions for processing. More...
 
bool m_shouldRunNeutrinoRecoOption
 Whether to run neutrino reconstruction for each slice. More...
 
bool m_shouldRunCosmicRecoOption
 Whether to run cosmic-ray reconstruction for each slice. More...
 
bool m_shouldPerformSliceId
 Whether to identify slices and select most appropriate pfos. More...
 
bool m_printOverallRecoStatus
 Whether to print current operation status messages. More...
 
bool m_visualizeOverallRecoStatus
 Whether to display results of current operations. More...
 
bool m_shouldRemoveOutOfTimeHits
 Whether to remove out of time hits. More...
 
PandoraInstanceList m_crWorkerInstances
 The list of cosmic-ray reconstruction worker instances. More...
 
const pandora::Pandora * m_pSlicingWorkerInstance
 The slicing worker instance. More...
 
const pandora::Pandora * m_pSliceNuWorkerInstance
 The per-slice neutrino reconstruction worker instance. More...
 
const pandora::Pandora * m_pSliceCRWorkerInstance
 The per-slice cosmic-ray reconstruction worker instance. More...
 
bool m_fullWidthCRWorkerWireGaps
 Whether wire-type line gaps in cosmic-ray worker instances should cover all drift time. More...
 
bool m_passMCParticlesToWorkerInstances
 Whether to pass mc particle details (and links to calo hits) to worker instances. More...
 
StitchingToolVector m_stitchingToolVector
 The stitching tool vector. More...
 
CosmicRayTaggingToolVector m_cosmicRayTaggingToolVector
 The cosmic-ray tagging tool vector. More...
 
SliceIdToolVector m_sliceIdToolVector
 The slice id tool vector. More...
 
SliceSelectionToolVector m_sliceSelectionToolVector
 The slice selection tool vector. More...
 
std::string m_filePathEnvironmentVariable
 The environment variable providing a list of paths to xml files. More...
 
std::string m_crSettingsFile
 The cosmic-ray reconstruction settings file. More...
 
std::string m_nuSettingsFile
 The neutrino reconstruction settings file. More...
 
std::string m_slicingSettingsFile
 The slicing settings file. More...
 
std::string m_inputMCParticleListName
 The input mc particle list name. More...
 
std::string m_inputHitListName
 The input hit list name. More...
 
std::string m_recreatedPfoListName
 The output recreated pfo list name. More...
 
std::string m_recreatedClusterListName
 The output recreated cluster list name. More...
 
std::string m_recreatedVertexListName
 The output recreated vertex list name. More...
 
float m_inTimeMaxX0
 Cut on X0 to determine whether particle is clear cosmic ray. More...
 
LArCaloHitFactory m_larCaloHitFactory
 Factory for creating LArCaloHits during hit copying. More...
 

Private Member Functions

pandora::StatusCode Run ()
 
pandora::StatusCode RegisterCustomContent (const pandora::Pandora *const pPandora) const
 Register custom content, such as algorithms or algorithm tools, with a specified pandora instance. More...
 
pandora::StatusCode ReadSettings (const pandora::TiXmlHandle xmlHandle)
 

Detailed Description

MasterAlgorithm class.

Definition at line 19 of file DLMasterAlgorithm.h.

Member Typedef Documentation

typedef std::vector<CosmicRayTaggingBaseTool *> lar_content::MasterAlgorithm::CosmicRayTaggingToolVector
protectedinherited

Definition at line 335 of file MasterAlgorithm.h.

typedef std::unordered_map<const pandora::ParticleFlowObject *, const pandora::LArTPC *> lar_content::MasterAlgorithm::PfoToLArTPCMap
inherited

Definition at line 63 of file MasterAlgorithm.h.

typedef std::vector<SliceIdBaseTool *> lar_content::MasterAlgorithm::SliceIdToolVector
protectedinherited

Definition at line 336 of file MasterAlgorithm.h.

typedef std::vector<SliceSelectionBaseTool *> lar_content::MasterAlgorithm::SliceSelectionToolVector
protectedinherited

Definition at line 337 of file MasterAlgorithm.h.

typedef std::vector<StitchingBaseTool *> lar_content::MasterAlgorithm::StitchingToolVector
protectedinherited

Definition at line 334 of file MasterAlgorithm.h.

typedef std::map<unsigned int, LArTPCHitList> lar_content::MasterAlgorithm::VolumeIdToHitListMap
protectedinherited

Definition at line 95 of file MasterAlgorithm.h.

Constructor & Destructor Documentation

lar_dl_content::DLMasterAlgorithm::DLMasterAlgorithm ( )
default

Default constructor.

Member Function Documentation

pandora::StatusCode lar_content::MasterAlgorithm::Copy ( const pandora::Pandora *const  pPandora,
const pandora::CaloHit *const  pCaloHit 
) const
protectedinherited

Copy a specified calo hit to the provided pandora instance.

Parameters
pPandorathe address of the target pandora instance
pCaloHitthe address of the calo hit

Referenced by lar_content::MasterAlgorithm::CopyMCParticles(), lar_content::MasterAlgorithm::Reset(), lar_content::MasterAlgorithm::RunCosmicRayReconstruction(), lar_content::MasterAlgorithm::RunSliceReconstruction(), and lar_content::MasterAlgorithm::RunSlicing().

pandora::StatusCode lar_content::MasterAlgorithm::Copy ( const pandora::Pandora *const  pPandora,
const pandora::MCParticle *const  pMCParticle,
const LArMCParticleFactory *const  pMCParticleFactory 
) const
protectedinherited

Copy a specified mc particle to the provided pandora instance.

Parameters
pPandorathe address of the target pandora instance
pMCParticlethe address of the mc particle
pMCParticleFactorythe address of the mc particle factory, allowing decoration of instances with information beyond that expected by sdk
StatusCode lar_content::MasterAlgorithm::CopyMCParticles ( ) const
protectedinherited

Copy mc particles in the named input list to all pandora worker instances.

Definition at line 239 of file MasterAlgorithm.cc.

References lar_content::MasterAlgorithm::Copy(), lar_content::MasterAlgorithm::m_crWorkerInstances, lar_content::MasterAlgorithm::m_inputMCParticleListName, lar_content::MasterAlgorithm::m_pSliceCRWorkerInstance, lar_content::MasterAlgorithm::m_pSliceNuWorkerInstance, and lar_content::MasterAlgorithm::m_pSlicingWorkerInstance.

Referenced by lar_content::MasterAlgorithm::Run().

240 {
241  const MCParticleList *pMCParticleList(nullptr);
242  PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::GetList(*this, m_inputMCParticleListName, pMCParticleList));
243 
244  PandoraInstanceList pandoraWorkerInstances(m_crWorkerInstances);
246  pandoraWorkerInstances.push_back(m_pSlicingWorkerInstance);
248  pandoraWorkerInstances.push_back(m_pSliceNuWorkerInstance);
250  pandoraWorkerInstances.push_back(m_pSliceCRWorkerInstance);
251 
252  LArMCParticleFactory mcParticleFactory;
253 
254  for (const Pandora *const pPandoraWorker : pandoraWorkerInstances)
255  {
256  for (const MCParticle *const pMCParticle : *pMCParticleList)
257  PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, this->Copy(pPandoraWorker, pMCParticle, &mcParticleFactory));
258  }
259 
260  return STATUS_CODE_SUCCESS;
261 }
std::string m_inputMCParticleListName
The input mc particle list name.
pandora::StatusCode Copy(const pandora::Pandora *const pPandora, const pandora::CaloHit *const pCaloHit) const
Copy a specified calo hit to the provided pandora instance.
const pandora::Pandora * m_pSlicingWorkerInstance
The slicing worker instance.
std::vector< const pandora::Pandora * > PandoraInstanceList
const pandora::Pandora * m_pSliceCRWorkerInstance
The per-slice cosmic-ray reconstruction worker instance.
const pandora::Pandora * m_pSliceNuWorkerInstance
The per-slice neutrino reconstruction worker instance.
PandoraInstanceList m_crWorkerInstances
The list of cosmic-ray reconstruction worker instances.
const CaloHit * lar_content::MasterAlgorithm::CreateCaloHit ( const pandora::CaloHit *const  pInputCaloHit,
const pandora::CaloHit *const  pParentCaloHit 
) const
protectedinherited

Create a new calo hit in the current pandora instance, based upon the provided input calo hit.

Parameters
pInputCaloHitthe address of the input calo hit
pParentCaloHitthe address of the parent calo hit
Returns
the address of the new calo hit

Definition at line 814 of file MasterAlgorithm.cc.

Referenced by lar_content::MasterAlgorithm::Reset().

815 {
816  PandoraContentApi::CaloHit::Parameters parameters;
817  parameters.m_positionVector = pInputCaloHit->GetPositionVector();
818  parameters.m_expectedDirection = pInputCaloHit->GetExpectedDirection();
819  parameters.m_cellNormalVector = pInputCaloHit->GetCellNormalVector();
820  parameters.m_cellGeometry = pInputCaloHit->GetCellGeometry();
821  parameters.m_cellSize0 = pInputCaloHit->GetCellSize0();
822  parameters.m_cellSize1 = pInputCaloHit->GetCellSize1();
823  parameters.m_cellThickness = pInputCaloHit->GetCellThickness();
824  parameters.m_nCellRadiationLengths = pInputCaloHit->GetNCellRadiationLengths();
825  parameters.m_nCellInteractionLengths = pInputCaloHit->GetNCellInteractionLengths();
826  parameters.m_time = pInputCaloHit->GetTime();
827  parameters.m_inputEnergy = pInputCaloHit->GetInputEnergy();
828  parameters.m_mipEquivalentEnergy = pInputCaloHit->GetMipEquivalentEnergy();
829  parameters.m_electromagneticEnergy = pInputCaloHit->GetElectromagneticEnergy();
830  parameters.m_hadronicEnergy = pInputCaloHit->GetHadronicEnergy();
831  parameters.m_isDigital = pInputCaloHit->IsDigital();
832  parameters.m_hitType = pInputCaloHit->GetHitType();
833  parameters.m_hitRegion = pInputCaloHit->GetHitRegion();
834  parameters.m_layer = pInputCaloHit->GetLayer();
835  parameters.m_isInOuterSamplingLayer = pInputCaloHit->IsInOuterSamplingLayer();
836  parameters.m_pParentAddress = static_cast<const void *>(pParentCaloHit);
837 
838  const CaloHit *pNewCaloHit(nullptr);
839  PANDORA_THROW_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::CaloHit::Create(*this, parameters, pNewCaloHit));
840 
841  PandoraContentApi::CaloHit::Metadata metadata;
842  metadata.m_isIsolated = pInputCaloHit->IsIsolated();
843  metadata.m_isPossibleMip = pInputCaloHit->IsPossibleMip();
844  PANDORA_THROW_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::CaloHit::AlterMetadata(*this, pNewCaloHit, metadata));
845 
846  return pNewCaloHit;
847 }
const Cluster * lar_content::MasterAlgorithm::CreateCluster ( const pandora::Cluster *const  pInputCluster,
const pandora::CaloHitList &  newCaloHitList,
const pandora::CaloHitList &  newIsolatedCaloHitList 
) const
protectedinherited

Create a new cluster in the current pandora instance, based upon the provided input cluster.

Parameters
pInputClusterthe address of the input cluster
newCaloHitListthe list of calo hits for the new cluster
newIsolatedCaloHitListthe list of isolated calo hits for the new cluster
Returns
the address of the new cluster

Definition at line 851 of file MasterAlgorithm.cc.

853 {
854  PandoraContentApi::Cluster::Parameters parameters;
855  parameters.m_caloHitList = newCaloHitList;
856  parameters.m_isolatedCaloHitList = newIsolatedCaloHitList;
857 
858  const Cluster *pNewCluster(nullptr);
859  PANDORA_THROW_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::Cluster::Create(*this, parameters, pNewCluster));
860 
861  PandoraContentApi::Cluster::Metadata metadata;
862  metadata.m_particleId = pInputCluster->GetParticleId();
863  PANDORA_THROW_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::Cluster::AlterMetadata(*this, pNewCluster, metadata));
864 
865  return pNewCluster;
866 }
const ParticleFlowObject * lar_content::MasterAlgorithm::CreatePfo ( const pandora::ParticleFlowObject *const  pInputPfo,
const pandora::ClusterList &  newClusterList,
const pandora::VertexList &  newVertexList 
) const
protectedinherited

Create a new pfo in the current pandora instance, based upon the provided input pfo.

Parameters
pInputPfothe address of the input pfo
newClusterListthe list of clusters for the new pfo
newVertexListthe list of vertices for the new pfo
Returns
the address of the new pfo

Definition at line 885 of file MasterAlgorithm.cc.

References MultiPandoraApi::AddDaughterPandoraInstance(), lar_content::MasterAlgorithm::CreateWorkerInstance(), lar_content::MasterAlgorithm::m_fullWidthCRWorkerWireGaps, LArContent::RegisterAlgorithms(), LArContent::RegisterBasicPlugins(), and lar_content::MasterAlgorithm::RegisterCustomContent().

Referenced by lar_content::MasterAlgorithm::Reset().

887 {
888  PandoraContentApi::ParticleFlowObject::Parameters parameters;
889  parameters.m_particleId = pInputPfo->GetParticleId();
890  parameters.m_charge = pInputPfo->GetCharge();
891  parameters.m_mass = pInputPfo->GetMass();
892  parameters.m_energy = pInputPfo->GetEnergy();
893  parameters.m_momentum = pInputPfo->GetMomentum();
894  parameters.m_clusterList = newClusterList;
895  parameters.m_trackList.clear();
896  parameters.m_vertexList = newVertexList;
897  parameters.m_propertiesToAdd = pInputPfo->GetPropertiesMap();
898 
899  const ParticleFlowObject *pNewPfo(nullptr);
900  PANDORA_THROW_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::ParticleFlowObject::Create(*this, parameters, pNewPfo));
901 
902  return pNewPfo;
903 }
const Vertex * lar_content::MasterAlgorithm::CreateVertex ( const pandora::Vertex *const  pInputVertex) const
protectedinherited

Create a new vertex in the current pandora instance, based upon the provided input vertex.

Parameters
pInputVertexthe address of the input vertex
Returns
the address of the new vertex

Definition at line 870 of file MasterAlgorithm.cc.

871 {
872  PandoraContentApi::Vertex::Parameters parameters;
873  parameters.m_position = pInputVertex->GetPosition();
874  parameters.m_vertexLabel = pInputVertex->GetVertexLabel();
875  parameters.m_vertexType = pInputVertex->GetVertexType();
876 
877  const Vertex *pNewVertex(nullptr);
878  PANDORA_THROW_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::Vertex::Create(*this, parameters, pNewVertex));
879 
880  return pNewVertex;
881 }
boost::graph_traits< ModuleGraph >::vertex_descriptor Vertex
Definition: ModuleGraph.h:25
const pandora::Pandora* lar_content::MasterAlgorithm::CreateWorkerInstance ( const pandora::LArTPC &  larTPC,
const pandora::DetectorGapList &  gapList,
const std::string &  settingsFile,
const std::string &  name 
) const
protectedinherited

Create a pandora worker instance to handle a single LArTPC.

Parameters
larTPCthe lar tpc
gapListthe gap list
settingsFilethe pandora settings file
namethe pandora instance name
Returns
the address of the pandora instance

Referenced by lar_content::MasterAlgorithm::CreatePfo(), and lar_content::MasterAlgorithm::InitializeWorkerInstances().

const pandora::Pandora* lar_content::MasterAlgorithm::CreateWorkerInstance ( const pandora::LArTPCMap &  larTPCMap,
const pandora::DetectorGapList &  gapList,
const std::string &  settingsFile,
const std::string &  name 
) const
protectedinherited

Create a pandora worker instance to handle a number of LArTPCs.

Parameters
larTPCMapthe lar tpc map
gapListthe gap list
settingsFilethe pandora settings file
namethe pandora instance name
Returns
the address of the pandora instance
StatusCode lar_content::MasterAlgorithm::GetVolumeIdToHitListMap ( VolumeIdToHitListMap volumeIdToHitListMap) const
protectedinherited

Get the mapping from lar tpc volume id to lists of all hits, and truncated hits.

Parameters
volumeIdToHitListMapto receive the populated volume id to hit list map

Definition at line 265 of file MasterAlgorithm.cc.

References lar_content::LArCaloHit::GetLArTPCVolumeId(), and lar_content::MasterAlgorithm::m_inputHitListName.

Referenced by lar_content::MasterAlgorithm::Run().

266 {
267  const LArTPCMap &larTPCMap(this->GetPandora().GetGeometry()->GetLArTPCMap());
268  const unsigned int nLArTPCs(larTPCMap.size());
269 
270  const CaloHitList *pCaloHitList(nullptr);
271  PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::GetList(*this, m_inputHitListName, pCaloHitList));
272 
273  for (const CaloHit *const pCaloHit : *pCaloHitList)
274  {
275  const LArCaloHit *const pLArCaloHit(dynamic_cast<const LArCaloHit *>(pCaloHit));
276 
277  if (!pLArCaloHit && (1 != nLArTPCs))
278  return STATUS_CODE_INVALID_PARAMETER;
279 
280  const unsigned int volumeId(pLArCaloHit ? pLArCaloHit->GetLArTPCVolumeId() : 0);
281  const LArTPC *const pLArTPC(larTPCMap.at(volumeId));
282 
283  LArTPCHitList &larTPCHitList(volumeIdToHitListMap[volumeId]);
284  larTPCHitList.m_allHitList.push_back(pCaloHit);
285 
286  if (((pCaloHit->GetPositionVector().GetX() >= (pLArTPC->GetCenterX() - 0.5f * pLArTPC->GetWidthX())) &&
287  (pCaloHit->GetPositionVector().GetX() <= (pLArTPC->GetCenterX() + 0.5f * pLArTPC->GetWidthX()))))
288  {
289  larTPCHitList.m_truncatedHitList.push_back(pCaloHit);
290  }
291  }
292 
293  return STATUS_CODE_SUCCESS;
294 }
std::string m_inputHitListName
The input hit list name.
StatusCode lar_content::MasterAlgorithm::InitializeWorkerInstances ( )
protectedinherited

Initialize pandora worker instances.

Definition at line 200 of file MasterAlgorithm.cc.

References lar_content::MasterAlgorithm::CreateWorkerInstance(), lar_content::MasterAlgorithm::m_crSettingsFile, lar_content::MasterAlgorithm::m_crWorkerInstances, lar_content::MasterAlgorithm::m_nuSettingsFile, lar_content::MasterAlgorithm::m_pSliceCRWorkerInstance, lar_content::MasterAlgorithm::m_pSliceNuWorkerInstance, lar_content::MasterAlgorithm::m_pSlicingWorkerInstance, lar_content::MasterAlgorithm::m_shouldRunCosmicRecoOption, lar_content::MasterAlgorithm::m_shouldRunNeutrinoRecoOption, lar_content::MasterAlgorithm::m_shouldRunSlicing, lar_content::MasterAlgorithm::m_slicingSettingsFile, lar_content::MasterAlgorithm::m_workerInstancesInitialized, and util::to_string().

Referenced by lar_content::MasterAlgorithm::Run().

201 {
202  // ATTN Used to be in the regular Initialize callback, but detector gap list cannot be extracted in client app before the first event
204  return STATUS_CODE_ALREADY_INITIALIZED;
205 
206  try
207  {
208  const LArTPCMap &larTPCMap(this->GetPandora().GetGeometry()->GetLArTPCMap());
209  const DetectorGapList &gapList(this->GetPandora().GetGeometry()->GetDetectorGapList());
210 
211  for (const LArTPCMap::value_type &mapEntry : larTPCMap)
212  {
213  const unsigned int volumeId(mapEntry.second->GetLArTPCVolumeId());
214  m_crWorkerInstances.push_back(
215  this->CreateWorkerInstance(*(mapEntry.second), gapList, m_crSettingsFile, "CRWorkerInstance" + std::to_string(volumeId)));
216  }
217 
218  if (m_shouldRunSlicing)
219  m_pSlicingWorkerInstance = this->CreateWorkerInstance(larTPCMap, gapList, m_slicingSettingsFile, "SlicingWorker");
220 
222  m_pSliceNuWorkerInstance = this->CreateWorkerInstance(larTPCMap, gapList, m_nuSettingsFile, "SliceNuWorker");
223 
225  m_pSliceCRWorkerInstance = this->CreateWorkerInstance(larTPCMap, gapList, m_crSettingsFile, "SliceCRWorker");
226  }
227  catch (const StatusCodeException &statusCodeException)
228  {
229  std::cout << "MasterAlgorithm: Exception during initialization of worker instances " << statusCodeException.ToString() << std::endl;
230  return statusCodeException.GetStatusCode();
231  }
232 
234  return STATUS_CODE_SUCCESS;
235 }
const pandora::Pandora * m_pSlicingWorkerInstance
The slicing worker instance.
bool m_shouldRunNeutrinoRecoOption
Whether to run neutrino reconstruction for each slice.
std::string m_slicingSettingsFile
The slicing settings file.
const pandora::Pandora * m_pSliceCRWorkerInstance
The per-slice cosmic-ray reconstruction worker instance.
const pandora::Pandora * CreateWorkerInstance(const pandora::LArTPC &larTPC, const pandora::DetectorGapList &gapList, const std::string &settingsFile, const std::string &name) const
Create a pandora worker instance to handle a single LArTPC.
decltype(auto) constexpr to_string(T &&obj)
ADL-aware version of std::to_string.
const pandora::Pandora * m_pSliceNuWorkerInstance
The per-slice neutrino reconstruction worker instance.
std::string m_nuSettingsFile
The neutrino reconstruction settings file.
bool m_workerInstancesInitialized
Whether all worker instances have been initialized.
std::string m_crSettingsFile
The cosmic-ray reconstruction settings file.
bool m_shouldRunSlicing
Whether to slice events into separate regions for processing.
bool m_shouldRunCosmicRecoOption
Whether to run cosmic-ray reconstruction for each slice.
PandoraInstanceList m_crWorkerInstances
The list of cosmic-ray reconstruction worker instances.
StatusCode lar_content::MasterAlgorithm::ReadExternalSettings ( const ExternalSteeringParameters *const  pExternalParameters,
const pandora::InputBool  inputBool,
const pandora::TiXmlHandle  xmlHandle,
const std::string &  xmlTag,
bool &  outputBool 
)
protectedinherited

Read settings from external steering parameters block, if present, otherwise from xml as standard.

Parameters
pExternalParametersthe address of the external parameters (if present)
inputBoolthe input boolean value, from the external parameters (if present)
xmlHandlethe xml handle
xmlTagthe xml tag
outputBoolto receive the output boolean value

Definition at line 1224 of file MasterAlgorithm.cc.

Referenced by lar_content::MasterAlgorithm::ReadSettings().

1226 {
1227  if (pExternalParameters && inputBool.IsInitialized())
1228  {
1229  outputBool = inputBool.Get();
1230  }
1231  else
1232  {
1233  PANDORA_RETURN_RESULT_IF_AND_IF(STATUS_CODE_SUCCESS, STATUS_CODE_NOT_FOUND, !=, XmlHelper::ReadValue(xmlHandle, xmlTag, outputBool));
1234  }
1235 
1236  return STATUS_CODE_SUCCESS;
1237 }
StatusCode lar_dl_content::DLMasterAlgorithm::ReadSettings ( const pandora::TiXmlHandle  xmlHandle)
private

Definition at line 37 of file DLMasterAlgorithm.cc.

38 {
39  return MasterAlgorithm::ReadSettings(xmlHandle);
40 }
pandora::StatusCode lar_content::MasterAlgorithm::Recreate ( const pandora::PfoList &  inputPfoList,
pandora::PfoList &  newPfoList 
) const
protectedinherited

Recreate a specified list of pfos in the current pandora instance.

Parameters
inputPfoListthe input pfo list
newPfoListto receive the list of new pfos

Referenced by lar_content::MasterAlgorithm::RecreateCosmicRayPfos(), lar_content::MasterAlgorithm::Reset(), and lar_content::MasterAlgorithm::SelectBestSliceHypotheses().

pandora::StatusCode lar_content::MasterAlgorithm::Recreate ( const pandora::ParticleFlowObject *const  pInputPfo,
const pandora::ParticleFlowObject *const  pNewParentPfo,
pandora::PfoList &  newPfoList 
) const
protectedinherited

Recreate a specified pfo in the current pandora instance.

Parameters
pInputPfothe input pfo
pNewParentPfothe new parent of the new output pfo (nullptr if none)
newPfoListto receive the list of new pfos
StatusCode lar_content::MasterAlgorithm::RecreateCosmicRayPfos ( PfoToLArTPCMap pfoToLArTPCMap) const
protectedinherited

Recreate cosmic-ray pfos (created by worker instances) in the master instance.

Parameters
pfoToLArTPCMapto receive the populated pfo to lar tpc map

Definition at line 324 of file MasterAlgorithm.cc.

References lar_content::MasterAlgorithm::m_crWorkerInstances, and lar_content::MasterAlgorithm::Recreate().

Referenced by lar_content::MasterAlgorithm::Run().

325 {
326  for (const Pandora *const pCRWorker : m_crWorkerInstances)
327  {
328  const PfoList *pCRPfos(nullptr);
329  PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraApi::GetCurrentPfoList(*pCRWorker, pCRPfos));
330 
331  PfoList newPfoList;
332  PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, this->Recreate(*pCRPfos, newPfoList));
333 
334  const LArTPC &larTPC(pCRWorker->GetGeometry()->GetLArTPC());
335 
336  for (const Pfo *const pNewPfo : newPfoList)
337  pfoToLArTPCMap[pNewPfo] = &larTPC;
338  }
339 
340  return STATUS_CODE_SUCCESS;
341 }
pandora::StatusCode Recreate(const pandora::PfoList &inputPfoList, pandora::PfoList &newPfoList) const
Recreate a specified list of pfos in the current pandora instance.
PandoraInstanceList m_crWorkerInstances
The list of cosmic-ray reconstruction worker instances.
StatusCode lar_dl_content::DLMasterAlgorithm::RegisterCustomContent ( const pandora::Pandora *const  pPandora) const
privatevirtual

Register custom content, such as algorithms or algorithm tools, with a specified pandora instance.

Parameters
pPandorathe address of the pandora instance

Reimplemented from lar_content::MasterAlgorithm.

Definition at line 28 of file DLMasterAlgorithm.cc.

References LArDLContent::RegisterAlgorithms().

29 {
30  PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, LArDLContent::RegisterAlgorithms(*pPandora));
31 
32  return STATUS_CODE_SUCCESS;
33 }
static pandora::StatusCode RegisterAlgorithms(const pandora::Pandora &pandora)
Register all the lar dl content algorithms and tools with pandora.
Definition: LArDLContent.cc:91
StatusCode lar_content::MasterAlgorithm::Reset ( )
protectedinherited

Reset all worker instances.

Definition at line 628 of file MasterAlgorithm.cc.

References lar_content::MasterAlgorithm::Copy(), lar_content::MasterAlgorithm::CreateCaloHit(), lar_content::MasterAlgorithm::CreatePfo(), lar_content::LArMCParticle::FillParameters(), lar_content::LArPfoHelper::GetThreeDClusterList(), lar_content::LArPfoHelper::GetTwoDClusterList(), lar_content::MasterAlgorithm::m_crWorkerInstances, lar_content::MasterAlgorithm::m_larCaloHitFactory, lar_content::MasterAlgorithm::m_passMCParticlesToWorkerInstances, lar_content::MasterAlgorithm::m_pSliceCRWorkerInstance, lar_content::MasterAlgorithm::m_pSliceNuWorkerInstance, lar_content::MasterAlgorithm::m_pSlicingWorkerInstance, lar_content::MasterAlgorithm::m_recreatedClusterListName, lar_content::MasterAlgorithm::m_recreatedPfoListName, lar_content::MasterAlgorithm::m_recreatedVertexListName, lar_content::MasterAlgorithm::Recreate(), Reset(), and lar_content::LArMCParticleHelper::SortByMomentum().

Referenced by lar_content::MasterAlgorithm::Run().

629 {
630  for (const Pandora *const pCRWorker : m_crWorkerInstances)
631  PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraApi::Reset(*pCRWorker));
632 
634  PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraApi::Reset(*m_pSlicingWorkerInstance));
635 
637  PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraApi::Reset(*m_pSliceNuWorkerInstance));
638 
640  PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraApi::Reset(*m_pSliceCRWorkerInstance));
641 
642  return STATUS_CODE_SUCCESS;
643 }
const pandora::Pandora * m_pSlicingWorkerInstance
The slicing worker instance.
const pandora::Pandora * m_pSliceCRWorkerInstance
The per-slice cosmic-ray reconstruction worker instance.
ntupleExperimental Reset()
const pandora::Pandora * m_pSliceNuWorkerInstance
The per-slice neutrino reconstruction worker instance.
PandoraInstanceList m_crWorkerInstances
The list of cosmic-ray reconstruction worker instances.
StatusCode lar_dl_content::DLMasterAlgorithm::Run ( )
private

Definition at line 21 of file DLMasterAlgorithm.cc.

22 {
23  return MasterAlgorithm::Run();
24 }
StatusCode lar_content::MasterAlgorithm::RunCosmicRayHitRemoval ( const pandora::PfoList &  ambiguousPfos) const
protectedinherited

Run cosmic-ray hit removal, freeing hits in ambiguous pfos for further processing.

Parameters
ambiguousPfosthe list of ambiguous cosmic-ray pfos

Definition at line 418 of file MasterAlgorithm.cc.

References lar_content::LArPfoHelper::GetAllConnectedPfos(), lar_content::LArPfoHelper::GetCaloHits(), lar_content::LArPfoHelper::GetIsolatedCaloHits(), and lar_content::LArStitchingHelper::HasPfoBeenStitched().

Referenced by lar_content::MasterAlgorithm::Run().

419 {
420  PfoList allPfosToDelete;
421  LArPfoHelper::GetAllConnectedPfos(ambiguousPfos, allPfosToDelete);
422 
423  for (const Pfo *const pPfoToDelete : allPfosToDelete)
424  {
425  const ClusterList clusterList(pPfoToDelete->GetClusterList());
426  const VertexList vertexList(pPfoToDelete->GetVertexList());
427 
428  // ATTN: If an ambiguous pfo has been stitched, reset the calo hit positions in preparation for subsequent algorithm chains
429  if (LArStitchingHelper::HasPfoBeenStitched(pPfoToDelete))
430  {
431  CaloHitList caloHitList2D;
432  LArPfoHelper::GetCaloHits(pPfoToDelete, TPC_VIEW_U, caloHitList2D);
433  LArPfoHelper::GetCaloHits(pPfoToDelete, TPC_VIEW_V, caloHitList2D);
434  LArPfoHelper::GetCaloHits(pPfoToDelete, TPC_VIEW_W, caloHitList2D);
435  LArPfoHelper::GetIsolatedCaloHits(pPfoToDelete, TPC_VIEW_U, caloHitList2D);
436  LArPfoHelper::GetIsolatedCaloHits(pPfoToDelete, TPC_VIEW_V, caloHitList2D);
437  LArPfoHelper::GetIsolatedCaloHits(pPfoToDelete, TPC_VIEW_W, caloHitList2D);
438 
439  for (const CaloHit *const pCaloHit : caloHitList2D)
440  {
441  PandoraContentApi::CaloHit::Metadata metadata;
442  metadata.m_x0 = 0.f;
443  PANDORA_THROW_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::CaloHit::AlterMetadata(*this, pCaloHit, metadata));
444  }
445  }
446 
447  PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::Delete(*this, pPfoToDelete));
448  PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::Delete(*this, &clusterList));
449  PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::Delete(*this, &vertexList));
450  }
451 
452  return STATUS_CODE_SUCCESS;
453 }
static bool HasPfoBeenStitched(const pandora::ParticleFlowObject *const pPfo)
Whether a pfo has been stitched.
static void GetIsolatedCaloHits(const pandora::PfoList &pfoList, const pandora::HitType &hitType, pandora::CaloHitList &caloHitList)
Get a list of isolated calo hits of a particular hit type from a list of pfos.
static void GetAllConnectedPfos(const pandora::PfoList &inputPfoList, pandora::PfoList &outputPfoList)
Get a flat list of all pfos, recursively including all daughters and parents associated with those pf...
static void GetCaloHits(const pandora::PfoList &pfoList, const pandora::HitType &hitType, pandora::CaloHitList &caloHitList)
Get a list of calo hits of a particular hit type from a list of pfos.
std::list< Vertex > VertexList
Definition: DCEL.h:169
StatusCode lar_content::MasterAlgorithm::RunCosmicRayReconstruction ( const VolumeIdToHitListMap volumeIdToHitListMap) const
protectedinherited

Run the cosmic-ray reconstruction worker instances.

Parameters
volumeIdToHitListMapthe volume id to hit list map

Definition at line 298 of file MasterAlgorithm.cc.

References lar_content::MasterAlgorithm::Copy(), lar_content::MasterAlgorithm::m_crWorkerInstances, lar_content::MasterAlgorithm::m_printOverallRecoStatus, and ProcessEvent().

Referenced by lar_content::MasterAlgorithm::Run().

299 {
300  unsigned int workerCounter(0);
301 
302  for (const Pandora *const pCRWorker : m_crWorkerInstances)
303  {
304  const LArTPC &larTPC(pCRWorker->GetGeometry()->GetLArTPC());
305  VolumeIdToHitListMap::const_iterator iter(volumeIdToHitListMap.find(larTPC.GetLArTPCVolumeId()));
306 
307  if (volumeIdToHitListMap.end() == iter)
308  continue;
309 
310  for (const CaloHit *const pCaloHit : iter->second.m_allHitList)
311  PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, this->Copy(pCRWorker, pCaloHit));
312 
314  std::cout << "Running cosmic-ray reconstruction worker instance " << ++workerCounter << " of " << m_crWorkerInstances.size() << std::endl;
315 
316  PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraApi::ProcessEvent(*pCRWorker));
317  }
318 
319  return STATUS_CODE_SUCCESS;
320 }
pandora::StatusCode Copy(const pandora::Pandora *const pPandora, const pandora::CaloHit *const pCaloHit) const
Copy a specified calo hit to the provided pandora instance.
void ProcessEvent(G4int iProp, size_t nEv)
Definition: errprop.cc:171
intermediate_table::const_iterator const_iterator
bool m_printOverallRecoStatus
Whether to print current operation status messages.
PandoraInstanceList m_crWorkerInstances
The list of cosmic-ray reconstruction worker instances.
StatusCode lar_content::MasterAlgorithm::RunSliceReconstruction ( SliceVector sliceVector,
SliceHypotheses nuSliceHypotheses,
SliceHypotheses crSliceHypotheses 
) const
protectedinherited

Process each slice under different reconstruction hypotheses.

Parameters
sliceVectorthe slice vector
nuSliceHypothesesto receive the vector of slice neutrino hypotheses
crSliceHypothesesto receive the vector of slice cosmic-ray hypotheses

Definition at line 515 of file MasterAlgorithm.cc.

References lar_content::MasterAlgorithm::Copy(), lar_content::MasterAlgorithm::m_printOverallRecoStatus, lar_content::MasterAlgorithm::m_pSliceCRWorkerInstance, lar_content::MasterAlgorithm::m_pSliceNuWorkerInstance, lar_content::MasterAlgorithm::m_shouldRunCosmicRecoOption, lar_content::MasterAlgorithm::m_shouldRunNeutrinoRecoOption, lar_content::MasterAlgorithm::m_shouldRunSlicing, lar_content::MasterAlgorithm::m_sliceSelectionToolVector, and ProcessEvent().

Referenced by lar_content::MasterAlgorithm::Run().

516 {
517  SliceVector selectedSliceVector;
519  {
520  SliceVector inputSliceVector(sliceVector);
521  for (SliceSelectionBaseTool *const pSliceSelectionTool : m_sliceSelectionToolVector)
522  {
523  pSliceSelectionTool->SelectSlices(this, inputSliceVector, selectedSliceVector);
524  inputSliceVector = selectedSliceVector;
525  }
526  }
527  else
528  {
529  selectedSliceVector = std::move(sliceVector);
530  }
531 
532  unsigned int sliceCounter(0);
533 
534  for (const CaloHitList &sliceHits : selectedSliceVector)
535  {
536  for (const CaloHit *const pSliceCaloHit : sliceHits)
537  {
538  // ATTN Must ensure we copy the hit actually owned by master instance; access differs with/without slicing enabled
539  const CaloHit *const pCaloHitInMaster(m_shouldRunSlicing ? static_cast<const CaloHit *>(pSliceCaloHit->GetParentAddress()) : pSliceCaloHit);
540 
542  PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, this->Copy(m_pSliceNuWorkerInstance, pCaloHitInMaster));
543 
545  PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, this->Copy(m_pSliceCRWorkerInstance, pCaloHitInMaster));
546  }
547 
549  {
551  std::cout << "Running nu worker instance for slice " << (sliceCounter + 1) << " of " << selectedSliceVector.size() << std::endl;
552 
553  const PfoList *pSliceNuPfos(nullptr);
554  PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraApi::ProcessEvent(*m_pSliceNuWorkerInstance));
555  PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraApi::GetCurrentPfoList(*m_pSliceNuWorkerInstance, pSliceNuPfos));
556  nuSliceHypotheses.push_back(*pSliceNuPfos);
557 
558  for (const ParticleFlowObject *const pPfo : *pSliceNuPfos)
559  {
560  PandoraContentApi::ParticleFlowObject::Metadata metadata;
561  metadata.m_propertiesToAdd["SliceIndex"] = sliceCounter;
562  PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::ParticleFlowObject::AlterMetadata(*this, pPfo, metadata));
563  }
564  }
565 
567  {
569  std::cout << "Running cr worker instance for slice " << (sliceCounter + 1) << " of " << selectedSliceVector.size() << std::endl;
570 
571  const PfoList *pSliceCRPfos(nullptr);
572  PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraApi::ProcessEvent(*m_pSliceCRWorkerInstance));
573  PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraApi::GetCurrentPfoList(*m_pSliceCRWorkerInstance, pSliceCRPfos));
574  crSliceHypotheses.push_back(*pSliceCRPfos);
575 
576  for (const ParticleFlowObject *const pPfo : *pSliceCRPfos)
577  {
578  PandoraContentApi::ParticleFlowObject::Metadata metadata;
579  metadata.m_propertiesToAdd["SliceIndex"] = sliceCounter;
580  PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::ParticleFlowObject::AlterMetadata(*this, pPfo, metadata));
581  }
582  }
583 
584  ++sliceCounter;
585  }
586 
587  // ATTN: If we swapped these objects at the start, be sure to swap them back in case we ever want to use sliceVector
588  // after this function
589  if (!(m_shouldRunSlicing && !m_sliceSelectionToolVector.empty()))
590  sliceVector = std::move(selectedSliceVector);
591 
592  if (m_shouldRunNeutrinoRecoOption && m_shouldRunCosmicRecoOption && (nuSliceHypotheses.size() != crSliceHypotheses.size()))
593  throw StatusCodeException(STATUS_CODE_INVALID_PARAMETER);
594 
595  return STATUS_CODE_SUCCESS;
596 }
pandora::StatusCode Copy(const pandora::Pandora *const pPandora, const pandora::CaloHit *const pCaloHit) const
Copy a specified calo hit to the provided pandora instance.
bool m_shouldRunNeutrinoRecoOption
Whether to run neutrino reconstruction for each slice.
void ProcessEvent(G4int iProp, size_t nEv)
Definition: errprop.cc:171
const pandora::Pandora * m_pSliceCRWorkerInstance
The per-slice cosmic-ray reconstruction worker instance.
SliceSelectionToolVector m_sliceSelectionToolVector
The slice selection tool vector.
bool m_printOverallRecoStatus
Whether to print current operation status messages.
const pandora::Pandora * m_pSliceNuWorkerInstance
The per-slice neutrino reconstruction worker instance.
bool m_shouldRunSlicing
Whether to slice events into separate regions for processing.
bool m_shouldRunCosmicRecoOption
Whether to run cosmic-ray reconstruction for each slice.
std::vector< pandora::CaloHitList > SliceVector
StatusCode lar_content::MasterAlgorithm::RunSlicing ( const VolumeIdToHitListMap volumeIdToHitListMap,
SliceVector sliceVector 
) const
protectedinherited

Run the event slicing procedures, dividing available hits up into distinct 3D regions.

Parameters
volumeIdToHitListMapthe volume id to hit list map
sliceVectorto receive the populated slice vector

Definition at line 457 of file MasterAlgorithm.cc.

References lar_content::MasterAlgorithm::Copy(), lar_content::LArPfoHelper::GetCaloHits(), lar_content::MasterAlgorithm::m_printOverallRecoStatus, lar_content::MasterAlgorithm::m_pSlicingWorkerInstance, lar_content::MasterAlgorithm::m_shouldRemoveOutOfTimeHits, lar_content::MasterAlgorithm::m_shouldRunSlicing, lar_content::MasterAlgorithm::m_visualizeOverallRecoStatus, and ProcessEvent().

Referenced by lar_content::MasterAlgorithm::Run().

458 {
459  for (const VolumeIdToHitListMap::value_type &mapEntry : volumeIdToHitListMap)
460  {
461  for (const CaloHit *const pCaloHit : (m_shouldRemoveOutOfTimeHits ? mapEntry.second.m_truncatedHitList : mapEntry.second.m_allHitList))
462  {
463  if (!PandoraContentApi::IsAvailable(*this, pCaloHit))
464  continue;
465 
466  const HitType hitType(pCaloHit->GetHitType());
467  if ((TPC_VIEW_U != hitType) && (TPC_VIEW_V != hitType) && (TPC_VIEW_W != hitType))
468  continue;
469 
470  if (m_shouldRunSlicing)
471  {
472  PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, this->Copy(m_pSlicingWorkerInstance, pCaloHit));
473  }
474  else
475  {
476  if (sliceVector.empty())
477  sliceVector.push_back(CaloHitList());
478  sliceVector.back().push_back(pCaloHit);
479  }
480  }
481  }
482 
483  if (m_shouldRunSlicing)
484  {
486  std::cout << "Running slicing worker instance" << std::endl;
487 
488  const PfoList *pSlicePfos(nullptr);
489  PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraApi::ProcessEvent(*m_pSlicingWorkerInstance));
490  PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraApi::GetCurrentPfoList(*m_pSlicingWorkerInstance, pSlicePfos));
491 
493  {
494  PANDORA_MONITORING_API(VisualizeParticleFlowObjects(this->GetPandora(), pSlicePfos, "OnePfoPerSlice", BLUE));
495  PANDORA_MONITORING_API(ViewEvent(this->GetPandora()));
496  }
497 
498  for (const Pfo *const pSlicePfo : *pSlicePfos)
499  {
500  sliceVector.push_back(CaloHitList());
501  LArPfoHelper::GetCaloHits(pSlicePfo, TPC_VIEW_U, sliceVector.back());
502  LArPfoHelper::GetCaloHits(pSlicePfo, TPC_VIEW_V, sliceVector.back());
503  LArPfoHelper::GetCaloHits(pSlicePfo, TPC_VIEW_W, sliceVector.back());
504  }
505  }
506 
508  std::cout << "Identified " << sliceVector.size() << " slice(s)" << std::endl;
509 
510  return STATUS_CODE_SUCCESS;
511 }
pandora::StatusCode Copy(const pandora::Pandora *const pPandora, const pandora::CaloHit *const pCaloHit) const
Copy a specified calo hit to the provided pandora instance.
const pandora::Pandora * m_pSlicingWorkerInstance
The slicing worker instance.
void ProcessEvent(G4int iProp, size_t nEv)
Definition: errprop.cc:171
bool m_shouldRemoveOutOfTimeHits
Whether to remove out of time hits.
bool m_printOverallRecoStatus
Whether to print current operation status messages.
bool m_visualizeOverallRecoStatus
Whether to display results of current operations.
HitType
Definition: HitType.h:12
bool m_shouldRunSlicing
Whether to slice events into separate regions for processing.
static void GetCaloHits(const pandora::PfoList &pfoList, const pandora::HitType &hitType, pandora::CaloHitList &caloHitList)
Get a list of calo hits of a particular hit type from a list of pfos.
StatusCode lar_content::MasterAlgorithm::SelectBestSliceHypotheses ( const SliceHypotheses nuSliceHypotheses,
const SliceHypotheses crSliceHypotheses 
) const
protectedinherited

Examine slice hypotheses to identify the most appropriate to provide in final event output.

Parameters
nuSliceHypothesesthe vector of slice neutrino hypotheses
crSliceHypothesesthe vector of slice cosmic-ray hypotheses

Definition at line 600 of file MasterAlgorithm.cc.

References lar_content::MasterAlgorithm::m_printOverallRecoStatus, lar_content::MasterAlgorithm::m_shouldPerformSliceId, lar_content::MasterAlgorithm::m_shouldRunCosmicRecoOption, lar_content::MasterAlgorithm::m_shouldRunNeutrinoRecoOption, lar_content::MasterAlgorithm::m_sliceIdToolVector, and lar_content::MasterAlgorithm::Recreate().

Referenced by lar_content::MasterAlgorithm::Run().

601 {
603  std::cout << "Select best slice hypotheses" << std::endl;
604 
605  PfoList selectedSlicePfos;
606 
608  {
609  for (SliceIdBaseTool *const pSliceIdTool : m_sliceIdToolVector)
610  pSliceIdTool->SelectOutputPfos(this, nuSliceHypotheses, crSliceHypotheses, selectedSlicePfos);
611  }
613  {
614  const SliceHypotheses &sliceHypotheses(m_shouldRunNeutrinoRecoOption ? nuSliceHypotheses : crSliceHypotheses);
615 
616  for (const PfoList &slice : sliceHypotheses)
617  selectedSlicePfos.insert(selectedSlicePfos.end(), slice.begin(), slice.end());
618  }
619 
620  PfoList newSlicePfoList;
621  PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, this->Recreate(selectedSlicePfos, newSlicePfoList));
622 
623  return STATUS_CODE_SUCCESS;
624 }
std::vector< pandora::PfoList > SliceHypotheses
pandora::StatusCode Recreate(const pandora::PfoList &inputPfoList, pandora::PfoList &newPfoList) const
Recreate a specified list of pfos in the current pandora instance.
bool m_shouldRunNeutrinoRecoOption
Whether to run neutrino reconstruction for each slice.
bool m_shouldPerformSliceId
Whether to identify slices and select most appropriate pfos.
bool m_printOverallRecoStatus
Whether to print current operation status messages.
bool m_shouldRunCosmicRecoOption
Whether to run cosmic-ray reconstruction for each slice.
SliceIdToolVector m_sliceIdToolVector
The slice id tool vector.
void lar_content::MasterAlgorithm::ShiftPfoHierarchy ( const pandora::ParticleFlowObject *const  pParentPfo,
const PfoToLArTPCMap pfoToLArTPCMap,
const float  x0 
) const
inherited

Shift a Pfo hierarchy by a specified x0 value.

Parameters
pPfothe address of the parent pfo
stitchingInfothe source for additional, local, stitching information
x0the x0 correction relative to the input pfo

Definition at line 60 of file MasterAlgorithm.cc.

References lar_content::LArPfoHelper::GetAllDownstreamPfos(), and lar_content::MasterAlgorithm::m_visualizeOverallRecoStatus.

Referenced by lar_content::StitchingCosmicRayMergingTool::ShiftPfo().

61 {
62  if (!pParentPfo->GetParentPfoList().empty())
63  throw StatusCodeException(STATUS_CODE_INVALID_PARAMETER);
64 
65  PfoToLArTPCMap::const_iterator larTPCIter(pfoToLArTPCMap.find(pParentPfo));
66 
67  if (pfoToLArTPCMap.end() == larTPCIter)
68  throw StatusCodeException(STATUS_CODE_NOT_FOUND);
69 
70  PfoList pfoList;
71  LArPfoHelper::GetAllDownstreamPfos(pParentPfo, pfoList);
72 
74  {
75  std::cout << "ShiftPfoHierarchy: x0 " << x0 << std::endl;
76  PANDORA_MONITORING_API(VisualizeParticleFlowObjects(this->GetPandora(), &pfoList, "BeforeShiftCRPfos", GREEN));
77  }
78 
79  for (const ParticleFlowObject *const pDaughterPfo : pfoList)
80  {
81  CaloHitList caloHitList;
82  for (const Cluster *const pCluster : pDaughterPfo->GetClusterList())
83  {
84  pCluster->GetOrderedCaloHitList().FillCaloHitList(caloHitList);
85  caloHitList.insert(caloHitList.end(), pCluster->GetIsolatedCaloHitList().begin(), pCluster->GetIsolatedCaloHitList().end());
86  }
87 
88  for (const CaloHit *const pCaloHit : caloHitList)
89  {
90  PandoraContentApi::CaloHit::Metadata metadata;
91  metadata.m_x0 = x0;
92  PANDORA_THROW_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::CaloHit::AlterMetadata(*this, pCaloHit, metadata));
93  }
94 
95  for (const Vertex *const pVertex : pDaughterPfo->GetVertexList())
96  {
97  PandoraContentApi::Vertex::Metadata metadata;
98  metadata.m_x0 = x0;
99  PANDORA_THROW_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::Vertex::AlterMetadata(*this, pVertex, metadata));
100  }
101  }
102 
104  {
105  PANDORA_MONITORING_API(VisualizeParticleFlowObjects(this->GetPandora(), &pfoList, "AfterShiftCRPfos", RED));
106  PANDORA_MONITORING_API(ViewEvent(this->GetPandora()));
107  }
108 }
intermediate_table::const_iterator const_iterator
bool m_visualizeOverallRecoStatus
Whether to display results of current operations.
static void GetAllDownstreamPfos(const pandora::PfoList &inputPfoList, pandora::PfoList &outputPfoList)
Get a flat list of all pfos, recursively, of all daughters associated with those pfos in an input lis...
boost::graph_traits< ModuleGraph >::vertex_descriptor Vertex
Definition: ModuleGraph.h:25
StatusCode lar_content::MasterAlgorithm::StitchCosmicRayPfos ( PfoToLArTPCMap pfoToLArTPCMap,
PfoToFloatMap stitchedPfosToX0Map 
) const
protectedinherited

Stitch together cosmic-ray pfos crossing between adjacent lar tpcs.

Parameters
pfoToLArTPCMapthe pfo to lar tpc map
stitchedPfosToX0Mapto receive the map of cosmic-ray pfos that have been stitched between lar tpcs to the X0 shift

Definition at line 345 of file MasterAlgorithm.cc.

References lar_content::MasterAlgorithm::m_stitchingToolVector, and lar_content::MasterAlgorithm::m_visualizeOverallRecoStatus.

Referenced by lar_content::MasterAlgorithm::Run().

346 {
347  const PfoList *pRecreatedCRPfos(nullptr);
348  PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraApi::GetCurrentPfoList(this->GetPandora(), pRecreatedCRPfos));
349 
351  {
352  PANDORA_MONITORING_API(VisualizeParticleFlowObjects(this->GetPandora(), pRecreatedCRPfos, "RecreatedCRPfos", GREEN));
353  PANDORA_MONITORING_API(ViewEvent(this->GetPandora()));
354  }
355 
356  for (StitchingBaseTool *const pStitchingTool : m_stitchingToolVector)
357  pStitchingTool->Run(this, pRecreatedCRPfos, pfoToLArTPCMap, stitchedPfosToX0Map);
358 
360  {
361  PANDORA_MONITORING_API(VisualizeParticleFlowObjects(this->GetPandora(), pRecreatedCRPfos, "AfterStitchingCRPfos", RED));
362  PANDORA_MONITORING_API(ViewEvent(this->GetPandora()));
363  }
364 
365  return STATUS_CODE_SUCCESS;
366 }
StitchingToolVector m_stitchingToolVector
The stitching tool vector.
bool m_visualizeOverallRecoStatus
Whether to display results of current operations.
void lar_content::MasterAlgorithm::StitchPfos ( const pandora::ParticleFlowObject *const  pPfoToEnlarge,
const pandora::ParticleFlowObject *const  pPfoToDelete,
PfoToLArTPCMap pfoToLArTPCMap 
) const
inherited

Stitch together a pair of pfos.

Parameters
pPfoToEnlargethe address of the pfo to enlarge
pPfoToDeletethe address of the pfo to delete (will become a dangling pointer)
stitchingInfothe source for additional, local, stitching information

Definition at line 112 of file MasterAlgorithm.cc.

References lar_content::LArClusterHelper::GetClusterHitType(), lar_content::PfoMopUpBaseAlgorithm::GetParentCluster(), lar_content::MasterAlgorithm::m_recreatedClusterListName, lar_content::MasterAlgorithm::m_recreatedPfoListName, and lar_content::MasterAlgorithm::m_recreatedVertexListName.

Referenced by lar_content::StitchingCosmicRayMergingTool::StitchPfos().

114 {
115  if (pPfoToEnlarge == pPfoToDelete)
116  throw StatusCodeException(STATUS_CODE_NOT_ALLOWED);
117 
118  // ATTN Remove pfos from pfo to lar tpc map here, avoiding problems if stitching across multiple tpcs.
119  pfoToLArTPCMap.erase(pPfoToEnlarge);
120  pfoToLArTPCMap.erase(pPfoToDelete);
121 
122  const PfoList daughterPfos(pPfoToDelete->GetDaughterPfoList());
123  const ClusterVector daughterClusters(pPfoToDelete->GetClusterList().begin(), pPfoToDelete->GetClusterList().end());
124  const VertexVector daughterVertices(pPfoToDelete->GetVertexList().begin(), pPfoToDelete->GetVertexList().end());
125 
126  PANDORA_THROW_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::Delete(*this, pPfoToDelete, m_recreatedPfoListName));
127 
128  for (const ParticleFlowObject *const pDaughterPfo : daughterPfos)
129  PANDORA_THROW_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::SetPfoParentDaughterRelationship(*this, pPfoToEnlarge, pDaughterPfo));
130 
131  for (const Vertex *const pDaughterVertex : daughterVertices)
132  PANDORA_THROW_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::Delete(*this, pDaughterVertex, m_recreatedVertexListName));
133 
134  for (const Cluster *const pDaughterCluster : daughterClusters)
135  {
136  const HitType daughterHitType(LArClusterHelper::GetClusterHitType(pDaughterCluster));
137  const Cluster *pParentCluster(PfoMopUpBaseAlgorithm::GetParentCluster(pPfoToEnlarge->GetClusterList(), daughterHitType));
138 
139  if (pParentCluster)
140  {
141  PANDORA_THROW_RESULT_IF(STATUS_CODE_SUCCESS, !=,
142  PandoraContentApi::MergeAndDeleteClusters(*this, pParentCluster, pDaughterCluster, m_recreatedClusterListName, m_recreatedClusterListName));
143  }
144  else
145  {
146  PANDORA_THROW_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::AddToPfo(*this, pPfoToEnlarge, pDaughterCluster));
147  }
148  }
149 }
static pandora::HitType GetClusterHitType(const pandora::Cluster *const pCluster)
Get the hit type associated with a two dimensional cluster.
std::string m_recreatedVertexListName
The output recreated vertex list name.
std::string m_recreatedClusterListName
The output recreated cluster list name.
static const pandora::Cluster * GetParentCluster(const pandora::ClusterList &clusterList, const pandora::HitType hitType)
Select the parent cluster (same hit type and most hits) using a provided cluster list and hit type...
std::string m_recreatedPfoListName
The output recreated pfo list name.
HitType
Definition: HitType.h:12
std::vector< art::Ptr< recob::Vertex > > VertexVector
boost::graph_traits< ModuleGraph >::vertex_descriptor Vertex
Definition: ModuleGraph.h:25
std::vector< art::Ptr< recob::Cluster > > ClusterVector
StatusCode lar_content::MasterAlgorithm::TagCosmicRayPfos ( const PfoToFloatMap stitchedPfosToX0Map,
pandora::PfoList &  clearCosmicRayPfos,
pandora::PfoList &  ambiguousPfos 
) const
protectedinherited

Tag clear, unambiguous cosmic-ray pfos.

Parameters
stitchedPfosToX0Mapa map of cosmic-ray pfos that have been stitched between lar tpcs to the X0 shift
clearCosmicRayPfosto receive the list of clear cosmic-ray pfos
ambiguousPfosto receive the list of ambiguous cosmic-ray pfos for further analysis

Definition at line 370 of file MasterAlgorithm.cc.

References lar_content::MasterAlgorithm::m_cosmicRayTaggingToolVector, lar_content::MasterAlgorithm::m_inTimeMaxX0, and lar_content::MasterAlgorithm::m_visualizeOverallRecoStatus.

Referenced by lar_content::MasterAlgorithm::Run().

371 {
372  const PfoList *pRecreatedCRPfos(nullptr);
373  PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraApi::GetCurrentPfoList(this->GetPandora(), pRecreatedCRPfos));
374 
375  PfoList nonStitchedParentCosmicRayPfos;
376  for (const Pfo *const pPfo : *pRecreatedCRPfos)
377  {
378  if (!pPfo->GetParentPfoList().empty())
379  continue;
380 
381  PfoToFloatMap::const_iterator pfoToX0Iter = stitchedPfosToX0Map.find(pPfo);
382  const float x0Shift((pfoToX0Iter != stitchedPfosToX0Map.end()) ? pfoToX0Iter->second : 0.f);
383  PfoList &targetList((std::fabs(x0Shift) > m_inTimeMaxX0) ? clearCosmicRayPfos : nonStitchedParentCosmicRayPfos);
384  targetList.push_back(pPfo);
385  }
386 
387  for (CosmicRayTaggingBaseTool *const pCosmicRayTaggingTool : m_cosmicRayTaggingToolVector)
388  pCosmicRayTaggingTool->FindAmbiguousPfos(nonStitchedParentCosmicRayPfos, ambiguousPfos, this);
389 
390  for (const Pfo *const pPfo : nonStitchedParentCosmicRayPfos)
391  {
392  const bool isClearCosmic(ambiguousPfos.end() == std::find(ambiguousPfos.begin(), ambiguousPfos.end(), pPfo));
393 
394  if (isClearCosmic)
395  clearCosmicRayPfos.push_back(pPfo);
396  }
397 
398  for (const Pfo *const pPfo : *pRecreatedCRPfos)
399  {
400  const bool isClearCosmic(ambiguousPfos.end() == std::find(ambiguousPfos.begin(), ambiguousPfos.end(), pPfo));
401  PandoraContentApi::ParticleFlowObject::Metadata metadata;
402  metadata.m_propertiesToAdd["IsClearCosmic"] = (isClearCosmic ? 1.f : 0.f);
403  PANDORA_RETURN_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::ParticleFlowObject::AlterMetadata(*this, pPfo, metadata));
404  }
405 
407  {
408  PANDORA_MONITORING_API(VisualizeParticleFlowObjects(this->GetPandora(), &clearCosmicRayPfos, "ClearCRPfos", RED));
409  PANDORA_MONITORING_API(VisualizeParticleFlowObjects(this->GetPandora(), &ambiguousPfos, "AmbiguousCRPfos", BLUE));
410  PANDORA_MONITORING_API(ViewEvent(this->GetPandora()));
411  }
412 
413  return STATUS_CODE_SUCCESS;
414 }
CosmicRayTaggingToolVector m_cosmicRayTaggingToolVector
The cosmic-ray tagging tool vector.
intermediate_table::const_iterator const_iterator
bool m_visualizeOverallRecoStatus
Whether to display results of current operations.
float m_inTimeMaxX0
Cut on X0 to determine whether particle is clear cosmic ray.

Member Data Documentation

CosmicRayTaggingToolVector lar_content::MasterAlgorithm::m_cosmicRayTaggingToolVector
protectedinherited

The cosmic-ray tagging tool vector.

Definition at line 340 of file MasterAlgorithm.h.

Referenced by lar_content::MasterAlgorithm::ReadSettings(), and lar_content::MasterAlgorithm::TagCosmicRayPfos().

std::string lar_content::MasterAlgorithm::m_crSettingsFile
protectedinherited

The cosmic-ray reconstruction settings file.

Definition at line 345 of file MasterAlgorithm.h.

Referenced by lar_content::MasterAlgorithm::InitializeWorkerInstances(), and lar_content::MasterAlgorithm::ReadSettings().

std::string lar_content::MasterAlgorithm::m_filePathEnvironmentVariable
protectedinherited

The environment variable providing a list of paths to xml files.

Definition at line 344 of file MasterAlgorithm.h.

Referenced by lar_content::MasterAlgorithm::ReadSettings().

bool lar_content::MasterAlgorithm::m_fullWidthCRWorkerWireGaps
protectedinherited

Whether wire-type line gaps in cosmic-ray worker instances should cover all drift time.

Definition at line 331 of file MasterAlgorithm.h.

Referenced by lar_content::MasterAlgorithm::CreatePfo(), and lar_content::MasterAlgorithm::ReadSettings().

std::string lar_content::MasterAlgorithm::m_inputHitListName
protectedinherited
std::string lar_content::MasterAlgorithm::m_inputMCParticleListName
protectedinherited

The input mc particle list name.

Definition at line 349 of file MasterAlgorithm.h.

Referenced by lar_content::MasterAlgorithm::CopyMCParticles(), and lar_content::MasterAlgorithm::ReadSettings().

float lar_content::MasterAlgorithm::m_inTimeMaxX0
protectedinherited

Cut on X0 to determine whether particle is clear cosmic ray.

Definition at line 355 of file MasterAlgorithm.h.

Referenced by lar_content::MasterAlgorithm::ReadSettings(), and lar_content::MasterAlgorithm::TagCosmicRayPfos().

LArCaloHitFactory lar_content::MasterAlgorithm::m_larCaloHitFactory
protectedinherited

Factory for creating LArCaloHits during hit copying.

Definition at line 356 of file MasterAlgorithm.h.

Referenced by lar_content::MasterAlgorithm::Reset().

unsigned int lar_content::MasterAlgorithm::m_larCaloHitVersion
protectedinherited

The LArCaloHit version for LArCaloHitFactory.

Definition at line 313 of file MasterAlgorithm.h.

Referenced by lar_content::MasterAlgorithm::ReadSettings().

std::string lar_content::MasterAlgorithm::m_nuSettingsFile
protectedinherited

The neutrino reconstruction settings file.

Definition at line 346 of file MasterAlgorithm.h.

Referenced by lar_content::MasterAlgorithm::InitializeWorkerInstances(), and lar_content::MasterAlgorithm::ReadSettings().

bool lar_content::MasterAlgorithm::m_passMCParticlesToWorkerInstances
protectedinherited

Whether to pass mc particle details (and links to calo hits) to worker instances.

Definition at line 332 of file MasterAlgorithm.h.

Referenced by lar_content::MasterAlgorithm::ReadSettings(), lar_content::MasterAlgorithm::Reset(), and lar_content::MasterAlgorithm::Run().

bool lar_content::MasterAlgorithm::m_printOverallRecoStatus
protectedinherited
const pandora::Pandora* lar_content::MasterAlgorithm::m_pSliceCRWorkerInstance
protectedinherited
const pandora::Pandora* lar_content::MasterAlgorithm::m_pSliceNuWorkerInstance
protectedinherited
const pandora::Pandora* lar_content::MasterAlgorithm::m_pSlicingWorkerInstance
protectedinherited
std::string lar_content::MasterAlgorithm::m_recreatedClusterListName
protectedinherited
std::string lar_content::MasterAlgorithm::m_recreatedPfoListName
protectedinherited
std::string lar_content::MasterAlgorithm::m_recreatedVertexListName
protectedinherited
bool lar_content::MasterAlgorithm::m_shouldPerformSliceId
protectedinherited

Whether to identify slices and select most appropriate pfos.

Definition at line 321 of file MasterAlgorithm.h.

Referenced by lar_content::MasterAlgorithm::ReadSettings(), and lar_content::MasterAlgorithm::SelectBestSliceHypotheses().

bool lar_content::MasterAlgorithm::m_shouldRemoveOutOfTimeHits
protectedinherited

Whether to remove out of time hits.

Definition at line 324 of file MasterAlgorithm.h.

Referenced by lar_content::MasterAlgorithm::ReadSettings(), and lar_content::MasterAlgorithm::RunSlicing().

bool lar_content::MasterAlgorithm::m_shouldRunAllHitsCosmicReco
protectedinherited

Whether to run all hits cosmic-ray reconstruction.

Definition at line 315 of file MasterAlgorithm.h.

Referenced by lar_content::MasterAlgorithm::ReadSettings(), and lar_content::MasterAlgorithm::Run().

bool lar_content::MasterAlgorithm::m_shouldRunCosmicHitRemoval
protectedinherited

Whether to remove hits from tagged cosmic-rays.

Definition at line 317 of file MasterAlgorithm.h.

Referenced by lar_content::MasterAlgorithm::ReadSettings(), and lar_content::MasterAlgorithm::Run().

bool lar_content::MasterAlgorithm::m_shouldRunCosmicRecoOption
protectedinherited
bool lar_content::MasterAlgorithm::m_shouldRunNeutrinoRecoOption
protectedinherited
bool lar_content::MasterAlgorithm::m_shouldRunSlicing
protectedinherited
bool lar_content::MasterAlgorithm::m_shouldRunStitching
protectedinherited

Whether to stitch cosmic-ray muons crossing between volumes.

Definition at line 316 of file MasterAlgorithm.h.

Referenced by lar_content::MasterAlgorithm::ReadSettings(), and lar_content::MasterAlgorithm::Run().

SliceIdToolVector lar_content::MasterAlgorithm::m_sliceIdToolVector
protectedinherited
SliceSelectionToolVector lar_content::MasterAlgorithm::m_sliceSelectionToolVector
protectedinherited

The slice selection tool vector.

Definition at line 342 of file MasterAlgorithm.h.

Referenced by lar_content::MasterAlgorithm::ReadSettings(), and lar_content::MasterAlgorithm::RunSliceReconstruction().

std::string lar_content::MasterAlgorithm::m_slicingSettingsFile
protectedinherited
StitchingToolVector lar_content::MasterAlgorithm::m_stitchingToolVector
protectedinherited

The stitching tool vector.

Definition at line 339 of file MasterAlgorithm.h.

Referenced by lar_content::MasterAlgorithm::ReadSettings(), and lar_content::MasterAlgorithm::StitchCosmicRayPfos().

bool lar_content::MasterAlgorithm::m_visualizeOverallRecoStatus
protectedinherited
bool lar_content::MasterAlgorithm::m_workerInstancesInitialized
protectedinherited

Whether all worker instances have been initialized.

Definition at line 311 of file MasterAlgorithm.h.

Referenced by lar_content::MasterAlgorithm::InitializeWorkerInstances(), and lar_content::MasterAlgorithm::Run().


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