Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
lar_content::EventWritingAlgorithm Class Reference

EventWritingAlgorithm class. More...

#include "EventWritingAlgorithm.h"

Inheritance diagram for lar_content::EventWritingAlgorithm:
Collaboration diagram for lar_content::EventWritingAlgorithm:

Public Member Functions

 EventWritingAlgorithm ()
 Default constructor.
 
 ~EventWritingAlgorithm ()
 Destructor.
 
const std::string & GetType () const
 Get the type.
 
const std::string & GetInstanceName () const
 Get the instance name.
 
const PandoraGetPandora () const
 Get the associated pandora instance.
 

Protected Member Functions

virtual StatusCode Reset ()
 Perform any operations when pandora is reset, typically at the end of each event.
 
StatusCode RegisterDetails (const Pandora *const pPandora, const std::string &type, const std::string &instanceName)
 Register i) the pandora instance that will run the process and ii) the process type.
 

Protected Attributes

const Pandoram_pPandora
 The pandora object that will run the process.
 
std::string m_type
 The process type.
 
std::string m_instanceName
 The process instance name.
 

Private Member Functions

pandora::StatusCode Initialize ()
 Perform any operations that must occur after reading settings, but before running the process.
 
pandora::StatusCode Run ()
 Run the algorithm.
 
bool PassNuanceCodeFilter () const
 Whether current event passes nuance code filter.
 
bool PassMCParticleFilter () const
 Whether current event passes mc particle constituent filter.
 
bool PassNeutrinoVertexFilter () const
 Whether current event passes neutrino vertex position filter (e.g. fiducial volume cut)
 
pandora::StatusCode ReadSettings (const pandora::TiXmlHandle xmlHandle)
 Read the algorithm settings.
 

Private Attributes

pandora::FileType m_geometryFileType
 The geometry file type.
 
pandora::FileType m_eventFileType
 The event file type.
 
pandora::FileWriterm_pEventFileWriter
 Address of the event file writer.
 
pandora::FileWriterm_pGeometryFileWriter
 Address of the geometry file writer.
 
bool m_shouldWriteGeometry
 Whether to write geometry to a specified file.
 
bool m_writtenGeometry
 Whether geometry has been written.
 
std::string m_geometryFileName
 Name of the output geometry file.
 
bool m_shouldWriteEvents
 Whether to write events to a specified file.
 
std::string m_eventFileName
 Name of the output event file.
 
bool m_shouldWriteMCRelationships
 Whether to write mc relationship information to the events file.
 
bool m_shouldWriteTrackRelationships
 Whether to write track relationship information to the events file.
 
bool m_shouldOverwriteEventFile
 Whether to overwrite existing event file with specified name, or append.
 
bool m_shouldOverwriteGeometryFile
 Whether to overwrite existing geometry file with specified name, or append.
 
bool m_useLArCaloHits
 Whether to write lar calo hits, or standard pandora calo hits.
 
unsigned int m_larCaloHitVersion
 LArCaloHit version for LArCaloHitFactory.
 
bool m_useLArMCParticles
 Whether to write lar mc particles, or standard pandora mc particles.
 
bool m_shouldFilterByNuanceCode
 Whether to filter output by nuance code.
 
int m_filterNuanceCode
 The filter nuance code (required if specify filter by nuance code)
 
bool m_shouldFilterByMCParticles
 Whether to filter output by mc particle constituents.
 
bool m_neutrinoInducedOnly
 Whether to consider only mc particles that were neutrino induced.
 
unsigned int m_matchingMinPrimaryHits
 The minimum number of mc primary hits used in matching scheme.
 
unsigned int m_nNonNeutrons
 The requested number of mc primaries that are not neutrons.
 
unsigned int m_nMuons
 The requested number of mc primaries that are muons.
 
unsigned int m_nElectrons
 The requested number of mc primaries that are electrons.
 
unsigned int m_nProtons
 The requested number of mc primaries that are protons.
 
unsigned int m_nPhotons
 The requested number of mc primaries that are photons.
 
unsigned int m_nChargedPions
 The requested number of mc primaries that are charged pions.
 
bool m_shouldFilterByNeutrinoVertex
 Whether to filter output by neutrino vertex position (e.g. fiducial volume cut)
 
float m_detectorHalfLengthX
 Half length of detector in x dimension.
 
float m_detectorHalfLengthY
 Half length of detector in y dimension.
 
float m_detectorHalfLengthZ
 Half length of detector in z dimension.
 
float m_coordinateOffsetX
 Origin offset (from detector corner) in x dimension.
 
float m_coordinateOffsetY
 Origin offset (from detector corner) in y dimension.
 
float m_coordinateOffsetZ
 Origin offset (from detector corner) in z dimension.
 
float m_selectedBorderX
 Required distance from detector edge in x dimension.
 
float m_selectedBorderY
 Required distance from detector edge in y dimension.
 
float m_selectedBorderZ
 Required distance from detector edge in z dimension.
 

Detailed Description

EventWritingAlgorithm class.

Definition at line 28 of file EventWritingAlgorithm.h.

Constructor & Destructor Documentation

◆ EventWritingAlgorithm()

EventWritingAlgorithm::EventWritingAlgorithm ( )

Default constructor.

Definition at line 27 of file EventWritingAlgorithm.cc.

◆ ~EventWritingAlgorithm()

EventWritingAlgorithm::~EventWritingAlgorithm ( )

Destructor.

Definition at line 68 of file EventWritingAlgorithm.cc.

Member Function Documentation

◆ GetInstanceName()

const std::string & pandora::Process::GetInstanceName ( ) const
inlineinherited

Get the instance name.

Returns
The instance name

Definition at line 109 of file Process.h.

◆ GetPandora()

const Pandora & pandora::Process::GetPandora ( ) const
inlineinherited

Get the associated pandora instance.

Returns
the associated pandora instance

Definition at line 116 of file Process.h.

◆ GetType()

const std::string & pandora::Process::GetType ( ) const
inlineinherited

Get the type.

Returns
The type

Definition at line 102 of file Process.h.

◆ Initialize()

StatusCode EventWritingAlgorithm::Initialize ( )
privatevirtual

Perform any operations that must occur after reading settings, but before running the process.

Reimplemented from pandora::Process.

Definition at line 76 of file EventWritingAlgorithm.cc.

Here is the call graph for this function:

◆ PassMCParticleFilter()

bool EventWritingAlgorithm::PassMCParticleFilter ( ) const
private

Whether current event passes mc particle constituent filter.

Returns
boolean

Definition at line 179 of file EventWritingAlgorithm.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PassNeutrinoVertexFilter()

bool EventWritingAlgorithm::PassNeutrinoVertexFilter ( ) const
private

Whether current event passes neutrino vertex position filter (e.g. fiducial volume cut)

Returns
boolean

Definition at line 236 of file EventWritingAlgorithm.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PassNuanceCodeFilter()

bool EventWritingAlgorithm::PassNuanceCodeFilter ( ) const
private

Whether current event passes nuance code filter.

Returns
boolean

Definition at line 158 of file EventWritingAlgorithm.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadSettings()

StatusCode EventWritingAlgorithm::ReadSettings ( const pandora::TiXmlHandle  xmlHandle)
privatevirtual

Read the algorithm settings.

Parameters
xmlHandlethe relevant xml handle

Implements pandora::Process.

Definition at line 264 of file EventWritingAlgorithm.cc.

Here is the call graph for this function:

◆ RegisterDetails()

StatusCode pandora::Process::RegisterDetails ( const Pandora *const  pPandora,
const std::string &  type,
const std::string &  instanceName 
)
inlineprotectedinherited

Register i) the pandora instance that will run the process and ii) the process type.

Parameters
pPandoraaddress of the pandora object that will run the process
typethe process type
instanceNamethe process instance name

Definition at line 146 of file Process.h.

Here is the caller graph for this function:

◆ Reset()

StatusCode pandora::Process::Reset ( )
inlineprotectedvirtualinherited

Perform any operations when pandora is reset, typically at the end of each event.

Reimplemented in lar_content::MasterAlgorithm, lar_content::PostProcessingAlgorithm, and lar_content::PreProcessingAlgorithm.

Definition at line 133 of file Process.h.

Here is the caller graph for this function:

◆ Run()

StatusCode EventWritingAlgorithm::Run ( )
privatevirtual

Run the algorithm.

Implements pandora::Algorithm.

Definition at line 125 of file EventWritingAlgorithm.cc.

Here is the call graph for this function:

Member Data Documentation

◆ m_coordinateOffsetX

float lar_content::EventWritingAlgorithm::m_coordinateOffsetX
private

Origin offset (from detector corner) in x dimension.

Definition at line 108 of file EventWritingAlgorithm.h.

◆ m_coordinateOffsetY

float lar_content::EventWritingAlgorithm::m_coordinateOffsetY
private

Origin offset (from detector corner) in y dimension.

Definition at line 109 of file EventWritingAlgorithm.h.

◆ m_coordinateOffsetZ

float lar_content::EventWritingAlgorithm::m_coordinateOffsetZ
private

Origin offset (from detector corner) in z dimension.

Definition at line 110 of file EventWritingAlgorithm.h.

◆ m_detectorHalfLengthX

float lar_content::EventWritingAlgorithm::m_detectorHalfLengthX
private

Half length of detector in x dimension.

Definition at line 105 of file EventWritingAlgorithm.h.

◆ m_detectorHalfLengthY

float lar_content::EventWritingAlgorithm::m_detectorHalfLengthY
private

Half length of detector in y dimension.

Definition at line 106 of file EventWritingAlgorithm.h.

◆ m_detectorHalfLengthZ

float lar_content::EventWritingAlgorithm::m_detectorHalfLengthZ
private

Half length of detector in z dimension.

Definition at line 107 of file EventWritingAlgorithm.h.

◆ m_eventFileName

std::string lar_content::EventWritingAlgorithm::m_eventFileName
private

Name of the output event file.

Definition at line 79 of file EventWritingAlgorithm.h.

◆ m_eventFileType

pandora::FileType lar_content::EventWritingAlgorithm::m_eventFileType
private

The event file type.

Definition at line 69 of file EventWritingAlgorithm.h.

◆ m_filterNuanceCode

int lar_content::EventWritingAlgorithm::m_filterNuanceCode
private

The filter nuance code (required if specify filter by nuance code)

Definition at line 92 of file EventWritingAlgorithm.h.

◆ m_geometryFileName

std::string lar_content::EventWritingAlgorithm::m_geometryFileName
private

Name of the output geometry file.

Definition at line 76 of file EventWritingAlgorithm.h.

◆ m_geometryFileType

pandora::FileType lar_content::EventWritingAlgorithm::m_geometryFileType
private

The geometry file type.

Definition at line 68 of file EventWritingAlgorithm.h.

◆ m_instanceName

std::string pandora::Process::m_instanceName
protectedinherited

The process instance name.

Definition at line 89 of file Process.h.

◆ m_larCaloHitVersion

unsigned int lar_content::EventWritingAlgorithm::m_larCaloHitVersion
private

LArCaloHit version for LArCaloHitFactory.

Definition at line 88 of file EventWritingAlgorithm.h.

◆ m_matchingMinPrimaryHits

unsigned int lar_content::EventWritingAlgorithm::m_matchingMinPrimaryHits
private

The minimum number of mc primary hits used in matching scheme.

Definition at line 96 of file EventWritingAlgorithm.h.

◆ m_nChargedPions

unsigned int lar_content::EventWritingAlgorithm::m_nChargedPions
private

The requested number of mc primaries that are charged pions.

Definition at line 102 of file EventWritingAlgorithm.h.

◆ m_nElectrons

unsigned int lar_content::EventWritingAlgorithm::m_nElectrons
private

The requested number of mc primaries that are electrons.

Definition at line 99 of file EventWritingAlgorithm.h.

◆ m_neutrinoInducedOnly

bool lar_content::EventWritingAlgorithm::m_neutrinoInducedOnly
private

Whether to consider only mc particles that were neutrino induced.

Definition at line 95 of file EventWritingAlgorithm.h.

◆ m_nMuons

unsigned int lar_content::EventWritingAlgorithm::m_nMuons
private

The requested number of mc primaries that are muons.

Definition at line 98 of file EventWritingAlgorithm.h.

◆ m_nNonNeutrons

unsigned int lar_content::EventWritingAlgorithm::m_nNonNeutrons
private

The requested number of mc primaries that are not neutrons.

Definition at line 97 of file EventWritingAlgorithm.h.

◆ m_nPhotons

unsigned int lar_content::EventWritingAlgorithm::m_nPhotons
private

The requested number of mc primaries that are photons.

Definition at line 101 of file EventWritingAlgorithm.h.

◆ m_nProtons

unsigned int lar_content::EventWritingAlgorithm::m_nProtons
private

The requested number of mc primaries that are protons.

Definition at line 100 of file EventWritingAlgorithm.h.

◆ m_pEventFileWriter

pandora::FileWriter* lar_content::EventWritingAlgorithm::m_pEventFileWriter
private

Address of the event file writer.

Definition at line 71 of file EventWritingAlgorithm.h.

◆ m_pGeometryFileWriter

pandora::FileWriter* lar_content::EventWritingAlgorithm::m_pGeometryFileWriter
private

Address of the geometry file writer.

Definition at line 72 of file EventWritingAlgorithm.h.

◆ m_pPandora

const Pandora* pandora::Process::m_pPandora
protectedinherited

The pandora object that will run the process.

Definition at line 87 of file Process.h.

◆ m_selectedBorderX

float lar_content::EventWritingAlgorithm::m_selectedBorderX
private

Required distance from detector edge in x dimension.

Definition at line 111 of file EventWritingAlgorithm.h.

◆ m_selectedBorderY

float lar_content::EventWritingAlgorithm::m_selectedBorderY
private

Required distance from detector edge in y dimension.

Definition at line 112 of file EventWritingAlgorithm.h.

◆ m_selectedBorderZ

float lar_content::EventWritingAlgorithm::m_selectedBorderZ
private

Required distance from detector edge in z dimension.

Definition at line 113 of file EventWritingAlgorithm.h.

◆ m_shouldFilterByMCParticles

bool lar_content::EventWritingAlgorithm::m_shouldFilterByMCParticles
private

Whether to filter output by mc particle constituents.

Definition at line 94 of file EventWritingAlgorithm.h.

◆ m_shouldFilterByNeutrinoVertex

bool lar_content::EventWritingAlgorithm::m_shouldFilterByNeutrinoVertex
private

Whether to filter output by neutrino vertex position (e.g. fiducial volume cut)

Definition at line 104 of file EventWritingAlgorithm.h.

◆ m_shouldFilterByNuanceCode

bool lar_content::EventWritingAlgorithm::m_shouldFilterByNuanceCode
private

Whether to filter output by nuance code.

Definition at line 91 of file EventWritingAlgorithm.h.

◆ m_shouldOverwriteEventFile

bool lar_content::EventWritingAlgorithm::m_shouldOverwriteEventFile
private

Whether to overwrite existing event file with specified name, or append.

Definition at line 84 of file EventWritingAlgorithm.h.

◆ m_shouldOverwriteGeometryFile

bool lar_content::EventWritingAlgorithm::m_shouldOverwriteGeometryFile
private

Whether to overwrite existing geometry file with specified name, or append.

Definition at line 85 of file EventWritingAlgorithm.h.

◆ m_shouldWriteEvents

bool lar_content::EventWritingAlgorithm::m_shouldWriteEvents
private

Whether to write events to a specified file.

Definition at line 78 of file EventWritingAlgorithm.h.

◆ m_shouldWriteGeometry

bool lar_content::EventWritingAlgorithm::m_shouldWriteGeometry
private

Whether to write geometry to a specified file.

Definition at line 74 of file EventWritingAlgorithm.h.

◆ m_shouldWriteMCRelationships

bool lar_content::EventWritingAlgorithm::m_shouldWriteMCRelationships
private

Whether to write mc relationship information to the events file.

Definition at line 81 of file EventWritingAlgorithm.h.

◆ m_shouldWriteTrackRelationships

bool lar_content::EventWritingAlgorithm::m_shouldWriteTrackRelationships
private

Whether to write track relationship information to the events file.

Definition at line 82 of file EventWritingAlgorithm.h.

◆ m_type

std::string pandora::Process::m_type
protectedinherited

The process type.

Definition at line 88 of file Process.h.

◆ m_useLArCaloHits

bool lar_content::EventWritingAlgorithm::m_useLArCaloHits
private

Whether to write lar calo hits, or standard pandora calo hits.

Definition at line 87 of file EventWritingAlgorithm.h.

◆ m_useLArMCParticles

bool lar_content::EventWritingAlgorithm::m_useLArMCParticles
private

Whether to write lar mc particles, or standard pandora mc particles.

Definition at line 89 of file EventWritingAlgorithm.h.

◆ m_writtenGeometry

bool lar_content::EventWritingAlgorithm::m_writtenGeometry
private

Whether geometry has been written.

Definition at line 75 of file EventWritingAlgorithm.h.


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