Fit function.
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) {
210 top[hit.getModuleID()].insert(hit.getPMTAddress());
216 double getZ()
const {
return z; }
217 double getP()
const {
return p; }
225 for (JDetector::const_iterator module =
detector.begin(); module !=
detector.end(); ++module) {
233 pos.transform(R, tz.getPosition());
237 const double z = pos.getZ() - pos.getX() /
getTanThetaC();
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) {
267 pos.transform(R, tz.getPosition());
271 const double z = pos.getZ() - pos.getX() /
getTanThetaC();
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());
Data structure for PMT geometry, calibration and status.
Data structure for fit of straight line paralel to z-axis.
void transform(const JAxis3D &axis)
Transform axis to reference frame of given axis.
Data structure for position in three dimensions.
JPosition3D & rotate(const JRotation3D &R)
Rotate.
const JClass_t & getReference() const
Get reference to object.
bool hasSummaryFrame(const JDAQModuleIdentifier &module) const
Has summary frame.
const JDAQSummaryFrame & getSummaryFrame() const
Get default summary frame.
Data storage class for rate measurements of all PMTs in one module.
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
double getNPE(const Hit &hit)
Get true charge of hit.
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.
double getTanThetaC()
Get average tangent of Cherenkov angle of water corresponding to group velocity.
const double getSpeedOfLight()
Get speed of light.
JPosition3D getPosition(const JFit &fit)
Get position.
JDirection3D getDirection(const JFit &fit)
Get direction.
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.
static const int PMT_DISABLE
KM3NeT Data Definitions v3.4.0-8-ge14cb17 https://git.km3net.de/common/km3net-dataformat.
Template specialisation of class JModel to match hit with muon trajectory along z-axis.
const JRateL1_t & getMultiplesRates() const
Get multiples rate.
int Nmax2
maximal number for twofold observations
double Pmin1
minimal probability single observation
double Pmin2
minimal probability for twofold observations
Auxiliary class for start or end point evaluation.
Auxiliary class to set-up Hit.