Track.h
Go to the documentation of this file.
1 #ifndef TRACK_GUARD_MONO_HH
2 #define TRACK_GUARD_MONO_HH
3 
5 
6 #include "RecoBase/CellHit.h"
7 
8 #include <map>
9 
10 
11 namespace mono
12 {
13  class Track;
14 }
15 
16 
18 {
19 public:
21  Track(art::Ptr<rb::CellHit> const& start, art::Ptr<rb::CellHit> const& end);
22 
23  double time() const;
24  double distance() const;
25  double velocity() const;
26  double beta() const;
27 
28  bool slope_plane_is_valid() const;
29  double slope_cell_plane() const;
30  double slope_time_plane() const;
31 
32  bool slope_time_is_valid() const;
33  double slope_cell_time() const;
34  double slope_plane_time() const;
35 
36  bool slope_cell_is_valid() const;
37  double slope_time_cell() const;
38 
39  unsigned max_plane() const;
40  unsigned min_plane() const;
41  int plane_difference() const;
42  unsigned max_cell() const;
43  unsigned min_cell() const;
44  int cell_difference() const;
45 
46  void mark_as_good();
47  bool is_good() const;
48 
49  void set(std::string const& name, double value);
50  template<class T> void set(std::map<std::string, T> const& info,
51  std::string const& prefix = "");
52  double get(std::string const& name) const;
53 
54  novaddt::DAQHit start_ddt() const;
55  novaddt::DAQHit end_ddt() const;
56 
59 
60 private:
61  double calculate_distance() const;
62  double calculate_velocity() const;
63  void calculate_slopes();
64 
66 
71 
73 
74  bool is_ddt_;
77 
79  std::map<std::string, double> info_;
80 };
81 
82 
83 template<class T>
85 (std::map<std::string, T> const& info, std::string const& prefix)
86 {
87  for (auto const& var : info)
88  set(prefix + var.first, static_cast<double>(var.second));
89 }
90 
91 
92 #endif
double beta() const
Definition: Track.cxx:129
const XML_Char XML_Encoding * info
Definition: expat.h:530
const XML_Char * name
Definition: expat.h:151
int cell_difference() const
Definition: Track.cxx:252
novaddt::DAQHit start_ddt_
Definition: Track.h:75
int plane_difference() const
Definition: Track.cxx:232
art::Ptr< rb::CellHit > start_rb_
Definition: Track.h:76
bool slope_plane_is_valid() const
Definition: Track.cxx:136
std::map< std::string, double > info_
Definition: Track.h:79
unsigned max_plane() const
Definition: Track.cxx:245
void set(std::string const &name, double value)
Definition: Track.cxx:290
std::string goodness_
Definition: Track.h:78
double distance_
Definition: Track.h:67
novaddt::DAQHit start_ddt() const
Definition: Track.cxx:316
Definition: Cluster.h:13
bool is_ddt_
Definition: Track.h:74
double beta_
Definition: Track.h:67
double slope_time_cell_
Definition: Track.h:67
double slope_cell_time_
Definition: Track.h:67
double dp_
Definition: Track.h:67
novaddt::DAQHit end_ddt_
Definition: Track.h:75
double time() const
Definition: Track.cxx:115
art::Ptr< rb::CellHit > end_rb_
Definition: Track.h:76
double slope_time_plane_
Definition: Track.h:67
bool slope_time_is_valid() const
Definition: Track.cxx:143
bool is_good() const
Definition: Track.cxx:280
double slope_plane_time_
Definition: Track.h:67
double slope_plane_time() const
Definition: Track.cxx:202
unsigned max_cell() const
Definition: Track.cxx:266
const XML_Char int const XML_Char * value
Definition: expat.h:331
void mark_as_good()
Definition: Track.cxx:273
double calculate_distance() const
Definition: Track.cxx:58
void calculate_slopes()
Definition: Track.cxx:77
bool slope_time_is_valid_
Definition: Track.h:72
art::Ptr< rb::CellHit > end_rb() const
Definition: Track.cxx:358
novaddt::DAQHit end_ddt() const
Definition: Track.cxx:330
art::Ptr< rb::CellHit > start_rb() const
Definition: Track.cxx:344
Track(novaddt::DAQHit const &start, novaddt::DAQHit const &end)
Definition: Track.cxx:7
const XML_Char * prefix
Definition: expat.h:380
unsigned min_cell_
Definition: Track.h:65
double velocity_
Definition: Track.h:67
bool slope_cell_is_valid() const
Definition: Track.cxx:150
double calculate_velocity() const
Definition: Track.cxx:68
double dc_
Definition: Track.h:67
double slope_cell_plane() const
Definition: Track.cxx:157
double slope_time_plane() const
Definition: Track.cxx:172
double velocity() const
Definition: Track.cxx:122
double slope_time_cell() const
Definition: Track.cxx:217
unsigned max_cell_
Definition: Track.h:65
double slope_cell_plane_
Definition: Track.h:67
unsigned min_cell() const
Definition: Track.cxx:259
bool slope_plane_is_valid_
Definition: Track.h:72
double dt_
Definition: Track.h:67
unsigned min_plane_
Definition: Track.h:65
double distance() const
Definition: Track.cxx:108
double slope_cell_time() const
Definition: Track.cxx:187
unsigned max_plane_
Definition: Track.h:65
bool slope_cell_is_valid_
Definition: Track.h:72
unsigned min_plane() const
Definition: Track.cxx:238
enum BeamMode string