Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DFCALHit_factory Class Reference

#include <DFCALHit_factory.h>

+ Inheritance diagram for DFCALHit_factory:

Public Types

enum  fcal_quality_state { GOOD, BAD, NOISY }
 

Public Member Functions

 DFCALHit_factory ()
 
 ~DFCALHit_factory ()
 
const double GetConstant (const fcal_digi_constants_t &the_table, const int in_row, const int in_column) const
 
const double GetConstant (const fcal_digi_constants_t &the_table, const DFCALDigiHit *the_digihit) const
 
const double GetConstant (const fcal_digi_constants_t &the_table, const DFCALHit *the_hit) const
 

Public Attributes

double a_scale
 
double t_scale
 
double t_base
 
fcal_digi_constants_t gains
 
fcal_digi_constants_t pedestals
 
fcal_digi_constants_t time_offsets
 
fcal_digi_constants_t block_qualities
 
fcal_digi_constants_t ADC_Offsets
 

Static Public Attributes

static const int FCAL_MAX_CHANNELS = 2800
 

Private Member Functions

jerror_t init (void)
 Called once at program start.2. More...
 
jerror_t brun (jana::JEventLoop *eventLoop, int32_t runnumber)
 Called everytime a new run number is detected. More...
 
jerror_t evnt (jana::JEventLoop *eventLoop, uint64_t eventnumber)
 Called every event. More...
 
jerror_t erun (void)
 Called everytime run number changes, provided brun has been called. More...
 
jerror_t fini (void)
 Called after last event of last event source has been processed. More...
 
void FillCalibTable (fcal_digi_constants_t &table, const vector< double > &raw_table, const DFCALGeometry &fcalGeom)
 

Private Attributes

bool CHECK_FADC_ERRORS
 

Detailed Description

Definition at line 22 of file DFCALHit_factory.h.

Member Enumeration Documentation

Enumerator
GOOD 
BAD 
NOISY 

Definition at line 29 of file DFCALHit_factory.h.

Constructor & Destructor Documentation

DFCALHit_factory::DFCALHit_factory ( )
inline

Definition at line 24 of file DFCALHit_factory.h.

DFCALHit_factory::~DFCALHit_factory ( )
inline

Definition at line 25 of file DFCALHit_factory.h.

Member Function Documentation

jerror_t DFCALHit_factory::brun ( jana::JEventLoop *  eventLoop,
int32_t  runnumber 
)
private

Called everytime a new run number is detected.

Read in calibration constants

Definition at line 63 of file DFCALHit_factory.cc.

References t_base, and t_scale.

jerror_t DFCALHit_factory::erun ( void  )
private

Called everytime run number changes, provided brun has been called.

Definition at line 253 of file DFCALHit_factory.cc.

jerror_t DFCALHit_factory::evnt ( jana::JEventLoop *  eventLoop,
uint64_t  eventnumber 
)
private

Called every event.

Generate DFCALHit object for each DFCALDigiHit object. This is where the first set of calibration constants is applied to convert from digitzed units into natural units.

Note that this code does NOT get called for simulated data in HDDM format. The HDDM event source will copy the precalibrated values directly into the _data vector.

Definition at line 138 of file DFCALHit_factory.cc.

References DTTabUtilities::CheckFADC250_NoErrors(), DTTabUtilities::CheckFADC250_PedestalOK(), DFCALDigiHit::column, DFCALHit::column, DFCALHit::E, DFCALHit::intOverPeak, DFCALGeometry::isBlockActive(), DFCALDigiHit::nsamples_integral, DFCALDigiHit::nsamples_pedestal, DFCALDigiHit::pedestal, pedestal, DFCALGeometry::positionOnFace(), DFCALDigiHit::pulse_integral, DFCALDigiHit::pulse_peak, DFCALDigiHit::pulse_time, DFCALDigiHit::QF, DFCALDigiHit::row, DFCALHit::row, sprintf(), str, DFCALHit::t, t_base, t_scale, DFCALHit::x, and DFCALHit::y.

void DFCALHit_factory::FillCalibTable ( fcal_digi_constants_t table,
const vector< double > &  raw_table,
const DFCALGeometry fcalGeom 
)
private
jerror_t DFCALHit_factory::fini ( void  )
private

Called after last event of last event source has been processed.

Definition at line 261 of file DFCALHit_factory.cc.

const double DFCALHit_factory::GetConstant ( const fcal_digi_constants_t the_table,
const int  in_row,
const int  in_column 
) const
const double DFCALHit_factory::GetConstant ( const fcal_digi_constants_t the_table,
const DFCALDigiHit the_digihit 
) const
const double DFCALHit_factory::GetConstant ( const fcal_digi_constants_t the_table,
const DFCALHit the_hit 
) const
jerror_t DFCALHit_factory::init ( void  )
private

Called once at program start.2.

Definition at line 25 of file DFCALHit_factory.cc.

References DFCALGeometry::kBlocksTall, DFCALGeometry::kBlocksWide, t_base, and t_scale.

Member Data Documentation

double DFCALHit_factory::a_scale

Definition at line 36 of file DFCALHit_factory.h.

fcal_digi_constants_t DFCALHit_factory::ADC_Offsets

Definition at line 45 of file DFCALHit_factory.h.

fcal_digi_constants_t DFCALHit_factory::block_qualities

Definition at line 44 of file DFCALHit_factory.h.

bool DFCALHit_factory::CHECK_FADC_ERRORS
private

Definition at line 67 of file DFCALHit_factory.h.

const int DFCALHit_factory::FCAL_MAX_CHANNELS = 2800
static

Definition at line 27 of file DFCALHit_factory.h.

fcal_digi_constants_t DFCALHit_factory::gains

Definition at line 41 of file DFCALHit_factory.h.

fcal_digi_constants_t DFCALHit_factory::pedestals

Definition at line 42 of file DFCALHit_factory.h.

double DFCALHit_factory::t_base

Definition at line 38 of file DFCALHit_factory.h.

double DFCALHit_factory::t_scale

Definition at line 37 of file DFCALHit_factory.h.

fcal_digi_constants_t DFCALHit_factory::time_offsets

Definition at line 43 of file DFCALHit_factory.h.


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