CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
DTDigiSyncTOFCorr Class Reference

#include <DTDigiSyncTOFCorr.h>

Inheritance diagram for DTDigiSyncTOFCorr:
DTDigiSyncBase

Public Member Functions

double digitizerOffset (const DTWireId *id, const DTLayer *layer=nullptr) const override
 Delays to be added to digi times during digitization, in ns. More...
 
 DTDigiSyncTOFCorr (const edm::ParameterSet &)
 Constructor. More...
 
double emulatorOffset (const DTWireId *id) const override
 Offset to obtain "raw" TDCs for the L1 emulator from digis. More...
 
 ~DTDigiSyncTOFCorr () override
 Destructor. More...
 
- Public Member Functions inherited from DTDigiSyncBase
 DTDigiSyncBase ()
 Constructor. More...
 
virtual ~DTDigiSyncBase ()
 Destructor. More...
 

Private Attributes

int corrType
 
double theOffset
 

Detailed Description

Digi offset computed as:
t0 = Tcommon - aTOF

where Tcommon is a fixed offset defined in
DTDigiSyncTOFCorr:offset (in ORCA the default was = 500 ns)

and aTOF is set according to MuBarDigiSyncTOFCorr:TOFCorrection:
0: no TOF correction (aTOF=0)
1: aTOF = the TOF of an infinite-momentum particle travelling from the nominal IP to the 3D center of the chamber
2: ditto, but for a particle travelling to the 3D center of the wire. (This mode is avaliable for comparison with older data which were produced in this way) 3: aTOF = the TOF of an infinite-momentum particle travelling from the nominal IP to the 3D center of the SL. Use this, unless you really know what you are doing.

Author
N. Amapane, R. Bellan - INFN Torino

Definition at line 33 of file DTDigiSyncTOFCorr.h.

Constructor & Destructor Documentation

◆ DTDigiSyncTOFCorr()

DTDigiSyncTOFCorr::DTDigiSyncTOFCorr ( const edm::ParameterSet pSet)

Constructor.

Definition at line 18 of file DTDigiSyncTOFCorr.cc.

18  {
19  theOffset = pSet.getParameter<double>("offset"); // 500ns
20  corrType = pSet.getParameter<int>("TOFCorrection"); // 1
21 }

References edm::ParameterSet::getParameter().

◆ ~DTDigiSyncTOFCorr()

DTDigiSyncTOFCorr::~DTDigiSyncTOFCorr ( )
override

Destructor.

Definition at line 23 of file DTDigiSyncTOFCorr.cc.

23 {}

Member Function Documentation

◆ digitizerOffset()

double DTDigiSyncTOFCorr::digitizerOffset ( const DTWireId id,
const DTLayer layer = nullptr 
) const
overridevirtual

Delays to be added to digi times during digitization, in ns.

Implements DTDigiSyncBase.

Definition at line 26 of file DTDigiSyncTOFCorr.cc.

26  {
27  double offset = theOffset;
28  const double cSpeed = 29.9792458; // cm/ns
29 
30  if (corrType == 1) {
31  // Subtraction of assumed TOF, per CHAMBER
32  double flightL = layer->chamber()->surface().position().mag();
33  offset -= flightL / cSpeed;
34  } else if (corrType == 2) {
35  // Subtraction of assumed TOF, per WIRE
36 
37  // Position of the wire in the Layer's reference frame
38  float localXPos = layer->specificTopology().wirePosition(id->wire());
39  LocalPoint localPos(localXPos, 0, 0);
40 
41  // Distance of the wire to the CMS's I.P.
42  double flightL = layer->surface().toGlobal(localPos).mag();
43 
44  offset -= flightL / cSpeed;
45 
46  } else if (corrType == 3) {
47  // Subtraction of assumed TOF, per SUPERLAYER
48  double flightL = layer->superLayer()->surface().position().mag();
49  offset -= flightL / cSpeed;
50  } else if (corrType != 0) {
51  cout << "ERROR: SimMuon:DTDigitizer:DTDigiSyncTOFCorr:TOFCorrection = " << corrType << "is not defined " << endl;
52  }
53  return offset;
54 }

References DTLayer::chamber(), gather_cfg::cout, triggerObjects_cff::id, PV3DBase< T, PVType, FrameType >::mag(), hltrates_dqm_sourceclient-live_cfg::offset, GloballyPositioned< T >::position(), DTLayer::specificTopology(), DTLayer::superLayer(), GeomDet::surface(), Surface::toGlobal(), and DTTopology::wirePosition().

◆ emulatorOffset()

double DTDigiSyncTOFCorr::emulatorOffset ( const DTWireId id) const
overridevirtual

Offset to obtain "raw" TDCs for the L1 emulator from digis.

Implements DTDigiSyncBase.

Definition at line 57 of file DTDigiSyncTOFCorr.cc.

57 { return theOffset; }

Member Data Documentation

◆ corrType

int DTDigiSyncTOFCorr::corrType
private

Definition at line 49 of file DTDigiSyncTOFCorr.h.

◆ theOffset

double DTDigiSyncTOFCorr::theOffset
private

Definition at line 48 of file DTDigiSyncTOFCorr.h.

gather_cfg.cout
cout
Definition: gather_cfg.py:144
DTLayer::superLayer
const DTSuperLayer * superLayer() const
Definition: DTLayer.cc:43
GeomDet::surface
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
DTTopology::wirePosition
float wirePosition(int wireNumber) const
Returns the x position in the layer of a given wire number.
Definition: DTTopology.cc:59
Surface::toGlobal
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:79
Point3DBase< float, LocalTag >
DTDigiSyncTOFCorr::theOffset
double theOffset
Definition: DTDigiSyncTOFCorr.h:48
PV3DBase::mag
T mag() const
Definition: PV3DBase.h:64
DTLayer::chamber
const DTChamber * chamber() const
Definition: DTLayer.cc:45
GloballyPositioned::position
const PositionType & position() const
Definition: GloballyPositioned.h:36
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
DTLayer::specificTopology
const DTTopology & specificTopology() const
Definition: DTLayer.cc:37
DTDigiSyncTOFCorr::corrType
int corrType
Definition: DTDigiSyncTOFCorr.h:49
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:82