CMS 3D CMS Logo

DTDigiSyncTOFCorr Class Reference

Digi offset computed as:
t0 = Tcommon - aTOF

. More...

#include <SimMuon/DTDigitizer/src/DTDigiSyncTOFCorr.h>

Inheritance diagram for DTDigiSyncTOFCorr:

DTDigiSyncBase

List of all members.

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


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)

Date
2006/01/25 11:07:39
Revision
1.3
Author:
N. Amapane, R. Bellan - INFN Torino

Definition at line 30 of file DTDigiSyncTOFCorr.h.


Constructor & Destructor Documentation

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

Constructor.

Definition at line 18 of file DTDigiSyncTOFCorr.cc.

References corrType, edm::ParameterSet::getParameter(), and theOffset.

00018                                                                {
00019   
00020   theOffset = pSet.getParameter<double>("offset"); //500ns
00021   corrType = pSet.getParameter<int>("TOFCorrection"); //1
00022 }

DTDigiSyncTOFCorr::~DTDigiSyncTOFCorr (  )  [virtual]

Destructor.

Definition at line 25 of file DTDigiSyncTOFCorr.cc.

00025 {}


Member Function Documentation

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 29 of file DTDigiSyncTOFCorr.cc.

References DTLayer::chamber(), corrType, GenMuonPlsPt100GeV_cfg::cout, lat::endl(), PV3DBase< T, PVType, FrameType >::mag(), offset, GloballyPositioned< T >::position(), DTLayer::specificTopology(), GeomDet::surface(), theOffset, Surface::toGlobal(), DTWireId::wire(), and DTTopology::wirePosition().

00029                                                                                          {
00030 
00031   double offset = theOffset;
00032   const double cSpeed = 29.9792458; // cm/ns
00033 
00034   if (corrType==1) {
00035     double flightL = layer->chamber()->surface().position().mag();
00036     offset -= flightL/cSpeed;
00037   } else if (corrType==2) {
00038     // Subtraction of assumed TOF, per WIRE 
00039 
00040     // Position of the wire in the Layer's reference frame
00041     float localXPos = layer->specificTopology().wirePosition(id->wire());
00042     LocalPoint localPos(localXPos,0,0); 
00043 
00044     // Distance of the wire to the CMS's I.P.
00045     double flightL = layer->surface().toGlobal(localPos).mag();
00046 
00047     offset -= flightL/cSpeed;
00048 
00049   } else if (corrType!=0){
00050     cout << "ERROR: SimMuon:DTDigitizer:DTDigiSyncTOFCorr:TOFCorrection = " << corrType
00051          << "is not defined " << endl; 
00052   }
00053   return offset;
00054 }

double DTDigiSyncTOFCorr::emulatorOffset ( const DTWireId id  )  const [virtual]

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

Implements DTDigiSyncBase.

Definition at line 58 of file DTDigiSyncTOFCorr.cc.

References theOffset.

00058                                                                   {
00059   return theOffset;
00060 }


Member Data Documentation

int DTDigiSyncTOFCorr::corrType [private]

Definition at line 46 of file DTDigiSyncTOFCorr.h.

Referenced by digitizerOffset(), and DTDigiSyncTOFCorr().

double DTDigiSyncTOFCorr::theOffset [private]

Definition at line 45 of file DTDigiSyncTOFCorr.h.

Referenced by digitizerOffset(), DTDigiSyncTOFCorr(), and emulatorOffset().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:18:51 2009 for CMSSW by  doxygen 1.5.4