1 #ifndef __JSIRENE__JSIRENETOOLKIT__
2 #define __JSIRENE__JSIRENETOOLKIT__
77 ns.resize(npe.size());
78 vs.resize(npe.size());
85 for (
size_t i = 1; i != npe.size(); ++i) {
87 vs[i] =
vs[i-1] + npe[i];
90 for (
int i = N; i != 0; --i) {
92 const double x = gRandom->Rndm() * NPE;
94 if (
x < *
vs.rbegin()) {
101 for (
size_t i = 0; i != npe.size(); ++i) {
102 ns[i] = gRandom->Poisson(npe[i]);
120 inline size_t operator()(
const size_t npe)
const
122 static const size_t NPE = 20;
126 const size_t n = (size_t) (NPE * log10((
double) npe / (
double) NPE));
266 double getE(
const double z)
const
268 if (!this->empty()) {
272 if (p != this->end() && p != this->begin()) {
276 return p->getE() - (z - p->getZ()) *
gWater.
getA();
294 const double precision = 1.0e-2;
296 if (!this->empty()) {
300 if (p == this->end()) {
304 if (p == this->begin()) {
313 pos = p->getPosition();
317 pos -= p->getPosition();
319 const double u = (pos.
getZ() > precision ? (z - p->getZ()) / pos.
getZ() : 0.0);
322 p->getY() +
u * pos.
getY());
385 if (__E > Ethreshold)
386 return (__E - Ethreshold) /
a;
442 __x += this->getDX() * ds;
443 __y += this->getDY() * ds;
444 __z += this->getDZ() * ds;
461 __x += this->getDX() * ds;
462 __y += this->getDY() * ds;
463 __z += this->getDZ() * ds;
465 __E = geane(__E, ds);
Numbering scheme for PDF types.
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
Data structure for vector in two dimensions.
Data structure for position in three dimensions.
Data structure for vector in three dimensions.
double getY() const
Get y position.
double getZ() const
Get z position.
double getX() const
Get x position.
Data structure for normalised vector in positive z-direction.
JVersor3Z & add(const JVersor3Z &value)
Addition operator.
virtual double getA() const override
Get energy loss constant.
Interface for muon energy loss.
Extensions to Evt data format.
JHitType_t
Enumeration of hit types based on km3 codes.
@ HIT_TYPE_UNKNOWN
Unknown source.
@ HIT_TYPE_DELTARAYS_DIRECT
Direct light from delta-rays.
@ HIT_TYPE_MUON_DIRECT
Direct light from muon.
@ HIT_TYPE_DELTARAYS_SCATTERED
Scattered light from delta-rays.
@ HIT_TYPE_MUON_SCATTERED
Scattered light from muon.
@ HIT_TYPE_SHOWER_DIRECT
Direct light from primary shower.
@ HIT_TYPE_BREMSSTRAHLUNG_SCATTERED
Scattered light from Bremsstrahlung.
@ HIT_TYPE_SHOWER_SCATTERED
Scattered light from primary shower.
@ HIT_TYPE_BREMSSTRAHLUNG_DIRECT
Direct light from Bremsstrahlung.
JComparator< JResult_t T::*, JComparison::lt > make_comparator(JResult_t T::*member)
Helper method to create comparator between values of data member.
Auxiliary methods for light properties of deep-sea water.
static const double MASS_MUON
muon mass [GeV]
static const JGeaneWater gWater
Function object for energy loss of muon in sea water.
double getSinThetaC()
Get average sine of Cherenkov angle of water corresponding to group velocity.
@ SCATTERED_LIGHT_FROM_EMSHOWER
scattered light from EM shower
@ SCATTERED_LIGHT_FROM_DELTARAYS
scattered light from delta-rays
@ SCATTERED_LIGHT_FROM_MUON
scattered light from muon
@ DIRECT_LIGHT_FROM_EMSHOWER
direct light from EM shower
@ DIRECT_LIGHT_FROM_DELTARAYS
direct light from delta-rays
@ DIRECT_LIGHT_FROM_MUON
direct light from muon
const double getSpeedOfLight()
Get speed of light.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
range_type getRange(TAxis *pAxis)
Get range of given axis.
JHitType_t getHitType(const JPDFType_t pdf, const bool shower=false)
Get hit type corresponding to given PDF type.
const struct JSIRENE::@64 getNumberOfPhotoElectrons
Auxiliary data structure for determination of number of photo-electrons.
Point along muon trajectory.
double getE() const
Get muon energy.
JPoint(const double z, const double t, const double E)
Constructor.
JPoint()
Default constructor.
double getEs() const
Get shower energy.
JVector2D getPosition(const double z) const
Get muon position at given position along trajectory.
JTrack(const JPoint &point)
Constructor.
double getE(const double z) const
Get muon energy at given position along trajectory.
Vertex of energy loss of muon.
double getRange(const JGeane &geane) const
Get range of muon using given energy loss function.
JVertex & step(const double a, const double ds)
Step using given ionisation energy loss.
double getRange() const
Get visible range of muon using default ionisation energy loss.
JVertex & step(const double ds)
Step using default ionisation energy loss.
double getRange(double a) const
Get visible range of muon using given ionisation energy loss.
void applyEloss(const JVersor3Z &Ts, const double Es)
Apply shower energy loss.
JVertex & step(const JGeane &geane, const double ds)
Step using given energy loss function.
JVertex(const double z, const double t, const double E)
Constructor.
JVertex()
Default constructor.