CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
DTTTrigSyncT0Only Class Reference
Inheritance diagram for DTTTrigSyncT0Only:
DTTTrigBaseSync

Public Member Functions

 DTTTrigSyncT0Only (const edm::ParameterSet &config, edm::ConsumesCollector)
 Constructor. More...
 
double emulatorOffset (const DTWireId &wireId, double &tTrig, double &t0cell) const override
 
double offset (const DTLayer *layer, const DTWireId &wireId, const GlobalPoint &globPos, double &tTrig, double &wirePropCorr, double &tofCorr) const override
 
double offset (const DTWireId &wireId) const override
 
void setES (const edm::EventSetup &setup) override
 Pass the Event Setup to the algo at each event. More...
 
 ~DTTTrigSyncT0Only () override
 Destructor. More...
 
- Public Member Functions inherited from DTTTrigBaseSync
 DTTTrigBaseSync ()
 Constructor. More...
 
virtual double emulatorOffset (const DTWireId &wireId) const
 
double offset (const DTLayer *layer, const DTWireId &wireId, const GlobalPoint &globalPos) const
 
virtual ~DTTTrigBaseSync ()
 Destructor. More...
 

Private Attributes

const bool debug
 
edm::ESGetToken< DTT0, DTT0Rcdt0Token_
 
const DTT0tZeroMap
 

Detailed Description

Concrete implementation of a DTTTrigBaseSync. This plugin reads only the t0 from pulses from the DB.

Author
G. Cerminara - INFN Torino

Definition at line 25 of file DTTTrigSyncT0Only.cc.

Constructor & Destructor Documentation

◆ DTTTrigSyncT0Only()

DTTTrigSyncT0Only::DTTTrigSyncT0Only ( const edm::ParameterSet config,
edm::ConsumesCollector  cc 
)

Constructor.

Definition at line 66 of file DTTTrigSyncT0Only.cc.

67  : t0Token_(cc.esConsumes()), debug(config.getUntrackedParameter<bool>("debug")) {}
Definition: config.py:1
edm::ESGetToken< DTT0, DTT0Rcd > t0Token_

◆ ~DTTTrigSyncT0Only()

DTTTrigSyncT0Only::~DTTTrigSyncT0Only ( )
override

Destructor.

Definition at line 69 of file DTTTrigSyncT0Only.cc.

69 {}

Member Function Documentation

◆ emulatorOffset()

double DTTTrigSyncT0Only::emulatorOffset ( const DTWireId wireId,
double &  tTrig,
double &  t0cell 
) const
overridevirtual

Time (ns) to be subtracted to the digi time for emulation purposes Returns just 0 in this implementation of the plugin

Implements DTTTrigBaseSync.

Definition at line 110 of file DTTTrigSyncT0Only.cc.

References dttriganalyzer_cfi::tTrig.

110  {
111  tTrig = 0.;
112  t0cell = 0.;
113  return 0.;
114 }

◆ offset() [1/2]

double DTTTrigSyncT0Only::offset ( const DTLayer layer,
const DTWireId wireId,
const GlobalPoint globPos,
double &  tTrig,
double &  wirePropCorr,
double &  tofCorr 
) const
overridevirtual

Time (ns) to be subtracted to the digi time, Parameters are the layer and the wireId to which the digi is referred and the estimation of the 3D hit position (globPos)

Implements DTTTrigBaseSync.

Definition at line 79 of file DTTTrigSyncT0Only.cc.

References debug, and dttriganalyzer_cfi::tTrig.

84  {
85  tTrig = offset(wireId);
86  wirePropCorr = 0;
87  tofCorr = 0;
88 
89  if (debug) {
90  edm::LogPrint("[DTTTrigSyncT0Only]") << "Offset (ns): " << tTrig + wirePropCorr - tofCorr << endl
91  << " various contributions are: "
92  << endl
93  //<< " tZero (ns): " << t0 << endl
94  << " Propagation along wire delay (ns): " << wirePropCorr << endl
95  << " TOF correction (ns): " << tofCorr << endl
96  << endl;
97  }
98  //The global offset is the sum of various contributions
99  return tTrig + wirePropCorr - tofCorr;
100 }
Log< level::Warning, true > LogPrint
double offset(const DTLayer *layer, const DTWireId &wireId, const GlobalPoint &globPos, double &tTrig, double &wirePropCorr, double &tofCorr) const override

◆ offset() [2/2]

double DTTTrigSyncT0Only::offset ( const DTWireId wireId) const
overridevirtual

Time (ns) to be subtracted to the digi time. It does not take into account TOF and signal propagation along the wire

Implements DTTTrigBaseSync.

Definition at line 102 of file DTTTrigSyncT0Only.cc.

References DTT0::get(), DTTimeUnits::ns, FrontierCondition_GT_autoExpress_cfi::t0, and tZeroMap.

102  {
103  float t0 = 0;
104  float t0rms = 0;
105  tZeroMap->get(wireId, t0, t0rms, DTTimeUnits::ns);
106 
107  return t0;
108 }
int get(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, float &t0mean, float &t0rms, DTTimeUnits::type unit) const
Definition: DTT0.cc:48

◆ setES()

void DTTTrigSyncT0Only::setES ( const edm::EventSetup setup)
overridevirtual

Pass the Event Setup to the algo at each event.

Implements DTTTrigBaseSync.

Definition at line 71 of file DTTTrigSyncT0Only.cc.

References debug, singleTopDQM_cfi::setup, t0Token_, tZeroMap, and DTT0::version().

71  {
72  tZeroMap = &setup.getData(t0Token_);
73 
74  if (debug) {
75  edm::LogPrint("[DTTTrigSyncT0Only]") << "T0 version: " << tZeroMap->version() << endl;
76  }
77 }
Log< level::Warning, true > LogPrint
const std::string & version() const
access version
Definition: DTT0.cc:82
edm::ESGetToken< DTT0, DTT0Rcd > t0Token_

Member Data Documentation

◆ debug

const bool DTTTrigSyncT0Only::debug
private

◆ t0Token_

edm::ESGetToken<DTT0, DTT0Rcd> DTTTrigSyncT0Only::t0Token_
private

Definition at line 57 of file DTTTrigSyncT0Only.cc.

Referenced by setES().

◆ tZeroMap

const DTT0* DTTTrigSyncT0Only::tZeroMap
private

Definition at line 56 of file DTTTrigSyncT0Only.cc.

Referenced by offset(), and setES().