Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | Private Attributes | List of all members
JSUPERNOVA::JTriggerSN Class Reference

Auxiliary class to apply the supernova trigger to SN data. More...

#include <JSupernova.hh>

Inheritance diagram for JSUPERNOVA::JTriggerSN:
std::vector< JClusterSN >

Public Member Functions

 JTriggerSN (JRange< int > tRange, double TMax_ms)
 Default constructor. More...
 
void setVeto (JVetoSet &vt)
 
void operator() (const JDataSN &in)
 Builds trigger. More...
 
vector< int > benchmark (JRange< int > A=JRange< int >(6, 10))
 Benchmark different trigger steps. More...
 
JModuleSet getModules (JRange< int > A=JRange< int >(6, 10))
 Get triggered modules after track veto. More...
 
void fill (TH1D *out, const JSNFilter &F)
 Get modules according to a filter criterion JModuleSet getModules(const JSNFilter& F) { JModuleSet out;. More...
 
bool operator> (const JTriggerSN &rhs) const
 

operator

used by (reverse) std:priority_queue, in absence of this operator the container will behave unpredictably More...

 
bool operator< (const JTriggerSN &rhs) const
 < operator More...
 

Public Attributes

int frameIndex
 
JDAQUTCExtended timeUTC
 

Private Attributes

double TMaxCluster_ms = 1000.0
 
JVetoSet veto
 

Detailed Description

Auxiliary class to apply the supernova trigger to SN data.

Definition at line 385 of file JSupernova.hh.

Constructor & Destructor Documentation

JSUPERNOVA::JTriggerSN::JTriggerSN ( JRange< int >  tRange,
double  TMax_ms 
)
inline

Default constructor.

Parameters
tRangemultiplicity range for selection of supernova coincidences
TMax_mstime width for coincidence clustering (track / afterpulse)

Definition at line 404 of file JSupernova.hh.

404  :
405  TMaxCluster_ms(TMax_ms)
406  {};

Member Function Documentation

void JSUPERNOVA::JTriggerSN::setVeto ( JVetoSet vt)
inline

Definition at line 408 of file JSupernova.hh.

408  {
409  veto = vt;
410  }
void JSUPERNOVA::JTriggerSN::operator() ( const JDataSN in)
inline

Builds trigger.

Parameters
inpretrigger SN data

Definition at line 418 of file JSupernova.hh.

418  {
419 
420  frameIndex = in.frameIndex;
421  timeUTC = in.timeUTC;
422 
423  for (vector<JCoincidenceSN>::const_iterator p = in.begin(); p != in.end(); ) {
424 
425  JClusterSN cluster;
426 
427  cluster.push_back(*p);
428 
430 
431  while(q != in.end() && (q->getTime() <= (p->getTime() + TMaxCluster_ms))) {
432  cluster.push_back(*q);
433  ++q;
434  }
435 
436  p = q;
437 
438  this->push_back(cluster);
439 
440  }
441  }
JDAQUTCExtended timeUTC
Definition: JSupernova.hh:396
vector<int> JSUPERNOVA::JTriggerSN::benchmark ( JRange< int >  A = JRange<int>(6,10))
inline

Benchmark different trigger steps.

0: count every triggering cluster of coincidences 1: track veto based on time-correlated coincidences 2: track veto based on triggered events

Returns
vector with count as a function of trigger step

Definition at line 452 of file JSupernova.hh.

452  {
453 
454  const int nBenchmarks = 3;
455 
456  vector<int> bench(nBenchmarks, 0);
457 
458  bench[0] = count_if(this->begin(), this->end(), JSNFilterM(A, 0));
459  bench[1] = count_if(this->begin(), this->end(), JSNFilterM(A, 1));
460  bench[2] = count_if(this->begin(), this->end(), JSNFilterMV(A, veto));
461 
462  return bench;
463 
464  }
JModuleSet JSUPERNOVA::JTriggerSN::getModules ( JRange< int >  A = JRange<int>(6,10))
inline

Get triggered modules after track veto.

Returns
std::set containing triggered modules IDs

Definition at line 472 of file JSupernova.hh.

472  {
473 
474  JModuleSet triggeredModules;
475 
476  JSNFilterM F(A, 1);
477 
478  for (JTriggerSN::const_iterator p = this->begin(); p != this->end(); p++) {
479 
480  if ( F(*p) ) {
481  triggeredModules.insert((*p)[0].getModule());
482  }
483 
484  }
485 
486  return triggeredModules;
487 
488  }
set< int > JModuleSet
Definition: JSupernova.hh:29
const JModule & getModule(const JDetector &detector, const JModuleLocation &location)
find module with a given string and floor number
void JSUPERNOVA::JTriggerSN::fill ( TH1D *  out,
const JSNFilter F 
)
inline

Get modules according to a filter criterion JModuleSet getModules(const JSNFilter& F) { JModuleSet out;.

for (JTriggerSN::const_iterator p = this->begin(); p != this->end(); p++) { if (F(*p)) {

} }

} Fills histogram with multiplicity counts

Definition at line 508 of file JSupernova.hh.

508  {
509  for (JTriggerSN::const_iterator p = this->begin(); p != this->end(); p++) {
510 
511  JSNFilterNM F(2, 4);
512 
513 
514  for (JClusterSN::const_iterator q = p->begin(); q != p->end(); q++) {
515 
516  }
517  }
518  }
bool JSUPERNOVA::JTriggerSN::operator> ( const JTriggerSN rhs) const
inline

operator

used by (reverse) std:priority_queue, in absence of this operator the container will behave unpredictably

Definition at line 524 of file JSupernova.hh.

524  {
525  return (frameIndex > rhs.frameIndex);
526  }
bool JSUPERNOVA::JTriggerSN::operator< ( const JTriggerSN rhs) const
inline

< operator

Definition at line 531 of file JSupernova.hh.

531  {
532  return (frameIndex < rhs.frameIndex);
533  }

Member Data Documentation

double JSUPERNOVA::JTriggerSN::TMaxCluster_ms = 1000.0
private

Definition at line 389 of file JSupernova.hh.

JVetoSet JSUPERNOVA::JTriggerSN::veto
private

Definition at line 391 of file JSupernova.hh.

int JSUPERNOVA::JTriggerSN::frameIndex

Definition at line 395 of file JSupernova.hh.

JDAQUTCExtended JSUPERNOVA::JTriggerSN::timeUTC

Definition at line 396 of file JSupernova.hh.


The documentation for this class was generated from the following file: