LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
TrackCalorimetryAlg.h
Go to the documentation of this file.
1 #ifndef TRACKCALORIMETRYALG_H
2 #define TRACKCALORIMETRYALG_H
3 
11 #include <iostream>
12 
15 
17 
18 #include "TVector3.h"
19 #include <set>
20 
21 namespace anab {
22  class Calorimetry;
23 }
24 namespace detinfo {
25  class DetectorClocksData;
26  class DetectorPropertiesData;
27  class LArProperties;
28 }
29 namespace fhicl {
30  class ParameterSet;
31 }
32 namespace geo {
33  struct PlaneID;
34  struct WireID;
35 }
36 namespace recob {
37  class Hit;
38  class Track;
39 }
40 
41 namespace calo {
42  class TrackCalorimetryAlg;
43 }
44 
46 public:
48 
50 
51  void ExtractCalorimetry(detinfo::DetectorClocksData const& clock_data,
52  detinfo::DetectorPropertiesData const& det_prop,
53  std::vector<recob::Track> const&,
54  std::vector<recob::Hit> const&,
55  std::vector<std::vector<size_t>> const&,
56  std::vector<anab::Calorimetry>&,
57  std::vector<size_t>&,
58  Providers_t providers);
59 
60 private:
62  unsigned int fNHitsToDetermineStart;
63 
64  struct HitProperties {
65  HitProperties() = default;
66  HitProperties(float q, float dqdx, float dedx, float p, TVector3 pos, float pf)
67  : charge(q), dQdx(dqdx), dEdx(dedx), pitch(p), xyz(pos), path_fraction(pf)
68  {}
69  float charge;
70  float dQdx;
71  float dEdx;
72  float pitch;
73  TVector3 xyz;
75  void Print() const
76  {
77  std::cout << "\tCharge " << charge << " dQdx " << dQdx << " dEdx " << dEdx << " pitch "
78  << pitch << " (x,y,z) (" << xyz.X() << "," << xyz.Y() << "," << xyz.Z() << ")"
79  << " path_fraction " << path_fraction << std::endl;
80  }
81  };
83  bool operator()(HitProperties const& i, HitProperties const& j) const
84  {
85  return i.path_fraction < j.path_fraction;
86  }
87  };
88 
89  using HitPropertiesMultiset_t = std::multiset<HitProperties, HitPropertySorter>;
90 
91  std::vector<float> CreatePathLengthFractionVector(recob::Track const& track);
92 
93  void AnalyzeHit(detinfo::DetectorClocksData const&,
95  recob::Hit const&,
96  recob::Track const&,
97  std::vector<std::pair<geo::WireID, float>> const&,
98  std::vector<float> const&,
100  geo::GeometryCore const&);
101 
102  bool IsInvertedTrack(HitPropertiesMultiset_t const&);
103 
104  void MakeCalorimetryObject(HitPropertiesMultiset_t const& hpm,
105  recob::Track const& track,
106  size_t const& i_track,
107  std::vector<anab::Calorimetry>& caloVector,
108  std::vector<size_t>& assnTrackCaloVector,
109  geo::PlaneID const& planeID);
110 
111  void PrintHitPropertiesMultiset(HitPropertiesMultiset_t const& hpm);
112 };
113 
114 #endif
bool operator()(HitProperties const &i, HitProperties const &j) const
Reconstruction base classes.
The data type to uniquely identify a Plane.
Definition: geo_types.h:463
std::multiset< HitProperties, HitPropertySorter > HitPropertiesMultiset_t
IDparameter< geo::PlaneID > PlaneID
Member type of validated geo::PlaneID parameter.
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:289
Access the description of detector geometry.
IDparameter< geo::WireID > WireID
Member type of validated geo::WireID parameter.
parameter set interface
General LArSoft Utilities.
Description of geometry of one entire detector.
Definition: GeometryCore.h:119
float dEdx(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, const TCSlice &slc, TP3D &tp3d)
Definition: PFPUtils.cxx:2675
Contains all timing reference information for the detector.
Container for a list of pointers to providers.
Definition: ProviderPack.h:111
Data structure containing constant pointers to classes.
2D representation of charge deposited in the TDC/wire plane
Definition: Hit.h:46
HitProperties(float q, float dqdx, float dedx, float p, TVector3 pos, float pf)
Namespace collecting geometry-related classes utilities.
Float_t track
Definition: plot.C:35
Definition: Track.hh:42
Track from a non-cascading particle.A recob::Track consists of a recob::TrackTrajectory, plus additional members relevant for a "fitted" track:
Definition: Track.h:49
calorimetry