Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JEvtToolkit.hh
Go to the documentation of this file.
1 #ifndef __JFIT__JEVTTOOLKIT__
2 #define __JFIT__JEVTTOOLKIT__
3 
4 #include <istream>
5 #include <ostream>
6 #include <algorithm>
7 #include <cmath>
8 
9 #include "JLang/JException.hh"
10 #include "JLang/JPredicate.hh"
11 #include "JLang/JFind_if.hh"
12 #include "JTools/JRange.hh"
13 #include "JTrigger/JHitL0.hh"
14 #include "JTrigger/JHitL1.hh"
15 #include "JTrigger/JHitR1.hh"
16 #include "JGeometry3D/JAngle3D.hh"
17 #include "JGeometry3D/JVector3D.hh"
18 #include "JGeometry3D/JVersor3D.hh"
21 #include "JGeometry3D/JAxis3D.hh"
22 #include "JGeometry3D/JTrack3D.hh"
23 #include "JGeometry3D/JTrack3E.hh"
24 #include "JMath/JMathToolkit.hh"
25 #include "JTools/JConstants.hh"
26 #include "JTools/JRange.hh"
27 #include "Jeep/JFunctionAdaptor.hh"
28 
29 #include "JFit/JLine1Z.hh"
30 #include "JFit/JShower3EZ.hh"
31 #include "JFit/JEvt.hh"
32 #include "JFit/JHistory.hh"
33 
34 
35 /**
36  * \author mdejong
37  */
38 
39 namespace JFIT {}
40 namespace JPP { using namespace JFIT; }
41 
42 namespace JFIT {
43 
45  using JTRIGGER::JHitL0;
46  using JTRIGGER::JHitL1;
47  using JTRIGGER::JHitR1;
55  using JTOOLS::JRange;
56 
57  /**
58  * Get position.
59  *
60  * \param fit fit
61  * \return position
62  */
63  inline JPosition3D getPosition(const JFit& fit)
64  {
65  return JPosition3D(fit.getX(), fit.getY(), fit.getZ());
66  }
67 
68 
69  /**
70  * Get direction.
71  *
72  * \param fit fit
73  * \return direction
74  */
75  inline JDirection3D getDirection(const JFit& fit)
76  {
77  return JDirection3D(fit.getDX(), fit.getDY(), fit.getDZ());
78  }
79 
80 
81  /**
82  * Get axis.
83  *
84  * \param fit fit
85  * \return axis
86  */
87  inline JAxis3D getAxis(const JFit& fit)
88  {
89  return JAxis3D(getPosition(fit), getDirection(fit));
90  }
91 
92 
93  /**
94  * Get track.
95  *
96  * \param fit fit
97  * \return track
98  */
99  inline JTrack3E getTrack(const JFit& fit)
100  {
101  return JTrack3E(JTrack3D(getAxis(fit), fit.getT()), fit.getE());
102  }
103 
104 
105  /**
106  * Get fit.
107  *
108  * \param history history
109  * \param track track
110  * \param Q quality
111  * \param NDF number of degrees of freedom
112  * \param energy Energy, which would be set as 0, if the fit does not reconstruct energy
113  * \param status status of the fit as defined in enum JFitStatus.hh
114  * \return fit
115  */
116  inline JFit getFit(const JHistory& history,
117  const JTrack3D& track,
118  const double Q,
119  const int NDF,
120  const double energy = 0.0,
121  const int status = 0)
122  {
123  return JFit(history,
124  track.getX(), track.getY(), track.getZ(),
125  track.getDX(), track.getDY(), track.getDZ(),
126  track.getT(),
127  Q, NDF,
128  energy, status);
129  }
130 
131 
132  /**
133  * Get fit.
134  *
135  * \param history history
136  * \param track track
137  * \param angle angle
138  * \param Q quality
139  * \param NDF number of degrees of freedom
140  * \param energy Energy, which would be set as 0, if the fit does not reconstruct energy
141  * \param status status of the fit as defined in JFitStatus.hh
142  * \return fit
143  */
144  inline JFit getFit(const JHistory& history,
145  const JLine1Z& track,
146  const JAngle3D& angle,
147  const double Q,
148  const int NDF,
149  const double energy = 0.0,
150  const int status = 0)
151  {
152  return JFit(history,
153  track.getX(), track.getY(), track.getZ(),
154  angle.getDX(), angle.getDY(), angle.getDZ(),
155  track.getT(),
156  Q, NDF,
157  energy, status);
158  }
159 
160 
161  /**
162  * Get dot product.
163  *
164  * \param first first fit
165  * \param second second fit
166  * \return dot product
167  */
168  inline double getDot(const JFit& first, const JFit& second)
169  {
170  return JMATH::getDot(getDirection(first), getDirection(second));
171  }
172 
173 
174  /**
175  * Get dot product.
176  *
177  * \param fit fit
178  * \param dir direction
179  * \return dot product
180  */
181  inline double getDot(const JFit& fit, const JDirection3D& dir)
182  {
183  return JMATH::getDot(getDirection(fit), dir);
184  }
185 
186 
187  /**
188  * Get quality of fit.
189  * The larger the quality, the better the fit.
190  *
191  * \param chi2 chi2
192  * \param NDF number of degrees of freedom
193  * \return quality
194  */
195  inline double getQuality(const double chi2, const int NDF)
196  {
197  const double w = NDF - 0.25 * chi2 / NDF;
198 
199  return w;
200  }
201 
202 
203  /**
204  * Get quality of fit.
205  * The larger the quality, the better the fit.
206  *
207  * \param chi2 chi2
208  * \return quality
209  */
210  inline double getQuality(const double chi2)
211  {
212  return -chi2;
213  }
214 
215 
216  /**
217  * Comparison of fit results.
218  *
219  * \param first first fit
220  * \param second second fit
221  * \return true if first fit has better quality than second; else false
222  */
223  inline bool qualitySorter(const JFit& first, const JFit& second)
224  {
225  if (first.getHistory().size() == second.getHistory().size())
226  return first.getQ() > second.getQ();
227  else
228  return first.getHistory().size() > second.getHistory().size();
229  }
230 
231 
232  /**
233  * General purpose sorter of fit results.
234  *
235  * The default constructor will sort fit results according the method JFIT::qualitySorter.\n
236  * A different method can dynamically be loaded from a (shared) library using class JEEP::JFunctionAdaptor.
237  * For the definition of an alternative method, see e.g. quality_sorter.cc
238  */
239  struct JQualitySorter :
240  public JFunctionAdaptor<bool, const JFit&, const JFit&>
241  {
244 
245 
246  /**
247  * Default constructor.
248  */
251  {}
252  };
253 
254 
255  /**
256  * Test whether given fit has specified history.
257  *
258  * \param fit fit
259  * \param type application type
260  * \return true if type in history; else false
261  */
262  inline bool has_history(const JFit& fit, const int type)
263  {
264  return std::find_if(fit.getHistory().begin(),
265  fit.getHistory().end(),
266  JLANG::make_predicate(&JEvent::type, type)) != fit.getHistory().end();
267  }
268 
269 
270  /**
271  * Test whether given fit has specified history.
272  *
273  * \param fit fit
274  * \param range application type range
275  * \return true if type in history; else false
276  */
277  inline bool has_history(const JFit& fit, const JRange<int>& range)
278  {
279  return std::find_if(fit.getHistory().begin(),
280  fit.getHistory().end(),
281  JLANG::make_find_if(&JEvent::type, range)) != fit.getHistory().end();
282  }
283 
284 
285  /**
286  * Test whether given fit has muon prefit in history.
287  *
288  * \param fit fit
289  * \return true if muon prefit in history; else false
290  */
291  inline bool has_muon_prefit(const JFit& fit)
292  {
293  return has_history(fit, JMUONPREFIT);
294  }
295 
296 
297  /**
298  * Test whether given fit has muon simplex in history.
299  *
300  * \param fit fit
301  * \return true if muon simplex in history; else false
302  */
303  inline bool has_muon_simplex(const JFit& fit)
304  {
305  return has_history(fit, JMUONSIMPLEX);
306  }
307 
308 
309  /**
310  * Test whether given fit has muon gandalf in history.
311  *
312  * \param fit fit
313  * \return true if muon gandalf in history; else false
314  */
315  inline bool has_muon_gandalf(const JFit& fit)
316  {
317  return has_history(fit, JMUONGANDALF);
318  }
319 
320 
321  /**
322  * Test whether given fit has muon energy in history.
323  *
324  * \param fit fit
325  * \return true if muon energy in history; else false
326  */
327  inline bool has_muon_energy(const JFit& fit)
328  {
329  return has_history(fit, JMUONENERGY);
330  }
331 
332 
333  /**
334  * Test whether given fit has muon start in history.
335  *
336  * \param fit fit
337  * \return true if muon start in history; else false
338  */
339  inline bool has_muon_start(const JFit& fit)
340  {
341  return has_history(fit, JMUONSTART);
342  }
343 
344 
345  /**
346  * Test whether given fit has muon fit in history.
347  *
348  * \param fit fit
349  * \return true if muon fit in history; else false
350  */
351  inline bool has_muon_fit(const JFit& fit)
352  {
354  }
355 
356 
357  /**
358  * Test whether given fit has shower prefit in history.
359  *
360  * \param fit fit
361  * \return true if shower prefit in history; else false
362  */
363  inline bool has_shower_prefit(const JFit& fit)
364  {
365  return has_history(fit, JSHOWERPREFIT);
366  }
367 
368 
369  /**
370  * Test whether given fit has shower position fit in history.
371  *
372  * \param fit fit
373  * \return true if shower position fit in history; else false
374  */
375  inline bool has_shower_positionfit(const JFit& fit)
376  {
377  return has_history(fit, JSHOWERPOSITIONFIT);
378  }
379 
380 
381  /**
382  * Test whether given fit has shower complete fit in history.
383  *
384  * \param fit fit
385  * \return true if shower complete fit in history; else false
386  */
387  inline bool has_shower_completefit(const JFit& fit)
388  {
389  return has_history(fit, JSHOWERCOMPLETEFIT);
390  }
391 
392 
393  /**
394  * Test whether given fit has shower fit in history.
395  *
396  * \param fit fit
397  * \return true if shower fit in history; else false
398  */
399  inline bool has_shower_fit(const JFit& fit)
400  {
402  }
403 
404 
405  /**
406  * Test whether given event has a track according selection.\n
407  * The track selector corresponds to the function operator <tt>bool selector(const Trk&);</tt>.
408  *
409  * \param evt event
410  * \param selector track selector
411  * \return true if at least one corresponding track; else false
412  */
413  template<class JTrackSelector_t>
414  inline bool has_reconstructed_track(const JEvt& evt, JTrackSelector_t selector)
415  {
416  return std::find_if(evt.begin(), evt.end(), selector) != evt.end();
417  }
418 
419 
420  /**
421  * Test whether given event has a track with muon reconstruction.
422  *
423  * \param evt event
424  * \return true if at least one reconstructed muon; else false
425  */
426  inline bool has_reconstructed_muon(const JEvt& evt)
427  {
429  }
430 
431 
432  /**
433  * Test whether given event has a track with shower reconstruction.
434  *
435  * \param evt event
436  * \return true if at least one reconstructed shower; else false
437  */
438  inline bool has_reconstructed_shower(const JEvt& evt)
439  {
441  }
442 
443 
444  /**
445  * Get best reconstructed track.\n
446  * The track selector corresponds to the function operator <tt>bool selector(const Trk&);</tt> and
447  * the track comparator to <tt>bool comprator(const Trk&, const Trk&);</tt>.
448  *
449  * \param evt event
450  * \param selector track selector
451  * \param comparator track comparator
452  * \return track
453  */
454  template<class JTrackSelector_t, class JQualitySorter_t>
455  inline const JFit& get_best_reconstructed_track(const JEvt& evt,
456  JTrackSelector_t selector,
457  JQualitySorter_t comparator)
458  {
459  JEvt::const_iterator p = std::find_if(evt.begin(), evt.begin(), selector);
460 
461  for (JEvt::const_iterator i = p; i != evt.end(); ++i) {
462  if (selector(*i) && comparator(*i, *p)) {
463  p = i;
464  }
465  }
466 
467  if (p != evt.end())
468  return *p;
469  else
470  THROW(JIndexOutOfRange, "This event has no fit with given selector.");
471  }
472 
473 
474  /**
475  * Get best reconstructed muon.
476  *
477  * \param evt event
478  * \return track
479  */
480  inline const JFit& get_best_reconstructed_muon(const JEvt& evt)
481  {
483  }
484 
485 
486  /**
487  * Get best reconstructed shower.
488  *
489  * \param evt event
490  * \return track
491  */
492  inline const JFit& get_best_reconstructed_shower(const JEvt& evt)
493  {
495  }
496 
497 
498  /**
499  * Auxiliary class for permutations of L1 hits.
500  */
502  {
503  /**
504  * Default constructor.
505  */
507  {}
508 
509 
510  /**
511  * Comparison of L1 hits by module identifier (first) and by time (second).
512  *
513  * \param first first hit
514  * \param second second hit
515  * \return true if first hit before second; else false
516  */
517  template<class JHitL1_t>
518  inline bool operator ()(const JHitL1_t& first, const JHitL1_t& second) const
519  {
520  if (first.getModuleID() == second.getModuleID())
521  return first.getT() < second.getT();
522  else
523  return first.getModuleID() < second.getModuleID();
524  }
525  };
526 
527 
528  /**
529  * Auxiliary class to compare fit results with respect to a reference direction (e.g. true muon).
530  * The sort operation results in an ordered set of fit results with increasing angle between
531  * the reference direction and that of the fit results.
532  */
533  class JPointing {
534  public:
535  /**
536  * Constructor.
537  *
538  * \param dir reference direction
539  */
541  {
542  this->dir = dir;
543  }
544 
545 
546  /**
547  * Get direction.
548  *
549  * \return direction
550  */
552  {
553  return dir;
554  }
555 
556 
557  /**
558  * Get dot product between reference direction and fit result.
559  *
560  * \param fit fit
561  * \return dot product
562  */
563  inline double getDot(const JFit& fit) const
564  {
565  return JFIT::getDot(fit, dir);
566  }
567 
568 
569  /**
570  * Get angle between reference direction and fit result.
571  *
572  * \param fit fit
573  * \return angle [deg]
574  */
575  inline double getAngle(const JFit& fit) const
576  {
577  const double dot = getDot(fit);
578 
579  if (dot >= +1.0)
580  return 0.0;
581  else if (dot <= -1.0)
582  return 180.0;
583  else
584  return acos(dot) * 180.0 / JTOOLS::PI;
585  }
586 
587 
588  /**
589  * Comparison of fit results.
590  *
591  * \param first first fit
592  * \param second second fit
593  * \return true if first fit worse; else false
594  */
595  inline bool operator()(const JFit& first, const JFit& second) const
596  {
597  return this->getDot(first) < this->getDot(second);
598  }
599 
600 
601  /**
602  * Select best fit result.
603  *
604  * \param __begin begin of fit results
605  * \param __end end of fit results
606  * \return best fit result
607  */
608  template<class T>
609  inline T operator()(T __begin, T __end) const
610  {
611  return std::max_element(__begin, __end, *this);
612  }
613 
614  protected:
616  };
617 
618 
619  /**
620  * Auxiliary class to evaluate atmospheric muon hypothesis.
621  * The hypothesis is tested by means of the difference in quality
622  * between the best upward and best downward track.
623  */
625  public:
626  /**
627  * Default constructor.
628  */
630  dot1(0.0),
631  dot2(0.0)
632  {}
633 
634 
635  /**
636  * Constructor.
637  *
638  * \param theta1 upper hemisphere angle [deg]
639  * \param theta2 lower hemisphere angle [deg]
640  */
641  JAtmosphericMuon(const double theta1,
642  const double theta2) :
643  dot1(cos(theta1 * JTOOLS::PI/180.0)),
644  dot2(cos(theta2 * JTOOLS::PI/180.0))
645  {}
646 
647 
648  /**
649  * Test is event is atmospheric muon.
650  *
651  * \param __begin begin of data
652  * \param __end end of data
653  * \return negative if preferably down / positive if preferably up
654  */
655  double operator()(JEvt::const_iterator __begin,
656  JEvt::const_iterator __end) const
657  {
658  double Qup = 0.0;
659  double Qdown = 0.0;
660 
661  for (JEvt::const_iterator i = __begin; i != __end; ++i) {
662 
663  if (i->getDZ() >= dot1) {
664 
665  if (i->getQ() > Qup) {
666  Qup = i->getQ();
667  }
668 
669  } else if (i->getDZ() <= dot2) {
670 
671  if (i->getQ() > Qdown) {
672  Qdown = i->getQ();
673  }
674  }
675  }
676 
677  return Qup - Qdown;
678  }
679 
680 
681  /**
682  * Read atmospheric muon analyser from input.
683  *
684  * \param in input stream
685  * \param object atmospheric muon analyser
686  * \return input stream
687  */
688  friend inline std::istream& operator>>(std::istream& in, JAtmosphericMuon& object)
689  {
690  double theta1, theta2;
691 
692  in >> theta1 >> theta2;
693 
694  object.dot1 = cos(theta1 * JTOOLS::PI/180.0);
695  object.dot2 = cos(theta2 * JTOOLS::PI/180.0);
696 
697  return in;
698  }
699 
700 
701  /**
702  * Write atmospheric muon analyser to output.
703  *
704  * \param out output stream
705  * \param object atmospheric muon analyser
706  * \return output stream
707  */
708  friend inline std::ostream& operator<<(std::ostream& out, const JAtmosphericMuon& object)
709  {
710  out << acos(object.dot1) * 180.0 / JTOOLS::PI << ' '
711  << acos(object.dot2) * 180.0 / JTOOLS::PI;
712 
713  return out;
714  }
715 
716 
717  double dot1;
718  double dot2;
719  };
720 
721 
722  /**
723  * Get hit count.
724  *
725  * \param hit L0 hit
726  * \return 1
727  */
728  inline int getCount(const JHitL0& hit)
729  {
730  return 1;
731  }
732 
733 
734  /**
735  * Get hit count.
736  *
737  * \param hit hit
738  * \return count
739  */
740  inline int getCount(const JHitL1& hit)
741  {
742  return hit.size();
743  }
744 
745 
746  /**
747  * Get hit count.
748  *
749  * \param hit hit
750  * \return count
751  */
752  inline int getCount(const JHitR1& hit)
753  {
754  return hit.getN();
755  }
756 
757 
758  /**
759  * Get hit count.
760  *
761  * \param __begin begin of L0/L1 data
762  * \param __end end of L0/L1 data
763  * \return hit count
764  */
765  template<class T>
766  inline int getCount(T __begin, T __end)
767  {
768  int count = 0;
769 
770  for (T hit = __begin; hit !=__end; ++hit) {
771  count += getCount(*hit);
772  }
773 
774  return count;
775  }
776 }
777 
778 #endif
JAtmosphericMuon(const double theta1, const double theta2)
Constructor.
Definition: JEvtToolkit.hh:641
Data structure for angles in three dimensions.
Definition: JAngle3D.hh:30
friend std::istream & operator>>(std::istream &in, JAtmosphericMuon &object)
Read atmospheric muon analyser from input.
Definition: JEvtToolkit.hh:688
JHitL1Comparator()
Default constructor.
Definition: JEvtToolkit.hh:506
bool has_muon_prefit(const Trk &track)
Test whether given track has muon prefit in history.
Exceptions.
JPredicate< JResult_t T::*, JComparison::eq > make_predicate(JResult_t T::*member, const JResult_t value)
Helper method to create predicate for data member.
Definition: JPredicate.hh:128
const Trk & get_best_reconstructed_shower(const Evt &evt)
Get best reconstructed shower.
Auxiliary methods for geometrical methods.
Data structure for L1 hit.
Definition: JHitL1.hh:34
Data structure for direction in three dimensions.
Definition: JDirection3D.hh:32
bool operator()(const JHitL1_t &first, const JHitL1_t &second) const
Comparison of L1 hits by module identifier (first) and by time (second).
Definition: JEvtToolkit.hh:518
JTrack3E getTrack(const Trk &track)
Get track.
double getCount(TH1D *hptr, int muon_threshold)
double getDot(const JNeutrinoDirection &first, const JNeutrinoDirection &second)
Dot product.
Definition: JAstronomy.hh:409
bool has_shower_positionfit(const Trk &track)
Test whether given track has shower position fit in history.
JShowerPositionFit.cc.
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Definition: JException.hh:633
JVersor3D getDirection() const
Get direction.
Definition: JEvtToolkit.hh:551
static const double PI
Constants.
Definition: JConstants.hh:20
JShowerPrefit.cc.
friend std::ostream & operator<<(std::ostream &out, const JAtmosphericMuon &object)
Write atmospheric muon analyser to output.
Definition: JEvtToolkit.hh:708
double getZ(const JPosition3D &pos) const
Get point of emission of Cherenkov light along muon path.
Definition: JLine1Z.hh:134
Container for historical events.
Definition: JHistory.hh:95
bool has_reconstructed_track(const Evt &evt, JTrackSelector_t selector)
Test whether given event has a track according selection.
double operator()(JEvt::const_iterator __begin, JEvt::const_iterator __end) const
Test is event is atmospheric muon.
Definition: JEvtToolkit.hh:655
3D track with energy.
Definition: JTrack3E.hh:29
General purpose sorter of fit results.
Definition: JEvtToolkit.hh:239
double getAngle(const JFit &fit) const
Get angle between reference direction and fit result.
Definition: JEvtToolkit.hh:575
Auxiliary class to compare fit results with respect to a reference direction (e.g.
Definition: JEvtToolkit.hh:533
double getDot(const JFit &fit) const
Get dot product between reference direction and fit result.
Definition: JEvtToolkit.hh:563
JFit getFit(const JHistory &history, const JTrack3D &track, const double Q, const int NDF, const double energy=0.0, const int status=0)
Get fit.
Definition: JEvtToolkit.hh:116
bool has_reconstructed_muon(const Evt &evt)
Test whether given event has a track with muon reconstruction.
Basic data structure for L0 hit.
Data structure for track fit results.
Definition: JEvt.hh:32
Axis object.
Definition: JAxis3D.hh:37
Auxiliary class for permutations of L1 hits.
Definition: JEvtToolkit.hh:501
function_adaptor_type::pF pF
Definition: JEvtToolkit.hh:243
Start of shower fit applications.
Constants.
bool has_muon_fit(const Trk &track)
Test whether given track has default muon fit in history.
JQualitySorter()
Default constructor.
Definition: JEvtToolkit.hh:249
bool has_muon_start(const Trk &track)
Test whether given track has muon start fit in history.
T operator()(T __begin, T __end) const
Select best fit result.
Definition: JEvtToolkit.hh:609
int type
application type
Definition: JHistory.hh:85
JAtmosphericMuon()
Default constructor.
Definition: JEvtToolkit.hh:629
double getT() const
Get time.
Definition: JEvt.hh:150
double getX() const
Get X-position.
Definition: JEvt.hh:144
double getDY() const
Get y direction.
Definition: JVersor3D.hh:101
double getDX() const
Get x direction.
Definition: JVersor3D.hh:90
JAxis3D getAxis(const Trk &track)
Get axis.
double getDot(const JFirst_t &first, const JSecond_t &second)
Get dot product of objects.
bool has_muon_gandalf(const Trk &track)
Test whether given track has muon gandalf fit in history.
double getY() const
Get y position.
Definition: JVector3D.hh:102
const Trk & get_best_reconstructed_track(const Evt &evt, JTrackSelector_t selector, JQualitySorter_t comparator)
Get best reconstructed track.
double getT(const JVector3D &pos) const
Get arrival time of Cherenkov light at given position.
Definition: JTrack3D.hh:126
Range of values.
Definition: JRange.hh:33
double getY() const
Get Y-position.
Definition: JEvt.hh:145
JFind_if< JResult_t T::*, JPredicate_t > make_find_if(JResult_t T::*member, const JPredicate_t &predicate)
Helper method to create find_if for data member.
Definition: JFind_if.hh:119
double getDZ() const
Get Z-slope.
Definition: JEvt.hh:149
JReturn_t(* pF)(JFirst_t, JSecond_t)
Type definition of method.
const Trk & get_best_reconstructed_muon(const Evt &evt)
Get best reconstructed muon.
Reduced data structure for L1 hit.
double getQ() const
Get quality.
Definition: JEvt.hh:151
bool has_muon_simplex(const Trk &track)
Test whether given track has muon simplex fit in history.
End of muon fit applications.
double getQuality(const double chi2, const int NDF)
Get quality of fit.
Definition: JEvtToolkit.hh:195
JFunctionAdaptor< bool, const JFit &, const JFit & > function_adaptor_type
Definition: JEvtToolkit.hh:242
Data structure for set of track fit results.
Definition: JEvt.hh:312
Auxiliary class to define a range between two values.
double getT(const JVector3D &pos) const
Get arrival time of Cherenkov light at given position.
Definition: JLine1Z.hh:114
bool has_muon_energy(const Trk &track)
Test whether given track has muon energy fit in history.
double getZ() const
Get Z-position.
Definition: JEvt.hh:146
Data structure for L0 hit.
Definition: JHitL0.hh:27
JPointing(const JVersor3D &dir)
Constructor.
Definition: JEvtToolkit.hh:540
bool has_reconstructed_shower(const Evt &evt)
Test whether given event has a track with shower reconstruction.
Start of muon fit applications.
Data structure for fit of straight line paralel to z-axis.
Definition: JLine1Z.hh:27
bool qualitySorter(const JFIT::JFit &first, const JFIT::JFit &second)
Comparison of fit results.
double getX() const
Get x position.
Definition: JVector3D.hh:92
End of shower fit applications.
Reduced data structure for L1 hit.
Definition: JHitR1.hh:31
double getDY() const
Get Y-slope.
Definition: JEvt.hh:148
JDirection3D getDirection(const Vec &v)
Get direction.
Data structure for position in three dimensions.
Definition: JPosition3D.hh:35
bool has_shower_completefit(const Trk &track)
Test whether given track has shower complete fit in history.
int getN() const
Get count.
Definition: JHitR1.hh:183
bool operator()(const JFit &first, const JFit &second) const
Comparison of fit results.
Definition: JEvtToolkit.hh:595
Exception for accessing an index in a collection that is outside of its range.
Definition: JException.hh:90
bool has_shower_prefit(const Trk &track)
Test whether given track has shower prefit in history.
Data structure for normalised vector in three dimensions.
Definition: JVersor3D.hh:23
Function adaptor.
const JHistory & getHistory() const
Get history.
Definition: JHistory.hh:225
double getDot(const JFit &first, const JFit &second)
Get dot product.
Definition: JEvtToolkit.hh:168
double getZ() const
Get z position.
Definition: JVector3D.hh:113
Auxiliary class to evaluate atmospheric muon hypothesis.
Definition: JEvtToolkit.hh:624
double getDZ() const
Get z direction.
Definition: JVersor3D.hh:112
double getE() const
Get energy.
Definition: JEvt.hh:153
double getDX() const
Get X-slope.
Definition: JEvt.hh:147
double getDX() const
Get x direction.
Definition: JAngle3D.hh:105
Basic data structure for L1 hit.
double getDZ() const
Get z direction.
Definition: JAngle3D.hh:127
JPosition3D getPosition(const Vec &v)
Get position.
bool has_shower_fit(const Trk &track)
Test whether given track has default shower fit in history.
double getDY() const
Get y direction.
Definition: JAngle3D.hh:116
bool has_history(const JFit &fit, const int type)
Test whether given fit has specified history.
Definition: JEvtToolkit.hh:262