Public Member Functions | Private Member Functions | Private Attributes | List of all members
novaddt::smt::Trigger Class Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N21-04-10/SlowMonopoleTrigger/Trigger.h"

Public Member Functions

 Trigger ()=default
 
 Trigger (fhicl::ParameterSet const &p)
 
bool run_algorithm (art::Handle< novaddt::HitList > const &hits)
 
std::vector< novaddt::TriggerDecisiontrigger_decisions () const
 

Private Member Functions

novaddt::HitList::const_iterator find (novaddt::HitList::const_iterator begin, novaddt::HitList::const_iterator end, novaddt::TDC tdc) const
 
novaddt::HitList::const_iterator find (novaddt::HitList const &hits, novaddt::TDC tdc) const
 
int find_max_gap (std::set< int > const &collection) const
 
void find_view_matched_hits (std::map< std::string, novaddt::HitList > &hitmap) const
 
bool gap_exceeds_cut (std::set< int > collection, int const &object, int const &max_gap_cut) const
 
bool good_track (Track const &track) const
 
bool hit_is_between_track_end_points (novaddt::DAQHit const &hit, Track const &track) const
 
bool hits_are_view_matched (novaddt::DAQHit const &x_hit, novaddt::DAQHit const &y_hit) const
 
bool hit_is_in_time_with_road (novaddt::DAQHit const &hit, Track const &track) const
 
bool hit_is_on_road (novaddt::DAQHit const &hit, Track const &track) const
 
bool hit_is_on_surface (novaddt::DAQHit const &hit) const
 
void split_by_view (novaddt::HitList hits, std::map< std::string, novaddt::HitList > &hitmap) const
 

Private Attributes

int max_cell_gap_cut_
 
int max_plane_gap_cut_
 
unsigned sparsification_factor_
 
double track_max_beta_
 
double track_min_beta_
 
unsigned trigger_time_buffer_
 
double trigger_timeout_
 
bool trigger_use_timeout_
 
bool trigger_write_all_timeout_data_
 
std::vector< novaddt::TriggerDecisiontrigger_decisions_
 

Detailed Description

Definition at line 28 of file Trigger.h.

Constructor & Destructor Documentation

novaddt::smt::Trigger::Trigger ( )
default
novaddt::smt::Trigger::Trigger ( fhicl::ParameterSet const &  p)

Definition at line 16 of file Trigger.cxx.

16  :
17  max_cell_gap_cut_ (p.get<int>("max_cell_gap_cut")),
18  max_plane_gap_cut_ (p.get<int>("max_plane_gap_cut")),
19  sparsification_factor_ (p.get<unsigned>("sparsification_factor")),
20  track_max_beta_ (p.get<double>("track_max_beta")),
21  track_min_beta_ (p.get<double>("track_min_beta")),
22  trigger_time_buffer_ (p.get<unsigned>("trigger_time_buffer")),
23  trigger_timeout_ (p.get<double>("trigger_timeout")),
24  trigger_use_timeout_ (p.get<bool>("trigger_use_timeout")),
25  trigger_write_all_timeout_data_(p.get<bool>("trigger_write_all_timeout_data"))
26 {
27 }
double track_max_beta_
Definition: Trigger.h:79
unsigned sparsification_factor_
Definition: Trigger.h:78
const char * p
Definition: xmltok.h:285
double track_min_beta_
Definition: Trigger.h:80
bool trigger_write_all_timeout_data_
Definition: Trigger.h:84
bool trigger_use_timeout_
Definition: Trigger.h:83
double trigger_timeout_
Definition: Trigger.h:82
unsigned trigger_time_buffer_
Definition: Trigger.h:81

Member Function Documentation

novaddt::HitList::const_iterator novaddt::smt::Trigger::find ( novaddt::HitList::const_iterator  begin,
novaddt::HitList::const_iterator  end,
novaddt::TDC  tdc 
) const
private

Definition at line 440 of file Trigger.cxx.

Referenced by find(), find_view_matched_hits(), hit_is_between_track_end_points(), and run_algorithm().

442 {
443  return
444  std::lower_bound(begin, end, tdc, novaddt::CompareDAQHit<novaddt::TDC>());
445 }
novaddt::HitList::const_iterator novaddt::smt::Trigger::find ( novaddt::HitList const &  hits,
novaddt::TDC  tdc 
) const
private

Definition at line 450 of file Trigger.cxx.

References find().

451 {
452  return find(hits.cbegin(), hits.cend(), tdc);
453 }
void hits()
Definition: readHits.C:15
novaddt::HitList::const_iterator find(novaddt::HitList::const_iterator begin, novaddt::HitList::const_iterator end, novaddt::TDC tdc) const
Definition: Trigger.cxx:440
int novaddt::smt::Trigger::find_max_gap ( std::set< int > const &  collection) const
private

Definition at line 399 of file Trigger.cxx.

References hit_is_between_track_end_points(), std::max(), and fillBadChanDBTables::result.

Referenced by gap_exceeds_cut(), and run_algorithm().

400 {
401  int result = -9999;
402 
403  std::adjacent_find
404  (collection.begin(), collection.end(), [&](int object, int next_object)
405  {
406  int gap = next_object - object;
407  result = std::max(gap, result);
408 
409  // This return is meaningless, but a boolean return is required by
410  // adjacent find. We choose false, so the loop goes until the end.
411  return false;
412  });
413 
414  return result;
415 }
T max(const caf::Proxy< T > &a, T b)
void novaddt::smt::Trigger::find_view_matched_hits ( std::map< std::string, novaddt::HitList > &  hitmap) const
private

Definition at line 224 of file Trigger.cxx.

References find(), srt_file_template::find_if, hit_is_on_surface(), hits_are_view_matched(), and novaddt::smt::Constants::VIEW_MATCH_TDC_CUT.

Referenced by run_algorithm(), and split_by_view().

225 {
226  for (auto const& x_hit : hitmap["x"])
227  {
228  auto y_first =
229  find(hitmap["y"], x_hit.TDC().val - Constants::VIEW_MATCH_TDC_CUT);
230  auto y_last =
231  find(hitmap["y"], x_hit.TDC().val + Constants::VIEW_MATCH_TDC_CUT);
232 
233  auto y_match = std::find_if
234  (y_first, y_last, [&](novaddt::DAQHit const& y_hit)
235  { return hits_are_view_matched(x_hit, y_hit); });
236 
237  if (y_match != y_last)
238  {
239  // we found a matched hit
240  hitmap["x_contained"].push_back(x_hit);
241 
242  // is this hit on the surface?
243  if (hit_is_on_surface(x_hit))
244  {
245  hitmap["x_surface"].push_back(x_hit);
246  } else {
247  // now we need to look for additional matched y-hits and check whether
248  // they are on the surface
249  auto surface_y_match = std::find_if
250  (y_match, y_last, [&](novaddt::DAQHit const& y_hit)
251  {
252  if (!hits_are_view_matched(x_hit, y_hit))
253  return false;
254 
255  if (!hit_is_on_surface(y_hit))
256  return false;
257 
258  return true;
259  });
260 
261  if (surface_y_match != y_last)
262  hitmap["x_surface"].push_back(x_hit);
263  }
264  }
265  }
266 }
bool hits_are_view_matched(novaddt::DAQHit const &x_hit, novaddt::DAQHit const &y_hit) const
Definition: Trigger.cxx:271
bool hit_is_on_surface(novaddt::DAQHit const &hit) const
Definition: Trigger.cxx:285
novaddt::HitList::const_iterator find(novaddt::HitList::const_iterator begin, novaddt::HitList::const_iterator end, novaddt::TDC tdc) const
Definition: Trigger.cxx:440
const unsigned VIEW_MATCH_TDC_CUT
Definition: Constants.h:30
bool novaddt::smt::Trigger::gap_exceeds_cut ( std::set< int collection,
int const &  object,
int const &  max_gap_cut 
) const
private

Definition at line 382 of file Trigger.cxx.

References find_max_gap().

Referenced by hit_is_in_time_with_road(), and run_algorithm().

383 {
384  // Note that we copy the collection in here on purpose, so that we do not
385  // accidentally alter it.
386  collection.insert(object);
387 
388  // We need to encode the max_plane cut differently here, so as to keep
389  // this method as general as possible.
390  if (find_max_gap(collection) > max_gap_cut)
391  return true;
392 
393  return false;
394 }
int find_max_gap(std::set< int > const &collection) const
Definition: Trigger.cxx:399
bool novaddt::smt::Trigger::good_track ( Track const &  track) const
private

Definition at line 304 of file Trigger.cxx.

References abs(), novaddt::smt::Track::beta(), novaddt::smt::Track::distance(), hit_is_on_road(), max_plane_gap_cut_, novaddt::smt::Track::plane_difference(), track_max_beta_, track_min_beta_, and novaddt::smt::Constants::TRACK_MIN_DISTANCE.

Referenced by run_algorithm().

305 {
306  if (track.distance() < Constants::TRACK_MIN_DISTANCE)
307  return false;
308 
309  if (track.beta() < track_min_beta_)
310  return false;
311 
312  if (track.beta() > track_max_beta_)
313  return false;
314 
315  if (abs(track.plane_difference()) <= max_plane_gap_cut_)
316  return false;
317 
318  return true;
319 }
double track_max_beta_
Definition: Trigger.h:79
Definition: event.h:19
void abs(TH1 *hist)
double track_min_beta_
Definition: Trigger.h:80
const double TRACK_MIN_DISTANCE
Definition: Constants.h:35
bool novaddt::smt::Trigger::hit_is_between_track_end_points ( novaddt::DAQHit const &  hit,
Track const &  track 
) const
private

Definition at line 420 of file Trigger.cxx.

References novaddt::DAQHit::Cell(), find(), novaddt::smt::Track::max_cell(), novaddt::smt::Track::max_plane(), novaddt::smt::Track::min_cell(), novaddt::smt::Track::min_plane(), novaddt::DAQHit::Plane(), novaddt::Plane::val, and novaddt::Cell::val.

Referenced by find_max_gap(), and hit_is_on_road().

421 {
422  if (hit.Plane().val < track.min_plane())
423  return false;
424 
425  if (hit.Plane().val > track.max_plane())
426  return false;
427 
428  if (hit.Cell().val < track.min_cell())
429  return false;
430 
431  if (hit.Cell().val > track.max_cell())
432  return false;
433 
434  return true;
435 }
Definition: event.h:19
Definition: structs.h:12
bool novaddt::smt::Trigger::hit_is_in_time_with_road ( novaddt::DAQHit const &  hit,
Track const &  track 
) const
private

Definition at line 351 of file Trigger.cxx.

References gap_exceeds_cut(), hit_is_on_road(), novaddt::DAQHit::Plane(), novaddt::smt::Constants::ROAD_TIME_VARIATION, novaddt::smt::Track::slope_plane_is_valid(), novaddt::smt::Track::slope_time_plane(), novaddt::smt::Track::start(), novaddt::DAQHit::TDC(), novaddt::TDC::val, and novaddt::Plane::val.

Referenced by hit_is_on_road(), and run_algorithm().

352 {
353  if (!hit_is_on_road(hit, track))
354  return false;
355 
356  // If the plane of the hit and track end points are all equal,
357  // we cannot calculate the time_slope and make no statement on the time.
358  if (!track.slope_plane_is_valid())
359  return false;
360 
361 
362  int64_t relative_hit_time =
363  static_cast<int64_t>(hit.TDC().val) -
364  static_cast<int64_t>(track.start().TDC().val);
365 
366  double expected_time = track.slope_time_plane() *
367  (static_cast<double>(hit.Plane().val) -
368  static_cast<double>(track.start().Plane().val));
369 
370  if (relative_hit_time > expected_time + Constants::ROAD_TIME_VARIATION)
371  return false;
372 
373  if (relative_hit_time < expected_time - Constants::ROAD_TIME_VARIATION)
374  return false;
375 
376  return true;
377 }
bool hit_is_on_road(novaddt::DAQHit const &hit, Track const &track) const
Definition: Trigger.cxx:324
Definition: event.h:19
const double ROAD_TIME_VARIATION
Definition: Constants.h:38
Definition: structs.h:12
bool novaddt::smt::Trigger::hit_is_on_road ( novaddt::DAQHit const &  hit,
Track const &  track 
) const
private

Definition at line 324 of file Trigger.cxx.

References novaddt::DAQHit::Cell(), hit_is_between_track_end_points(), hit_is_in_time_with_road(), novaddt::DAQHit::Plane(), novaddt::smt::Constants::ROAD_HALF_WIDTH, novaddt::smt::Track::slope_cell_plane(), novaddt::smt::Track::slope_plane_is_valid(), novaddt::smt::Track::start(), novaddt::Plane::val, and novaddt::Cell::val.

Referenced by good_track(), and hit_is_in_time_with_road().

325 {
327  return false;
328 
329  // If the plane of the hit and track end points are all equal,
330  // the hit is on the road.
331  if (!track.slope_plane_is_valid())
332  return true;
333 
334  double road_center_cell = track.slope_cell_plane() *
335  (static_cast<double>(hit.Plane().val) -
336  static_cast<double>(track.start().Plane().val)) +
337  static_cast<double>(track.start().Cell().val);
338 
339  if (hit.Cell().val > road_center_cell + Constants::ROAD_HALF_WIDTH)
340  return false;
341 
342  if (hit.Cell().val < road_center_cell - Constants::ROAD_HALF_WIDTH)
343  return false;
344 
345  return true;
346 }
const unsigned ROAD_HALF_WIDTH
Definition: Constants.h:37
Definition: event.h:19
bool hit_is_between_track_end_points(novaddt::DAQHit const &hit, Track const &track) const
Definition: Trigger.cxx:420
Definition: structs.h:12
bool novaddt::smt::Trigger::hit_is_on_surface ( novaddt::DAQHit const &  hit) const
private

Definition at line 285 of file Trigger.cxx.

References novaddt::DAQHit::Cell(), novaddt::DAQHit::Plane(), novaddt::smt::Constants::SURFACE_MAX_CELL, novaddt::smt::Constants::SURFACE_MAX_PLANE, novaddt::smt::Constants::SURFACE_MIN_CELL, novaddt::smt::Constants::SURFACE_MIN_PLANE, novaddt::Plane::val, and novaddt::Cell::val.

Referenced by find_view_matched_hits(), and hits_are_view_matched().

286 {
287  if (hit.Cell().val < Constants::SURFACE_MIN_CELL)
288  return true;
289 
290  if (hit.Cell().val > Constants::SURFACE_MAX_CELL)
291  return true;
292 
293  if (hit.Plane().val < Constants::SURFACE_MIN_PLANE)
294  return true;
295 
296  if (hit.Plane().val > Constants::SURFACE_MAX_PLANE)
297  return true;
298 
299  return false;
300 }
const unsigned SURFACE_MAX_CELL
Definition: Constants.h:24
const unsigned SURFACE_MAX_PLANE
Definition: Constants.h:28
const unsigned SURFACE_MIN_PLANE
Definition: Constants.h:27
Definition: structs.h:12
const unsigned SURFACE_MIN_CELL
Definition: Constants.h:23
bool novaddt::smt::Trigger::hits_are_view_matched ( novaddt::DAQHit const &  x_hit,
novaddt::DAQHit const &  y_hit 
) const
private

Definition at line 271 of file Trigger.cxx.

References std::abs(), hit_is_on_surface(), novaddt::DAQHit::Plane(), novaddt::Plane::val, and novaddt::smt::Constants::VIEW_MATCH_PLANE_CUT.

Referenced by find_view_matched_hits().

272 {
273  int plane_difference =
274  static_cast<int>(x_hit.Plane().val) - static_cast<int>(y_hit.Plane().val);
275 
276  if (std::abs(plane_difference) < Constants::VIEW_MATCH_PLANE_CUT)
277  return true;
278 
279  return false;
280 }
float abs(float number)
Definition: d0nt_math.hpp:39
const unsigned VIEW_MATCH_PLANE_CUT
Definition: Constants.h:31
bool novaddt::smt::Trigger::run_algorithm ( art::Handle< novaddt::HitList > const &  hits)

Definition at line 40 of file Trigger.cxx.

References abs(), novaddt::DAQHit::Cell(), novaddt::smt::Extra_Info::CHECK_BIT, confusionMatrixTree::count, distance(), find(), srt_file_template::find_if, find_max_gap(), find_view_matched_hits(), gap_exceeds_cut(), good_track(), hit_is_in_time_with_road(), max_cell_gap_cut_, max_plane_gap_cut_, std::min(), recentWatchdog::now, novaddt::DAQHit::Plane(), fillBadChanDBTables::result, gen_hdf5record::size, novaddt::smt::Track::slope_cell_is_valid(), novaddt::smt::Track::slope_cell_time(), novaddt::smt::Track::slope_plane_is_valid(), novaddt::smt::Track::slope_plane_time(), novaddt::smt::Track::slope_time_cell(), novaddt::smt::Track::slope_time_is_valid(), novaddt::smt::Track::slope_time_plane(), sparsification_factor_, split_by_view(), novaddt::smt::Track::start(), novaddt::DAQHit::TDC(), novaddt::smt::Extra_Info::TIMEOUT_BIT, track, novaddt::smt::Constants::TRACK_MIN_HITS, novaddt::smt::Constants::TRACK_MIN_UNIQUE_PLANES, daqdataformats::TRIG_ID_DATA_SLOWMONO, trigger_decisions_, trigger_time_buffer_, trigger_timeout_, trigger_use_timeout_, trigger_write_all_timeout_data_, novaddt::TDC::val, novaddt::Plane::val, and novaddt::Cell::val.

Referenced by novaddt::SlowMonopoleTrigger::filter(), and trigger_decisions().

41 {
42  trigger_decisions_.clear();
43  std::bitset<Extra_Info::BITSET_SIZE> extra_info;
44  extra_info.set(Extra_Info::CHECK_BIT, true);
45 
46  auto t_start = high_resolution_clock::now();
47  bool result = false;
48  novaddt::DAQHit trigger_entry_hit, trigger_exit_hit;
49 
50  std::map<std::string, novaddt::HitList> hitmap;
51  split_by_view(*hits, hitmap);
52 
53  if (hitmap["x"].size() < Constants::TRACK_MIN_HITS ||
54  hitmap["y"].size() < Constants::TRACK_MIN_HITS)
55  return false;
56 
57  hitmap["x_surface"];
58  hitmap["x_contained"];
59 
60  find_view_matched_hits(hitmap);
61 
62  if(hitmap["x_contained"].size() < Constants::TRACK_MIN_HITS)
63  return false;
64 
65  unsigned n_good_track = 0;
66  for (auto entry_hit = hitmap["x_surface"].cbegin();
67  entry_hit != hitmap["x_surface"].cend() && !result;
68  ++entry_hit)
69  {
70  // we add 1, so that we avoid combinations between the same hit
71  novaddt::HitList::const_reverse_iterator until(entry_hit + 1);
72 
73  auto contained_first = find(hitmap["x_contained"], entry_hit->TDC());
74 
75  std::find_if(hitmap["x_surface"].crbegin(), until,
76  [&](novaddt::DAQHit const& exit_hit)
77  {
78  auto contained_last =
79  find(contained_first, hitmap["x_contained"].cend(), exit_hit.TDC());
80 
81  if (std::distance(contained_first, contained_last) <
83  return false;
84 
85  Track track(*entry_hit, exit_hit);
86 
87  if (!good_track(track))
88  return false;
89 
90  if (++n_good_track % sparsification_factor_)
91  return false;
92 
93  auto time_spent = duration_cast<milliseconds>
94  (high_resolution_clock::now() - t_start).count();
95 
97  time_spent > trigger_timeout_)
98  {
99  result = true;
100  trigger_entry_hit = *entry_hit;
101 
103  trigger_exit_hit = hitmap["x_surface"].back();
104  else
105  trigger_exit_hit = *entry_hit;
106 
107  extra_info.set(Extra_Info::TIMEOUT_BIT, true);
108 
109  return true;
110  }
111 
112  std::set<int> plane_set = {entry_hit->Plane().val};
113  std::set<int> cell_set = {entry_hit->Cell().val};
114 
115  uint64_t t_max_plane_gap = track.start().TDC().val;
116  if (track.slope_plane_is_valid())
117  t_max_plane_gap += abs(track.slope_time_plane()) * max_plane_gap_cut_;
118 
119  uint64_t t_max_cell_gap = track.start().TDC().val;
120  if (track.slope_cell_is_valid())
121  t_max_cell_gap += abs(track.slope_time_cell()) * max_cell_gap_cut_;
122  uint64_t t_max_gap = std::min(t_max_plane_gap, t_max_cell_gap);
123 
124  //unsigned n_contained_hit = 0;
125  bool contains_gap_exceeding_cut = std::any_of
126  (contained_first, contained_last,
127  [&](novaddt::DAQHit const& hit)
128  {
129  if (hit.TDC().val > t_max_gap)
130  {
131  int64_t time_difference =
132  static_cast<int64_t>(hit.TDC().val) -
133  static_cast<int64_t>(track.start().TDC().val);
134 
135  if (hit.TDC().val > t_max_cell_gap)
136  {
137  double expected_cell =
138  static_cast<double>(track.start().Cell().val);
139  if (track.slope_time_is_valid())
140  expected_cell += track.slope_cell_time() * time_difference;
141 
142  if (gap_exceeds_cut(cell_set, expected_cell, max_cell_gap_cut_))
143  return true;
144  }
145 
146  if (hit.TDC().val > t_max_plane_gap)
147  {
148  double expected_plane =
149  static_cast<double>(track.start().Plane().val);
150  if (track.slope_time_is_valid())
151  expected_plane += track.slope_plane_time() * time_difference;
152 
153  if (gap_exceeds_cut
154  (plane_set, expected_plane, max_plane_gap_cut_))
155  return true;
156  }
157  }
158 
160  {
161  cell_set.insert(hit.Cell().val);
162  plane_set.insert(hit.Plane().val);
163  }
164 
165  return false;
166  });
167 
168  if (contains_gap_exceeding_cut)
169  return false;
170 
171  plane_set.insert(exit_hit.Plane().val);
172  if (plane_set.size() < Constants::TRACK_MIN_UNIQUE_PLANES)
173  return false;
174 
175  if (find_max_gap(plane_set) > max_plane_gap_cut_)
176  return false;
177 
178  cell_set.insert(exit_hit.Cell().val);
179  if (find_max_gap(cell_set) > max_cell_gap_cut_)
180  return false;
181 
182  result = true;
183  trigger_entry_hit = *entry_hit;
184  trigger_exit_hit = exit_hit;
185 
186  return true;
187  });
188  }
189 
190  if (result)
191  {
192  auto t_begin = trigger_entry_hit.TDC().val - trigger_time_buffer_;
193  auto t_end = trigger_exit_hit.TDC().val + trigger_time_buffer_;
194 
196  emplace_back(t_begin, t_end - t_begin,
198  extra_info.to_ulong());
199  }
200 
201  return result;
202 }
bool hit_is_in_time_with_road(novaddt::DAQHit const &hit, Track const &track) const
Definition: Trigger.cxx:351
unsigned sparsification_factor_
Definition: Trigger.h:78
value_type val
Definition: BaseProducts.h:34
novaddt::Plane const & Plane() const
Definition: DAQHit.h:70
bool good_track(Track const &track) const
Definition: Trigger.cxx:304
novaddt::TDC const & TDC() const
Definition: DAQHit.h:74
value_type val
Definition: BaseProducts.h:109
Definition: event.h:19
void abs(TH1 *hist)
unsigned distance(const T &t1, const T &t2)
std::vector< novaddt::TriggerDecision > trigger_decisions_
Definition: Trigger.h:86
int find_max_gap(std::set< int > const &collection) const
Definition: Trigger.cxx:399
void find_view_matched_hits(std::map< std::string, novaddt::HitList > &hitmap) const
Definition: Trigger.cxx:224
const unsigned TRACK_MIN_UNIQUE_PLANES
Definition: Constants.h:34
void split_by_view(novaddt::HitList hits, std::map< std::string, novaddt::HitList > &hitmap) const
Definition: Trigger.cxx:207
value_type val
Definition: BaseProducts.h:84
bool trigger_write_all_timeout_data_
Definition: Trigger.h:84
const unsigned CHECK_BIT
Definition: Constants.h:45
bool gap_exceeds_cut(std::set< int > collection, int const &object, int const &max_gap_cut) const
Definition: Trigger.cxx:382
bool trigger_use_timeout_
Definition: Trigger.h:83
Definition: structs.h:12
double trigger_timeout_
Definition: Trigger.h:82
novaddt::Cell const & Cell() const
Definition: DAQHit.h:71
novaddt::HitList::const_iterator find(novaddt::HitList::const_iterator begin, novaddt::HitList::const_iterator end, novaddt::TDC tdc) const
Definition: Trigger.cxx:440
const unsigned TIMEOUT_BIT
Definition: Constants.h:46
T min(const caf::Proxy< T > &a, T b)
unsigned trigger_time_buffer_
Definition: Trigger.h:81
Float_t track
Definition: plot.C:35
const unsigned TRACK_MIN_HITS
Definition: Constants.h:33
void novaddt::smt::Trigger::split_by_view ( novaddt::HitList  hits,
std::map< std::string, novaddt::HitList > &  hitmap 
) const
private

Definition at line 207 of file Trigger.cxx.

References distance(), find_view_matched_hits(), make_syst_table_plots::h, and daqchannelmap::X_VIEW.

Referenced by run_algorithm().

208 {
209  auto bound = std::stable_partition
210  (hits.begin(), hits.end(),
211  [](novaddt::DAQHit const& h)
212  { return h.View().val == daqchannelmap::X_VIEW; });
213 
214  hitmap["x"] = novaddt::HitList(std::distance(hits.begin(), bound));
215  std::move(hits.begin(), bound, hitmap["x"].begin());
216 
217  hitmap["y"] = novaddt::HitList(std::distance(bound, hits.end()));
218  std::move(bound, hits.end(), hitmap["y"].begin());
219 }
std::vector< DAQHit > HitList
Definition: HitList.h:15
unsigned distance(const T &t1, const T &t2)
void hits()
Definition: readHits.C:15
Identifier for the X measuring view of the detector (top)
std::vector< novaddt::TriggerDecision > novaddt::smt::Trigger::trigger_decisions ( ) const

Definition at line 32 of file Trigger.cxx.

References run_algorithm(), and trigger_decisions_.

Referenced by novaddt::SlowMonopoleTrigger::filter().

33 {
34  return trigger_decisions_;
35 }
std::vector< novaddt::TriggerDecision > trigger_decisions_
Definition: Trigger.h:86

Member Data Documentation

int novaddt::smt::Trigger::max_cell_gap_cut_
private

Definition at line 76 of file Trigger.h.

Referenced by run_algorithm().

int novaddt::smt::Trigger::max_plane_gap_cut_
private

Definition at line 77 of file Trigger.h.

Referenced by good_track(), and run_algorithm().

unsigned novaddt::smt::Trigger::sparsification_factor_
private

Definition at line 78 of file Trigger.h.

Referenced by run_algorithm().

double novaddt::smt::Trigger::track_max_beta_
private

Definition at line 79 of file Trigger.h.

Referenced by good_track().

double novaddt::smt::Trigger::track_min_beta_
private

Definition at line 80 of file Trigger.h.

Referenced by good_track().

std::vector<novaddt::TriggerDecision> novaddt::smt::Trigger::trigger_decisions_
private

Definition at line 86 of file Trigger.h.

Referenced by run_algorithm(), and trigger_decisions().

unsigned novaddt::smt::Trigger::trigger_time_buffer_
private

Definition at line 81 of file Trigger.h.

Referenced by run_algorithm().

double novaddt::smt::Trigger::trigger_timeout_
private

Definition at line 82 of file Trigger.h.

Referenced by run_algorithm().

bool novaddt::smt::Trigger::trigger_use_timeout_
private

Definition at line 83 of file Trigger.h.

Referenced by run_algorithm().

bool novaddt::smt::Trigger::trigger_write_all_timeout_data_
private

Definition at line 84 of file Trigger.h.

Referenced by run_algorithm().


The documentation for this class was generated from the following files: