LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
EventWritingAlgorithm.h
Go to the documentation of this file.
1 
8 #ifndef LAR_EVENT_WRITING_ALGORITHM_H
9 #define LAR_EVENT_WRITING_ALGORITHM_H 1
10 
11 #include "Pandora/Algorithm.h"
12 
13 #include "Persistency/PandoraIO.h"
14 
15 namespace pandora
16 {
17 class FileWriter;
18 }
19 
20 //------------------------------------------------------------------------------------------------------------------------------------------
21 
22 namespace lar_content
23 {
24 
28 class EventWritingAlgorithm : public pandora::Algorithm
29 {
30 public:
35 
40 
41 private:
42  pandora::StatusCode Initialize();
43  pandora::StatusCode Run();
44 
50  bool PassNuanceCodeFilter() const;
51 
57  bool PassMCParticleFilter() const;
58 
64  bool PassNeutrinoVertexFilter() const;
65 
66  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
67 
68  pandora::FileType m_geometryFileType;
69  pandora::FileType m_eventFileType;
70 
71  pandora::FileWriter *m_pEventFileWriter;
72  pandora::FileWriter *m_pGeometryFileWriter;
73 
76  std::string m_geometryFileName;
77 
79  std::string m_eventFileName;
80 
83 
86 
88  unsigned int m_larCaloHitVersion;
90 
93 
96  unsigned int m_matchingMinPrimaryHits;
97  unsigned int m_nNonNeutrons;
98  unsigned int m_nMuons;
99  unsigned int m_nElectrons;
100  unsigned int m_nProtons;
101  unsigned int m_nPhotons;
102  unsigned int m_nChargedPions;
103 
114 };
115 
116 } // namespace lar_content
117 
118 #endif // #ifndef LAR_EVENT_WRITING_ALGORITHM_H
float m_detectorHalfLengthZ
Half length of detector in z dimension.
unsigned int m_matchingMinPrimaryHits
The minimum number of mc primary hits used in matching scheme.
bool m_shouldWriteMCRelationships
Whether to write mc relationship information to the events file.
pandora::FileWriter * m_pEventFileWriter
Address of the event file writer.
EventWritingAlgorithm class.
bool m_shouldFilterByMCParticles
Whether to filter output by mc particle constituents.
bool m_shouldWriteEvents
Whether to write events to a specified file.
bool m_useLArCaloHits
Whether to write lar calo hits, or standard pandora calo hits.
float m_coordinateOffsetY
Origin offset (from detector corner) in y dimension.
void Initialize()
Definition: errprop.cc:100
bool m_neutrinoInducedOnly
Whether to consider only mc particles that were neutrino induced.
unsigned int m_larCaloHitVersion
LArCaloHit version for LArCaloHitFactory.
unsigned int m_nPhotons
The requested number of mc primaries that are photons.
unsigned int m_nProtons
The requested number of mc primaries that are protons.
float m_selectedBorderY
Required distance from detector edge in y dimension.
float m_detectorHalfLengthY
Half length of detector in y dimension.
float m_selectedBorderZ
Required distance from detector edge in z dimension.
std::string m_eventFileName
Name of the output event file.
pandora::FileType m_geometryFileType
The geometry file type.
unsigned int m_nChargedPions
The requested number of mc primaries that are charged pions.
bool m_shouldWriteTrackRelationships
Whether to write track relationship information to the events file.
bool m_useLArMCParticles
Whether to write lar mc particles, or standard pandora mc particles.
pandora::FileWriter * m_pGeometryFileWriter
Address of the geometry file writer.
unsigned int m_nNonNeutrons
The requested number of mc primaries that are not neutrons.
float m_selectedBorderX
Required distance from detector edge in x dimension.
bool m_shouldFilterByNeutrinoVertex
Whether to filter output by neutrino vertex position (e.g. fiducial volume cut)
int m_filterNuanceCode
The filter nuance code (required if specify filter by nuance code)
float m_detectorHalfLengthX
Half length of detector in x dimension.
unsigned int m_nElectrons
The requested number of mc primaries that are electrons.
std::string m_geometryFileName
Name of the output geometry file.
pandora::FileType m_eventFileType
The event file type.
bool m_shouldFilterByNuanceCode
Whether to filter output by nuance code.
bool m_shouldOverwriteEventFile
Whether to overwrite existing event file with specified name, or append.
unsigned int m_nMuons
The requested number of mc primaries that are muons.
bool m_shouldWriteGeometry
Whether to write geometry to a specified file.
bool m_shouldOverwriteGeometryFile
Whether to overwrite existing geometry file with specified name, or append.
float m_coordinateOffsetZ
Origin offset (from detector corner) in z dimension.
bool m_writtenGeometry
Whether geometry has been written.
float m_coordinateOffsetX
Origin offset (from detector corner) in x dimension.