1#ifndef __JAANET__JMUONBUNDLECATEGORY__
2#define __JAANET__JMUONBUNDLECATEGORY__
60 const int absType = abs(type);
61 const string typeStr = to_string(absType);
65 (typeStr.size() == 10 && typeStr.substr(0,2) ==
"10") ||
73 ((
int)(absType / 1000)) % 10 != 0) );
81 public JClonable<JEvtCategory, JMuonBundleCategory>
105 this->primaryType = primaryType;
130 this->primaryType = primaryType;
171 Mrange.getLowerLimit() >= 0 &&
189 return (this->primaryType == cat.getPrimaryType() &&
191 this->coszRange.overlap (cat.
coszRange));
224 int multiplicity = 0;
227 for (vector<Trk>::const_iterator i = event.mc_trks.cbegin(); i != event.mc_trks.cend(); ++i) {
233 const double R = getCross<JVector3D>(dp, pi - pp).
getLength();
235 if (R > maxR) { maxR = R; }
256#define RETURN_IF_DIFFERENT_RANGE(A, B) \
257 if (A != B) { return (A.getLowerLimit() == B.getLowerLimit() ? \
258 A.getUpperLimit() < B.getUpperLimit() : \
259 A.getLowerLimit() < B.getLowerLimit() ); }
261 if (this->primaryType != category.getPrimaryType()) {
262 return this->primaryType < category.getPrimaryType();
267 if (p == NULL) {
return false; }
275#undef RETURN_IF_DIFFERENT_RANGE
321 template<
class JMuonBundleCategory_t>
#define RETURN_IF_DIFFERENT_RANGE(A, B)
#define gmake_property(A)
macros to convert (template) parameter to JPropertiesElement object
Auxiliary class to define a range between two values.
JAANET::cut_primary cut_primary
Utility class to parse parameter values.
Data structure for direction in three dimensions.
Data structure for position in three dimensions.
const JPosition3D & getPosition() const
Get position.
JVersor3D getDirection(const JVector3D &pos) const
Get photon direction of Cherenkov light on PMT.
double getLength() const
Get length.
Simple data structure to support I/O of equations (see class JLANG::JEquation).
Extensions to Evt data format.
static const JRange< int > DEFAULT_BUNDLE_MULTIPLICITY_RANGE
Default bundle multiplicity range [-].
JTrack3E getTrack(const Trk &track)
Get track.
bool is_corsika(const JHead &header)
Check for generator.
static const JRange< double > DEFAULT_BUNDLE_ENERGY_RANGE
Default bundle energy range [GeV].
static const JRange< double > DEFAULT_BUNDLE_COSINE_ZENITH_ANGLE_RANGE
Default bundle cosine zenith angle range [-].
bool is_muonbundle(const Trk &track)
Test whether given track is a (anti-)muon.
static const double DEFAULT_BUNDLE_RADIAL_EXTENT
Default bundle radial extent [m].
const Trk & get_primary(const Evt &evt)
Auxiliary function to retrieve the primary track of an event.
bool is_finalstate(const Trk &track)
Test whether given track corresponds to a final state particle.
bool is_muon(const Trk &track)
Test whether given track is a (anti-)muon.
bool is_mupage(const JHead &header)
Check for generator.
bool is_muon_bundle_primary(const int type)
Auxiliary function to check if given PDG code corresponds to a valid muon bundle primary type.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
Low-level interface for event categories.
static JEquationParameters & getEquationParameters()
Get equation parameters.
Auxiliary class for I/O of muon bundle category.
JMuonBundleCategoryHelper(JMuonBundleCategory_t &cat, const JEquationParameters &equation)
Constructor.
Class for muon bundle categories.
bool match(const JHead &header) const override final
Check whether this event category matches with the given MC header.
bool match(const Evt &event) const override final
Check whether given event matches with this event category.
JMuonBundleCategory(const int primaryType, const JRange< double > &Erange, const JRange< double > &coszRange, const JRange< int > &Mrange, const double Rmax)
Constructor.
JMuonBundleCategory(const JHead &header)
Constructor.
JRange< double > Erange
energy range [GeV]
JMuonBundleCategory(const int primaryType)
Constructor.
bool is_valid() const override final
Check if muon bundle category is valid.
JProperties getProperties(const JEquationParameters &equation=JEvtCategory::getEquationParameters()) override final
Get properties of this class.
JProperties getProperties(const JEquationParameters &equation=JEvtCategory::getEquationParameters()) const override final
Get properties of this class.
JRange< double > coszRange
cosine zenith-angle range [-]
JMuonBundleCategory()
Default constructor.
double Rmax
maximum radial extent [m]
JRange< int > Mrange
multiplicity range [-]
bool less(const JEvtCategory &category) const override final
Less-than method.
JRange_t cosT
Cosine zenith angle range
JRange_t E
Energy range [GeV].
Template class for object cloning.
The Trk class represents a Monte Carlo (MC) particle as well as a reconstructed track/shower.
static const int PDG_MUONBUNDLE
muon bundle reached the can level (mupage)