CMS 3D CMS Logo

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

Public Member Functions

 DTTTrigSyncTOFCorr (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...
 
 ~DTTTrigSyncTOFCorr () 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
 
double theBXspace
 
const int theTOFCorrType
 
const double theTTrig
 
const double theVPropWire
 

Detailed Description

Concrete implementation of a DTTTrigBaseSync. This class define the offsets for RecHit building coherently to the digitization realized with the DTDigiSyncTOFCorr module. The offset is computes as:
offset = tTrig + wirePropCorr - tofCorr
where:

The emulatorOffset is computed as:
offset = int(ttrig/BXspace)*BXspace
where:

NOTE: this should approximate what is seen online by the BTI

Author
G. Cerminara - INFN Torino

Definition at line 45 of file DTTTrigSyncTOFCorr.cc.

Constructor & Destructor Documentation

◆ DTTTrigSyncTOFCorr()

DTTTrigSyncTOFCorr::DTTTrigSyncTOFCorr ( const edm::ParameterSet config,
edm::ConsumesCollector   
)

Constructor.

Definition at line 107 of file DTTTrigSyncTOFCorr.cc.

108  : // The fixed t0 (or t_trig) to be subtracted to digi time (ns)
109  theTTrig(config.getParameter<double>("tTrig")), // FIXME: Default was 500 ns
110  // Velocity of signal propagation along the wire (cm/ns)
111  theVPropWire(config.getParameter<double>("vPropWire")), // FIXME: Default was 24.4 cm/ns
112  // Select the mode for TOF correction:
113  // 0: tofCorr = TOF from IP to 3D Hit position (globPos)
114  // 1: tofCorr = TOF correction for distance difference
115  // between 3D center of the chamber and hit position
116  // (default)
117  // 2: tofCorr = TOF correction for distance difference
118  // between 3D center of the wire and hit position
119  // (This mode in available for backward compatibility)
120  theTOFCorrType(config.getParameter<int>("tofCorrType")), // FIXME: Default was 1
121  debug(config.getUntrackedParameter<bool>("debug")),
122  theBXspace(config.getUntrackedParameter<double>("bxSpace", 25.)) // spacing of BX in ns
123 {}
Definition: config.py:1

◆ ~DTTTrigSyncTOFCorr()

DTTTrigSyncTOFCorr::~DTTTrigSyncTOFCorr ( )
override

Destructor.

Definition at line 125 of file DTTTrigSyncTOFCorr.cc.

125 {}

Member Function Documentation

◆ emulatorOffset()

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

Time (ns) to be subtracted to the digi time for emulation purposes It does not take into account TOF and signal propagation along the wire It also returns the different contributions separately:

  • tTrig is the offset (t_trig)
  • t0cell is the t0 from pulses (always 0 in this case)

Implements DTTTrigBaseSync.

Definition at line 198 of file DTTTrigSyncTOFCorr.cc.

References createfilelist::int, theBXspace, theTTrig, and dttriganalyzer_cfi::tTrig.

198  {
199  tTrig = theTTrig;
200  t0cell = 0.;
201 
202  return int(tTrig / theBXspace) * theBXspace;
203 }

◆ offset() [1/2]

double DTTTrigSyncTOFCorr::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) It also returns the different contributions separately:

  • tTrig is the offset (t_trig)
  • wirePropCorr is the delay for signal propagation along the wire
  • tofCorr is the correction due to the particle TOF

Implements DTTTrigBaseSync.

Definition at line 127 of file DTTTrigSyncTOFCorr.cc.

References relativeConstraints::chamber, gather_cfg::cout, debug, Exception, nano_mu_digi_cff::layer, PV3DBase< T, PVType, FrameType >::mag(), mag(), theTOFCorrType, theVPropWire, dttriganalyzer_cfi::tTrig, and DTWireId::wire().

132  {
133  tTrig = offset(wireId);
134 
135  //Compute the time spent in signal propagation along wire.
136  // NOTE: the FE is always at y>0
137  float halfL = layer->specificTopology().cellLenght() / 2;
138  float wireCoord = layer->toLocal(globPos).y();
139  float propgL = halfL - wireCoord;
140  wirePropCorr = propgL / theVPropWire;
141 
142  // Compute TOF correction treating it accordingly to
143  // the tofCorrType card
144  float flightToHit = globPos.mag();
145  static const float cSpeed = 29.9792458; // cm/ns
146  tofCorr = 0.;
147  switch (theTOFCorrType) {
148  case 0: {
149  // In this mode the subtraction of the TOF from IP to
150  // estimate 3D hit digi position is done here
151  // (No correction is needed anymore)
152  tofCorr = -flightToHit / cSpeed;
153  break;
154  }
155  case 1: {
156  // Correction for TOF from the center of the chamber to hit position
157  const DTChamber* chamber = layer->chamber();
158  double flightToChamber = chamber->surface().position().mag();
159  tofCorr = (flightToChamber - flightToHit) / cSpeed;
160  break;
161  }
162  case 2: {
163  // TOF from 3D center of the wire to hit position
164  float flightToWire =
165  layer->toGlobal(LocalPoint(layer->specificTopology().wirePosition(wireId.wire()), 0., 0.)).mag();
166  tofCorr = (flightToWire - flightToHit) / cSpeed;
167  break;
168  }
169  default: {
170  throw cms::Exception("[DTTTrigSyncTOFCorr]")
171  << " Invalid parameter: tofCorrType = " << theTOFCorrType << std::endl;
172  break;
173  }
174  }
175 
176  if (debug) {
177  cout << "[DTTTrigSyncTOFCorr] Offset (ns): " << tTrig + wirePropCorr - tofCorr << endl
178  << " various contributions are: " << endl
179  << " tTrig (ns): " << tTrig << endl
180  << " Propagation along wire delay (ns): " << wirePropCorr << endl
181  << " TOF correction (ns): " << tofCorr << endl
182  << endl;
183  }
184  //The global offset is the sum of various contributions
185  return tTrig + wirePropCorr - tofCorr;
186 }
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
double offset(const DTLayer *layer, const DTWireId &wireId, const GlobalPoint &globPos, double &tTrig, double &wirePropCorr, double &tofCorr) const override
int wire() const
Return the wire number.
Definition: DTWireId.h:42
T mag() const
Definition: PV3DBase.h:64
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())

◆ offset() [2/2]

double DTTTrigSyncTOFCorr::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 188 of file DTTTrigSyncTOFCorr.cc.

References theTTrig.

188  {
189  // Correction for the float to int conversion
190  // (half a bin on average) in DTDigi constructor
191  static const float f2i_convCorr = (25. / 64.); // ns
192  //FIXME: This should be considered only if the Digi is constructed from a float....
193 
194  // The tTrig is taken from a parameter
195  return theTTrig - f2i_convCorr;
196 }

◆ setES()

void DTTTrigSyncTOFCorr::setES ( const edm::EventSetup setup)
inlineoverridevirtual

Pass the Event Setup to the algo at each event.

Implements DTTTrigBaseSync.

Definition at line 56 of file DTTTrigSyncTOFCorr.cc.

56 {}

Member Data Documentation

◆ debug

const bool DTTTrigSyncTOFCorr::debug
private

◆ theBXspace

double DTTTrigSyncTOFCorr::theBXspace
private

Definition at line 102 of file DTTTrigSyncTOFCorr.cc.

Referenced by emulatorOffset().

◆ theTOFCorrType

const int DTTTrigSyncTOFCorr::theTOFCorrType
private

Definition at line 97 of file DTTTrigSyncTOFCorr.cc.

Referenced by offset().

◆ theTTrig

const double DTTTrigSyncTOFCorr::theTTrig
private

Definition at line 84 of file DTTTrigSyncTOFCorr.cc.

Referenced by emulatorOffset(), and offset().

◆ theVPropWire

const double DTTTrigSyncTOFCorr::theVPropWire
private

Definition at line 89 of file DTTTrigSyncTOFCorr.cc.

Referenced by offset().