1 #ifndef __JAANET__JAANETTOOLKIT__ 
    2 #define __JAANET__JAANETTOOLKIT__ 
   37 namespace JPP { 
using namespace JAANET; }
 
   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 from_tau(const Hit &hit)
Test whether given hit was produced by a tau. 
 
Router for direct addressing of PMT data in detector data structure. 
 
JVertex3D getVertex(const Trk &track)
Get vertex. 
 
bool is_electron(const Trk &track)
Test whether given track is a (anti-)electron. 
 
int count_electrons(const Evt &evt)
Count the number of electrons in a given event. 
 
bool has_muon_prefit(const Trk &track)
Test whether given track has muon prefit in history. 
 
JHitType_t
Enumeration of hit types based on km3 codes. 
 
bool operator()(const Trk &track) const 
 
Scattered light from primary shower. 
 
bool operator()(const Trk &first, const Trk &second) const 
The default comparison is based on:number of reconstruction stages, i.e. 
 
const Trk & get_best_reconstructed_shower(const Evt &evt)
Get best reconstructed shower. 
 
bool is_proton(const Trk &track)
Test whether given track is a (anti-)proton. 
 
const Trk & get_muon(const Evt &evt)
Get first muon from the event tracklist. 
 
Data structure for direction in three dimensions. 
 
const JModule & getModule(const JObjectID &id) const 
Get module parameters. 
 
bool has_reconstructed_aashower(const Evt &evt)
Test whether given event has a track with aashower reconstruction. 
 
JTrack3E getTrack(const Trk &track)
Get track. 
 
Direct light from delta-rays. 
 
Scattered light from muon. 
 
const Trk & get_best_reconstructed_aashower(const Evt &evt)
Get best reconstructed aashower. 
 
JTransformation3D getTransformation(const Trk &track)
Get transformation. 
 
bool has_shower_positionfit(const Trk &track)
Test whether given track has shower position fit in history. 
 
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...
 
bool has_neutrino(const Evt &evt)
Test whether given event has an incoming neutrino. 
 
bool is_muon(const Trk &track)
Test whether given track is a (anti-)muon. 
 
bool has_electron(const Evt &evt)
Test whether given event has an electron. 
 
int count_muons(const Evt &evt)
Count the number of muons in a given event. 
 
Router for direct addressing of module data in detector data structure. 
 
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message. 
 
bool has_particleID(const Trk &track, const int type)
Test whether given track corresponds to given particle type. 
 
Structure to store the ToT mean and standard deviation of the hits produced by a nanobeacon in a sour...
 
Scattered light from Bremsstrahlung. 
 
const JPMT & getPMT(const JPMTAddress &address) const 
Get PMT. 
 
Reconstruction type dependent comparison of track quality. 
 
const int type
reconstruction type 
 
bool has_reconstructed_track(const Evt &evt, JTrackSelector_t selector)
Test whether given event has a track according selection. 
 
has_history(const int type, const JRange< int > range)
Constructor. 
 
Direct light from Bremsstrahlung. 
 
double getTime(const Hit &hit)
Get true time of hit. 
 
Direct light from primary shower. 
 
static const int AASHOWER_RECONSTRUCTION_TYPE
AAshower reconstruction type for AAnet. 
 
bool is_noise(const Hit &hit)
Verify hit origin. 
 
bool has_reconstructed_muon(const Evt &evt)
Test whether given event has a track with muon reconstruction. 
 
JTimeRange getTimeRange(const Evt &event)
Get time range (i.e. 
 
Basic data structure for L0 hit. 
 
bool is_neutrino(const Trk &track)
Test whether given track is a neutrino. 
 
const JRange< int > range
range of application types 
 
double getToT(const T &tot, const JCalibration &cal)
Get calibrated time-over-threshold of hit. 
 
Start of shower fit applications. 
 
bool has_muon_fit(const Trk &track)
Test whether given track has default muon fit in history. 
 
bool has_muon_start(const Trk &track)
Test whether given track has muon start fit in history. 
 
Trk get_hadronic_cascade(const Evt &evt)
Auxiliary function to get average direction and total energy of a hadronic cascade. 
 
const Trk & get_electron(const Evt &evt)
Get first electron from the event tracklist. 
 
JAxis3D getAxis(const Trk &track)
Get axis. 
 
bool has_muon_gandalf(const Trk &track)
Test whether given track has muon gandalf fit in history. 
 
Direct access to PMT in detector data structure. 
 
const Trk & get_best_reconstructed_track(const Evt &evt, JTrackSelector_t selector, JQualitySorter_t comparator)
Get best reconstructed track. 
 
const JPMT & getPMT(const int index) const 
Get PMT. 
 
bool is_photon(const Trk &track)
Test whether given track is a photon or neutral pion. 
 
bool from_hadron(const Hit &hit)
Test whether given hit was produced by a hadronic shower. 
 
Direct access to module in detector data structure. 
 
Auxiliary class to test whether given track has specified history. 
 
const Trk & get_best_reconstructed_muon(const Evt &evt)
Get best reconstructed muon. 
 
bool is_pion(const Trk &track)
Test whether given track is a charged pion. 
 
bool has_muon_simplex(const Trk &track)
Test whether given track has muon simplex fit in history. 
 
int count_taus(const Evt &evt)
Count the number of taus in a given event. 
 
End of muon fit applications. 
 
const Trk & get_tau(const Evt &evt)
Get first tau from the event tracklist. 
 
Auxiliary class to define a range between two values. 
 
bool has_muon(const Evt &evt)
Test whether given event has a muon. 
 
bool has_muon_energy(const Trk &track)
Test whether given track has muon energy fit in history. 
 
Data structure for L0 hit. 
 
Scattered light from delta-rays. 
 
bool has_reconstructed_shower(const Evt &evt)
Test whether given event has a track with shower reconstruction. 
 
Start of muon fit applications. 
 
Definition of particle types. 
 
bool has_aashower_fit(const Trk &track)
Test whether given track has default shower fit in history. 
 
End of shower fit applications. 
 
bool has_tau(const Evt &evt)
Test whether given event has a tau. 
 
JDirection3D getDirection(const Vec &v)
Get direction. 
 
double getNPE(const Hit &hit)
Get true charge of hit. 
 
Data structure for position in three dimensions. 
 
bool has_shower_completefit(const Trk &track)
Test whether given track has shower complete fit in history. 
 
bool is_neutron(const Trk &track)
Test whether given track is a (anti-)neutron. 
 
Exception for accessing an index in a collection that is outside of its range. 
 
bool has_shower_prefit(const Trk &track)
Test whether given track has shower prefit in history. 
 
const Trk & get_neutrino(const Evt &evt)
Get incoming neutrino. 
 
bool is_hadron(const Trk &track)
Test whether given track is a hadron. 
 
JHitL0 getHit(const Hit &hit)
Get transformation. 
 
bool is_tau(const Trk &track)
Test whether given track is a (anti-)tau. 
 
bool from_electron(const Hit &hit)
Test whether given hit was produced by an electron. 
 
Definition of fit applications. 
 
int count_hadrons(const Evt &evt)
Count the number of hadrons in a given event (not including neutral pions) 
 
JPosition3D getPosition(const Vec &v)
Get position. 
 
bool has_shower_fit(const Trk &track)
Test whether given track has default shower fit in history. 
 
static const int JPP_RECONSTRUCTION_TYPE
Jpp reconstruction type for AAnet. 
 
bool has_history(const JFit &fit, const int type)
Test whether given fit has specified history. 
 
bool from_muon(const Hit &hit)
Test whether given hit was produced by a muon.