Jpp  master_rocky-37-gf0c5bc59d
the software that should make you happy
Public Member Functions | Public Attributes | List of all members
JSUPERNOVA::JCoincidenceSN Class Reference

Auxiliary class to store reduced information of a coincidence on an optical module This class allows storing the observables associated with searches for low-energy neutrinos from Core-Collapse supernovae: More...

#include <JSupernova.hh>

Public Member Functions

void clear ()
 
 JCoincidenceSN (double t, int m, int dom, int vetoIndex=-1, double ctheta=-2, double rnorm=-1, double deltaT=-1, double total_ToT=-1, double timeslice_time=-1)
 Constructor: More...
 
bool operator() (const vector< JHitR0 > &hits, const JDetector &det)
 Compute single-DOM observables |R|, cos(theta), total ToT, and Delta(t) and set the corresponding class attributes. More...
 
int getMultiplicity () const
 
int getModule () const
 
double getTime () const
 
bool operator< (const JCoincidenceSN &rhs) const
 

Public Attributes

double time
 
double timeslice_time
 
int moduleID
 
int vetoIndex
 
int multiplicity
 
double mean_dir_ctheta = -2
 
double mean_dir_norm = -1
 
double deltaT = -1
 
double total_ToT = -1
 

Detailed Description

Auxiliary class to store reduced information of a coincidence on an optical module This class allows storing the observables associated with searches for low-energy neutrinos from Core-Collapse supernovae:

Definition at line 52 of file JSupernova.hh.

Constructor & Destructor Documentation

◆ JCoincidenceSN()

JSUPERNOVA::JCoincidenceSN::JCoincidenceSN ( double  t,
int  m,
int  dom,
int  vetoIndex = -1,
double  ctheta = -2,
double  rnorm = -1,
double  deltaT = -1,
double  total_ToT = -1,
double  timeslice_time = -1 
)
inline

Constructor:

Parameters
tEvent timing within a timeslice
mNumber of hits within 10ns
domID of the module
vetoIndexMuon veto index: 0 if pass all vetoes, 1 if pass only trigger veto, 2 if pass only correlation veto, 3 if fails all vetoes
cthetaMean z position of hit cluster on DOM
rnormHit concentration |R|
deltaTAverage time spread of hit cluster
total_ToTTotal ToT in DOM
timeslice_timeAbsolute time of the timeslice

Definition at line 88 of file JSupernova.hh.

Member Function Documentation

◆ clear()

void JSUPERNOVA::JCoincidenceSN::clear ( )
inline

Definition at line 66 of file JSupernova.hh.

66  {
67  this->vetoIndex = 0;
68  this->multiplicity = 0;
69  this->mean_dir_ctheta = -2;
70  this->mean_dir_norm = -1;
71  this->total_ToT = -1;
72  this->deltaT = -1;
73  }

◆ operator()()

bool JSUPERNOVA::JCoincidenceSN::operator() ( const vector< JHitR0 > &  hits,
const JDetector det 
)
inline

Compute single-DOM observables |R|, cos(theta), total ToT, and Delta(t) and set the corresponding class attributes.

Parameters
hitsHit vector from timeslice
detSingle-DOM detx file used to simulate CCSN signal

Definition at line 98 of file JSupernova.hh.

98  {
99  if (hits.size() == 0) return 1;
100  JVector3D mean_pmt_dir;
101  double first_hit_time = 0;
102  this->total_ToT = 0;
103  this->multiplicity = 0;
104  this->deltaT = 0;
105  int hitcount=0;
106  for(auto &hit: hits){
107  this->multiplicity++;
108  this->total_ToT += hit.getToT();
109  if (hitcount > 0) {
110  this->deltaT += hit.getT() - first_hit_time;
111  }
112  else first_hit_time = hit.getT();
113  int channel_id = hit.getPMT();
114  JPMTAddress pmt_address(JModuleRouter(det).getAddress(101),channel_id);
115  auto pmt = det.getPMT(pmt_address).getDirection();
116  mean_pmt_dir += pmt.getDirection();
117  hitcount++;
118  }
119  if (this->multiplicity >= 2) {
120  this->mean_dir_norm = mean_pmt_dir.getLength()/this->multiplicity;
121  this->mean_dir_ctheta = mean_pmt_dir.getZ()/this->multiplicity;
122  this->deltaT /= (this->multiplicity-1);
123  }
124  return 0;
125  }
const JPMT & getPMT(const JPMTAddress &address) const
Get PMT parameters.
Definition: JDetector.hh:348
Router for direct addressing of module data in detector data structure.
Address of PMT in detector data structure.
Definition: JPMTAddress.hh:35
const JDirection3D & getDirection() const
Get direction.
Data structure for vector in three dimensions.
Definition: JVector3D.hh:36
double getLength() const
Get length.
Definition: JVector3D.hh:246
double getZ() const
Get z position.
Definition: JVector3D.hh:115

◆ getMultiplicity()

int JSUPERNOVA::JCoincidenceSN::getMultiplicity ( ) const
inline

Definition at line 127 of file JSupernova.hh.

127  {
128  return multiplicity;
129  }

◆ getModule()

int JSUPERNOVA::JCoincidenceSN::getModule ( ) const
inline

Definition at line 131 of file JSupernova.hh.

131  {
132  return moduleID;
133  }

◆ getTime()

double JSUPERNOVA::JCoincidenceSN::getTime ( ) const
inline

Definition at line 135 of file JSupernova.hh.

135  {
136  return time;
137  }

◆ operator<()

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

Definition at line 139 of file JSupernova.hh.

139  {
140  return (time < rhs.time);
141  }

Member Data Documentation

◆ time

double JSUPERNOVA::JCoincidenceSN::time

Definition at line 55 of file JSupernova.hh.

◆ timeslice_time

double JSUPERNOVA::JCoincidenceSN::timeslice_time

Definition at line 56 of file JSupernova.hh.

◆ moduleID

int JSUPERNOVA::JCoincidenceSN::moduleID

Definition at line 57 of file JSupernova.hh.

◆ vetoIndex

int JSUPERNOVA::JCoincidenceSN::vetoIndex

Definition at line 58 of file JSupernova.hh.

◆ multiplicity

int JSUPERNOVA::JCoincidenceSN::multiplicity

Definition at line 60 of file JSupernova.hh.

◆ mean_dir_ctheta

double JSUPERNOVA::JCoincidenceSN::mean_dir_ctheta = -2

Definition at line 61 of file JSupernova.hh.

◆ mean_dir_norm

double JSUPERNOVA::JCoincidenceSN::mean_dir_norm = -1

Definition at line 62 of file JSupernova.hh.

◆ deltaT

double JSUPERNOVA::JCoincidenceSN::deltaT = -1

Definition at line 63 of file JSupernova.hh.

◆ total_ToT

double JSUPERNOVA::JCoincidenceSN::total_ToT = -1

Definition at line 64 of file JSupernova.hh.


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