LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
EventWritingAlgorithm class. More...
#include "EventWritingAlgorithm.h"
Public Member Functions | |
EventWritingAlgorithm () | |
Default constructor. More... | |
~EventWritingAlgorithm () | |
Destructor. More... | |
Private Member Functions | |
pandora::StatusCode | Initialize () |
pandora::StatusCode | Run () |
bool | PassNuanceCodeFilter () const |
Whether current event passes nuance code filter. More... | |
bool | PassMCParticleFilter () const |
Whether current event passes mc particle constituent filter. More... | |
bool | PassNeutrinoVertexFilter () const |
Whether current event passes neutrino vertex position filter (e.g. fiducial volume cut) More... | |
pandora::StatusCode | ReadSettings (const pandora::TiXmlHandle xmlHandle) |
Private Attributes | |
pandora::FileType | m_geometryFileType |
The geometry file type. More... | |
pandora::FileType | m_eventFileType |
The event file type. More... | |
pandora::FileWriter * | m_pEventFileWriter |
Address of the event file writer. More... | |
pandora::FileWriter * | m_pGeometryFileWriter |
Address of the geometry file writer. More... | |
bool | m_shouldWriteGeometry |
Whether to write geometry to a specified file. More... | |
bool | m_writtenGeometry |
Whether geometry has been written. More... | |
std::string | m_geometryFileName |
Name of the output geometry file. More... | |
bool | m_shouldWriteEvents |
Whether to write events to a specified file. More... | |
std::string | m_eventFileName |
Name of the output event file. More... | |
bool | m_shouldWriteMCRelationships |
Whether to write mc relationship information to the events file. More... | |
bool | m_shouldWriteTrackRelationships |
Whether to write track relationship information to the events file. More... | |
bool | m_shouldOverwriteEventFile |
Whether to overwrite existing event file with specified name, or append. More... | |
bool | m_shouldOverwriteGeometryFile |
Whether to overwrite existing geometry file with specified name, or append. More... | |
bool | m_useLArCaloHits |
Whether to write lar calo hits, or standard pandora calo hits. More... | |
unsigned int | m_larCaloHitVersion |
LArCaloHit version for LArCaloHitFactory. More... | |
bool | m_useLArMCParticles |
Whether to write lar mc particles, or standard pandora mc particles. More... | |
bool | m_shouldFilterByNuanceCode |
Whether to filter output by nuance code. More... | |
int | m_filterNuanceCode |
The filter nuance code (required if specify filter by nuance code) More... | |
bool | m_shouldFilterByMCParticles |
Whether to filter output by mc particle constituents. More... | |
bool | m_neutrinoInducedOnly |
Whether to consider only mc particles that were neutrino induced. More... | |
unsigned int | m_matchingMinPrimaryHits |
The minimum number of mc primary hits used in matching scheme. More... | |
unsigned int | m_nNonNeutrons |
The requested number of mc primaries that are not neutrons. More... | |
unsigned int | m_nMuons |
The requested number of mc primaries that are muons. More... | |
unsigned int | m_nElectrons |
The requested number of mc primaries that are electrons. More... | |
unsigned int | m_nProtons |
The requested number of mc primaries that are protons. More... | |
unsigned int | m_nPhotons |
The requested number of mc primaries that are photons. More... | |
unsigned int | m_nChargedPions |
The requested number of mc primaries that are charged pions. More... | |
bool | m_shouldFilterByNeutrinoVertex |
Whether to filter output by neutrino vertex position (e.g. fiducial volume cut) More... | |
float | m_detectorHalfLengthX |
Half length of detector in x dimension. More... | |
float | m_detectorHalfLengthY |
Half length of detector in y dimension. More... | |
float | m_detectorHalfLengthZ |
Half length of detector in z dimension. More... | |
float | m_coordinateOffsetX |
Origin offset (from detector corner) in x dimension. More... | |
float | m_coordinateOffsetY |
Origin offset (from detector corner) in y dimension. More... | |
float | m_coordinateOffsetZ |
Origin offset (from detector corner) in z dimension. More... | |
float | m_selectedBorderX |
Required distance from detector edge in x dimension. More... | |
float | m_selectedBorderY |
Required distance from detector edge in y dimension. More... | |
float | m_selectedBorderZ |
Required distance from detector edge in z dimension. More... | |
EventWritingAlgorithm class.
Definition at line 28 of file EventWritingAlgorithm.h.
lar_content::EventWritingAlgorithm::EventWritingAlgorithm | ( | ) |
Default constructor.
Definition at line 27 of file EventWritingAlgorithm.cc.
lar_content::EventWritingAlgorithm::~EventWritingAlgorithm | ( | ) |
Destructor.
Definition at line 68 of file EventWritingAlgorithm.cc.
References m_pEventFileWriter, and m_pGeometryFileWriter.
|
private |
Definition at line 76 of file EventWritingAlgorithm.cc.
References m_eventFileName, m_eventFileType, m_geometryFileName, m_geometryFileType, m_larCaloHitVersion, m_pEventFileWriter, m_pGeometryFileWriter, m_shouldOverwriteEventFile, m_shouldOverwriteGeometryFile, m_shouldWriteEvents, m_shouldWriteGeometry, m_useLArCaloHits, and m_useLArMCParticles.
|
private |
Whether current event passes mc particle constituent filter.
Definition at line 179 of file EventWritingAlgorithm.cc.
References util::abs(), lar_content::LArMCParticleHelper::IsBeamNeutrinoFinalState(), lar_content::LArMCParticleHelper::IsBeamParticle(), lar_content::LArMCParticleHelper::IsCosmicRay(), m_nChargedPions, m_nElectrons, m_neutrinoInducedOnly, m_nMuons, m_nNonNeutrons, m_nPhotons, m_nProtons, lar_content::LArMCParticleHelper::SelectReconstructableMCParticles(), and lar_content::LArMCParticleHelper::SortByMomentum().
Referenced by Run().
|
private |
Whether current event passes neutrino vertex position filter (e.g. fiducial volume cut)
Definition at line 236 of file EventWritingAlgorithm.cc.
References lar_content::LArMCParticleHelper::GetTrueNeutrinos(), m_coordinateOffsetX, m_coordinateOffsetY, m_coordinateOffsetZ, m_detectorHalfLengthX, m_detectorHalfLengthY, m_detectorHalfLengthZ, m_selectedBorderX, m_selectedBorderY, and m_selectedBorderZ.
Referenced by Run().
|
private |
Whether current event passes nuance code filter.
Definition at line 158 of file EventWritingAlgorithm.cc.
References lar_content::LArMCParticle::GetNuanceCode(), lar_content::LArMCParticleHelper::GetTrueNeutrinos(), and m_filterNuanceCode.
Referenced by Run().
|
private |
Definition at line 264 of file EventWritingAlgorithm.cc.
References m_coordinateOffsetX, m_coordinateOffsetY, m_coordinateOffsetZ, m_detectorHalfLengthX, m_detectorHalfLengthY, m_detectorHalfLengthZ, m_eventFileName, m_eventFileType, m_filterNuanceCode, m_geometryFileName, m_geometryFileType, m_larCaloHitVersion, m_matchingMinPrimaryHits, m_nChargedPions, m_nElectrons, m_neutrinoInducedOnly, m_nMuons, m_nNonNeutrons, m_nPhotons, m_nProtons, m_selectedBorderX, m_selectedBorderY, m_selectedBorderZ, m_shouldFilterByMCParticles, m_shouldFilterByNeutrinoVertex, m_shouldFilterByNuanceCode, m_shouldOverwriteEventFile, m_shouldOverwriteGeometryFile, m_shouldWriteEvents, m_shouldWriteGeometry, m_shouldWriteMCRelationships, m_shouldWriteTrackRelationships, m_useLArCaloHits, and m_useLArMCParticles.
|
private |
Definition at line 125 of file EventWritingAlgorithm.cc.
References m_pEventFileWriter, m_pGeometryFileWriter, m_shouldFilterByMCParticles, m_shouldFilterByNeutrinoVertex, m_shouldFilterByNuanceCode, m_shouldWriteEvents, m_shouldWriteGeometry, m_shouldWriteMCRelationships, m_shouldWriteTrackRelationships, m_writtenGeometry, PassMCParticleFilter(), PassNeutrinoVertexFilter(), and PassNuanceCodeFilter().
|
private |
Origin offset (from detector corner) in x dimension.
Definition at line 108 of file EventWritingAlgorithm.h.
Referenced by PassNeutrinoVertexFilter(), and ReadSettings().
|
private |
Origin offset (from detector corner) in y dimension.
Definition at line 109 of file EventWritingAlgorithm.h.
Referenced by PassNeutrinoVertexFilter(), and ReadSettings().
|
private |
Origin offset (from detector corner) in z dimension.
Definition at line 110 of file EventWritingAlgorithm.h.
Referenced by PassNeutrinoVertexFilter(), and ReadSettings().
|
private |
Half length of detector in x dimension.
Definition at line 105 of file EventWritingAlgorithm.h.
Referenced by PassNeutrinoVertexFilter(), and ReadSettings().
|
private |
Half length of detector in y dimension.
Definition at line 106 of file EventWritingAlgorithm.h.
Referenced by PassNeutrinoVertexFilter(), and ReadSettings().
|
private |
Half length of detector in z dimension.
Definition at line 107 of file EventWritingAlgorithm.h.
Referenced by PassNeutrinoVertexFilter(), and ReadSettings().
|
private |
Name of the output event file.
Definition at line 79 of file EventWritingAlgorithm.h.
Referenced by Initialize(), and ReadSettings().
|
private |
The event file type.
Definition at line 69 of file EventWritingAlgorithm.h.
Referenced by Initialize(), and ReadSettings().
|
private |
The filter nuance code (required if specify filter by nuance code)
Definition at line 92 of file EventWritingAlgorithm.h.
Referenced by PassNuanceCodeFilter(), and ReadSettings().
|
private |
Name of the output geometry file.
Definition at line 76 of file EventWritingAlgorithm.h.
Referenced by Initialize(), and ReadSettings().
|
private |
The geometry file type.
Definition at line 68 of file EventWritingAlgorithm.h.
Referenced by Initialize(), and ReadSettings().
|
private |
LArCaloHit version for LArCaloHitFactory.
Definition at line 88 of file EventWritingAlgorithm.h.
Referenced by Initialize(), and ReadSettings().
|
private |
The minimum number of mc primary hits used in matching scheme.
Definition at line 96 of file EventWritingAlgorithm.h.
Referenced by ReadSettings().
|
private |
The requested number of mc primaries that are charged pions.
Definition at line 102 of file EventWritingAlgorithm.h.
Referenced by PassMCParticleFilter(), and ReadSettings().
|
private |
The requested number of mc primaries that are electrons.
Definition at line 99 of file EventWritingAlgorithm.h.
Referenced by PassMCParticleFilter(), and ReadSettings().
|
private |
Whether to consider only mc particles that were neutrino induced.
Definition at line 95 of file EventWritingAlgorithm.h.
Referenced by PassMCParticleFilter(), and ReadSettings().
|
private |
The requested number of mc primaries that are muons.
Definition at line 98 of file EventWritingAlgorithm.h.
Referenced by PassMCParticleFilter(), and ReadSettings().
|
private |
The requested number of mc primaries that are not neutrons.
Definition at line 97 of file EventWritingAlgorithm.h.
Referenced by PassMCParticleFilter(), and ReadSettings().
|
private |
The requested number of mc primaries that are photons.
Definition at line 101 of file EventWritingAlgorithm.h.
Referenced by PassMCParticleFilter(), and ReadSettings().
|
private |
The requested number of mc primaries that are protons.
Definition at line 100 of file EventWritingAlgorithm.h.
Referenced by PassMCParticleFilter(), and ReadSettings().
|
private |
Address of the event file writer.
Definition at line 71 of file EventWritingAlgorithm.h.
Referenced by Initialize(), Run(), and ~EventWritingAlgorithm().
|
private |
Address of the geometry file writer.
Definition at line 72 of file EventWritingAlgorithm.h.
Referenced by Initialize(), Run(), and ~EventWritingAlgorithm().
|
private |
Required distance from detector edge in x dimension.
Definition at line 111 of file EventWritingAlgorithm.h.
Referenced by PassNeutrinoVertexFilter(), and ReadSettings().
|
private |
Required distance from detector edge in y dimension.
Definition at line 112 of file EventWritingAlgorithm.h.
Referenced by PassNeutrinoVertexFilter(), and ReadSettings().
|
private |
Required distance from detector edge in z dimension.
Definition at line 113 of file EventWritingAlgorithm.h.
Referenced by PassNeutrinoVertexFilter(), and ReadSettings().
|
private |
Whether to filter output by mc particle constituents.
Definition at line 94 of file EventWritingAlgorithm.h.
Referenced by ReadSettings(), and Run().
|
private |
Whether to filter output by neutrino vertex position (e.g. fiducial volume cut)
Definition at line 104 of file EventWritingAlgorithm.h.
Referenced by ReadSettings(), and Run().
|
private |
Whether to filter output by nuance code.
Definition at line 91 of file EventWritingAlgorithm.h.
Referenced by ReadSettings(), and Run().
|
private |
Whether to overwrite existing event file with specified name, or append.
Definition at line 84 of file EventWritingAlgorithm.h.
Referenced by Initialize(), and ReadSettings().
|
private |
Whether to overwrite existing geometry file with specified name, or append.
Definition at line 85 of file EventWritingAlgorithm.h.
Referenced by Initialize(), and ReadSettings().
|
private |
Whether to write events to a specified file.
Definition at line 78 of file EventWritingAlgorithm.h.
Referenced by Initialize(), ReadSettings(), and Run().
|
private |
Whether to write geometry to a specified file.
Definition at line 74 of file EventWritingAlgorithm.h.
Referenced by Initialize(), ReadSettings(), and Run().
|
private |
Whether to write mc relationship information to the events file.
Definition at line 81 of file EventWritingAlgorithm.h.
Referenced by ReadSettings(), and Run().
|
private |
Whether to write track relationship information to the events file.
Definition at line 82 of file EventWritingAlgorithm.h.
Referenced by ReadSettings(), and Run().
|
private |
Whether to write lar calo hits, or standard pandora calo hits.
Definition at line 87 of file EventWritingAlgorithm.h.
Referenced by Initialize(), and ReadSettings().
|
private |
Whether to write lar mc particles, or standard pandora mc particles.
Definition at line 89 of file EventWritingAlgorithm.h.
Referenced by Initialize(), and ReadSettings().
|
private |
Whether geometry has been written.
Definition at line 75 of file EventWritingAlgorithm.h.
Referenced by Run().