1 #ifndef __JRECONSTRUCTION__JMUONSTART__ 
    2 #define __JRECONSTRUCTION__JMUONSTART__ 
   89     for (
size_t i = 0; i != module.size(); ++i) {
 
  105       return (M == 0 ? 1.0 : 0.0);
 
  121     using JRegressor_t::operator();
 
  136                const std::string&            pdfFile,
 
  138                const int                     debug = 0):
 
  147       JRegressor_t::T_ns.setRange(parameters.
TMin_ns, parameters.
TMax_ns);
 
  150         roadWidth_m = this->getRmax();
 
  171       buildL0(event, router, 
true, back_inserter(dataL0));
 
  173       return (*
this)(dataL0, in);
 
  193       const JStart start(Pmin1, Pmin2, Nmax2);  
 
  195       for (JEvt::const_iterator track = in.begin(); track != in.end(); ++track) {
 
  203         for (buffer_type::const_iterator i = 
data.begin(); i != 
data.end(); ++i) {
 
  216           double getZ()
 const { 
return z; }
 
  217           double getP()
 const { 
return p; }
 
  225         for (JDetector::const_iterator module = 
detector.begin(); module != 
detector.end(); ++module) {
 
  227           if (summary.hasSummaryFrame(module->getID())) {
 
  235             if (pos.
getX() <= roadWidth_m) {
 
  239               const double p = 
getProbability(*module, frame, rates_Hz.getMultiplesRates(), JRegressor_t::T_ns.getLength(), top[module->getID()]);
 
  241               data.push_back({ z, p });
 
  248         double npe_total  = 0.0;     
 
  249         double npe_missed = 0.0;     
 
  258           if (track_start != 
data. end()) { Zmin = track_start->getZ(); }
 
  259           if (track_end   != 
data.rend()) { Zmax = track_end  ->getZ(); }
 
  263           for (JDetector::const_iterator module = 
detector.begin(); module != 
detector.end(); ++module) {
 
  269             if (pos.
getX() <= roadWidth_m) {
 
  273               if (z >= Zmin && z <= Zmax) {
 
  275                 for (
size_t i = 0; i != module->size(); ++i) {
 
  284                     JPMT pmt = module->getPMT(i);
 
  288                     const double ya = this->
getNPE(pmt, 0.0).getYA();
 
  292                     if (top[module->getID()].count(i) == 0) {
 
  310         out.rbegin()->setW(track->getW());
 
Auxiliary class to extract a subset of optical modules from a detector.
 
Data structure for detector geometry and calibration.
 
Data regression method for JFIT::JEnergy.
 
Basic data structure for L0 hit.
 
Reduced data structure for L1 hit.
 
Maximum likelihood estimator (M-estimators).
 
Direct access to module in detector data structure.
 
Auxiliary method to locate start and end point of muon trajectory.
 
Router for direct addressing of module data in detector data structure.
 
Data structure for a composite optical module.
 
const JPMT & getPMT(const int index) const
Get PMT.
 
Data structure for PMT geometry, calibration and status.
 
Data structure for fit of energy.
 
Data structure for set of track fit results.
 
Data structure for track fit results with history and optional associated values.
 
void move(const double step, const double velocity)
Move vertex along this track with given velocity.
 
JFit & add(const int type)
Add event to history.
 
Data structure for fit of straight line paralel to z-axis.
 
void transform(const JAxis3D &axis)
Transform axis to reference frame of given axis.
 
JAxis3D & rotate(const JRotation3D &R)
Rotate axis.
 
Data structure for position in three dimensions.
 
JPosition3D & rotate(const JRotation3D &R)
Rotate.
 
const JPosition3D & getPosition() const
Get position.
 
void transform(const JRotation3D &R, const JVector3D &pos)
Transform position.
 
double getZ() const
Get z position.
 
double getX() const
Get x position.
 
Auxiliary class to determine start and end position of muon trajectory.
 
const JSummaryRouter & summary
 
JRegressor< JEnergy > JRegressor_t
 
const JModuleRouter & router
 
JMuonStart(const JMuonStartParameters_t ¶meters, const JModuleRouter &router, const JSummaryRouter &summary, const std::string &pdfFile, const JK40Rates &rates_Hz, const int debug=0)
Constructor.
 
JEvt operator()(const KM3NETDAQ::JDAQEvent &event, const JEvt &in)
Fit function.
 
JEvt operator()(const buffer_type &data, const JEvt &in)
Fit function.
 
std::vector< hit_type > buffer_type
 
JTRIGGER::JHitL0 hit_type
 
Router for fast addressing of summary data in KM3NETDAQ::JDAQSummaryslice data structure as a functio...
 
Data structure for L0 hit.
 
int getModuleID() const
Get module identifier.
 
int getPMTAddress() const
Get PMT identifier.
 
Data storage class for rate measurements of all PMTs in one module.
 
double getRate(const int tdc, const double factor=1.0) const
Get count rate.
 
static const int JMUONSTART
 
static const int JSTART_NPE_MIP_TOTAL
number of photo-electrons along the whole track from JStart.cc
 
static const int JSTART_LENGTH_METRES
distance between first and last hits in metres from JStart.cc
 
static const int JSTART_NPE_MIP_MISSED
number of photo-electrons missed from JStart.cc
 
JDirection3D getDirection(const Vec &dir)
Get direction.
 
JPosition3D getPosition(const Vec &pos)
Get position.
 
double getNPE(const Hit &hit)
Get true charge of hit.
 
double getProbability(const size_t N, const size_t M, const JK40Rates &R_Hz, const double T_ns)
Get probability due to random background.
 
double getP(const double expval, bool hit)
Get Poisson probability to observe a hit or not for given expectation value for the number of hits.
 
JComparator< JResult_t T::*, JComparison::lt > make_comparator(JResult_t T::*member)
Helper method to create comparator between values of data member.
 
std::vector< double > JRateL1_t
Type definition of count rate as a function of multiplicty [Hz] The multiples rate start counting at ...
 
double getTanThetaC()
Get average tangent of Cherenkov angle of water corresponding to group velocity.
 
const double getSpeedOfLight()
Get speed of light.
 
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
 
double getProbability(const JModule &module, const JDAQSummaryFrame &frame, const JRateL1_t &R_Hz, const double T_ns, const std::multiset< int > &top)
Get probability of given response in optical module due to random background.
 
bool is_valid(const json &js)
Check validity of JSon data.
 
bool getDAQStatus(const JDAQFrameStatus &frame, const JStatus &status)
Test status of DAQ.
 
bool getPMTStatus(const JStatus &status)
Test status of PMT.
 
KM3NeT DAQ data structures and auxiliaries.
 
static const int PMT_DISABLE
KM3NeT Data Definitions v3.4.0-8-ge14cb17 https://git.km3net.de/common/km3net-dataformat.
 
bool has(const int bit) const
Test PMT status.
 
Template specialisation of class JModel to match hit with muon trajectory along z-axis.
 
Regressor function object for fit of muon energy.
 
Template definition of a data regressor of given model.
 
Auxiliary class for K40 rates.
 
Data structure for fit parameters.
 
double roadWidth_m
road width [m]
 
double TMin_ns
minimal time w.r.t. Cherenkov hypothesis [ns]
 
double TMax_ns
maximal time w.r.t. Cherenkov hypothesis [ns]
 
Auxiliary class for start or end point evaluation.
 
T find(T __begin, T __end) const
Get start point of muon trajectory.
 
Auxiliary class to set-up Hit.