LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
LArPandoraShowerAlg.h
Go to the documentation of this file.
1 #ifndef LArPandoraShowerAlg_hxx
2 #define LArPandoraShowerAlg_hxx
3 
4 namespace reco::shower {
6 }
7 
8 namespace detinfo {
9  class DetectorClocksData;
10  class DetectorPropertiesData;
11 }
12 
14 
15 namespace recob {
16  class Hit;
17  class PFParticle;
18  class SpacePoint;
19 }
20 
21 namespace spacecharge {
22  class SpaceCharge;
23 }
24 
27 #include "art_root_io/TFileService.h"
31 
32 //C++ Includes
33 #include <string>
34 #include <vector>
35 
36 namespace shower {
37  class LArPandoraShowerAlg;
38 }
39 
41 public:
42  explicit LArPandoraShowerAlg(const fhicl::ParameterSet& pset);
43 
44  void OrderShowerHits(detinfo::DetectorPropertiesData const& detProp,
46  geo::Point_t const& ShowerPosition,
47  geo::Vector_t const& ShowerDirection) const;
48 
49  void OrderShowerSpacePointsPerpendicular(std::vector<art::Ptr<recob::SpacePoint>>& showersps,
50  geo::Point_t const& vertex,
51  geo::Vector_t const& direction) const;
52 
53  void OrderShowerSpacePoints(std::vector<art::Ptr<recob::SpacePoint>>& showersps,
54  geo::Point_t const& vertex,
55  geo::Vector_t const& direction) const;
56 
57  void OrderShowerSpacePoints(std::vector<art::Ptr<recob::SpacePoint>>& showersps,
58  geo::Point_t const& vertex) const;
59 
60  geo::Point_t ShowerCentre(std::vector<art::Ptr<recob::SpacePoint>> const& showersps) const;
61 
62  geo::Point_t ShowerCentre(detinfo::DetectorClocksData const& clockData,
63  detinfo::DetectorPropertiesData const& detProp,
64  std::vector<art::Ptr<recob::SpacePoint>> const& showersps,
65  art::FindManyP<recob::Hit> const& fmh,
66  float& totalCharge) const;
67 
68  geo::Point_t ShowerCentre(detinfo::DetectorClocksData const& clockData,
69  detinfo::DetectorPropertiesData const& detProp,
70  std::vector<art::Ptr<recob::SpacePoint>> const& showerspcs,
71  art::FindManyP<recob::Hit> const& fmh) const;
72 
73  double DistanceBetweenSpacePoints(art::Ptr<recob::SpacePoint> const& sp_a,
74  art::Ptr<recob::SpacePoint> const& sp_b) const;
75 
76  double SpacePointCharge(art::Ptr<recob::SpacePoint> const& sp,
77  art::FindManyP<recob::Hit> const& fmh) const;
78 
79  double SpacePointTime(art::Ptr<recob::SpacePoint> const& sp,
80  art::FindManyP<recob::Hit> const& fmh) const;
81 
82  TVector2 HitCoordinates(detinfo::DetectorPropertiesData const& detProp,
83  art::Ptr<recob::Hit> const& hit) const;
84 
85  double SpacePointProjection(art::Ptr<recob::SpacePoint> const& sp,
86  geo::Point_t const& vertex,
87  geo::Vector_t const& direction) const;
88 
89  double SpacePointPerpendicular(art::Ptr<recob::SpacePoint> const& sp,
90  geo::Point_t const& vertex,
91  geo::Vector_t const& direction) const;
92 
93  double SpacePointPerpendicular(art::Ptr<recob::SpacePoint> const& sp,
94  geo::Point_t const& vertex,
95  geo::Vector_t const& direction,
96  double proj) const;
97 
98  double RMSShowerGradient(std::vector<art::Ptr<recob::SpacePoint>>& sps,
99  const geo::Point_t& ShowerCentre,
100  const geo::Vector_t& Direction,
101  const unsigned int nSegments) const;
102 
103  double CalculateRMS(const std::vector<float>& perps) const;
104 
105  // The SCE service requires thing in geo::Point/Vector form, so overload and be nice
106  double SCECorrectPitch(double const& pitch,
107  geo::Point_t const& pos,
108  geo::Vector_t const& dir,
109  unsigned int const& TPC) const;
110 
111  double SCECorrectEField(double const& EField, geo::Point_t const& pos) const;
112 
113  std::map<art::Ptr<recob::Hit>, std::vector<art::Ptr<recob::Hit>>> OrganizeHits(
114  const std::vector<art::Ptr<recob::Hit>>& hits) const;
115 
116  void DebugEVD(art::Ptr<recob::PFParticle> const& pfparticle,
117  art::Event const& Event,
118  const reco::shower::ShowerElementHolder& ShowerEleHolder,
119  std::string const& evd_disp_name_append = "") const;
120 
121 private:
124  bool fSCEXFlip; // If a (legacy) flip is needed in x componant of spatial SCE correction
125 
129 
130  const std::string fInitialTrackInputLabel;
132  const std::string fShowerDirectionInputLabel;
134 };
135 
136 #endif
Reconstruction base classes.
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Vector_t
Type for representation of momenta in 3D space.
Definition: geo_vectors.h:160
art::ServiceHandle< geo::Geometry const > fGeom
const std::string fInitialTrackInputLabel
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:289
void hits()
Definition: readHits.C:15
const std::string fInitialTrackSpacePointsInputLabel
const std::string fShowerDirectionInputLabel
General LArSoft Utilities.
const std::string fShowerStartPositionInputLabel
Detector simulation of raw signals on wires.
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.
Definition: geo_vectors.h:180
art::ServiceHandle< art::TFileService > tfs
Contains all timing reference information for the detector.
TDirectory * dir
Definition: macro.C:5
Float_t proj
Definition: plot.C:35
Direction
Definition: types.h:12
spacecharge::SpaceCharge const * fSCE
art framework interface to geometry description
vertex reconstruction