CMS 3D CMS Logo

DTTTrigSyncT0Only.cc
Go to the documentation of this file.
1 /*
2  * See header file for a description of this class.
3  *
4  * \author G. Cerminara - INFN Torino
5  */
6 
7 #include "DTTTrigSyncT0Only.h"
8 
15 
16 #include <iostream>
17 
18 using namespace std;
19 using namespace edm;
20 
21 DTTTrigSyncT0Only::DTTTrigSyncT0Only(const ParameterSet& config) : debug(config.getUntrackedParameter<bool>("debug")) {}
22 
24 
27  setup.get<DTT0Rcd>().get(t0);
28  tZeroMap = &*t0;
29 
30  if (debug) {
31  cout << "[DTTTrigSyncT0Only] T0 version: " << t0->version() << endl;
32  }
33 }
34 
36  const DTWireId& wireId,
37  const GlobalPoint& globPos,
38  double& tTrig,
39  double& wirePropCorr,
40  double& tofCorr) const {
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 }
57 
58 double DTTTrigSyncT0Only::offset(const DTWireId& wireId) const {
59  float t0 = 0;
60  float t0rms = 0;
61  tZeroMap->get(wireId, t0, t0rms, DTTimeUnits::ns);
62 
63  return t0;
64 }
65 
66 double DTTTrigSyncT0Only::emulatorOffset(const DTWireId& wireId, double& tTrig, double& t0cell) const {
67  tTrig = 0.;
68  t0cell = 0.;
69  return 0.;
70 }
electrons_cff.bool
bool
Definition: electrons_cff.py:366
DTTTrigSyncT0Only::tZeroMap
const DTT0 * tZeroMap
Definition: DTTTrigSyncT0Only.h:53
ESHandle.h
DTTTrigSyncT0Only.h
edm
HLT enums.
Definition: AlignableModifier.h:19
dttriganalyzer_cfi.tTrig
tTrig
Definition: dttriganalyzer_cfi.py:11
DTT0.h
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
debug
#define debug
Definition: HDRShower.cc:19
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
DTWireId
Definition: DTWireId.h:12
FrontierCondition_GT_autoExpress_cfi.t0
t0
Definition: FrontierCondition_GT_autoExpress_cfi.py:149
DTTTrigSyncT0Only::DTTTrigSyncT0Only
DTTTrigSyncT0Only(const edm::ParameterSet &config)
Constructor.
Definition: DTTTrigSyncT0Only.cc:21
DTTimeUnits::ns
Definition: DTTimeUnits.h:32
edm::ESHandle
Definition: DTSurvey.h:22
Point3DBase< float, GlobalTag >
phase1PixelTopology::layer
constexpr std::array< uint8_t, layerIndexSize > layer
Definition: phase1PixelTopology.h:99
edm::ParameterSet
Definition: ParameterSet.h:47
DTTTrigSyncT0Only::emulatorOffset
double emulatorOffset(const DTWireId &wireId, double &tTrig, double &t0cell) const override
Definition: DTTTrigSyncT0Only.cc:66
DTT0Rcd.h
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
edm::EventSetup
Definition: EventSetup.h:58
get
#define get
DTLayer
Definition: DTLayer.h:25
DTTTrigSyncT0Only::setES
void setES(const edm::EventSetup &setup) override
Pass the Event Setup to the algo at each event.
Definition: DTTTrigSyncT0Only.cc:25
DTTTrigSyncT0Only::~DTTTrigSyncT0Only
~DTTTrigSyncT0Only() override
Destructor.
Definition: DTTTrigSyncT0Only.cc:23
std
Definition: JetResolutionObject.h:76
DTWireId.h
EventSetup.h
ParameterSet.h
DTTTrigSyncT0Only::debug
const bool debug
Definition: DTTTrigSyncT0Only.h:56