Go to the documentation of this file.    1 #ifndef __JAANET__JAANETTOOLKIT__ 
    2 #define __JAANET__JAANETTOOLKIT__ 
   91     if (hit.pure_a == 0.0)
 
  108     if (hit.pure_a == 0.0)
 
  140         timeRange.include(
getTime(*hit));
 
  164     double t0 = numeric_limits<double>::max();
 
  174     if (t0 != numeric_limits<double>::max()) {
 
  178       window.fixLowerLimit(t0);
 
  182           timeRange.include(
getTime(*hit));
 
  313     return JHitL0(JDAQPMTIdentifier(hit.dom_id, hit.channel_id), pmt.getAxis(), JHit(
getTime(hit.tdc, pmt.getCalibration()), 
getToT(hit.tot, pmt.getCalibration())));
 
  328     const JPMT& pmt = router.
getPMT(hit.pmt_id);
 
  330     return JHitL0(JDAQPMTIdentifier(hit.dom_id, hit.channel_id), pmt.getAxis(), JHit(
getTime(hit.tdc, pmt.getCalibration()), 
getToT(hit.tot, pmt.getCalibration())));
 
  419   inline bool has_particleID (
const Trk& track, 
const int type) { 
return (track.type == type); }
 
  429     return !evt.mc_trks.empty() && 
is_neutrino(evt.mc_trks[0]);
 
  441       return evt.mc_trks[0];
 
  454     return std::count_if(evt.mc_trks.begin(), evt.mc_trks.end(), 
is_electron);
 
  477       return *std::find_if(evt.mc_trks.begin(), evt.mc_trks.end(), 
is_electron);
 
  504     return std::count_if(evt.mc_trks.begin(), evt.mc_trks.end(), 
is_muon);
 
  527       return *std::find_if(evt.mc_trks.begin(), evt.mc_trks.end(), 
is_muon);
 
  554     return std::count_if(evt.mc_trks.begin(), evt.mc_trks.end(), 
is_tau);
 
  577       return *std::find_if(evt.mc_trks.begin(), evt.mc_trks.end(), 
is_tau);
 
  604     return std::count_if(evt.mc_trks.begin(), evt.mc_trks.end(), 
is_hadron);
 
  633         cascade.E   += track->E;
 
  634         cascade.dir += track->dir * track->E;
 
  635         cascade.t    = track->t;
 
  636         cascade.pos  = track->pos;
 
  640     cascade.dir.normalize();
 
  669   template<
int reconstruction_type>
 
  680     inline bool operator()(
const Trk& first, 
const Trk& second)
 const 
  682       if (first.rec_stages.size() == second.rec_stages.size())
 
  683         return first.lik > second.lik;
 
  685         return first.rec_stages.size() > second.rec_stages.size();
 
  711       if (track.rec_type == 
type)
 
  712         return std::find_if(track.rec_stages.begin(), track.rec_stages.end(), 
range) != track.rec_stages.end();
 
  850   template<
class JTrackSelector_t>
 
  853     return std::find_if(evt.trks.begin(), evt.trks.end(), selector) != evt.trks.end();
 
  863   template<
int reconstruction_type>
 
  912   template<
class JTrackSelector_t, 
class JQualitySorter_t>
 
  914                                                  JTrackSelector_t selector,
 
  915                                                  JQualitySorter_t comparator)
 
  920       if (selector(*i) && comparator(*i, *p)) {
 
  925     if (p != evt.trks.end())
 
  938   template<
int reconstruction_type>
 
 
bool has_shower_positionfit(const Trk &track)
Test whether given track has shower position fit in history.
bool has_muon_energy(const Trk &track)
Test whether given track has muon energy fit in history.
const Trk & get_electron(const Evt &evt)
Get first electron from the event tracklist.
double getToT(const T &tot, const JCalibration &cal)
Get calibrated time-over-threshold of hit.
Exception for accessing an index in a collection that is outside of its range.
bool is_hadron(const Trk &track)
Test whether given track is a hadron.
bool from_electron(const Hit &hit)
Test whether given hit was produced by an electron.
JAxis3D getAxis(const Trk &track)
Get axis.
bool has_tau(const Evt &evt)
Test whether given event has a tau.
bool has_muon_fit(const Trk &track)
Test whether given track has default muon fit in history.
const Trk & get_tau(const Evt &evt)
Get first tau from the event tracklist.
bool is_photon(const Trk &track)
Test whether given track is a photon or neutral pion.
bool is_neutron(const Trk &track)
Test whether given track is a (anti-)neutron.
static const int AASHOWER_RECONSTRUCTION_TYPE
AAshower reconstruction type for AAnet.
const JModule & getModule(const JObjectID &id) const
Get module parameters.
JHitL0 getHit(const Hit &hit, const JPMTRouter &router)
Get transformation.
bool has_muon_gandalf(const Trk &track)
Test whether given track has muon gandalf fit in history.
bool is_tau(const Trk &track)
Test whether given track is a (anti-)tau.
bool is_proton(const Trk &track)
Test whether given track is a (anti-)proton.
JDirection3D getDirection(const Trk &track)
Get direction.
Direct light from delta-rays.
Data structure for direction in three dimensions.
double getNPE(const Hit &hit)
Get true charge of hit.
JTrack3E getTrack(const Trk &track)
Get track.
bool has_reconstructed_aashower(const Evt &evt)
Test whether given event has a track with aashower reconstruction.
JTransformation3D getTransformation(const Trk &track)
Get transformation.
Router for direct addressing of PMT data in detector data structure.
bool from_muon(const Hit &hit)
Test whether given hit was produced by a muon.
bool operator()(const Trk &track) const
bool is_pion(const Trk &track)
Test whether given track is a charged pion.
bool is_muon(const Trk &track)
Test whether given track is a (anti-)muon.
Scattered light from muon.
Direct light from primary shower.
Start of shower fit applications.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
bool has_shower_prefit(const Trk &track)
Test whether given track has shower prefit in history.
has_history(const int type, const JRange< int > range)
Constructor.
const int type
reconstruction type
bool has_aashower_fit(const Trk &track)
Test whether given track has default shower fit in history.
const JPMT & getPMT(const int index) const
Get PMT.
int count_taus(const Evt &evt)
Count the number of taus in a given event.
const JRange< int > range
range of application types
const Trk & get_best_reconstructed_track(const Evt &evt, const JRange< int > range=JRange< int >())
Get best reconstructed track.
bool has_electron(const Evt &evt)
Test whether given event has an electron.
bool from_hadron(const Hit &hit)
Test whether given hit was produced by a hadronic shower.
Data structure for position in three dimensions.
const Trk & get_neutrino(const Evt &evt)
Get incoming neutrino.
const Trk & get_best_reconstructed_shower(const Evt &evt)
Get best reconstructed shower.
const Trk & get_best_reconstructed_muon(const Evt &evt)
Get best reconstructed muon.
bool has_neutrino(const Evt &evt)
Test whether given event has an incoming neutrino.
Scattered light from delta-rays.
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Auxiliary class to test whether given track has specified history.
double getTime(const Hit &hit)
Get true time of hit.
bool from_tau(const Hit &hit)
Test whether given hit was produced by a tau.
static const int JPP_RECONSTRUCTION_TYPE
Jpp reconstruction type for AAnet.
bool has_reconstructed_track(const Evt &evt, const JRange< int > range=JRange< int >())
Test whether given event has a track according selection.
bool has_shower_completefit(const Trk &track)
Test whether given track has shower complete fit in history.
const Trk & get_best_reconstructed_aashower(const Evt &evt)
Get best reconstructed aashower.
JHitType_t
Enumeration of hit types based on km3 codes.
bool has_reconstructed_shower(const Evt &evt)
Test whether given event has a track with shower reconstruction.
End of muon fit applications.
bool operator()(const Trk &first, const Trk &second) const
The default comparison is based on:
Extensions to AAnet data format.
Trk get_hadronic_cascade(const Evt &evt)
Auxiliary function to get average direction and total energy of a hadronic cascade.
Router for direct addressing of module data in detector data structure.
int count_electrons(const Evt &evt)
Count the number of electrons in a given event.
JVertex3D getVertex(const Trk &track)
Get vertex.
bool has_particleID(const Trk &track, const int type)
Test whether given track corresponds to given particle type.
bool has_muon_start(const Trk &track)
Test whether given track has muon start fit in history.
bool has_history(const JFit &fit, const int type)
Test whether given fit has specified history.
bool has_shower_fit(const Trk &track)
Test whether given track has default shower fit in history.
bool has_reconstructed_muon(const Evt &evt)
Test whether given event has a track with muon reconstruction.
bool is_neutrino(const Trk &track)
Test whether given track is a neutrino.
Data structure for L0 hit.
const Trk & get_muon(const Evt &evt)
Get first muon from the event tracklist.
int count_muons(const Evt &evt)
Count the number of muons in a given event.
bool is_electron(const Trk &track)
Test whether given track is a (anti-)electron.
bool has_muon_prefit(const Trk &track)
Test whether given track has muon prefit in history.
Direct light from Bremsstrahlung.
int count_hadrons(const Evt &evt)
Count the number of hadrons in a given event (not including neutral pions)
void add_time_offset(Evt &evt, const double tOff)
Add time offset to mc event; according to current definition, the absolute time of the event is defin...
Start of muon fit applications.
Scattered light from primary shower.
bool has_muon_simplex(const Trk &track)
Test whether given track has muon simplex fit in history.
Scattered light from Bremsstrahlung.
End of shower fit applications.
JTimeRange getTimeRange(const Evt &event, const JTimeRange &T_ns)
Get time range (i.e.
const JPMT & getPMT(const JPMTAddress &address) const
Get PMT.
bool has_muon(const Evt &evt)
Test whether given event has a muon.
JPosition3D getPosition(const Trk &track)
Get position.
Reconstruction type dependent comparison of track quality.
bool is_noise(const Hit &hit)
Verify hit origin.