Hall-D Software
alpha
|
#include <DSCHit_factory.h>
Public Member Functions | |
DSCHit_factory () | |
~DSCHit_factory () | |
DSCHit * | FindMatch (vector< DSCHit * > &schits, int sector, double T) |
const double | GetConstant (const vector< double > &the_table, const int in_sector) const |
const double | GetConstant (const vector< double > &the_table, const DSCDigiHit *the_digihit) const |
const double | GetConstant (const vector< double > &the_table, const DSCHit *the_hit) const |
Public Attributes | |
double | a_scale |
double | t_scale |
double | t_base |
double | t_tdc_base |
vector< double > | a_gains |
vector< double > | a_pedestals |
vector< double > | adc_time_offsets |
vector< double > | tdc_time_offsets |
vector< vector< double > > | timewalk_parameters |
double | DELTA_T_ADC_TDC_MAX |
double | HIT_TIME_WINDOW |
double | ADC_THRESHOLD |
double | USE_TIMEWALK_CORRECTION |
int | MAX_SECTORS |
Private Member Functions | |
jerror_t | init (void) |
Called once at program start. 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... | |
Private Attributes | |
bool | CHECK_FADC_ERRORS |
bool | REQUIRE_ADC_TDC_MATCH |
Definition at line 19 of file DSCHit_factory.h.
|
inline |
Definition at line 21 of file DSCHit_factory.h.
|
inline |
Definition at line 22 of file DSCHit_factory.h.
|
private |
Called everytime a new run number is detected.
Load geometry - just need the number of sectors
Read in calibration constants
Definition at line 82 of file DSCHit_factory.cc.
References a_pedestals, adc_time_offsets, dapp, DApplication::GetDGeometry(), DGeometry::GetStartCounterGeom(), t_base, t_scale, t_tdc_base, and tdc_time_offsets.
|
private |
Called everytime run number changes, provided brun has been called.
Definition at line 376 of file DSCHit_factory.cc.
|
private |
Called every event.
Generate DSCHit object for each DSCDigiHit 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 169 of file DSCHit_factory.cc.
References A0, a_pedestals, adc_time_offsets, DSCHit::dE, DSCHit_fadc_cmp(), DSCHit_tdc_cmp(), DSCHit::has_fADC, DSCHit::has_TDC, if(), DSCDigiHit::nsamples_integral, DSCDigiHit::nsamples_pedestal, DSCDigiHit::pedestal, pedestal, DSCHit::pulse_height, DSCDigiHit::pulse_integral, DSCDigiHit::pulse_peak, DSCDigiHit::pulse_time, DSCDigiHit::QF, DSCHit::sector, DSCDigiHit::sector, DSCTDCDigiHit::sector, sprintf(), str, DSCHit::t, t_base, DSCHit::t_fADC, t_scale, DSCHit::t_TDC, t_tdc_base, and tdc_time_offsets.
Definition at line 343 of file DSCHit_factory.cc.
References DSCHit::sector, DSCHit::t, and DSCHit::t_fADC.
|
private |
Called after last event of last event source has been processed.
Definition at line 384 of file DSCHit_factory.cc.
const double DSCHit_factory::GetConstant | ( | const vector< double > & | the_table, |
const int | in_sector | ||
) | const |
Definition at line 394 of file DSCHit_factory.cc.
const double DSCHit_factory::GetConstant | ( | const vector< double > & | the_table, |
const DSCDigiHit * | the_digihit | ||
) | const |
Definition at line 410 of file DSCHit_factory.cc.
References DSCDigiHit::sector, sprintf(), and str.
const double DSCHit_factory::GetConstant | ( | const vector< double > & | the_table, |
const DSCHit * | the_hit | ||
) | const |
Definition at line 427 of file DSCHit_factory.cc.
References DSCHit::sector, sprintf(), and str.
|
private |
Called once at program start.
set the base conversion scales
Definition at line 39 of file DSCHit_factory.cc.
References t_base, t_scale, and t_tdc_base.
vector<double> DSCHit_factory::a_gains |
Definition at line 31 of file DSCHit_factory.h.
vector<double> DSCHit_factory::a_pedestals |
Definition at line 32 of file DSCHit_factory.h.
double DSCHit_factory::a_scale |
Definition at line 22 of file DSCHit_factory.h.
double DSCHit_factory::ADC_THRESHOLD |
Definition at line 42 of file DSCHit_factory.h.
vector<double> DSCHit_factory::adc_time_offsets |
Definition at line 33 of file DSCHit_factory.h.
|
private |
Definition at line 65 of file DSCHit_factory.h.
double DSCHit_factory::DELTA_T_ADC_TDC_MAX |
Definition at line 40 of file DSCHit_factory.h.
double DSCHit_factory::HIT_TIME_WINDOW |
Definition at line 41 of file DSCHit_factory.h.
int DSCHit_factory::MAX_SECTORS |
Definition at line 44 of file DSCHit_factory.h.
|
private |
Definition at line 66 of file DSCHit_factory.h.
double DSCHit_factory::t_base |
Definition at line 27 of file DSCHit_factory.h.
double DSCHit_factory::t_scale |
Definition at line 26 of file DSCHit_factory.h.
double DSCHit_factory::t_tdc_base |
Definition at line 28 of file DSCHit_factory.h.
vector<double> DSCHit_factory::tdc_time_offsets |
Definition at line 34 of file DSCHit_factory.h.
vector<vector<double> > DSCHit_factory::timewalk_parameters |
Definition at line 35 of file DSCHit_factory.h.
double DSCHit_factory::USE_TIMEWALK_CORRECTION |
Definition at line 43 of file DSCHit_factory.h.