90 for (
size_t i = 0; i !=
module.size(); ++i) {
105 return (M == 0 ? 1.0 : 0.0);
124 typedef JTriggeredFileScanner_t::multi_pointer_type multi_pointer_type;
128 JTriggeredFileScanner_t inputFile;
141 JParser<> zap(
"Program to test JMuonStart.");
143 zap[
'f'] =
make_field(inputFile,
"input file (output of JXXXMuonReconstruction.sh)");
148 zap[
'B'] =
make_field(rates_Hz) = KM3NET::getK40Rates();
154 catch(
const exception& error) {
155 FATAL(error.what() << endl);
199 while (inputFile.hasNext()) {
201 STATUS(
"event: " << setw(10) << inputFile.getCounter() <<
'\r');
DEBUG(endl);
203 multi_pointer_type ps = inputFile.next();
216 if (muon == event->mc_trks.end() || track->E > muon->E) {
222 if (muon == event->mc_trks.end()) {
226 if (muon->len == 0.0) {
227 muon->len =
gWater(muon->E);
233 JRange_t za(JRange_t::DEFAULT_RANGE());
234 JRange_t zb(JRange_t::DEFAULT_RANGE());
235 JRange_t zd(JRange_t::DEFAULT_RANGE());
252 buildL0(*tev, moduleRouter,
true, back_inserter(dataL0));
259 JEvt::const_iterator track = evt->begin();
274 for (buffer_type::const_iterator i = dataL0.begin(); i != dataL0.end(); ++i) {
281 top[hit.getModuleID()].insert(hit.getPMTAddress());
287 double getZ()
const {
return z; }
288 double getP()
const {
return p; }
296 for (JDetector::const_iterator module =
detector.begin(); module !=
detector.end(); ++module) {
311 data.push_back({ z, p });
320 vector<JHit_t>::const_iterator track_start = start.
find(data. begin(), data. end());
321 vector<JHit_t>::const_reverse_iterator track_end = start.
find(data.rbegin(), data.rend());
323 if (track_start == data. end()) { track_start = data. begin(); }
324 if (track_end == data.rend()) { track_end = data.rbegin(); }
326 zd =
JRange_t(track_start->getZ(), track_end->getZ());
KM3NeT DAQ constants, bit handling, etc.
Data structure for detector geometry and calibration.
Basic data structure for L0 hit.
Dynamic ROOT object management.
General purpose messaging.
#define DEBUG(A)
Message macros.
Direct access to module in detector data structure.
Direct access to PMT in detector data structure.
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
I/O formatting auxiliaries.
Auxiliary method to locate start and end point of muon trajectory.
ROOT TTree parameter settings of various packages.
Synchronously read DAQ events and Monte Carlo events (and optionally other events).
Properties of KM3NeT PMT and deep-sea water.
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.
Router for direct addressing of PMT data in detector data structure.
Data structure for fit of straight line paralel to z-axis.
double getZ(const JPosition3D &pos) const
Get point of emission of Cherenkov light along muon path.
JAxis3D & rotate(const JRotation3D &R)
Rotate axis.
Data structure for position in three dimensions.
void transform(const JRotation3D &R, const JVector3D &pos)
Transform position.
JPosition3D & rotate(const JRotation3D &R)
Rotate.
const JPosition3D & getPosition() const
Get position.
JTime & add(const JTime &value)
Addition operator.
double getZ() const
Get z position.
double getX() const
Get x position.
int getID() const
Get identifier.
Utility class to parse command line options.
Auxiliary class to manage set of compatible ROOT objects (e.g. histograms) using unique keys.
void Write(TDirectory &out, const bool wm=false)
Write objects to file.
File router for fast addressing of summary data.
void update(const JDAQHeader &header)
Update router.
bool hasSummaryFrame(const JDAQModuleIdentifier &module) const
Has summary frame.
const JDAQSummaryFrame & getSummaryFrame(const JDAQModuleIdentifier &module) const
Get summary frame.
Data structure for L0 hit.
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
int main(int argc, char **argv)
static const int JSTART_LENGTH_METRES
distance between projected positions on the track of optical modules for which the response does not ...
JDirection3D getDirection(const Vec &dir)
Get direction.
JTrack3E getTrack(const Trk &track)
Get track.
JPosition3D getPosition(const Vec &pos)
Get position.
bool is_muon(const Trk &track)
Test whether given track is a (anti-)muon.
Vec getOffset(const JHead &header)
Get offset.
JAbstractHistogram< double > JHistogram_t
Type definition for scan along axis.
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
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.
static const JGeaneWater gWater
Function object for energy loss of muon in sea water.
double getTanThetaC()
Get average tangent of Cherenkov angle of water corresponding to group velocity.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
std::vector< JHitW0 > buffer_type
hits
bool qualitySorter(const JFit &first, const JFit &second)
Comparison of fit results.
Head getHeader(const JMultipleFileScanner_t &file_list)
Get Monte Carlo header.
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.6.0 https://git.km3net.de/common/km3net-dataformat.
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
Type definition of range.
bool has(const int bit) const
Test PMT status.
Auxiliary class to match data points with given model.
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
Auxiliary class for K40 rates.
const JRateL1_t & getMultiplesRates() const
Get multiples rate.
Data structure for fit parameters.
double roadWidth_m
road width [m]
size_t numberOfPrefits
number of prefits
int Nmax2
maximal number for twofold observations
double Pmin1
minimal probability single observation
double TMin_ns
minimal time w.r.t. Cherenkov hypothesis [ns]
double Pmin2
minimal probability for twofold observations
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.
Auxiliary class for defining the range of iterations of objects.
const JLimit & getLimit() const
Get limit.
static counter_type max()
Get maximum counter value.
Auxiliary class to synchronously read DAQ events and Monte Carlo events (and optionally other events)...
The Vec class is a straightforward 3-d vector, which also works in pyroot.