CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 ( 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 {}
T getUntrackedParameter(std::string const &, T const &) const
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
DTTTrigSyncTOFCorr::~DTTTrigSyncTOFCorr ( )
override

Destructor.

Definition at line 125 of file DTTTrigSyncTOFCorr.cc.

125 {}

Member Function Documentation

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 theBXspace, and theTTrig.

198  {
199  tTrig = theTTrig;
200  t0cell = 0.;
201 
202  return int(tTrig / theBXspace) * theBXspace;
203 }
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 DTTopology::cellLenght(), DTLayer::chamber(), gather_cfg::cout, debug, Exception, PV3DBase< T, PVType, FrameType >::mag(), mag(), GloballyPositioned< T >::position(), DTLayer::specificTopology(), GeomDet::surface(), theTOFCorrType, theVPropWire, GeomDet::toGlobal(), GeomDet::toLocal(), DTWireId::wire(), DTTopology::wirePosition(), and PV3DBase< T, PVType, FrameType >::y().

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 }
float wirePosition(int wireNumber) const
Returns the x position in the layer of a given wire number.
Definition: DTTopology.cc:59
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
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:49
T y() const
Definition: PV3DBase.h:60
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
Definition: GeomDet.h:58
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
const DTTopology & specificTopology() const
Definition: DTLayer.cc:37
T mag() const
Definition: PV3DBase.h:64
int wire() const
Return the wire number.
Definition: DTWireId.h:42
const DTChamber * chamber() const
Definition: DTLayer.cc:45
tuple cout
Definition: gather_cfg.py:144
float cellLenght() const
Definition: DTTopology.h:74
const PositionType & position() const
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 }
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

const bool DTTTrigSyncTOFCorr::debug
private
double DTTTrigSyncTOFCorr::theBXspace
private

Definition at line 102 of file DTTTrigSyncTOFCorr.cc.

Referenced by emulatorOffset().

const int DTTTrigSyncTOFCorr::theTOFCorrType
private

Definition at line 97 of file DTTTrigSyncTOFCorr.cc.

Referenced by offset().

const double DTTTrigSyncTOFCorr::theTTrig
private

Definition at line 84 of file DTTTrigSyncTOFCorr.cc.

Referenced by emulatorOffset(), and offset().

const double DTTTrigSyncTOFCorr::theVPropWire
private

Definition at line 89 of file DTTTrigSyncTOFCorr.cc.

Referenced by offset().