CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends
DTT0 Class Reference

#include <DTT0.h>

Public Types

typedef std::vector< DTT0Data >::const_iterator const_iterator
 Access methods to data. More...
 

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 More...
 
int cellT0 (const DTWireId &id, float &t0mean, float &t0rms, DTTimeUnits::type unit) const
 
void clear ()
 reset content More...
 
 DTT0 ()
 
 DTT0 (const std::string &version)
 
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 (int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, float t0mean, float t0rms, DTTimeUnits::type unit)
 
int setCellT0 (const DTWireId &id, float t0mean, float t0rms, DTTimeUnits::type unit)
 
void setUnit (float unit)
 
float unit () const
 
const std::string & version () const
 access version More...
 
std::string & version ()
 
 ~DTT0 ()
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

std::vector< DTT0DatadataList
 
std::string dataVersion
 
float nsPerCount
 

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 

Detailed Description

Description: Class to hold drift tubes T0s ( cell by cell time offsets )

Author
Paolo Ronchese INFN Padova

Definition at line 53 of file DTT0.h.

Member Typedef Documentation

Access methods to data.

Definition at line 140 of file DTT0.h.

Constructor & Destructor Documentation

DTT0::DTT0 ( )

Constructor

Definition at line 32 of file DTT0.cc.

32  :
33  dataVersion( " " ),
34  nsPerCount( 25.0 / 32.0 ),
36 }
std::vector< DTT0Data > dataList
Definition: DTT0.h:149
std::string dataVersion
Definition: DTT0.h:146
float nsPerCount
Definition: DTT0.h:147
DTT0::DTT0 ( const std::string &  version)

Definition at line 39 of file DTT0.cc.

39  :
41  nsPerCount( 25.0 / 32.0 ),
43 }
std::vector< DTT0Data > dataList
Definition: DTT0.h:149
std::string dataVersion
Definition: DTT0.h:146
float nsPerCount
Definition: DTT0.h:147
const std::string & version() const
access version
Definition: DTT0.cc:118
DTT0::~DTT0 ( )

Destructor

Definition at line 56 of file DTT0.cc.

56  {
57 }

Member Function Documentation

DTT0::const_iterator DTT0::begin ( void  ) const

Definition at line 204 of file DTT0.cc.

Referenced by DTT0Calibration::endJob(), and DTT0CalibrationNew::endJob().

204  {
205  return dataList.begin();
206 }
std::vector< DTT0Data > dataList
Definition: DTT0.h:149
int DTT0::cellT0 ( int  wheelId,
int  stationId,
int  sectorId,
int  slId,
int  layerId,
int  cellId,
float &  t0mean,
float &  t0rms,
DTTimeUnits::type  unit 
) const
inline

get content

Operations

Definition at line 69 of file DTT0.h.

78  { return get( wheelId, stationId, sectorId, slId, layerId, cellId,
79  t0mean, t0rms, unit ); };
float unit() const
Definition: DTT0.cc:112
int DTT0::cellT0 ( const DTWireId id,
float &  t0mean,
float &  t0rms,
DTTimeUnits::type  unit 
) const
inline

Definition at line 80 of file DTT0.h.

References hitfit::clear(), hcalTTPDigis_cfi::id, AlCaHLTBitMon_QueryRunRegistry::string, DTT0Data::t0mean, DTT0Data::t0rms, csvLumiCalc::unit, and jetIDSelector_cfi::version.

84  { return get( id, t0mean, t0rms, unit ); };
float unit() const
Definition: DTT0.cc:112
void DTT0::clear ( void  )
DTT0::const_iterator DTT0::end ( void  ) const

Definition at line 209 of file DTT0.cc.

Referenced by Types.LuminosityBlockRange::cppID(), Types.EventRange::cppID(), DTT0Calibration::endJob(), and DTT0CalibrationNew::endJob().

209  {
210  return dataList.end();
211 }
std::vector< DTT0Data > dataList
Definition: DTT0.h:149
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 67 of file DTT0.cc.

References DTT0Data::channelId, data, DTSequentialCellNumber::id(), DTTimeUnits::ns, DTT0Data::t0mean, and DTT0Data::t0rms.

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), rrapi.RRApi::columns(), util.rrapi.RRApi::columns(), dtCalibration::DTT0FillDefaultFromDB::correction(), dtCalibration::DTT0ChamberReferenceCorrection::correction(), dtCalibration::DTT0AbsoluteReferenceCorrection::correction(), dtCalibration::DTT0FillChamberFromDB::correction(), dtCalibration::DTT0FEBPathCorrection::correction(), dtCalibration::DTT0WireInChamberReferenceCorrection::correction(), rrapi.RRApi::count(), util.rrapi.RRApi::count(), rrapi.RRApi::data(), util.rrapi.RRApi::data(), dtCalibration::DTT0ChamberReferenceCorrection::defaultT0(), dtCalibration::DTT0AbsoluteReferenceCorrection::defaultT0(), dtCalibration::DTT0WireInChamberReferenceCorrection::defaultT0(), dtCalibration::DTT0FEBPathCorrection::defaultT0(), DTTTrigSyncFromDB::emulatorOffset(), DTT0Calibration::endJob(), DTT0CalibrationNew::endJob(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), DTConfigPedestals::getOffset(), betterConfigParser.BetterConfigParser::getResultingSection(), DTTTrigSyncT0Only::offset(), DTTTrigSyncFromDB::offset(), util.rrapi.RRApi::report(), rrapi.RRApi::report(), util.rrapi.RRApi::reports(), rrapi.RRApi::reports(), rrapi.RRApi::tables(), util.rrapi.RRApi::tables(), rrapi.RRApi::tags(), util.rrapi.RRApi::tags(), util.rrapi.RRApi::templates(), rrapi.RRApi::templates(), rrapi.RRApi::workspaces(), and util.rrapi.RRApi::workspaces().

75  {
76 
77  t0mean =
78  t0rms = 0.0;
79 
80  int seqNum = DTSequentialCellNumber::id( wheelId, stationId, sectorId,
81  slId, layerId, cellId );
82  if ( seqNum < 0 ) return seqNum;
83 
84  const DTT0Data& data = dataList[seqNum];
85  if ( data.channelId == 0 ) return -999999999;
86 
87  t0mean = data.t0mean;
88  t0rms = data.t0rms;
89  if ( unit == DTTimeUnits::ns ) {
90  t0mean *= nsPerCount;
91  t0rms *= nsPerCount;
92  }
93  return 0;
94 
95 }
std::vector< DTT0Data > dataList
Definition: DTT0.h:149
uint32_t channelId
Definition: DTT0.h:44
static int id(int wheel, int station, int sector, int superlayer, int layer, int cell)
float unit() const
Definition: DTT0.cc:112
float nsPerCount
Definition: DTT0.h:147
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
float t0rms
Definition: DTT0.h:46
float t0mean
Definition: DTT0.h:45
Definition: DTT0.h:37
int DTT0::get ( const DTWireId id,
float &  t0mean,
float &  t0rms,
DTTimeUnits::type  unit 
) const
template<class Archive >
void DTT0::serialize ( Archive &  ar,
const unsigned int  version 
)
private
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 140 of file DTT0.cc.

References DTT0Data::channelId, data, hcalTTPDigis_cfi::id, DTSequentialCellNumber::id(), DTTimeUnits::ns, DTT0Data::t0mean, and DTT0Data::t0rms.

Referenced by DTT0Correction::endJob(), DTT0Calibration::endJob(), DTT0CalibrationNew::endJob(), DTT0Handler::getNewObjects(), and DTFakeT0ESProducer::produce().

148  {
149 
150  if ( unit == DTTimeUnits::ns ) {
151  t0mean /= nsPerCount;
152  t0rms /= nsPerCount;
153  }
154 
155  int seqNum = DTSequentialCellNumber::id( wheelId, stationId, sectorId,
156  slId, layerId, cellId );
157  if ( seqNum < 0 ) return seqNum;
158 
159  DTWireId id( wheelId, stationId, sectorId,
160  slId, layerId, cellId );
161  DTT0Data& data = dataList[seqNum];
162  data.channelId = id.rawId();
163  data.t0mean = t0mean;
164  data.t0rms = t0rms;
165 
166  return 0;
167 
168 }
std::vector< DTT0Data > dataList
Definition: DTT0.h:149
uint32_t channelId
Definition: DTT0.h:44
static int id(int wheel, int station, int sector, int superlayer, int layer, int cell)
float unit() const
Definition: DTT0.cc:112
float nsPerCount
Definition: DTT0.h:147
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
float t0rms
Definition: DTT0.h:46
float t0mean
Definition: DTT0.h:45
Definition: DTT0.h:37
int DTT0::set ( const DTWireId id,
float  t0mean,
float  t0rms,
DTTimeUnits::type  unit 
)

Definition at line 171 of file DTT0.cc.

References DTT0Data::channelId, data, DTSequentialCellNumber::id(), DTTimeUnits::ns, relativeConstraints::station, DTT0Data::t0mean, DTT0Data::t0rms, and makeMuonMisalignmentScenario::wheel.

174  {
175 
176  if ( unit == DTTimeUnits::ns ) {
177  t0mean /= nsPerCount;
178  t0rms /= nsPerCount;
179  }
180 
181  int seqNum = DTSequentialCellNumber::id( id.wheel(),
182  id.station(),
183  id.sector(),
184  id.superLayer(),
185  id.layer(),
186  id.wire() );
187  if ( seqNum < 0 ) return seqNum;
188 
189  DTT0Data& data = dataList[seqNum];
190  data.channelId = id.rawId();
191  data.t0mean = t0mean;
192  data.t0rms = t0rms;
193 
194  return 0;
195 
196 }
std::vector< DTT0Data > dataList
Definition: DTT0.h:149
uint32_t channelId
Definition: DTT0.h:44
static int id(int wheel, int station, int sector, int superlayer, int layer, int cell)
float unit() const
Definition: DTT0.cc:112
float nsPerCount
Definition: DTT0.h:147
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
float t0rms
Definition: DTT0.h:46
float t0mean
Definition: DTT0.h:45
Definition: DTT0.h:37
int DTT0::setCellT0 ( int  wheelId,
int  stationId,
int  sectorId,
int  slId,
int  layerId,
int  cellId,
float  t0mean,
float  t0rms,
DTTimeUnits::type  unit 
)
inline

Definition at line 108 of file DTT0.h.

References DTT0Data::t0mean, DTT0Data::t0rms, and csvLumiCalc::unit.

117  { return set( wheelId, stationId, sectorId, slId, layerId, cellId,
118  t0mean, t0rms, unit ); };
float unit() const
Definition: DTT0.cc:112
int DTT0::setCellT0 ( const DTWireId id,
float  t0mean,
float  t0rms,
DTTimeUnits::type  unit 
)
inline

Definition at line 119 of file DTT0.h.

References hcalTTPDigis_cfi::id, DTT0Data::t0mean, DTT0Data::t0rms, and csvLumiCalc::unit.

123  { return set( id, t0mean, t0rms, unit ); };
float unit() const
Definition: DTT0.cc:112
void DTT0::setUnit ( float  unit)

Definition at line 199 of file DTT0.cc.

References csvLumiCalc::unit.

199  {
200  nsPerCount = unit;
201 }
float unit() const
Definition: DTT0.cc:112
float nsPerCount
Definition: DTT0.h:147
float DTT0::unit ( ) const

Definition at line 112 of file DTT0.cc.

112  {
113  return nsPerCount;
114 }
float nsPerCount
Definition: DTT0.h:147
const std::string & DTT0::version ( ) const
std::string & DTT0::version ( )

Definition at line 123 of file DTT0.cc.

Referenced by validation.Sample::datasetpattern(), and validation.Sample::filename().

123  {
124  return dataVersion;
125 }
std::string dataVersion
Definition: DTT0.h:146

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 152 of file DTT0.h.

template<typename CondSerializationT , typename Enabled >
friend struct cond::serialization::access
friend

Definition at line 152 of file DTT0.h.

Member Data Documentation

std::vector< DTT0Data > DTT0::dataList
private

Definition at line 149 of file DTT0.h.

std::string DTT0::dataVersion
private

Definition at line 146 of file DTT0.h.

float DTT0::nsPerCount
private

Definition at line 147 of file DTT0.h.