92 void compile(
const double Tmax,
93 const unsigned int L1 = 2)
95 std::sort(this->begin(), this->end());
99 for (const_iterator i = this->begin(); i != this->end(); ) {
112 buffer.insert(i->getID());
114 const_iterator
j = i;
116 for (
double t1 = i->getLowerLimit(); ++
j != this->end() &&
j->getLowerLimit() - t1 < Tmax; t1 =
j->getLowerLimit()) {
117 buffer.insert(
j->getID());
120 if (buffer.size() >=
L1) {
129 this->erase(out, end());
142 const_iterator i = std::lower_bound(this->begin(), this->end(),
timerange.getLowerLimit());
144 return i != this->end() && i->overlap(
timerange);
174 JHorizon(
const double ct,
192 for (JHitL1::const_iterator i =
hit.begin(); i !=
hit.end(); ++i) {
219 JLimit_t& numberOfEvents = inputFile.getLimit();
232 JParser<> zap(
"Example program to test performance of various hit filters.");
242 zap[
'c'] =
make_field(cluster) =
'A',
'B',
'C',
'D',
'E',
'F';
248 catch(
const exception &error) {
284 for ( ; x < 30.0; x += 1.0)
287 for ( ; x < 50.0; x += 2.0)
290 for ( ; x < 100.0; x += 5.0)
293 for ( ; x < 200.0; x += 10.0)
323 const JHorizon
horizon(0.2, 2);
328 while (inputFile.hasNext()) {
335 const Evt*
event = ps;
340 const double E = neutrino.
E;
359 if (muon != event->mc_trks.end()) {
378 zmap[
pmtRouter.getParentModuleID(i->pmt_id)].push_back(*i);
385 for (JMap_t::iterator i = zmap.begin(); i != zmap.end(); ) {
387 i->second.compile(Tmax_ns, 2);
389 if (i->second.empty())
395 const int L1mc = zmap.size();
405 for (JDAQTimeslice::const_iterator i = timeslice.begin(); i != timeslice.end(); ++i) {
415 dataL1.push_back(*zbuf.begin());
422 JDataL1_t::iterator __end = dataL1.begin();
445 for (JDataL1_t::iterator i = dataL1.begin(); i != dataL1.end(); ++i)
450 for (JDataL1_t::iterator i = dataL1.begin(); i != dataL1.end(); ++i)
459 for (JDataL1_t::iterator i = dataL1.begin(); i != dataL1.end(); ++i)
465 for (JDataL1_t::iterator i = dataL1.begin(); i != dataL1.end(); ++i)
471 __end = dataL1.end();
478 JDataL1_t::iterator
__q = __end;
489 if (zmap[
hit->getModuleID()].has(
JTimeRange(t1 - 0.5*Tmax_ns, t1 + 0.5*Tmax_ns))) {
502 if (
L1mc != 0 && !
L1.empty()) {
517 for (JDataL1_t::iterator
hit = dataL1.begin();
hit != __end; ++
hit) {
518 hit->transform(R, pos);
522 for (JDataL1_t::iterator
hit = dataL1.begin();
hit != __end; ++
hit) {
528 for (JHitL1::const_iterator i =
hit->begin(); i !=
hit->end(); ++i) {
529 if (i->getDot(
gui) < dot)
530 dot = i->getDot(
gui);
533 const double w = (
hit->rbegin()->getT() -
hit->begin()->getT());
Algorithms for hit clustering and sorting.
Data structure for detector geometry and calibration.
int main(int argc, char **argv)
Basic data structure for L0 hit.
Basic data structure for L1 hit.
Match operator for Cherenkov light from muon with given direction.
Match operator for Cherenkov light from muon in any direction.
Match operator for Cherenkov light from muon in any direction.
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
Time-over-threshold (ToT) pulse from a PMT.
ROOT TTree parameter settings of various packages.
Basic data structure for time and time over threshold information of hit.
Synchronously read DAQ events and Monte Carlo events (and optionally other events).
Router for direct addressing of module data in detector data structure.
const JModule & getModule(const JObjectID &id) const
Get module parameters.
Router for direct addressing of PMT data in detector data structure.
Data structure for position in three dimensions.
JPosition3D & rotate(const JRotation3D &R)
Rotate.
Data structure for normalised vector in three dimensions.
Template definition of a multi-dimensional oscillation probability interpolation table.
Auxiliary class for a time-over-threshold pulse from a PMT.
Data structure for L1 hit.
Auxiliary class to convert DAQ hit time to/from Monte Carlo hit time.
JDirection3D getDirection(const Vec &dir)
Get direction.
bool has_neutrino(const Evt &evt)
Test whether given event has an incoming neutrino.
JPosition3D getPosition(const Vec &pos)
Get position.
bool is_muon(const Trk &track)
Test whether given track is a (anti-)muon.
bool is_noise(const Hit &hit)
Verify hit origin.
Vec getOffset(const JHead &header)
Get offset.
const Trk & get_neutrino(const Evt &evt)
Get incoming neutrino.
JTOOLS::JRange< double > JTimeRange
Type definition for time range (unit [s]).
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
double getCosThetaC()
Get average cosine of Cherenkov angle of water corresponding to group velocity.
const double getInverseSpeedOfLight()
Get inverse speed of light.
double getTanThetaC()
Get average tangent of Cherenkov angle of water corresponding to group velocity.
double getSinThetaC()
Get average sine of Cherenkov angle of water corresponding to group velocity.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Head getHeader(const JMultipleFileScanner_t &file_list)
Get Monte Carlo header.
JHitIterator_t clusterize(JHitIterator_t __begin, JHitIterator_t __end, const JMatch_t &match, const int Nmin=1)
Partition data according given binary match operator.
JHitIterator_t clusterizeWeight(JHitIterator_t __begin, JHitIterator_t __end, const JMatch_t &match)
Partition data according given binary match operator.
JMatchHelper< JHit_t > make_match(bool(*match)(const JHit_t &, const JHit_t &))
Auxiliary method to make JMatch object based on pointer to match function.
KM3NeT DAQ data structures and auxiliaries.
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
General purpose class for multiple pointers.
Auxiliary class for defining the range of iterations of objects.
static counter_type max()
Get maximum counter value.
Data structure for L2 parameters.
The Trk class represents a Monte Carlo (MC) particle as well as a reconstructed track/shower.
double E
Energy [GeV] (either MC truth or reconstructed)
The Vec class is a straightforward 3-d vector, which also works in pyroot.
Auxiliary include file for time conversion between DAQ/trigger hit and Monte Carlo hit.