Go to the documentation of this file. 1 #ifndef __JAANET__JAANETTOOLKIT__
2 #define __JAANET__JAANETTOOLKIT__
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));
633 cascade.
E += track->E;
634 cascade.
dir += track->dir * track->E;
635 cascade.
t = track->t;
636 cascade.
pos = track->pos;
669 template<
int reconstruction_type>
683 return first.
lik > second.
lik;
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>
static const int JMUONENERGY
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.
static const int JSHOWERPOSITIONFIT
double getToT(const T &tot, const JCalibration &cal)
Get calibrated time-over-threshold of hit.
double pure_t
photon time before pmt simultion (MC only)
unsigned int tdc
hit tdc (=time in ns)
static const int JMUONSTART
Exception for accessing an index in a collection that is outside of its range.
std::vector< Trk > mc_trks
MC: list of MC truth tracks
static const int JMUONPREFIT
static const int JMUONEND
end range of reconstruction stages
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.
int rec_type
identifyer for the overall fitting algorithm/chain/strategy
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.
int pmt_id
global PMT identifier as found in evt files
static const int JSHOWERBEGIN
begin range of reconstruction stages
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.
const JAxis3D & getAxis() const
Get axis.
double E
Energy (either MC truth or reconstructed)
JDirection3D getDirection(const Trk &track)
Get direction.
Direct light from delta-rays.
The Trk class represents a Monte Carlo (MC) particle as well as a reconstructed track/shower.
Data structure for direction in three dimensions.
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
double getNPE(const Hit &hit)
Get true charge of hit.
JTrack3E getTrack(const Trk &track)
Get track.
static const int JSHOWERCOMPLETEFIT
bool has_reconstructed_aashower(const Evt &evt)
Test whether given event has a track with aashower reconstruction.
double t
track time (when the particle is at pos )
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.
static const int JMUONBEGIN
begin range of reconstruction stages
Scattered light from muon.
Direct light from primary shower.
double a
hit amplitude (in p.e.)
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
double t
hit time (from calibration or MC truth)
bool has_shower_prefit(const Trk &track)
Test whether given track has shower prefit in history.
unsigned int tot
tot value as stored in raw data (int for pyroot)
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.
int dom_id
module identifier from the data (unique in the detector).
Vec dir
hit direction; i.e. direction of the PMT
const JCalibration & getCalibration() const
Get calibration.
const Trk & get_neutrino(const Evt &evt)
Get incoming neutrino.
static const int JMUONSIMPLEX
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.
double pure_a
amptitude before pmt simution (MC only)
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.
static const int JMUONGANDALF
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.
Data structure for PMT geometry and calibration.
JHitType_t
Enumeration of hit types based on km3 codes.
int type
MC: particle type in PDG encoding.
bool has_reconstructed_shower(const Evt &evt)
Test whether given event has a track with shower reconstruction.
static const int JSHOWEREND
end range of reconstruction stages
Vec pos
postion of the track at time t
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.
std::vector< int > rec_stages
list of identifyers of succesfull fitting stages resulting in this track
The Vec class is a straightforward 3-d vector, which also works in pyroot.
double lik
likelihood or lambda value (for aafit, lambda)
static const int JSHOWERPREFIT
Direct light from Bremsstrahlung.
Vec & normalize()
Normalise this vector.
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...
Scattered light from primary shower.
std::vector< Trk > trks
list of reconstructed tracks (can be several because of prefits,showers, etc).
bool has_muon_simplex(const Trk &track)
Test whether given track has muon simplex fit in history.
Scattered light from Bremsstrahlung.
std::vector< Hit > mc_hits
MC: list of MC truth hits.
JTimeRange getTimeRange(const Evt &event, const JTimeRange &T_ns)
Get time range (i.e.
unsigned int channel_id
PMT channel id {0,1, .., 31} local to moduke.
int type
particle type or parametrisation used for hit (mc only)
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.