Jpp
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 386 of file JSupernova.hh.

Constructor & Destructor Documentation

◆ JTriggerSN()

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 405 of file JSupernova.hh.

405  :
406  TMaxCluster_ms(TMax_ms)
407  {};

Member Function Documentation

◆ setVeto()

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

Definition at line 409 of file JSupernova.hh.

409  {
410  veto = vt;
411  }

◆ operator()()

void JSUPERNOVA::JTriggerSN::operator() ( const JDataSN in)
inline

Builds trigger.

Parameters
inpretrigger SN data

Definition at line 419 of file JSupernova.hh.

419  {
420 
421  frameIndex = in.frameIndex;
422  timeUTC = in.timeUTC;
423 
424  for (vector<JCoincidenceSN>::const_iterator p = in.begin(); p != in.end(); ) {
425 
426  JClusterSN cluster;
427 
428  cluster.push_back(*p);
429 
431 
432  while(q != in.end() && (q->getTime() <= (p->getTime() + TMaxCluster_ms))) {
433  cluster.push_back(*q);
434  ++q;
435  }
436 
437  p = q;
438 
439  this->push_back(cluster);
440 
441  }
442  }

◆ benchmark()

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 453 of file JSupernova.hh.

453  {
454 
455  const int nBenchmarks = 3;
456 
457  vector<int> bench(nBenchmarks, 0);
458 
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));
462 
463  return bench;
464 
465  }

◆ getModules()

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 473 of file JSupernova.hh.

473  {
474 
475  JModuleSet triggeredModules;
476 
477  JSNFilterM F(A, 1);
478 
479  for (JTriggerSN::const_iterator p = this->begin(); p != this->end(); p++) {
480 
481  if ( F(*p) ) {
482  triggeredModules.insert((*p)[0].getModule());
483  }
484 
485  }
486 
487  return triggeredModules;
488 
489  }

◆ fill()

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 509 of file JSupernova.hh.

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

◆ operator>()

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 525 of file JSupernova.hh.

525  {
526  return (frameIndex > rhs.frameIndex);
527  }

◆ operator<()

bool JSUPERNOVA::JTriggerSN::operator< ( const JTriggerSN rhs) const
inline

< operator

Definition at line 532 of file JSupernova.hh.

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

Member Data Documentation

◆ TMaxCluster_ms

double JSUPERNOVA::JTriggerSN::TMaxCluster_ms = 1000.0
private

Definition at line 390 of file JSupernova.hh.

◆ veto

JVetoSet JSUPERNOVA::JTriggerSN::veto
private

Definition at line 392 of file JSupernova.hh.

◆ frameIndex

int JSUPERNOVA::JTriggerSN::frameIndex

Definition at line 396 of file JSupernova.hh.

◆ timeUTC

JDAQUTCExtended JSUPERNOVA::JTriggerSN::timeUTC

Definition at line 397 of file JSupernova.hh.


The documentation for this class was generated from the following file:
JSUPERNOVA::JTriggerSN::TMaxCluster_ms
double TMaxCluster_ms
Definition: JSupernova.hh:390
getModule
const JModule & getModule(const JDetector &detector, const JModuleLocation &location)
find module with a given string and floor number
Definition: JBeaconSimulator.cc:927
std::vector
Definition: JSTDTypes.hh:12
JSUPERNOVA::JTriggerSN::timeUTC
JDAQUTCExtended timeUTC
Definition: JSupernova.hh:397
JSUPERNOVA::JModuleSet
set< int > JModuleSet
Definition: JSupernova.hh:30
JSUPERNOVA::JTriggerSN::veto
JVetoSet veto
Definition: JSupernova.hh:392
JSUPERNOVA::JTriggerSN::frameIndex
int frameIndex
Definition: JSupernova.hh:396