LArSoft  v09_90_00
Liquid Argon Software toolkit - https://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 
13 
14 namespace lar_content
15 {
16 
21 {
22 public:
27 
28  void SelectOutputPfos(const pandora::Algorithm *const pAlgorithm, const SliceHypotheses &beamSliceHypotheses,
29  const SliceHypotheses &crSliceHypotheses, pandora::PfoList &selectedPfos);
30 
31 private:
35  class Plane
36  {
37  public:
44  Plane(const pandora::CartesianVector &normal, const pandora::CartesianVector &point);
45 
52  pandora::CartesianVector GetLineIntersection(const pandora::CartesianVector &a0, const pandora::CartesianVector &a) const;
53 
54  private:
55  pandora::CartesianVector m_unitNormal;
56  pandora::CartesianVector m_point;
57  float m_d;
58  };
59 
60  pandora::StatusCode Initialize();
61 
69  void GetSelectedCaloHits(const pandora::CaloHitList &inputCaloHitList, pandora::CaloHitList &outputCaloHitList, float &closestHitToFaceDistance) const;
70 
79  void GetTPCIntercepts(const pandora::CartesianVector &a0, const pandora::CartesianVector &majorAxis,
80  pandora::CartesianVector &interceptOne, pandora::CartesianVector &interceptTwo) const;
81 
87  bool IsContained(const pandora::CartesianVector &spacePoint) const;
88 
89  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
90 
91  typedef std::vector<Plane> PlaneVector;
92 
95  float m_tpcMinX;
96  float m_tpcMaxX;
97  float m_tpcMinY;
98  float m_tpcMaxY;
99  float m_tpcMinZ;
100  float m_tpcMaxZ;
101  pandora::CartesianVector m_beamTPCIntersection;
102  pandora::CartesianVector m_beamDirection;
103  PlaneVector m_tpcPlanes;
104 
109  unsigned int m_nSelectedHits;
110 };
111 
112 } // namespace lar_content
113 
114 #endif // #ifndef LAR_BEAM_PARTICLE_ID_TOOL_H
std::vector< pandora::PfoList > SliceHypotheses
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.
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.
Header file for the stitching tool base class.
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.