CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
DTTMax::InfoLayer Struct Reference

#include <DTTMax.h>

Public Member Functions

 InfoLayer (const DTRecHit1D &rh_, const DTSuperLayer &isl, GlobalVector dir, GlobalPoint pos, const DTTTrigBaseSync &sync)
 

Public Attributes

DTWireId idWire
 
DTEnums::DTCellSide lr
 
DTRecHit1D rh
 
float time
 
float wireX
 

Detailed Description

Definition at line 63 of file DTTMax.h.

Constructor & Destructor Documentation

◆ InfoLayer()

DTTMax::InfoLayer::InfoLayer ( const DTRecHit1D rh_,
const DTSuperLayer isl,
GlobalVector  dir,
GlobalPoint  pos,
const DTTTrigBaseSync sync 
)

Definition at line 21 of file DTTMax.cc.

References funct::cos(), gather_cfg::cout, DTRecHit1D::digiTime(), DeadROC_duringRun::dir, idWire, nano_mu_digi_cff::layer, DTSuperLayer::layer(), DTWireId::layerId(), DTRecHit1D::localPosition(), DTTTrigBaseSync::offset(), rh, PV3DBase< T, PVType, FrameType >::theta(), time, GeomDet::toLocal(), DTWireId::wire(), wireX, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

23  : rh(rh_), idWire(rh.wireId()), lr(rh.lrSide()) {
24  const DTLayer* layer = isl.layer(idWire.layerId());
25  LocalPoint wirePosInLayer(layer->specificTopology().wirePosition(idWire.wire()), 0, 0);
26  LocalPoint wirePosInSL = isl.toLocal(layer->toGlobal(wirePosInLayer));
27  wireX = wirePosInSL.x();
28 
29  //-- Correction for signal propagation along wire, t0 subtraction,
30  LocalVector segDir = layer->toLocal(dir);
31  LocalPoint segPos = layer->toLocal(pos);
32  LocalPoint segPosAtLayer = segPos + segDir * (-segPos.z()) / cos(segDir.theta());
33  LocalPoint hitPos(rh.localPosition().x(), segPosAtLayer.y(), 0.);
34  time = rh.digiTime() - sync.offset(layer, idWire, layer->toGlobal(hitPos));
35 
36  if (time < 0. || time > 415.) {
37  // FIXME introduce time window to reject "out-of-time" digis
38  cout << " *** WARNING time = " << time << endl;
39  }
40 }
int wire() const
Return the wire number.
Definition: DTWireId.h:45
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
Definition: GeomDet.h:58
T z() const
Definition: PV3DBase.h:61
float digiTime() const
Return the time (ns) of the digi used to build the rechit.
Definition: DTRecHit1D.h:79
DTRecHit1D rh
Definition: DTTMax.h:66
T x() const
Definition: PV3DBase.h:59
T y() const
Definition: PV3DBase.h:60
double offset(const DTLayer *layer, const DTWireId &wireId, const GlobalPoint &globalPos) const
const DTLayer * layer(const DTLayerId &id) const
Return the layer corresponding to the given id.
Definition: DTSuperLayer.cc:54
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
DTEnums::DTCellSide lrSide() const
The side of the cell.
Definition: DTRecHit1D.h:61
DTEnums::DTCellSide lr
Definition: DTTMax.h:68
DTWireId idWire
Definition: DTTMax.h:67
DTWireId wireId() const
Return the wireId.
Definition: DTRecHit1D.h:76
DTLayerId layerId() const
Return the corresponding LayerId.
Definition: DTWireId.h:48
LocalPoint localPosition() const override
Return the 3-dimensional local position.
Definition: DTRecHit1D.h:47
Geom::Theta< T > theta() const
Definition: PV3DBase.h:72

Member Data Documentation

◆ idWire

DTWireId DTTMax::InfoLayer::idWire

Definition at line 67 of file DTTMax.h.

Referenced by DTTMax::DTTMax(), and InfoLayer().

◆ lr

DTEnums::DTCellSide DTTMax::InfoLayer::lr

Definition at line 68 of file DTTMax.h.

◆ rh

DTRecHit1D DTTMax::InfoLayer::rh

Definition at line 66 of file DTTMax.h.

Referenced by InfoLayer().

◆ time

float DTTMax::InfoLayer::time

◆ wireX

float DTTMax::InfoLayer::wireX

Definition at line 69 of file DTTMax.h.

Referenced by DTTMax::DTTMax(), and InfoLayer().