#include <DTDigiSyncTOFCorr.h>
Public Member Functions | |
virtual double | digitizerOffset (const DTWireId *id, const DTLayer *layer=0) const |
Delays to be added to digi times during digitization, in ns. | |
DTDigiSyncTOFCorr (const edm::ParameterSet &) | |
Constructor. | |
virtual double | emulatorOffset (const DTWireId *id) const |
Offset to obtain "raw" TDCs for the L1 emulator from digis. | |
virtual | ~DTDigiSyncTOFCorr () |
Destructor. | |
Private Attributes | |
int | corrType |
double | theOffset |
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.
Definition at line 33 of file DTDigiSyncTOFCorr.h.
DTDigiSyncTOFCorr::DTDigiSyncTOFCorr | ( | const edm::ParameterSet & | pSet | ) |
Constructor.
Definition at line 20 of file DTDigiSyncTOFCorr.cc.
References edm::ParameterSet::getParameter().
{ theOffset = pSet.getParameter<double>("offset"); //500ns corrType = pSet.getParameter<int>("TOFCorrection"); //1 }
DTDigiSyncTOFCorr::~DTDigiSyncTOFCorr | ( | ) | [virtual] |
double DTDigiSyncTOFCorr::digitizerOffset | ( | const DTWireId * | id, |
const DTLayer * | layer = 0 |
||
) | const [virtual] |
Delays to be added to digi times during digitization, in ns.
Implements DTDigiSyncBase.
Definition at line 31 of file DTDigiSyncTOFCorr.cc.
References DTLayer::chamber(), gather_cfg::cout, PV3DBase< T, PVType, FrameType >::mag(), evf::evtn::offset(), GloballyPositioned< T >::position(), DTLayer::specificTopology(), DTLayer::superLayer(), GeomDet::surface(), Surface::toGlobal(), DTWireId::wire(), and DTTopology::wirePosition().
{ double offset = theOffset; const double cSpeed = 29.9792458; // cm/ns if (corrType==1) { // Subtraction of assumed TOF, per CHAMBER double flightL = layer->chamber()->surface().position().mag(); offset -= flightL/cSpeed; } else if (corrType==2) { // Subtraction of assumed TOF, per WIRE // Position of the wire in the Layer's reference frame float localXPos = layer->specificTopology().wirePosition(id->wire()); LocalPoint localPos(localXPos,0,0); // Distance of the wire to the CMS's I.P. double flightL = layer->surface().toGlobal(localPos).mag(); offset -= flightL/cSpeed; } else if (corrType==3) { // Subtraction of assumed TOF, per SUPERLAYER double flightL = layer->superLayer()->surface().position().mag(); offset -= flightL/cSpeed; } else if (corrType!=0){ cout << "ERROR: SimMuon:DTDigitizer:DTDigiSyncTOFCorr:TOFCorrection = " << corrType << "is not defined " << endl; } return offset; }
double DTDigiSyncTOFCorr::emulatorOffset | ( | const DTWireId * | id | ) | const [virtual] |
Offset to obtain "raw" TDCs for the L1 emulator from digis.
Implements DTDigiSyncBase.
Definition at line 65 of file DTDigiSyncTOFCorr.cc.
{ return theOffset; }
int DTDigiSyncTOFCorr::corrType [private] |
Definition at line 49 of file DTDigiSyncTOFCorr.h.
double DTDigiSyncTOFCorr::theOffset [private] |
Definition at line 48 of file DTDigiSyncTOFCorr.h.