SlowMonopoleTrigger.h
Go to the documentation of this file.
1 #ifndef GUARD_OFFLINE_SLOW_MONOPOLE_TRIGGER_HH
2 #define GUARD_OFFLINE_SLOW_MONOPOLE_TRIGGER_HH
3 
4 
9 
10 #include "DDTMonopole/Track.h"
11 
12 #include <map>
13 
14 
15 namespace mono
16 {
17  struct Configuration;
18  class SlowMonopoleTrigger;
19 }
20 
21 
23 {
26 };
27 
28 // using unsigned long long rather than uint64_t to ensure consisent behavior on OSX and LINUX
29 
31 {
32 public:
34  unsigned long long const& event_time,
35  Configuration const& c);
36 
37  std::vector<novaddt::TriggerDecision> trigger_decisions() const;
38  std::map<std::string, novaddt::HitList> essential_hit_lists() const;
39 
40  unsigned trigger_decision_time_buffer() const;
41 
42  bool parameter_exists(std::string const name) const;
43  double parameter(std::string const name);
44 
45 private:
46  bool algorithm();
47  novaddt::HitList::const_iterator find(novaddt::HitList::const_iterator begin,
48  novaddt::HitList::const_iterator end,
49  novaddt::TDC tdc) const;
50  novaddt::HitList::const_iterator find(novaddt::HitList const& hits,
51  novaddt::TDC tdc) const;
52  int find_max_gap(std::set<int> const& collection) const;
53  void find_view_matched_hits
54  (std::map<std::string, novaddt::HitList> & hitmap) const;
55  bool gap_exceeds_cut(std::set<int> collection,
56  int const& object,
57  int const& max_gap_cut) const;
58  bool good_track(Track const& track) const;
59  bool hit_is_between_track_end_points(novaddt::DAQHit const& hit,
60  Track const& track) const;
61  bool hit_is_in_time_with_road(novaddt::DAQHit const& hit,
62  Track const& track) const;
63  bool hit_is_on_road(novaddt::DAQHit const& hit, Track const& track) const;
64  bool hit_is_on_surface(novaddt::DAQHit const& hit) const;
65  bool hits_are_view_matched(novaddt::DAQHit const& x_hit,
66  novaddt::DAQHit const& y_hit) const;
67  /* CAUTION:
68  The current signature causes the hits to be copied into the function.
69  While we are comparing algorithms, this ensures that hits_ does not get
70  overwritten. I am not sure whether we can avoid the copy depending on
71  how we pull the hits out of the event. */
72  void split_by_view(novaddt::HitList hits,
73  std::map<std::string, novaddt::HitList> & hitmap) const;
74 
76  unsigned long long event_time_;
79 
81 
85 
86  std::map<std::string, novaddt::HitList> essential_hit_lists_;
87  std::vector<novaddt::TriggerDecision> trigger_decisions_;
88 
89  std::map<std::string, double> parameter_;
90 };
91 
92 
93 #endif
const XML_Char * name
Definition: expat.h:151
Definition: Cluster.h:13
std::vector< DAQHit > HitList
Definition: HitList.h:15
std::vector< novaddt::TriggerDecision > trigger_decisions_
Definition: event.h:19
novaddt::HitList const & hits_
void hits()
Definition: readHits.C:15
unsigned long long event_time_
std::map< std::string, double > parameter_
Definition: structs.h:12
std::map< std::string, novaddt::HitList > essential_hit_lists_
enum BeamMode string