CMS 3D CMS Logo

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

#include <SiStripFineDelayTLA.h>

Public Member Functions

std::vector< std::pair< std::pair< DetId, LocalPoint >, float > > findtrackangle (const std::vector< Trajectory > &traj)
 
std::vector< std::pair< std::pair< DetId, LocalPoint >, float > > findtrackangle (const Trajectory &traj)
 
void init (const edm::Event &e, const edm::EventSetup &c)
 
 SiStripFineDelayTLA (const edm::ParameterSet &conf)
 
virtual ~SiStripFineDelayTLA ()
 

Private Member Functions

double computeAngleCorr (const LocalVector &v, double pitch, double thickness)
 

Private Attributes

edm::ParameterSet conf_
 
const TrackerGeometrytracker
 

Detailed Description

Definition at line 19 of file SiStripFineDelayTLA.h.

Constructor & Destructor Documentation

◆ SiStripFineDelayTLA()

SiStripFineDelayTLA::SiStripFineDelayTLA ( const edm::ParameterSet conf)
explicit

Definition at line 26 of file SiStripFineDelayTLA.cc.

26 : conf_(conf) {}

◆ ~SiStripFineDelayTLA()

SiStripFineDelayTLA::~SiStripFineDelayTLA ( )
virtual

Definition at line 36 of file SiStripFineDelayTLA.cc.

36 {}

Member Function Documentation

◆ computeAngleCorr()

double SiStripFineDelayTLA::computeAngleCorr ( const LocalVector v,
double  pitch,
double  thickness 
)
private

Definition at line 113 of file SiStripFineDelayTLA.cc.

113  {
114  double v_xy = sqrt(v.x() * v.x() + v.y() * v.y());
115  double L = fabs(thickness * v_xy / v.z());
116  double Lmax = fabs(pitch / v.x() * v_xy);
117  if (L < Lmax) {
118  LogDebug("SiStripFineDelayTLA ") << L << " vs " << Lmax << " Signal contained in strip. Correction is "
119  << v.z() / v.mag();
120  return v.z() / v.mag();
121  } else {
122  LogDebug("SiStripFineDelayTLA ") << L << " vs " << Lmax << " Signal not contained in strip. Correction is "
123  << thickness / pitch * v.x() / v_xy * v.z() / v.mag() << " instead of "
124  << v.z() / v.mag();
125  return thickness / pitch * v.x() / v_xy * v.z() / v.mag();
126  }
127 }

References dttmaxenums::L, LogDebug, mathSSE::sqrt(), Calorimetry_cff::thickness, and findQualityFiles::v.

Referenced by findtrackangle().

◆ findtrackangle() [1/2]

std::vector< std::pair< std::pair< DetId, LocalPoint >, float > > SiStripFineDelayTLA::findtrackangle ( const std::vector< Trajectory > &  traj)

Definition at line 38 of file SiStripFineDelayTLA.cc.

39  {
40  if (!trajVec.empty()) {
41  return findtrackangle(trajVec.front());
42  }
43  std::vector<std::pair<std::pair<DetId, LocalPoint>, float> > hitangleassociation;
44  return hitangleassociation;
45 }

Referenced by SiStripFineDelayHit::detId().

◆ findtrackangle() [2/2]

std::vector< std::pair< std::pair< DetId, LocalPoint >, float > > SiStripFineDelayTLA::findtrackangle ( const Trajectory traj)

Definition at line 47 of file SiStripFineDelayTLA.cc.

48  {
49  std::vector<std::pair<std::pair<DetId, LocalPoint>, float> > hitangleassociation;
50  std::vector<TrajectoryMeasurement> TMeas = traj.measurements();
51  std::vector<TrajectoryMeasurement>::iterator itm;
52  for (itm = TMeas.begin(); itm != TMeas.end(); itm++) {
53  TrajectoryStateOnSurface tsos = itm->updatedState();
54  auto thit = itm->recHit();
55  const SiStripMatchedRecHit2D* matchedhit = dynamic_cast<const SiStripMatchedRecHit2D*>((*thit).hit());
56  const SiStripRecHit2D* hit = dynamic_cast<const SiStripRecHit2D*>((*thit).hit());
57  LocalVector trackdirection = tsos.localDirection();
58  if (matchedhit) { //if matched hit...
59  const GluedGeomDet* gdet = static_cast<const GluedGeomDet*>(tracker->idToDet(matchedhit->geographicalId()));
60  GlobalVector gtrkdir = gdet->toGlobal(trackdirection);
61  // trackdirection on mono det
62  // this the pointer to the mono hit of a matched hit
63  const SiStripRecHit2D monohit = matchedhit->monoHit();
64  const GeomDetUnit* monodet = gdet->monoDet();
65  LocalVector monotkdir = monodet->toLocal(gtrkdir);
66  if (monotkdir.z() != 0) {
67  // the local angle (mono)
68  float localpitch = static_cast<const StripTopology&>(monodet->topology()).localPitch(tsos.localPosition());
69  float thickness = ((((((monohit.geographicalId()) >> 25) & 0x7f) == 0xd) ||
70  ((((monohit.geographicalId()) >> 25) & 0x7f) == 0xe)) &&
71  ((((monohit.geographicalId()) >> 5) & 0x7) > 4))
72  ? 0.0500
73  : 0.0320;
74  float angle = computeAngleCorr(monotkdir, localpitch, thickness);
75  hitangleassociation.push_back(make_pair(make_pair(monohit.geographicalId(), monohit.localPosition()), angle));
76  // trackdirection on stereo det
77  // this the pointer to the stereo hit of a matched hit
78  const SiStripRecHit2D stereohit = matchedhit->stereoHit();
79  const GeomDetUnit* stereodet = gdet->stereoDet();
80  LocalVector stereotkdir = stereodet->toLocal(gtrkdir);
81  if (stereotkdir.z() != 0) {
82  // the local angle (stereo)
83  float localpitch = static_cast<const StripTopology&>(stereodet->topology()).localPitch(tsos.localPosition());
84  float thickness = ((((((stereohit.geographicalId()) >> 25) & 0x7f) == 0xd) ||
85  ((((stereohit.geographicalId()) >> 25) & 0x7f) == 0xe)) &&
86  ((((stereohit.geographicalId()) >> 5) & 0x7) > 4))
87  ? 0.0500
88  : 0.0320;
89  float angle = computeAngleCorr(stereotkdir, localpitch, thickness);
90  hitangleassociation.push_back(
91  make_pair(make_pair(stereohit.geographicalId(), stereohit.localPosition()), angle));
92  }
93  }
94  } else if (hit) {
95  const GeomDetUnit* det = tracker->idToDet(hit->geographicalId());
96  // hit= pointer to the rechit
97  if (trackdirection.z() != 0) {
98  // the local angle (single hit)
99  float localpitch = static_cast<const StripTopology&>(det->topology()).localPitch(tsos.localPosition());
100  float thickness =
101  ((((((hit->geographicalId()) >> 25) & 0x7f) == 0xd) || ((((hit->geographicalId()) >> 25) & 0x7f) == 0xe)) &&
102  ((((hit->geographicalId()) >> 5) & 0x7) > 4))
103  ? 0.0500
104  : 0.0320;
105  float angle = computeAngleCorr(trackdirection, localpitch, thickness);
106  hitangleassociation.push_back(make_pair(make_pair(hit->geographicalId(), hit->localPosition()), angle));
107  }
108  }
109  }
110  return hitangleassociation;
111 }

References angle(), computeAngleCorr(), TrackingRecHit::geographicalId(), TrackerGeometry::idToDet(), TrajectoryStateOnSurface::localDirection(), BaseTrackerRecHit::localPosition(), TrajectoryStateOnSurface::localPosition(), Trajectory::measurements(), GluedGeomDet::monoDet(), SiStripMatchedRecHit2D::monoHit(), GluedGeomDet::stereoDet(), SiStripMatchedRecHit2D::stereoHit(), Calorimetry_cff::thickness, GeomDet::toGlobal(), GeomDet::toLocal(), GeomDet::topology(), tracker, and PV3DBase< T, PVType, FrameType >::z().

◆ init()

void SiStripFineDelayTLA::init ( const edm::Event e,
const edm::EventSetup c 
)

Definition at line 28 of file SiStripFineDelayTLA.cc.

28  {
29  // get geometry
31  es.get<TrackerDigiGeometryRecord>().get(estracker);
32  tracker = &(*estracker);
33 }

References edm::EventSetup::get(), get, and tracker.

Referenced by SiStripFineDelayHit::produce().

Member Data Documentation

◆ conf_

edm::ParameterSet SiStripFineDelayTLA::conf_
private

Definition at line 32 of file SiStripFineDelayTLA.h.

◆ tracker

const TrackerGeometry* SiStripFineDelayTLA::tracker
private

Definition at line 33 of file SiStripFineDelayTLA.h.

Referenced by findtrackangle(), and init().

Vector3DBase< float, LocalTag >
TrackerGeometry::idToDet
const TrackerGeomDet * idToDet(DetId) const override
Definition: TrackerGeometry.cc:193
dttmaxenums::L
Definition: DTTMax.h:29
GeomDet
Definition: GeomDet.h:27
SiStripFineDelayTLA::findtrackangle
std::vector< std::pair< std::pair< DetId, LocalPoint >, float > > findtrackangle(const std::vector< Trajectory > &traj)
Definition: SiStripFineDelayTLA.cc:38
GluedGeomDet::monoDet
const GeomDetUnit * monoDet() const
Definition: GluedGeomDet.h:19
GeomDet::topology
virtual const Topology & topology() const
Definition: GeomDet.cc:67
SiStripRecHit2D
Definition: SiStripRecHit2D.h:7
findQualityFiles.v
v
Definition: findQualityFiles.py:179
TrackingRecHit::geographicalId
DetId geographicalId() const
Definition: TrackingRecHit.h:120
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
TrajectoryStateOnSurface::localDirection
LocalVector localDirection() const
Definition: TrajectoryStateOnSurface.h:76
Calorimetry_cff.thickness
thickness
Definition: Calorimetry_cff.py:114
TrackerDigiGeometryRecord
Definition: TrackerDigiGeometryRecord.h:15
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
edm::ESHandle< TrackerGeometry >
SiStripMatchedRecHit2D::stereoHit
SiStripRecHit2D stereoHit() const
Definition: SiStripMatchedRecHit2D.h:25
SiStripFineDelayTLA::conf_
edm::ParameterSet conf_
Definition: SiStripFineDelayTLA.h:32
GeomDet::toLocal
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
Definition: GeomDet.h:58
GluedGeomDet
Definition: GluedGeomDet.h:7
TrajectoryStateOnSurface::localPosition
LocalPoint localPosition() const
Definition: TrajectoryStateOnSurface.h:74
GeomDet::toGlobal
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:49
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:223
SiStripMatchedRecHit2D::monoHit
SiStripRecHit2D monoHit() const
Definition: SiStripMatchedRecHit2D.h:26
get
#define get
Trajectory::measurements
DataContainer const & measurements() const
Definition: Trajectory.h:178
GluedGeomDet::stereoDet
const GeomDetUnit * stereoDet() const
Definition: GluedGeomDet.h:20
BaseTrackerRecHit::localPosition
LocalPoint localPosition() const override
Definition: BaseTrackerRecHit.h:56
SiStripMatchedRecHit2D
Definition: SiStripMatchedRecHit2D.h:8
SiStripFineDelayTLA::computeAngleCorr
double computeAngleCorr(const LocalVector &v, double pitch, double thickness)
Definition: SiStripFineDelayTLA.cc:113
angle
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
Definition: angle.h:11
hit
Definition: SiStripHitEffFromCalibTree.cc:88
SiStripFineDelayTLA::tracker
const TrackerGeometry * tracker
Definition: SiStripFineDelayTLA.h:33