CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes | Static Private Attributes
DTTTrigSyncTOFCorr Class Reference

#include <DTTTrigSyncTOFCorr.h>

Inheritance diagram for DTTTrigSyncTOFCorr:
DTTTrigBaseSync

Public Member Functions

 DTTTrigSyncTOFCorr (const edm::ParameterSet &config)
 Constructor. More...
 
virtual double emulatorOffset (const DTWireId &wireId, double &tTrig, double &t0cell)
 
virtual double offset (const DTLayer *layer, const DTWireId &wireId, const GlobalPoint &globPos, double &tTrig, double &wirePropCorr, double &tofCorr)
 
virtual double offset (const DTWireId &wireId)
 
virtual void setES (const edm::EventSetup &setup)
 Pass the Event Setup to the algo at each event. More...
 
virtual ~DTTTrigSyncTOFCorr ()
 Destructor. More...
 
- Public Member Functions inherited from DTTTrigBaseSync
 DTTTrigBaseSync ()
 Constructor. More...
 
virtual double emulatorOffset (const DTWireId &wireId)
 
double offset (const DTLayer *layer, const DTWireId &wireId, const GlobalPoint &globalPos)
 
virtual ~DTTTrigBaseSync ()
 Destructor. More...
 

Private Attributes

double theBXspace
 

Static Private Attributes

static bool debug
 
static int theTOFCorrType
 
static double theTTrig
 
static 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

Date:
2009/10/21 17:05:47
Revision:
1.2
Author
G. Cerminara - INFN Torino

Definition at line 52 of file DTTTrigSyncTOFCorr.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 22 of file DTTTrigSyncTOFCorr.cc.

References debug, edm::ParameterSet::getParameter(), and edm::ParameterSet::getUntrackedParameter().

22  {
23  theTTrig = config.getParameter<double>("tTrig"); // FIXME: Default was 500 ns
24  theVPropWire = config.getParameter<double>("vPropWire"); // FIXME: Default was 24.4 cm/ns
25  theTOFCorrType = config.getParameter<int>("tofCorrType"); // FIXME: Default was 1
26  debug = config.getUntrackedParameter<bool>("debug");
27  // spacing of BX in ns
28  theBXspace = config.getUntrackedParameter<double>("bxSpace", 25.);
29 
30 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
static double theTTrig
static double theVPropWire
DTTTrigSyncTOFCorr::~DTTTrigSyncTOFCorr ( )
virtual

Destructor.

Definition at line 34 of file DTTTrigSyncTOFCorr.cc.

34 {}

Member Function Documentation

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

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 141 of file DTTTrigSyncTOFCorr.cc.

143  {
144  tTrig = theTTrig;
145  t0cell = 0.;
146 
147  return int(tTrig/theBXspace)*theBXspace;
148 }
static double theTTrig
double DTTTrigSyncTOFCorr::offset ( const DTLayer layer,
const DTWireId wireId,
const GlobalPoint globPos,
double &  tTrig,
double &  wirePropCorr,
double &  tofCorr 
)
virtual

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 38 of file DTTTrigSyncTOFCorr.cc.

References DTTopology::cellLenght(), DTLayer::chamber(), gather_cfg::cout, debug, edm::hlt::Exception, PV3DBase< T, PVType, FrameType >::mag(), mag(), evf::evtn::offset(), GloballyPositioned< T >::position(), DTLayer::specificTopology(), GeomDet::surface(), GeomDet::toGlobal(), GeomDet::toLocal(), DTWireId::wire(), DTTopology::wirePosition(), and PV3DBase< T, PVType, FrameType >::y().

43  {
44  tTrig = offset(wireId);
45 
46  //Compute the time spent in signal propagation along wire.
47  // NOTE: the FE is always at y>0
48  float halfL = layer->specificTopology().cellLenght()/2;
49  float wireCoord = layer->toLocal(globPos).y();
50  float propgL = halfL - wireCoord;
51  wirePropCorr = propgL/theVPropWire;
52 
53 
54  // Compute TOF correction treating it accordingly to
55  // the tofCorrType card
56  float flightToHit = globPos.mag();
57  static const float cSpeed = 29.9792458; // cm/ns
58  tofCorr = 0.;
59  switch(theTOFCorrType) {
60  case 0: {
61  // In this mode the subtraction of the TOF from IP to
62  // estimate 3D hit digi position is done here
63  // (No correction is needed anymore)
64  tofCorr = -flightToHit/cSpeed;
65  break;
66  }
67  case 1: {
68  // Correction for TOF from the center of the chamber to hit position
69  const DTChamber * chamber = layer->chamber();
70  double flightToChamber = chamber->surface().position().mag();
71  tofCorr = (flightToChamber-flightToHit)/cSpeed;
72  break;
73  }
74  case 2: {
75  // TOF from 3D center of the wire to hit position
76  float flightToWire =
77  layer->toGlobal(LocalPoint(layer->specificTopology().wirePosition(wireId.wire()), 0., 0.)).mag();
78  tofCorr = (flightToWire-flightToHit)/cSpeed;
79  break;
80  }
81  default: {
82  throw
83  cms::Exception("[DTTTrigSyncTOFCorr]") << " Invalid parameter: tofCorrType = "
84  << theTOFCorrType
85  << std::endl;
86  break;
87  }
88  }
89 
90  if(debug) {
91  cout << "[DTTTrigSyncTOFCorr] Offset (ns): " << tTrig + wirePropCorr - tofCorr << endl
92  << " various contributions are: " << endl
93  << " tTrig (ns): " << tTrig << endl
94  << " Propagation along wire delay (ns): " << wirePropCorr << endl
95  << " TOF correction (ns): " << tofCorr << endl
96  << endl;
97  }
98  //The global offset is the sum of various contributions
99  return tTrig + wirePropCorr - tofCorr;
100 }
float wirePosition(int wireNumber) const
Returns the x position in the layer of a given wire number.
Definition: DTTopology.cc:88
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:47
T y() const
Definition: PV3DBase.h:62
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
Definition: GeomDet.h:62
virtual double offset(const DTLayer *layer, const DTWireId &wireId, const GlobalPoint &globPos, double &tTrig, double &wirePropCorr, double &tofCorr)
const DTTopology & specificTopology() const
Definition: DTLayer.cc:44
T mag() const
Definition: PV3DBase.h:66
int wire() const
Return the wire number.
Definition: DTWireId.h:58
static double theVPropWire
const DTChamber * chamber() const
Definition: DTLayer.cc:60
const BoundPlane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:35
Local3DPoint LocalPoint
Definition: LocalPoint.h:11
tuple cout
Definition: gather_cfg.py:121
float cellLenght() const
Definition: DTTopology.h:75
const PositionType & position() const
double DTTTrigSyncTOFCorr::offset ( const DTWireId wireId)
virtual

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 102 of file DTTTrigSyncTOFCorr.cc.

102  {
103  // Correction for the float to int conversion
104  // (half a bin on average) in DTDigi constructor
105  static const float f2i_convCorr = (25./64.); // ns
106  //FIXME: This should be considered only if the Digi is constructed from a float....
107 
108 
109  // The tTrig is taken from a parameter
110  return theTTrig - f2i_convCorr;
111 }
static double theTTrig
virtual void DTTTrigSyncTOFCorr::setES ( const edm::EventSetup setup)
inlinevirtual

Pass the Event Setup to the algo at each event.

Implements DTTTrigBaseSync.

Definition at line 63 of file DTTTrigSyncTOFCorr.h.

63 {}

Member Data Documentation

bool DTTTrigSyncTOFCorr::debug
staticprivate

Definition at line 110 of file DTTTrigSyncTOFCorr.h.

double DTTTrigSyncTOFCorr::theBXspace
private

Definition at line 112 of file DTTTrigSyncTOFCorr.h.

int DTTTrigSyncTOFCorr::theTOFCorrType
staticprivate

Definition at line 107 of file DTTTrigSyncTOFCorr.h.

double DTTTrigSyncTOFCorr::theTTrig
staticprivate

Definition at line 94 of file DTTTrigSyncTOFCorr.h.

double DTTTrigSyncTOFCorr::theVPropWire
staticprivate

Definition at line 99 of file DTTTrigSyncTOFCorr.h.