LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
TrackCalorimetryAlg.h
Go to the documentation of this file.
1 #ifndef TRACKCALORIMETRYALG_H
2 #define TRACKCALORIMETRYALG_H
3 
11 #include <iostream>
12 
13 #include "fhiclcpp/ParameterSet.h"
14 
18 
23 
25 
26 #include <set>
27 #include "TTree.h"
28 #include "TVector3.h"
29 
30 namespace calo{
31  class TrackCalorimetryAlg;
32 }
33 
35  public:
38  >;
39 
41  void reconfigure(fhicl::ParameterSet const& p);
42 
43  void ExtractCalorimetry(std::vector<recob::Track> const&,
44  std::vector<recob::Hit> const&,
45  std::vector< std::vector<size_t> > const&,
46  std::vector<anab::Calorimetry>&,
47  std::vector<size_t>&,
48  Providers_t providers
49  );
50 
51  private:
52 
54  unsigned int fNHitsToDetermineStart;
55 
56  struct HitProperties{
58  HitProperties(float q, float dqdx, float dedx, float p, TVector3 pos, float pf):
59  charge(q), dQdx(dqdx), dEdx(dedx), pitch(p), xyz(pos), path_fraction(pf) {}
60  float charge;
61  float dQdx;
62  float dEdx;
63  float pitch;
64  TVector3 xyz;
66  void Print() const
67  {
68  std::cout << "\tCharge " << charge
69  << " dQdx " << dQdx
70  << " dEdx " << dEdx
71  << " pitch " << pitch
72  << " (x,y,z) (" << xyz.X() << "," << xyz.Y() << "," << xyz.Z() << ")"
73  << " path_fraction " << path_fraction << std::endl;
74  }
75  };
77  bool operator() (HitProperties const& i, HitProperties const& j) const { return i.path_fraction < j.path_fraction; }
78  };
79 
80  typedef std::multiset<HitProperties,HitPropertySorter> HitPropertiesMultiset_t;
81  //typedef std::multimap<float,HitProperties> HitPropertiesMultiset_t;
82 
84  void ReserveInternalVectors(size_t s) {}
85 
86  std::vector<float> CreatePathLengthFractionVector(recob::Track const& track);
87 
88  void AnalyzeHit(recob::Hit const&,
89  recob::Track const&,
90  std::vector< std::pair<geo::WireID,float> > const&,
91  std::vector<float> const&,
92  HitPropertiesMultiset_t &,
93  geo::GeometryCore const&);
94 
95  bool IsInvertedTrack(HitPropertiesMultiset_t const&);
96 
97  void MakeCalorimetryObject(HitPropertiesMultiset_t const& hpm,
98  recob::Track const& track,
99  size_t const& i_track,
100  std::vector<anab::Calorimetry>& caloVector,
101  std::vector<size_t>& assnTrackCaloVector,
102  geo::PlaneID const& planeID);
103 
104  void PrintHitPropertiesMultiset(HitPropertiesMultiset_t const& hpm);
105 
106 };
107 
108 #endif
Float_t s
Definition: plot.C:23
bool IsInvertedTrack(HitPropertiesMultiset_t const &)
Declaration of signal hit object.
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)
The data type to uniquely identify a Plane.
Definition: geo_types.h:250
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)
Provides recob::Track data product.
void PrintHitPropertiesMultiset(HitPropertiesMultiset_t const &hpm)
void ReserveInternalVectors(size_t s)
Description of geometry of one entire detector.
TrackCalorimetryAlg(fhicl::ParameterSet const &p)
Container for a list of pointers to providers.
Definition: ProviderPack.h:114
std::multiset< HitProperties, HitPropertySorter > HitPropertiesMultiset_t
void reconfigure(fhicl::ParameterSet const &p)
Data structure containing constant pointers to classes.
2D representation of charge deposited in the TDC/wire plane
Definition: Hit.h:49
void ExtractCalorimetry(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)
HitProperties(float q, float dqdx, float dedx, float p, TVector3 pos, float pf)
Float_t track
Definition: plot.C:34
void AnalyzeHit(recob::Hit const &, recob::Track const &, std::vector< std::pair< geo::WireID, float > > const &, std::vector< float > const &, HitPropertiesMultiset_t &, geo::GeometryCore const &)
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:52
calorimetry