CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
DTTTrigSyncT0Only Class Reference

#include <DTTTrigSyncT0Only.h>

Inheritance diagram for DTTTrigSyncT0Only:
DTTTrigBaseSync

Public Member Functions

 DTTTrigSyncT0Only (const edm::ParameterSet &config)
 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
 
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 22 of file DTTTrigSyncT0Only.h.

Constructor & Destructor Documentation

DTTTrigSyncT0Only::DTTTrigSyncT0Only ( const edm::ParameterSet config)

Constructor.

Definition at line 21 of file DTTTrigSyncT0Only.cc.

21 : debug(config.getUntrackedParameter<bool>("debug")) {}
T getUntrackedParameter(std::string const &, T const &) const
DTTTrigSyncT0Only::~DTTTrigSyncT0Only ( )
override

Destructor.

Definition at line 23 of file DTTTrigSyncT0Only.cc.

23 {}

Member Function Documentation

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 66 of file DTTTrigSyncT0Only.cc.

66  {
67  tTrig = 0.;
68  t0cell = 0.;
69  return 0.;
70 }
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 35 of file DTTTrigSyncT0Only.cc.

References gather_cfg::cout, and debug.

40  {
41  tTrig = offset(wireId);
42  wirePropCorr = 0;
43  tofCorr = 0;
44 
45  if (debug) {
46  cout << "[DTTTrigSyncT0Only] Offset (ns): " << tTrig + wirePropCorr - tofCorr << endl
47  << " various contributions are: "
48  << endl
49  //<< " tZero (ns): " << t0 << endl
50  << " Propagation along wire delay (ns): " << wirePropCorr << endl
51  << " TOF correction (ns): " << tofCorr << endl
52  << endl;
53  }
54  //The global offset is the sum of various contributions
55  return tTrig + wirePropCorr - tofCorr;
56 }
double offset(const DTLayer *layer, const DTWireId &wireId, const GlobalPoint &globPos, double &tTrig, double &wirePropCorr, double &tofCorr) const override
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 58 of file DTTTrigSyncT0Only.cc.

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

58  {
59  float t0 = 0;
60  float t0rms = 0;
61  tZeroMap->get(wireId, t0, t0rms, DTTimeUnits::ns);
62 
63  return t0;
64 }
const DTT0 * tZeroMap
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
void DTTTrigSyncT0Only::setES ( const edm::EventSetup setup)
overridevirtual

Pass the Event Setup to the algo at each event.

Implements DTTTrigBaseSync.

Definition at line 25 of file DTTTrigSyncT0Only.cc.

References gather_cfg::cout, debug, edm::EventSetup::get(), FrontierCondition_GT_autoExpress_cfi::t0, tZeroMap, and DTT0::version().

25  {
27  setup.get<DTT0Rcd>().get(t0);
28  tZeroMap = &*t0;
29 
30  if (debug) {
31  cout << "[DTTTrigSyncT0Only] T0 version: " << t0->version() << endl;
32  }
33 }
const DTT0 * tZeroMap
Definition: DTT0Rcd.h:9
T get() const
Definition: EventSetup.h:73
const std::string & version() const
access version
Definition: DTT0.cc:82

Member Data Documentation

const bool DTTTrigSyncT0Only::debug
private
const DTT0* DTTTrigSyncT0Only::tZeroMap
private

Definition at line 53 of file DTTTrigSyncT0Only.h.

Referenced by offset(), and setES().