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::DTTTrigSyncT0Only ( const edm::ParameterSet config)

Constructor.

Definition at line 21 of file DTTTrigSyncT0Only.cc.

21 : debug(config.getUntrackedParameter<bool>("debug")) {}

◆ ~DTTTrigSyncT0Only()

DTTTrigSyncT0Only::~DTTTrigSyncT0Only ( )
override

Destructor.

Definition at line 23 of file DTTTrigSyncT0Only.cc.

23 {}

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

66  {
67  tTrig = 0.;
68  t0cell = 0.;
69  return 0.;
70 }

References dttriganalyzer_cfi::tTrig.

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

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 }

References gather_cfg::cout, debug, and dttriganalyzer_cfi::tTrig.

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

58  {
59  float t0 = 0;
60  float t0rms = 0;
61  tZeroMap->get(wireId, t0, t0rms, DTTimeUnits::ns);
62 
63  return t0;
64 }

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

◆ setES()

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.

25  {
27  setup.get<DTT0Rcd>().get(t0);
28  tZeroMap = &*t0;
29 
30  if (debug) {
31  cout << "[DTTTrigSyncT0Only] T0 version: " << t0->version() << endl;
32  }
33 }

References gather_cfg::cout, debug, get, singleTopDQM_cfi::setup, FrontierCondition_GT_autoExpress_cfi::t0, and tZeroMap.

Member Data Documentation

◆ debug

const bool DTTTrigSyncT0Only::debug
private

◆ tZeroMap

const DTT0* DTTTrigSyncT0Only::tZeroMap
private

Definition at line 53 of file DTTTrigSyncT0Only.h.

Referenced by offset(), and setES().

DTTTrigSyncT0Only::tZeroMap
const DTT0 * tZeroMap
Definition: DTTTrigSyncT0Only.h:53
dttriganalyzer_cfi.tTrig
tTrig
Definition: dttriganalyzer_cfi.py:11
gather_cfg.cout
cout
Definition: gather_cfg.py:144
DTT0Rcd
Definition: DTT0Rcd.h:9
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
config
Definition: config.py:1
DTT0::get
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
FrontierCondition_GT_autoExpress_cfi.t0
t0
Definition: FrontierCondition_GT_autoExpress_cfi.py:149
DTTimeUnits::ns
Definition: DTTimeUnits.h:32
edm::ESHandle< DTT0 >
DTTTrigSyncT0Only::offset
double offset(const DTLayer *layer, const DTWireId &wireId, const GlobalPoint &globPos, double &tTrig, double &wirePropCorr, double &tofCorr) const override
Definition: DTTTrigSyncT0Only.cc:35
get
#define get
DTTTrigSyncT0Only::debug
const bool debug
Definition: DTTTrigSyncT0Only.h:56