1 #ifndef __JRECONSTRUCTION__JMUONSTART__
2 #define __JRECONSTRUCTION__JMUONSTART__
51 namespace JRECONSTRUCTION {}
52 namespace JPP {
using namespace JRECONSTRUCTION; }
54 namespace JRECONSTRUCTION {
83 using namespace KM3NETDAQ;
89 for (
size_t i = 0;
i != module.size(); ++
i) {
93 frame[
i].is_valid() &&
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) {
237 const double z = pos.getZ() - pos.getX() /
getTanThetaC();
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) {
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) {
281 frame[
i].is_valid() &&
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());
static const int JMUONSTART
JRegressor< JEnergy > JRegressor_t
Template definition of a data regressor of given model.
static const int JSTART_NPE_MIP_TOTAL
number of photo-electrons along the whole track from JStart.cc
int getModuleID() const
Get module identifier.
double getRate(const int tdc, const double factor=1.0) const
Get count rate.
JComparator< JResult_t T::*, JComparison::lt > make_comparator(JResult_t T::*member)
Helper method to create comparator between values of data member.
Data structure for a composite optical module.
Auxiliary method to locate start and end point of muon trajectory.
Regressor function object for fit of muon energy.
double roadWidth_m
road width [m]
Router for direct addressing of module data in detector data structure.
*fatal Wrong number of arguments esac JCookie sh typeset Z DETECTOR typeset Z SOURCE_RUN typeset Z TARGET_RUN set_variable PARAMETERS_FILE $WORKDIR parameters
Template specialisation of class JModel to match hit with muon trajectory along z-axis.
T find(T __begin, T __end) const
Get start point of muon trajectory.
JFit & add(const int type)
Add event to history.
Data structure for detector geometry and calibration.
void transform(const JRotation3D &R, const JVector3D &pos)
Transform position.
void transform(const JAxis3D &axis)
Transform axis to reference frame of given axis.
int getPMTAddress() const
Get PMT identifier.
Basic data structure for L0 hit.
Data structure for track fit results with history and optional associated values. ...
Auxiliary class to extract a subset of optical modules from a detector.
Data structure for fit parameters.
double TMax_ns
maximal time w.r.t. Cherenkov hypothesis [ns]
Auxiliary class to determine start and end position of muon trajectory.
JAxis3D & rotate(const JRotation3D &R)
Rotate axis.
JDirection3D getDirection(const Vec &dir)
Get direction.
JMuonStart(const JMuonStartParameters_t ¶meters, const JModuleRouter &router, const JSummaryRouter &summary, const std::string &pdfFile, const JK40Rates &rates_Hz, const int debug=0)
Constructor.
static const int JSTART_NPE_MIP_MISSED
number of photo-electrons missed from JStart.cc
bool has(const int bit) const
Test PMT status.
Auxiliary class for start or end point evaluation.
Data storage class for rate measurements of all PMTs in one module.
Data structure for PMT geometry, calibration and status.
static const int PMT_DISABLE
KM3NeT Data Definitions v3.3.0-2-g5cc95cf https://git.km3net.de/common/km3net-dataformat.
JPosition3D getPosition(const Vec &pos)
Get position.
Router for fast addressing of summary data in KM3NETDAQ::JDAQSummaryslice data structure as a functio...
const JPMT & getPMT(const int index) const
Get PMT.
JEvt operator()(const KM3NETDAQ::JDAQEvent &event, const JEvt &in)
Fit function.
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...
Direct access to module in detector data structure.
const JModuleRouter & router
Reduced data structure for L1 hit.
then JCookie sh JDataQuality D $DETECTOR_ID R
bool getPMTStatus(const JStatus &status)
Test status of PMT.
then usage $script< input file >[option[primary[working directory]]] nWhere option can be N
JTRIGGER::JHitL0 hit_type
const double getSpeedOfLight()
Get speed of light.
static const int JSTART_LENGTH_METRES
distance between first and last hits in metres from JStart.cc
Data structure for set of track fit results.
then fatal The output file must have the wildcard in the e g root fi eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
Data structure for L0 hit.
Auxiliary class to set-up 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.
Data structure for fit of straight line paralel to z-axis.
const JSummaryRouter & summary
Data structure for fit of energy.
double getTanThetaC()
Get average tangent of Cherenkov angle of water corresponding to group velocity.
double getNPE(const Hit &hit)
Get true charge of hit.
Data structure for position in three dimensions.
double TMin_ns
minimal time w.r.t. Cherenkov hypothesis [ns]
Data regression method for JFIT::JEnergy.
void move(const double step, const double velocity)
Move vertex along this track with given velocity.
bool getDAQStatus(const JDAQFrameStatus &frame, const JStatus &status)
Test status of DAQ.
JEvt operator()(const buffer_type &data, const JEvt &in)
Fit function.
std::vector< double > JRateL1_t
Type definition of count rate as a function of multiplicty [Hz] The multiples rate start counting at ...
JPosition3D & rotate(const JRotation3D &R)
Rotate.
std::vector< hit_type > buffer_type
Maximum likelihood estimator (M-estimators).
Auxiliary class for K40 rates.