LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
BeamParticleIdTool.h
Go to the documentation of this file.
1 
8 #ifndef LAR_BEAM_PARTICLE_ID_TOOL_H
9 #define LAR_BEAM_PARTICLE_ID_TOOL_H 1
10 
12 
13 namespace lar_content
14 {
15 
20 {
21 public:
26 
27  void SelectOutputPfos(const pandora::Algorithm *const pAlgorithm, const SliceHypotheses &beamSliceHypotheses, const SliceHypotheses &crSliceHypotheses, pandora::PfoList &selectedPfos);
28 
29 private:
33  class Plane
34  {
35  public:
42  Plane(const pandora::CartesianVector &normal, const pandora::CartesianVector &point);
43 
50  pandora::CartesianVector GetLineIntersection(const pandora::CartesianVector &a0, const pandora::CartesianVector &a) const;
51 
52  private:
53  pandora::CartesianVector m_unitNormal;
54  pandora::CartesianVector m_point;
55  float m_d;
56  };
57 
58  pandora::StatusCode Initialize();
59 
67  void GetSelectedCaloHits(const pandora::CaloHitList &inputCaloHitList, pandora::CaloHitList &outputCaloHitList,
68  float &closestHitToFaceDistance) const;
69 
78  void GetTPCIntercepts(const pandora::CartesianVector &a0, const pandora::CartesianVector &majorAxis,
79  pandora::CartesianVector &interceptOne, pandora::CartesianVector &interceptTwo) const;
80 
86  bool IsContained(const pandora::CartesianVector &spacePoint) const;
87 
88  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
89 
90  typedef std::vector<Plane> PlaneVector;
91 
94  float m_tpcMinX;
95  float m_tpcMaxX;
96  float m_tpcMinY;
97  float m_tpcMaxY;
98  float m_tpcMinZ;
99  float m_tpcMaxZ;
100  pandora::CartesianVector m_beamTPCIntersection;
101  pandora::CartesianVector m_beamDirection;
102  PlaneVector m_tpcPlanes;
103 
108  unsigned int m_nSelectedHits;
109 };
110 
111 } // namespace lar_content
112 
113 #endif // #ifndef LAR_BEAM_PARTICLE_ID_TOOL_H
BeamParticleIdTool()
Default constructor.
pandora::CartesianVector m_beamTPCIntersection
Intersection of beam and global TPC volume.
bool IsContained(const pandora::CartesianVector &spacePoint) const
Check if a given 3D spacepoint is inside the global TPC volume.
bool m_selectAllBeamParticles
First approach: select all beam particles, as opposed to selecting all cosmics.
#define a0
pandora::CartesianVector m_point
A point on the plane.
void GetSelectedCaloHits(const pandora::CaloHitList &inputCaloHitList, pandora::CaloHitList &outputCaloHitList, float &closestHitToFaceDistance) const
Select a given fraction of a slice&#39;s calo hits that are closest to the beam spot. ...
float m_closestDistanceCut
Closest distance (of hit to beam spot), used in beam event selection.
pandora::CartesianVector GetLineIntersection(const pandora::CartesianVector &a0, const pandora::CartesianVector &a) const
Return the intersection between the plane and a line.
float m_tpcMaxX
Global TPC volume maximum x extent.
float m_tpcMinZ
Global TPC volume minimum z extent.
float m_tpcMaxZ
Global TPC volume maximum z extent.
float m_d
Parameter defining a plane.
Header file for the master algorithm class.
float m_angleToBeamCut
Angle between major axis and beam direction, used in beam event selection.
std::vector< pandora::PfoList > SliceHypotheses
bool m_selectOnlyFirstSliceBeamParticles
First approach: select first slice beam particles, cosmics for all subsequent slices.
pandora::CartesianVector m_unitNormal
Unit normal to plane.
void GetTPCIntercepts(const pandora::CartesianVector &a0, const pandora::CartesianVector &majorAxis, pandora::CartesianVector &interceptOne, pandora::CartesianVector &interceptTwo) const
Find the intercepts of a line with the protoDUNE detector.
Plane(const pandora::CartesianVector &normal, const pandora::CartesianVector &point)
Constructor, using equation of plane: m_a*x + m_b*y + m_c*z + m_d = 0.
SliceIdBaseTool class.
unsigned int m_nSelectedHits
Minimum number of hits to use in 3D cluster fits.
BeamParticleIdTool class.
float m_selectedFraction
Fraction of hits to use in 3D cluster fits.
float m_projectionIntersectionCut
Projection intersection distance cut, used in beam event selection.
float m_tpcMaxY
Global TPC volume maximum y extent.
pandora::CartesianVector m_beamDirection
Beam direction.
void SelectOutputPfos(const pandora::Algorithm *const pAlgorithm, const SliceHypotheses &beamSliceHypotheses, const SliceHypotheses &crSliceHypotheses, pandora::PfoList &selectedPfos)
Select which reconstruction hypotheses to use; neutrino outcomes or cosmic-ray muon outcomes for each...
float m_tpcMinY
Global TPC volume minimum y extent.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
PlaneVector m_tpcPlanes
Vector of all planes making up global TPC volume.
float m_tpcMinX
Global TPC volume minimum x extent.