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 
9 
16 
17 #include <iostream>
18 
19 using namespace std;
20 using namespace edm;
21 
22 
24  :debug(config.getUntrackedParameter<bool>("debug"))
25 {
26 }
27 
28 
29 
31 
32 
33 
36  setup.get<DTT0Rcd>().get(t0);
37  tZeroMap = &*t0;
38 
39  if(debug) {
40  cout << "[DTTTrigSyncT0Only] T0 version: " << t0->version() << endl;
41  }
42 }
43 
44 
45 
46 
47 double DTTTrigSyncT0Only::offset(const DTLayer* layer,
48  const DTWireId& wireId,
49  const GlobalPoint& globPos,
50  double& tTrig,
51  double& wirePropCorr,
52  double& tofCorr) {
53  tTrig = offset(wireId);
54  wirePropCorr = 0;
55  tofCorr = 0;
56 
57  if(debug) {
58  cout << "[DTTTrigSyncT0Only] Offset (ns): " << tTrig + wirePropCorr - tofCorr << endl
59  << " various contributions are: " << endl
60  //<< " tZero (ns): " << t0 << endl
61  << " Propagation along wire delay (ns): " << wirePropCorr << endl
62  << " TOF correction (ns): " << tofCorr << endl
63  << endl;
64  }
65  //The global offset is the sum of various contributions
66  return tTrig + wirePropCorr - tofCorr;
67 }
68 
69 double DTTTrigSyncT0Only::offset(const DTWireId& wireId) {
70  float t0 = 0;
71  float t0rms = 0;
72  tZeroMap->get(wireId,
73  t0,
74  t0rms,
76 
77  return t0;
78 }
79 
80 
82  double &tTrig,
83  double &t0cell) {
84  tTrig = 0.;
85  t0cell = 0.;
86  return 0.;
87 }
88 
89 
90 
virtual ~DTTTrigSyncT0Only()
Destructor.
const DTT0 * tZeroMap
virtual void setES(const edm::EventSetup &setup)
Pass the Event Setup to the algo at each event.
def setup(process, global_tag, zero_tesla=False)
Definition: GeneralSetup.py:1
Definition: config.py:1
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:67
DTTTrigSyncT0Only(const edm::ParameterSet &config)
Constructor.
virtual double offset(const DTLayer *layer, const DTWireId &wireId, const GlobalPoint &globPos, double &tTrig, double &wirePropCorr, double &tofCorr)
#define debug
Definition: HDRShower.cc:19
const T & get() const
Definition: EventSetup.h:56
Definition: DTT0Rcd.h:9
HLT enums.
const std::string & version() const
access version
Definition: DTT0.cc:118
virtual double emulatorOffset(const DTWireId &wireId, double &tTrig, double &t0cell)