All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TrackCalorimetryAlg.h
Go to the documentation of this file.
1 #ifndef TRACKCALORIMETRYALG_H
2 #define TRACKCALORIMETRYALG_H
3 /*!
4  * Title: Track Calorimetry Algorithim Class
5  * Author: Wes Ketchum (wketchum@lanl.gov), based on code the Calorimetry_module
6  *
7  * Description: Algorithm that produces a calorimetry object given a track
8  * Input: recob::Track, Assn<recob::Spacepoint,recob::Track>, Assn<recob::Hit,recob::Track>
9  * Output: anab::Calorimetry, (and Assn<anab::Calorimetry,recob::Track>)
10 */
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 
49  TrackCalorimetryAlg(fhicl::ParameterSet const& p);
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
76  Print() const
77  {
78  std::cout << "\tCharge " << charge << " dQdx " << dQdx << " dEdx " << dEdx << " pitch "
79  << pitch << " (x,y,z) (" << xyz.X() << "," << xyz.Y() << "," << xyz.Z() << ")"
80  << " path_fraction " << path_fraction << std::endl;
81  }
82  };
84  bool
85  operator()(HitProperties const& i, HitProperties const& j) const
86  {
87  return i.path_fraction < j.path_fraction;
88  }
89  };
90 
91  using HitPropertiesMultiset_t = std::multiset<HitProperties, HitPropertySorter>;
92 
93  void
95  {}
96  void
98  {}
99 
100  std::vector<float> CreatePathLengthFractionVector(recob::Track const& track);
101 
104  recob::Hit const&,
105  recob::Track const&,
106  std::vector<std::pair<geo::WireID, float>> const&,
107  std::vector<float> const&,
109  geo::GeometryCore const&);
110 
112 
114  recob::Track const& track,
115  size_t const& i_track,
116  std::vector<anab::Calorimetry>& caloVector,
117  std::vector<size_t>& assnTrackCaloVector,
118  geo::PlaneID const& planeID);
119 
121 };
122 
123 #endif
bool operator()(HitProperties const &i, HitProperties const &j) const
bool IsInvertedTrack(HitPropertiesMultiset_t const &)
void MakeCalorimetryObject(HitPropertiesMultiset_t const &hpm, recob::Track const &track, size_t const &i_track, std::vector< anab::Calorimetry > &caloVector, std::vector< size_t > &assnTrackCaloVector, geo::PlaneID const &planeID)
pdgs p
Definition: selectors.fcl:22
void ExtractCalorimetry(detinfo::DetectorClocksData const &clock_data, detinfo::DetectorPropertiesData const &det_prop, std::vector< recob::Track > const &, std::vector< recob::Hit > const &, std::vector< std::vector< size_t >> const &, std::vector< anab::Calorimetry > &, std::vector< size_t > &, Providers_t providers)
The data type to uniquely identify a Plane.
Definition: geo_types.h:472
process_name use argoneut_mc_hitfinder track
std::multiset< HitProperties, HitPropertySorter > HitPropertiesMultiset_t
Definition: Data.h:7
IDparameter< geo::PlaneID > PlaneID
Member type of validated geo::PlaneID parameter.
process_name can override from command line with o or output calo
Definition: pid.fcl:40
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:265
Access the description of detector geometry.
std::vector< float > CreatePathLengthFractionVector(recob::Track const &track)
IDparameter< geo::WireID > WireID
Member type of validated geo::WireID parameter.
void PrintHitPropertiesMultiset(HitPropertiesMultiset_t const &hpm)
void ReserveInternalVectors(size_t s)
Description of geometry of one entire detector.
void AnalyzeHit(detinfo::DetectorClocksData const &, detinfo::DetectorPropertiesData const &, recob::Hit const &, recob::Track const &, std::vector< std::pair< geo::WireID, float >> const &, std::vector< float > const &, HitPropertiesMultiset_t &, geo::GeometryCore const &)
TrackCalorimetryAlg(fhicl::ParameterSet const &p)
Contains all timing reference information for the detector.
then echo File list $list not found else cat $list while read file do echo $file sed s
Definition: file_to_url.sh:60
Container for a list of pointers to providers.
Definition: ProviderPack.h:114
Data structure containing constant pointers to classes.
2D representation of charge deposited in the TDC/wire plane
Definition: Hit.h:48
HitProperties(float q, float dqdx, float dedx, float p, TVector3 pos, float pf)
BEGIN_PROLOG could also be cout
Track from a non-cascading particle.A recob::Track consists of a recob::TrackTrajectory, plus additional members relevant for a &quot;fitted&quot; track: