Jpp  17.0.0
the software that should make you happy
 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 (double TMax_ns)
 Default constructor. More...
 
void operator() (const JDataSN &in)
 Builds trigger by clustering pretrigger data. More...
 
JModuleSet getModules (JRange< int > A=JRange< int >(6, 10))
 Get triggered modules after track veto. More...
 
JModuleSet getModules (const JSNFilter &F)
 Get triggered modules according to given filter. More...
 
void fill (TH1D *out, const JSNFilter &F)
 Fill histogram with multiplicity spectrum resulting from given filter. More...
 
vector< double > getMultiplicities (const JSNFilter &F)
 
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_ns = 1000.0
 

Detailed Description

Auxiliary class to apply the supernova trigger to SN data.

Definition at line 391 of file JSupernova.hh.

Constructor & Destructor Documentation

JSUPERNOVA::JTriggerSN::JTriggerSN ( double  TMax_ns)
inline

Default constructor.

Parameters
TMax_nstime width for coincidence clustering (track / afterpulse)

Definition at line 409 of file JSupernova.hh.

409  :
410  TMaxCluster_ns(TMax_ns)
411  {};

Member Function Documentation

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

Builds trigger by clustering pretrigger data.

Parameters
inpretrigger SN data

Definition at line 423 of file JSupernova.hh.

423  {
424 
425  frameIndex = in.frameIndex;
426  timeUTC = in.timeUTC;
427 
428  for (vector<JCoincidenceSN>::const_iterator p = in.begin(); p != in.end(); ) {
429 
430  JClusterSN cluster;
431 
432  cluster.push_back(*p);
433 
435 
436  while(q != in.end() && (q->getTime() <= (p->getTime() + TMaxCluster_ns))) {
437  cluster.push_back(*q);
438  ++q;
439  }
440 
441  p = q;
442 
443  this->push_back(cluster);
444 
445  }
446  }
JDAQUTCExtended timeUTC
Definition: JSupernova.hh:402
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
Definition: JCanberra.sh:46
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 454 of file JSupernova.hh.

454  {
455 
456  JModuleSet triggeredModules;
457 
458  JSNFilterM F(A, 1);
459 
460  for (JTriggerSN::const_iterator p = this->begin(); p != this->end(); p++) {
461 
462  if ( F(*p) ) {
463 
464  // only clusters with one module pass the selection JSNFilterM(A, 1)
465  triggeredModules.insert((*p)[0].getModule());
466 
467  }
468 
469  }
470 
471  return triggeredModules;
472 
473  }
then awk F
set< int > JModuleSet
Definition: JSupernova.hh:42
const JModule & getModule(const JDetector &detector, const JModuleLocation &location)
find module with a given string and floor number
JModuleSet JSUPERNOVA::JTriggerSN::getModules ( const JSNFilter F)
inline

Get triggered modules according to given filter.

Definition at line 479 of file JSupernova.hh.

479  {
480 
481  JModuleSet out;
482 
483  for (JTriggerSN::const_iterator p = this->begin(); p != this->end(); p++) {
484  if ( F(*p) ) {
485  out.insert(p->getPeak().getModule());
486  }
487  }
488  return out;
489  }
then awk F
set< int > JModuleSet
Definition: JSupernova.hh:42
void JSUPERNOVA::JTriggerSN::fill ( TH1D *  out,
const JSNFilter F 
)
inline

Fill histogram with multiplicity spectrum resulting from given filter.

Definition at line 494 of file JSupernova.hh.

494  {
495  for (JTriggerSN::const_iterator p = this->begin(); p != this->end(); p++) {
496  if (F(*p)) {
497  out->Fill( p->getPeak().getMultiplicity() );
498  }
499  }
500  }
then awk F
vector<double> JSUPERNOVA::JTriggerSN::getMultiplicities ( const JSNFilter F)
inline

Definition at line 502 of file JSupernova.hh.

502  {
503  vector<double> out;
504 
505  for (JTriggerSN::const_iterator p = this->begin(); p != this->end(); p++) {
506  if (F(*p)) {
507  out.push_back( p->getPeak().getMultiplicity() );
508  }
509  }
510  return out;
511  }
then awk F
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 520 of file JSupernova.hh.

520  {
521  return (frameIndex > rhs.frameIndex);
522  }
bool JSUPERNOVA::JTriggerSN::operator< ( const JTriggerSN rhs) const
inline

< operator

Definition at line 527 of file JSupernova.hh.

527  {
528  return (frameIndex < rhs.frameIndex);
529  }

Member Data Documentation

double JSUPERNOVA::JTriggerSN::TMaxCluster_ns = 1000.0
private

Definition at line 395 of file JSupernova.hh.

int JSUPERNOVA::JTriggerSN::frameIndex

Definition at line 401 of file JSupernova.hh.

JDAQUTCExtended JSUPERNOVA::JTriggerSN::timeUTC

Definition at line 402 of file JSupernova.hh.


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