#include <DTT0.h>
Public Types | |
typedef std::vector< DTT0Data > ::const_iterator | const_iterator |
Access methods to data. | |
Public Member Functions | |
const_iterator | begin () const |
int | cellT0 (int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, float &t0mean, float &t0rms, DTTimeUnits::type unit) const |
get content | |
int | cellT0 (const DTWireId &id, float &t0mean, float &t0rms, DTTimeUnits::type unit) const |
void | clear () |
reset content | |
DTT0 (const std::string &version) | |
DTT0 () | |
const_iterator | end () const |
int | get (int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, float &t0mean, float &t0rms, DTTimeUnits::type unit) const |
int | get (const DTWireId &id, float &t0mean, float &t0rms, DTTimeUnits::type unit) const |
int | set (int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, float t0mean, float t0rms, DTTimeUnits::type unit) |
int | set (const DTWireId &id, float t0mean, float t0rms, DTTimeUnits::type unit) |
int | setCellT0 (const DTWireId &id, float t0mean, float t0rms, DTTimeUnits::type unit) |
int | setCellT0 (int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, float t0mean, float t0rms, DTTimeUnits::type unit) |
void | setUnit (float unit) |
float | unit () const |
std::string & | version () |
const std::string & | version () const |
access version | |
~DTT0 () | |
Private Attributes | |
std::vector< DTT0Data > | dataList |
std::string | dataVersion |
float | nsPerCount |
Description: Class to hold drift tubes T0s ( cell by cell time offsets )
typedef std::vector<DTT0Data>::const_iterator DTT0::const_iterator |
DTT0::DTT0 | ( | ) |
Constructor
Definition at line 34 of file DTT0.cc.
: dataVersion( " " ), nsPerCount( 25.0 / 32.0 ), dataList( DTSequentialCellNumber::max() + 10 ) { }
DTT0::DTT0 | ( | const std::string & | version | ) |
Definition at line 41 of file DTT0.cc.
: dataVersion( version ), nsPerCount( 25.0 / 32.0 ), dataList( DTSequentialCellNumber::max() + 10 ) { }
DTT0::const_iterator DTT0::begin | ( | void | ) | const |
Definition at line 206 of file DTT0.cc.
References dataList.
Referenced by DTT0CalibrationNew::endJob(), and DTT0Calibration::endJob().
{ return dataList.begin(); }
int DTT0::cellT0 | ( | const DTWireId & | id, |
float & | t0mean, | ||
float & | t0rms, | ||
DTTimeUnits::type | unit | ||
) | const [inline] |
int DTT0::cellT0 | ( | int | wheelId, |
int | stationId, | ||
int | sectorId, | ||
int | slId, | ||
int | layerId, | ||
int | cellId, | ||
float & | t0mean, | ||
float & | t0rms, | ||
DTTimeUnits::type | unit | ||
) | const [inline] |
void DTT0::clear | ( | void | ) |
DTT0::const_iterator DTT0::end | ( | void | ) | const |
Definition at line 211 of file DTT0.cc.
References dataList.
Referenced by DTT0CalibrationNew::endJob(), and DTT0Calibration::endJob().
{ return dataList.end(); }
int DTT0::get | ( | int | wheelId, |
int | stationId, | ||
int | sectorId, | ||
int | slId, | ||
int | layerId, | ||
int | cellId, | ||
float & | t0mean, | ||
float & | t0rms, | ||
DTTimeUnits::type | unit | ||
) | const |
Definition at line 69 of file DTT0.cc.
References DTT0Data::channelId, data, dataList, DTSequentialCellNumber::id(), DTTimeUnits::ns, nsPerCount, DTT0Data::t0mean, and DTT0Data::t0rms.
Referenced by dtCalibration::DTT0AbsoluteReferenceCorrection::correction(), dtCalibration::DTT0WireInChamberReferenceCorrection::correction(), dtCalibration::DTT0ChamberReferenceCorrection::correction(), dtCalibration::DTT0FillDefaultFromDB::correction(), dtCalibration::DTT0FillChamberFromDB::correction(), dtCalibration::DTT0ChamberReferenceCorrection::defaultT0(), dtCalibration::DTT0AbsoluteReferenceCorrection::defaultT0(), dtCalibration::DTT0WireInChamberReferenceCorrection::defaultT0(), DTT0CalibrationNew::endJob(), DTT0Calibration::endJob(), and DTConfigPedestals::getOffset().
{ t0mean = t0rms = 0.0; int seqNum = DTSequentialCellNumber::id( wheelId, stationId, sectorId, slId, layerId, cellId ); if ( seqNum < 0 ) return seqNum; const DTT0Data& data = dataList[seqNum]; if ( data.channelId == 0 ) return -999999999; t0mean = data.t0mean; t0rms = data.t0rms; if ( unit == DTTimeUnits::ns ) { t0mean *= nsPerCount; t0rms *= nsPerCount; } return 0; }
int DTT0::get | ( | const DTWireId & | id, |
float & | t0mean, | ||
float & | t0rms, | ||
DTTimeUnits::type | unit | ||
) | const |
int DTT0::set | ( | int | wheelId, |
int | stationId, | ||
int | sectorId, | ||
int | slId, | ||
int | layerId, | ||
int | cellId, | ||
float | t0mean, | ||
float | t0rms, | ||
DTTimeUnits::type | unit | ||
) |
Definition at line 142 of file DTT0.cc.
References DTT0Data::channelId, data, dataList, DTSequentialCellNumber::id(), DTTimeUnits::ns, nsPerCount, DTT0Data::t0mean, and DTT0Data::t0rms.
Referenced by DTT0CalibrationNew::endJob(), DTT0Calibration::endJob(), DTT0Correction::endJob(), DTT0Handler::getNewObjects(), and DTFakeT0ESProducer::produce().
{ if ( unit == DTTimeUnits::ns ) { t0mean /= nsPerCount; t0rms /= nsPerCount; } int seqNum = DTSequentialCellNumber::id( wheelId, stationId, sectorId, slId, layerId, cellId ); if ( seqNum < 0 ) return seqNum; DTWireId id( wheelId, stationId, sectorId, slId, layerId, cellId ); DTT0Data& data = dataList[seqNum]; data.channelId = id.rawId(); data.t0mean = t0mean; data.t0rms = t0rms; return 0; }
int DTT0::set | ( | const DTWireId & | id, |
float | t0mean, | ||
float | t0rms, | ||
DTTimeUnits::type | unit | ||
) |
Definition at line 173 of file DTT0.cc.
References DTT0Data::channelId, data, dataList, DTSequentialCellNumber::id(), DTTimeUnits::ns, nsPerCount, relativeConstraints::station, DTT0Data::t0mean, DTT0Data::t0rms, and createXMLFile::wire.
{ if ( unit == DTTimeUnits::ns ) { t0mean /= nsPerCount; t0rms /= nsPerCount; } int seqNum = DTSequentialCellNumber::id( id.wheel(), id.station(), id.sector(), id.superLayer(), id.layer(), id.wire() ); if ( seqNum < 0 ) return seqNum; DTT0Data& data = dataList[seqNum]; data.channelId = id.rawId(); data.t0mean = t0mean; data.t0rms = t0rms; return 0; }
int DTT0::setCellT0 | ( | int | wheelId, |
int | stationId, | ||
int | sectorId, | ||
int | slId, | ||
int | layerId, | ||
int | cellId, | ||
float | t0mean, | ||
float | t0rms, | ||
DTTimeUnits::type | unit | ||
) | [inline] |
int DTT0::setCellT0 | ( | const DTWireId & | id, |
float | t0mean, | ||
float | t0rms, | ||
DTTimeUnits::type | unit | ||
) | [inline] |
void DTT0::setUnit | ( | float | unit | ) |
float DTT0::unit | ( | ) | const |
Definition at line 114 of file DTT0.cc.
References nsPerCount.
Referenced by cellT0(), get(), setCellT0(), and setUnit().
{ return nsPerCount; }
const std::string & DTT0::version | ( | ) | const |
access version
Definition at line 120 of file DTT0.cc.
References dataVersion.
{ return dataVersion; }
std::string & DTT0::version | ( | ) |
std::vector< DTT0Data > DTT0::dataList [private] |
std::string DTT0::dataVersion [private] |