Go to the documentation of this file.    1 #ifndef __JSUPERNOVA_JSUPERNOVA__ 
    2 #define __JSUPERNOVA_JSUPERNOVA__ 
   44       : time(t), multiplicity(m), moduleID(dom)
 
   60       return (time < rhs.
time);
 
   92         moduleSet.insert(hit->getModuleID());
 
  112       return timeRange(in.
getTime()) && 
 
  113         (moduleSet.find(in.
getModule()) != moduleSet.end());
 
  123     : 
public vector<JCoincidenceSN> {
 
  138       : TMax_ns(window), multiplicityThreshold(threshold)
 
  154           while (++q != in.end() && q->getT() - p->getT() <= TMax_ns ) {}
 
  158           if (M >= multiplicityThreshold)
 
  186       for (JDAQTimeslice::const_iterator frame = timeslice->begin(); frame != timeslice->end(); ++frame) {
 
  188         int moduleID = frame->getModuleID();
 
  190         JSuperFrame2D_t& buffer = JSuperFrame2D_t::demultiplex(*frame, moduleRouter.
getModule(moduleID)); 
 
  192         for (JSuperFrame2D_t::iterator i = buffer.begin(); i != buffer.end(); ++i) { i->join(match); }
 
  194         JSuperFrame1D_t& data = JSuperFrame1D_t::multiplex(buffer); data.pop_back();
 
  196         (*this)(data, moduleID);
 
  200       sort(this->begin(), this->end());
 
  246       return any_of(this->begin(), this->end(), 
JMatchVeto(in)); 
 
  265       for (JClusterSN::const_iterator p = this->begin(); p != this->end(); p++) {
 
  266         out.insert(p->getModule());
 
  282       for (JClusterSN::const_iterator p = this->begin(); p != this->end(); p++) {
 
  283         if (p->getMultiplicity() >= multiplicityThreshold) {
 
  284           out.insert(p->getModule());
 
  302     virtual bool operator() (
const JClusterSN&     in) = 0;
 
  324       bool out = any_of(in.begin(), in.end(), *
this);
 
  345       numberOfModules(
n), multiplicityThreshold(m)
 
  354       return (modules.size() <= 1);
 
  377       return any_of(in.begin(), in.end(), *
this);
 
  390     double TMaxCluster_ms = 1000.0; 
 
  406       TMaxCluster_ms(TMax_ms)
 
  428         cluster.push_back(*p);
 
  432         while(q != in.end() && (q->getTime() <= (p->getTime() + TMaxCluster_ms))) {
 
  433           cluster.push_back(*q);
 
  439         this->push_back(cluster);      
 
  455       const int nBenchmarks = 3;
 
  459       bench[0] = count_if(this->begin(), this->end(), 
JSNFilterM(A, 0));
 
  460       bench[1] = count_if(this->begin(), this->end(), 
JSNFilterM(A, 1));
 
  461       bench[2] = count_if(this->begin(), this->end(), 
JSNFilterMV(A, veto));
 
  479       for (JTriggerSN::const_iterator p = this->begin(); p != this->end(); p++) {
 
  482           triggeredModules.insert((*p)[0].
getModule());
 
  487       return triggeredModules;
 
  510       for (JTriggerSN::const_iterator p = this->begin(); p != this->end(); p++) {
 
  515         for (JClusterSN::const_iterator q = p->begin(); q != p->end(); q++) {
 
  555       : DETID(d), activeModules(am), RUNNR(
r), frame(f), trigger(tr), time(tm)
 
  559       out << summary.
DETID         << 
" ";
 
  561       out << summary.
RUNNR         << 
" ";
 
  562       out << summary.
frame         << 
" ";
 
  563       out << summary.
time          << 
" ";
 
  612       os << 
"=== SUPERNOVA TRIGGER STATISTICS ==" << endl;
 
  613       os << 
"=> livetime [s] = " << 
livetime << endl;
 
  614       os << 
"Level" << 
'\t' << 
"Rate (error)" << endl;
 
  617         for (
unsigned i = 0; i < this->size(); i++) {
 
  619           double count = (*this)[i];
 
  621           double error = 100 * (sqrt(count) / count);
 
  625             os << scientific << setprecision(2) << rate << 
"Hz "; 
 
  626             os << fixed      << setprecision(0) << 
"(" << setw(2) << error << 
"%)";
 
  649         for (
unsigned i = 0; i < this->size(); i++) {
 
  651           double count = (*this)[i];
 
  653           double error = (sqrt(count) / count);
 
  658             os << setprecision(2);
 
 
SN filter based on multiplicity selection optional suppression of multi-module coincidences.
 
JMatchVeto(const JCoincidenceSN &in)
Default constructor.
 
JVeto(const JDAQEvent &event, const JDAQHitRouter &hitRouter)
Default constructor.
 
Auxiliary class to set-up Hit.
 
SN filter based on veto window.
 
Auxiliary class to apply the supernova trigger to SN data.
 
void setLiveTime(const double lt)
 
const_iterator< T > begin() const
Get begin of data.
 
Select clusters without correlated coincidences.
 
Data structure for UTC time.
 
SN trigger statistics, the information is stored in the form of a count as a function of the trigger ...
 
const JModule & getModule(const JObjectID &id) const
Get module parameters.
 
bool operator<(const JCoincidenceSN &rhs) const
 
string toSummaryFile()
put statistics into printable form outputs trigger level - rate - error
 
const JModule & getModule(const JDetector &detector, const JModuleLocation &location)
find module with a given string and floor number
 
JSNFilterNM(const int n, const int m)
 
JDAQUTCExtended getTimesliceStart() const
Get start of timeslice.
 
1-dimensional frame with time calibrated data from one optical module.
 
Auxiliary class to store reduced information of a coincidence on an optical module.
 
Auxiliary class to manage a set of vetoes.
 
int getFrameIndex() const
Get frame index.
 
friend std::istream & operator>>(std::istream &in, JSummarySN &summary)
 
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
 
JSNFilterMV(JRange< int > &R, JVetoSet &S)
 
string toString()
put statistics into printable form outputs trigger level - rate - error
 
int multiplicityThreshold
 
JDataSN(double window, int threshold=4)
Default constructor Configures the trigger with a time window and the pretrigger threshold.
 
const_iterator< T > end() const
Get end of data.
 
double getLength()
Get length of veto time range.
 
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
 
void setVeto(JVetoSet &vt)
 
void fill(TH1D *out, const JSNFilter &F)
Get modules according to a filter criterion JModuleSet getModules(const JSNFilter& F) { JModuleSet ou...
 
JSummarySN(int d, int am, int r, int f, JDAQUTCExtended tm, int tr)
 
JModuleSet getModules(JRange< int > A=JRange< int >(6, 10))
Get triggered modules after track veto.
 
friend std::ostream & operator<<(std::ostream &out, const JSummarySN &summary)
 
const JPMT & getPMT(const JDAQKeyHit &hit) const
Get PMT parameters.
 
bool operator<(const JTriggerSN &rhs) const
< operator
 
bool operator>(const JTriggerSN &rhs) const
operator used by (reverse) std:priority_queue, in absence of this operator the container will behave ...
 
JModuleSet getModules() const
 
double getTime(const Hit &hit)
Get true time of hit.
 
Auxiliary class-operator to match a JVeto with a JCoincidenceSN object Provides an operator to test i...
 
Router for direct addressing of module data in detector data structure.
 
Auxiliary class to manage a cluster of coincidences.
 
Interface for SN filter operator.
 
SN trigger summary information.
 
JTriggerSNStats(const int nModules)
default constructor
 
JTriggerSN(JRange< int > tRange, double TMax_ms)
Default constructor.
 
Auxiliary class to define a veto time window on a set of optical modules.
 
int getMultiplicity() const
 
KM3NeT DAQ data structures and auxiliaries.
 
vector< int > benchmark(JRange< int > A=JRange< int >(6, 10))
Benchmark different trigger steps.
 
Normalisation of MUPAGE events.
 
JCoincidenceSN(double t, int m, int dom)
 
2-dimensional frame with time calibrated data from one optical module.
 
JSNFilterM(JRange< int > R, int m=0)
 
Auxiliary class to build the supernova trigger dataset.
 
JModuleSet getModules(int multiplicityThreshold) const
 
int multiplicityThreshold
 
Simple wrapper around JModuleRouter class for direct addressing of PMT data in detector data structur...