/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Member Functions | Static Public Member Functions | Private Attributes
DayaBay::CalibReadoutPmtChannel Class Reference

Calibrated Readout TDC/ADC data for one channel in the PMT electronics. More...

#include <CalibReadoutPmtChannel.h>

Collaboration diagram for DayaBay::CalibReadoutPmtChannel:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 CalibReadoutPmtChannel (const DayaBay::DetectorSensor &sensorId, DayaBay::CalibReadoutPmtCrate *calibReadout)
 standard constructor
 CalibReadoutPmtChannel ()
 Default Constructor.
virtual ~CalibReadoutPmtChannel ()
 Default Destructor.
virtual std::ostream & fillStream (std::ostream &s) const
 Fill the ASCII output stream.
unsigned int size () const
 Return size of time vector(should be the same as charge vector)
double charge (unsigned int index) const
 Return charge with a given index.
double time (unsigned int index) const
 Return time with a given index.
int maxChargeIndex () const
 Return the max charge index for this channel.
double maxCharge () const
 Return max charge for this channel.
double sumCharge () const
 Return sum of charge for this channel.
int earliestTimeIndex (double earlytime=-1000000, double latetime=1000000) const
 Return the index of earliest time in a given range; returns -1 if no hits found.
double earliestTime (double earlytime=-1000000, double latetime=1000000) const
 Return earliest time in a given range; returns 0 if no hits are found.
double earliestCharge (double earlytime=-1000000, double latetime=1000000) const
 Return the earliest ADC value in a given range; returns 0 if no hits are found.
double properCharge (double earlytime, double latetime) const
 Return the charge in a certain time range.
const
DayaBay::CalibReadoutPmtCrate
calibReadout () const
 Retrieve const Reference to full calibrated readout which contains this data.
void setCalibReadout (DayaBay::CalibReadoutPmtCrate *value)
 Update Reference to full calibrated readout which contains this data.
const DayaBay::DetectorSensorpmtSensorId () const
 Retrieve const Detector Sensor ID.
void setPmtSensorId (const DayaBay::DetectorSensor &value)
 Update Detector Sensor ID.
const std::vector< double > & charge () const
 Retrieve const Vector of charges (PE)
void setCharge (const std::vector< double > &value)
 Update Vector of charges (PE)
const std::vector< double > & time () const
 Retrieve const Vector of times (ns)
void setTime (const std::vector< double > &value)
 Update Vector of times (ns)

Static Public Member Functions

static void * operator new (size_t size)
 operator new
static void * operator new (size_t size, void *pObj)
 placement operator new it is needed by libstdc++ 3.2.3 (e.g.
static void operator delete (void *p)
 operator delete
static void operator delete (void *p, void *pObj)
 placement operator delete not sure if really needed, but it does not harm

Private Attributes

DayaBay::CalibReadoutPmtCratem_calibReadout
 Reference to full calibrated readout which contains this data.
DayaBay::DetectorSensor m_pmtSensorId
 Detector Sensor ID.
std::vector< double > m_charge
 Vector of charges (PE)
std::vector< double > m_time
 Vector of times (ns)

Detailed Description

Calibrated Readout TDC/ADC data for one channel in the PMT electronics.

Author:
dandwyer@caltech.edu created Thu Dec 5 17:49:32 2013

Definition at line 43 of file CalibReadoutPmtChannel.h.


Constructor & Destructor Documentation

DayaBay::CalibReadoutPmtChannel::CalibReadoutPmtChannel ( const DayaBay::DetectorSensor sensorId,
DayaBay::CalibReadoutPmtCrate calibReadout 
) [inline]

standard constructor

Definition at line 188 of file CalibReadoutPmtChannel.h.

{

          setPmtSensorId(sensorId);
          setCalibReadout(calibReadout);
        
}
DayaBay::CalibReadoutPmtChannel::CalibReadoutPmtChannel ( ) [inline]

Default Constructor.

Definition at line 52 of file CalibReadoutPmtChannel.h.

virtual DayaBay::CalibReadoutPmtChannel::~CalibReadoutPmtChannel ( ) [inline, virtual]

Default Destructor.

Definition at line 58 of file CalibReadoutPmtChannel.h.

{}

Member Function Documentation

std::ostream & DayaBay::CalibReadoutPmtChannel::fillStream ( std::ostream &  s) const [inline, virtual]

Fill the ASCII output stream.

Definition at line 197 of file CalibReadoutPmtChannel.h.

{
  s << "{ " << "calibReadout :  " << m_calibReadout << std::endl
            << "pmtSensorId :   " << m_pmtSensorId << std::endl
            << "charge :        " << m_charge << std::endl
            << "time :  " << m_time << std::endl << " }";
  return s;
}
unsigned int DayaBay::CalibReadoutPmtChannel::size ( ) const [inline]

Return size of time vector(should be the same as charge vector)

Definition at line 247 of file CalibReadoutPmtChannel.h.

{

    return m_time.size();
  
}
double DayaBay::CalibReadoutPmtChannel::charge ( unsigned int  index) const [inline]

Return charge with a given index.

Definition at line 254 of file CalibReadoutPmtChannel.h.

{

    return index >= m_charge.size() ? 0 : m_charge[index];
  
}
double DayaBay::CalibReadoutPmtChannel::time ( unsigned int  index) const [inline]

Return time with a given index.

Definition at line 261 of file CalibReadoutPmtChannel.h.

{

    return index >= m_time.size() ? 0 : m_time[index];
  
}
int DayaBay::CalibReadoutPmtChannel::maxChargeIndex ( ) const [inline]

Return the max charge index for this channel.

Definition at line 268 of file CalibReadoutPmtChannel.h.

{

          if( m_charge.empty() ) return 0;
    double maxCharge = 0;
          int maxChargeIndex = 0;
    for(unsigned i=0; i<m_charge.size(); i++) {
      if( m_charge[i] > maxCharge ) {
        maxCharge = m_charge[i];
        maxChargeIndex = i;
      }
    }
          return maxChargeIndex;
        
}
double DayaBay::CalibReadoutPmtChannel::maxCharge ( ) const [inline]

Return max charge for this channel.

Definition at line 284 of file CalibReadoutPmtChannel.h.

{

          if( m_charge.empty() ) return 0;
          return m_charge[maxChargeIndex()];
        
}
double DayaBay::CalibReadoutPmtChannel::sumCharge ( ) const [inline]

Return sum of charge for this channel.

Definition at line 292 of file CalibReadoutPmtChannel.h.

{

          if( m_charge.empty() ) return 0;
          double sumCharge = 0;
    for(unsigned i=0; i<m_charge.size(); i++) {
      sumCharge += m_charge[i];
    }
          return sumCharge;
        
}
int DayaBay::CalibReadoutPmtChannel::earliestTimeIndex ( double  earlytime = -1000000,
double  latetime = 1000000 
) const [inline]

Return the index of earliest time in a given range; returns -1 if no hits found.

Definition at line 304 of file CalibReadoutPmtChannel.h.

{
    
    
          if( m_time.empty() ) return -1;
          double earliestTime = 1e9;
          int earliestTimeIndex = -1;
          for(unsigned int i=0; i<m_time.size(); i++) {
          if( m_time[i]<earliestTime &&  m_time[i]<latetime && m_time[i]>earlytime ) {
          earliestTime = m_time[i];
          earliestTimeIndex = i;
          }
         }
  
         return earliestTimeIndex;
        
         
}
double DayaBay::CalibReadoutPmtChannel::earliestTime ( double  earlytime = -1000000,
double  latetime = 1000000 
) const [inline]

Return earliest time in a given range; returns 0 if no hits are found.

Definition at line 324 of file CalibReadoutPmtChannel.h.

{

          
          if( m_time.empty() ) return 0;
          int index=earliestTimeIndex(earlytime,latetime);
          if(index < 0) return 0;
          else return m_time[index];
          
        
}
double DayaBay::CalibReadoutPmtChannel::earliestCharge ( double  earlytime = -1000000,
double  latetime = 1000000 
) const [inline]

Return the earliest ADC value in a given range; returns 0 if no hits are found.

Definition at line 337 of file CalibReadoutPmtChannel.h.

{


         if( m_charge.empty() ) return 0;
         int index=earliestTimeIndex(earlytime,latetime);
         if(index < 0) return 0;
         return m_charge[index];

        
}
double DayaBay::CalibReadoutPmtChannel::properCharge ( double  earlytime,
double  latetime 
) const [inline]

Return the charge in a certain time range.

Definition at line 350 of file CalibReadoutPmtChannel.h.

{

          double pcharge=0;
          for(int i=0;i < m_time.size();i++){
            if(m_time[i] > earlytime && m_time[i] < latetime)
              pcharge+=m_charge[i];
          }
          return pcharge;
        
}
const DayaBay::CalibReadoutPmtCrate * DayaBay::CalibReadoutPmtChannel::calibReadout ( ) const [inline]

Retrieve const Reference to full calibrated readout which contains this data.

Definition at line 207 of file CalibReadoutPmtChannel.h.

{
  return m_calibReadout;
}
void DayaBay::CalibReadoutPmtChannel::setCalibReadout ( DayaBay::CalibReadoutPmtCrate value) [inline]

Update Reference to full calibrated readout which contains this data.

Definition at line 212 of file CalibReadoutPmtChannel.h.

{
  m_calibReadout = value;
}
const DayaBay::DetectorSensor & DayaBay::CalibReadoutPmtChannel::pmtSensorId ( ) const [inline]

Retrieve const Detector Sensor ID.

Definition at line 217 of file CalibReadoutPmtChannel.h.

{
  return m_pmtSensorId;
}
void DayaBay::CalibReadoutPmtChannel::setPmtSensorId ( const DayaBay::DetectorSensor value) [inline]

Update Detector Sensor ID.

Definition at line 222 of file CalibReadoutPmtChannel.h.

{
  m_pmtSensorId = value;
}
const std::vector< double > & DayaBay::CalibReadoutPmtChannel::charge ( ) const [inline]

Retrieve const Vector of charges (PE)

Definition at line 227 of file CalibReadoutPmtChannel.h.

{
  return m_charge;
}
void DayaBay::CalibReadoutPmtChannel::setCharge ( const std::vector< double > &  value) [inline]

Update Vector of charges (PE)

Definition at line 232 of file CalibReadoutPmtChannel.h.

{
  m_charge = value;
}
const std::vector< double > & DayaBay::CalibReadoutPmtChannel::time ( ) const [inline]

Retrieve const Vector of times (ns)

Definition at line 237 of file CalibReadoutPmtChannel.h.

{
  return m_time;
}
void DayaBay::CalibReadoutPmtChannel::setTime ( const std::vector< double > &  value) [inline]

Update Vector of times (ns)

Definition at line 242 of file CalibReadoutPmtChannel.h.

{
  m_time = value;
}
static void* DayaBay::CalibReadoutPmtChannel::operator new ( size_t  size) [inline, static]

operator new

Definition at line 132 of file CalibReadoutPmtChannel.h.

    {
      return ( sizeof(CalibReadoutPmtChannel) == size ? 
               boost::singleton_pool<CalibReadoutPmtChannel, sizeof(CalibReadoutPmtChannel)>::malloc() :
               ::operator new(size) );
    }
static void* DayaBay::CalibReadoutPmtChannel::operator new ( size_t  size,
void *  pObj 
) [inline, static]

placement operator new it is needed by libstdc++ 3.2.3 (e.g.

in std::vector) it is not needed in libstdc++ >= 3.4

Definition at line 142 of file CalibReadoutPmtChannel.h.

static void DayaBay::CalibReadoutPmtChannel::operator delete ( void *  p) [inline, static]

operator delete

Definition at line 148 of file CalibReadoutPmtChannel.h.

    {
      boost::singleton_pool<CalibReadoutPmtChannel, sizeof(CalibReadoutPmtChannel)>::is_from(p) ?
      boost::singleton_pool<CalibReadoutPmtChannel, sizeof(CalibReadoutPmtChannel)>::free(p) :
      ::operator delete(p);
    }
static void DayaBay::CalibReadoutPmtChannel::operator delete ( void *  p,
void *  pObj 
) [inline, static]

placement operator delete not sure if really needed, but it does not harm

Definition at line 157 of file CalibReadoutPmtChannel.h.

    {
      ::operator delete (p, pObj);
    }

Member Data Documentation

Reference to full calibrated readout which contains this data.

Definition at line 166 of file CalibReadoutPmtChannel.h.

Detector Sensor ID.

Definition at line 167 of file CalibReadoutPmtChannel.h.

std::vector<double> DayaBay::CalibReadoutPmtChannel::m_charge [private]

Vector of charges (PE)

Definition at line 168 of file CalibReadoutPmtChannel.h.

std::vector<double> DayaBay::CalibReadoutPmtChannel::m_time [private]

Vector of times (ns)

Definition at line 169 of file CalibReadoutPmtChannel.h.


The documentation for this class was generated from the following file:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 10:00:42 for CalibReadoutEvent by doxygen 1.7.4