Go to the documentation of this file. 1 #ifndef __JFIT__JEVTTOOLKIT__
2 #define __JFIT__JEVTTOOLKIT__
40 namespace JPP {
using namespace JFIT; }
120 const double energy = 0.0,
121 const int status = 0)
149 const double energy = 0.0,
150 const int status = 0)
197 const double w = NDF - 0.25 * chi2 / NDF;
226 return first.
getQ() > second.
getQ();
413 template<
class JTrackSelector_t>
416 return std::find_if(evt.begin(), evt.end(), selector) != evt.end();
454 template<
class JTrackSelector_t,
class JQualitySorter_t>
456 JTrackSelector_t selector,
457 JQualitySorter_t comparator)
459 JEvt::const_iterator p = std::find_if(evt.begin(), evt.begin(), selector);
461 for (JEvt::const_iterator i = p; i != evt.end(); ++i) {
462 if (selector(*i) && comparator(*i, *p)) {
517 template<
class JHitL1_t>
518 inline bool operator ()(
const JHitL1_t& first,
const JHitL1_t& second)
const
520 if (first.getModuleID() == second.getModuleID())
521 return first.getT() < second.getT();
523 return first.getModuleID() < second.getModuleID();
577 const double dot =
getDot(fit);
581 else if (dot <= -1.0)
611 return std::max_element(__begin, __end, *
this);
642 const double theta2) :
656 JEvt::const_iterator __end)
const
661 for (JEvt::const_iterator i = __begin; i != __end; ++i) {
663 if (i->getDZ() >=
dot1) {
665 if (i->getQ() > Qup) {
669 }
else if (i->getDZ() <=
dot2) {
671 if (i->getQ() > Qdown) {
690 double theta1, theta2;
692 in >> theta1 >> theta2;
770 for (T hit = __begin; hit !=__end; ++hit) {
double getDZ() const
Get z direction.
double getZ() const
Get Z-position.
bool operator()(const JHitL1_t &first, const JHitL1_t &second) const
Comparison of L1 hits by module identifier (first) and by time (second).
double getDX() const
Get X-slope.
bool has_shower_completefit(const JFit &fit)
Test whether given fit has shower complete fit in history.
int getN() const
Get count.
Exception for accessing an index in a collection that is outside of its range.
bool has_muon_prefit(const JFit &fit)
Test whether given fit has muon prefit in history.
bool has_reconstructed_muon(const JEvt &evt)
Test whether given event has a track with muon reconstruction.
double getT(const JVector3D &pos) const
Get arrival time of Cherenkov light at given position.
friend std::ostream & operator<<(std::ostream &out, const JAtmosphericMuon &object)
Write atmospheric muon analyser to output.
Auxiliary class for permutations of L1 hits.
bool has_muon_simplex(const JFit &fit)
Test whether given fit has muon simplex in history.
Auxiliary classes and methods for linear and iterative data regression.
int getCount(T __begin, T __end)
Get hit count.
bool qualitySorter(const JFIT::JFit &first, const JFIT::JFit &second)
Comparison of fit results.
double getZ() const
Get z position.
JAxis3D getAxis(const JFit &fit)
Get axis.
friend std::istream & operator>>(std::istream &in, JAtmosphericMuon &object)
Read atmospheric muon analyser from input.
double getE() const
Get energy.
JQualitySorter()
Default constructor.
Data structure for direction in three dimensions.
Data structure for normalised vector in three dimensions.
double getDZ() const
Get Z-slope.
JFit getFit(const JHistory &history, const JLine1Z &track, const JAngle3D &angle, const double Q, const int NDF, const double energy=0.0, const int status=0)
Get fit.
const JFit & get_best_reconstructed_track(const JEvt &evt, JTrackSelector_t selector, JQualitySorter_t comparator)
Get best reconstructed track.
bool has_reconstructed_track(const JEvt &evt, JTrackSelector_t selector)
Test whether given event has a track according selection.
bool has_shower_positionfit(const JFit &fit)
Test whether given fit has shower position fit in history.
bool has_history(const JFit &fit, const JRange< int > &range)
Test whether given fit has specified history.
JAtmosphericMuon()
Default constructor.
bool has_shower_prefit(const JFit &fit)
Test whether given fit has shower prefit in history.
Data structure for set of track fit results.
double getT(const JVector3D &pos) const
Get arrival time of Cherenkov light at given position.
bool operator()(const JFit &first, const JFit &second) const
Comparison of fit results.
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.
Start of shower fit applications.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
double getQ() const
Get quality.
const JFit & get_best_reconstructed_shower(const JEvt &evt)
Get best reconstructed shower.
bool has_shower_fit(const JFit &fit)
Test whether given fit has shower fit in history.
General purpose sorter of fit results.
Data structure for position in three dimensions.
function_adaptor_type::pF pF
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
double getDX() const
Get x direction.
double getDX() const
Get x direction.
JFunctionAdaptor< bool, const JFit &, const JFit & > function_adaptor_type
const JFit & get_best_reconstructed_muon(const JEvt &evt)
Get best reconstructed muon.
double getDY() const
Get y direction.
Data structure for fit of straight line paralel to z-axis.
End of muon fit applications.
bool has_muon_start(const JFit &fit)
Test whether given fit has muon start in history.
Reduced data structure for L1 hit.
double getX() const
Get X-position.
JTrack3E getTrack(const JFit &fit)
Get track.
Data structure for angles in three dimensions.
double getDZ() const
Get z direction.
bool has_reconstructed_shower(const JEvt &evt)
Test whether given event has a track with shower reconstruction.
JPointing(const JVersor3D &dir)
Constructor.
double getDot(const JFit &fit) const
Get dot product between reference direction and fit result.
double getZ(const JPosition3D &pos) const
Get point of emission of Cherenkov light along muon path.
Data structure for L0 hit.
JVersor3D getDirection() const
Get direction.
double getY() const
Get y position.
bool has_muon_fit(const JFit &fit)
Test whether given fit has muon fit in history.
double getDY() const
Get y direction.
JPredicate< JResult_t T::*, JComparison::eq > make_predicate(JResult_t T::*member, const JResult_t value)
Helper method to create predicate for data member.
T operator()(T __begin, T __end) const
Select best fit result.
double getDY() const
Get Y-slope.
double operator()(JEvt::const_iterator __begin, JEvt::const_iterator __end) const
Test is event is atmospheric muon.
JHitL1Comparator()
Default constructor.
Start of muon fit applications.
double getDot(const JFit &first, const JFit &second)
Get dot product.
bool(* pF)(const JFit &, const JFit &)
Type definition of method.
Auxiliary class to compare fit results with respect to a reference direction (e.g.
JAtmosphericMuon(const double theta1, const double theta2)
Constructor.
Container for historical events.
double getX() const
Get x position.
bool has_muon_energy(const JFit &fit)
Test whether given fit has muon energy in history.
End of shower fit applications.
double getT() const
Get time.
double getY() const
Get Y-position.
double getDot(const JFirst_t &first, const JSecond_t &second)
Get dot product of objects.
JPosition3D getPosition(const JFit &fit)
Get position.
Auxiliary class to evaluate atmospheric muon hypothesis.
bool has_muon_gandalf(const JFit &fit)
Test whether given fit has muon gandalf in history.
double getAngle(const JFit &fit) const
Get angle between reference direction and fit result.
JDirection3D getDirection(const JFit &fit)
Get direction.
Data structure for L1 hit.
double getDot(const JFit &fit, const JDirection3D &dir)
Get dot product.
double getQuality(const double chi2)
Get quality of fit.
Data structure for track fit results.
const JHistory & getHistory() const
Get history.