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 (double TMax_ns)
 Default constructor. More...
 
void setVeto (JVetoSet &vt)
 
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
 
JVetoSet veto
 

Detailed Description

Auxiliary class to apply the supernova trigger to SN data.

Definition at line 411 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 429 of file JSupernova.hh.

429  :
430  TMaxCluster_ns(TMax_ns)
431  {};

Member Function Documentation

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

Definition at line 433 of file JSupernova.hh.

433  {
434  veto = vt;
435  }
void JSUPERNOVA::JTriggerSN::operator() ( const JDataSN in)
inline

Builds trigger by clustering pretrigger data.

Parameters
inpretrigger SN data

Definition at line 443 of file JSupernova.hh.

443  {
444 
445  frameIndex = in.frameIndex;
446  timeUTC = in.timeUTC;
447 
448  for (vector<JCoincidenceSN>::const_iterator p = in.begin(); p != in.end(); ) {
449 
450  JClusterSN cluster;
451 
452  cluster.push_back(*p);
453 
455 
456  while(q != in.end() && (q->getTime() <= (p->getTime() + TMaxCluster_ns))) {
457  cluster.push_back(*q);
458  ++q;
459  }
460 
461  p = q;
462 
463  this->push_back(cluster);
464 
465  }
466  }
JDAQUTCExtended timeUTC
Definition: JSupernova.hh:422
esac print_variable DETECTOR INPUT_FILE OUTPUT_FILE CDF for TYPE in
Definition: JSirene.sh:45
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 474 of file JSupernova.hh.

474  {
475 
476  JModuleSet triggeredModules;
477 
478  JSNFilterM F(A, 1);
479 
480  for (JTriggerSN::const_iterator p = this->begin(); p != this->end(); p++) {
481 
482  if ( F(*p) ) {
483 
484  // only clusters with one module pass the selection JSNFilterM(A, 1)
485  triggeredModules.insert((*p)[0].getModule());
486 
487  }
488 
489  }
490 
491  return triggeredModules;
492 
493  }
then check_input_file $DETECTOR $INPUT_FILE for OPTION in A B C D E F
Definition: JFilter.sh:47
set< int > JModuleSet
Definition: JSupernova.hh:47
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 499 of file JSupernova.hh.

499  {
500 
501  JModuleSet out;
502 
503  for (JTriggerSN::const_iterator p = this->begin(); p != this->end(); p++) {
504  if ( F(*p) ) {
505  out.insert(p->getPeak().getModule());
506  }
507  }
508  return out;
509  }
then check_input_file $DETECTOR $INPUT_FILE for OPTION in A B C D E F
Definition: JFilter.sh:47
set< int > JModuleSet
Definition: JSupernova.hh:47
void JSUPERNOVA::JTriggerSN::fill ( TH1D *  out,
const JSNFilter F 
)
inline

Fill histogram with multiplicity spectrum resulting from given filter.

Definition at line 514 of file JSupernova.hh.

514  {
515  for (JTriggerSN::const_iterator p = this->begin(); p != this->end(); p++) {
516  if (F(*p)) {
517  out->Fill( p->getPeak().getMultiplicity() );
518  }
519  }
520  }
then check_input_file $DETECTOR $INPUT_FILE for OPTION in A B C D E F
Definition: JFilter.sh:47
vector<double> JSUPERNOVA::JTriggerSN::getMultiplicities ( const JSNFilter F)
inline

Definition at line 522 of file JSupernova.hh.

522  {
523  vector<double> out;
524 
525  for (JTriggerSN::const_iterator p = this->begin(); p != this->end(); p++) {
526  if (F(*p)) {
527  out.push_back( p->getPeak().getMultiplicity() );
528  }
529  }
530  return out;
531  }
then check_input_file $DETECTOR $INPUT_FILE for OPTION in A B C D E F
Definition: JFilter.sh:47
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 540 of file JSupernova.hh.

540  {
541  return (frameIndex > rhs.frameIndex);
542  }
bool JSUPERNOVA::JTriggerSN::operator< ( const JTriggerSN rhs) const
inline

< operator

Definition at line 547 of file JSupernova.hh.

547  {
548  return (frameIndex < rhs.frameIndex);
549  }

Member Data Documentation

double JSUPERNOVA::JTriggerSN::TMaxCluster_ns = 1000.0
private

Definition at line 415 of file JSupernova.hh.

JVetoSet JSUPERNOVA::JTriggerSN::veto
private

Definition at line 417 of file JSupernova.hh.

int JSUPERNOVA::JTriggerSN::frameIndex

Definition at line 421 of file JSupernova.hh.

JDAQUTCExtended JSUPERNOVA::JTriggerSN::timeUTC

Definition at line 422 of file JSupernova.hh.


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