File indexing completed on 2024-04-06 12:28:34
0001 #include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHit.h"
0002 #include "Geometry/CommonDetUnit/interface/GeomDet.h"
0003 #include "Geometry/CommonDetUnit/interface/GeomDetEnumerators.h"
0004 #include "DataFormats/TrackerCommon/interface/TrackerTopology.h"
0005 #include "DataFormats/SiStripDetId/interface/SiStripDetId.h"
0006 #include "Geometry/Records/interface/IdealGeometryRecord.h"
0007 #include "RecoTracker/PixelSeeding/interface/ThirdHitPredictionFromCircle.h"
0008 #include "TrackingTools/DetLayers/interface/DetLayer.h"
0009 #include "MatchedHitRZCorrectionFromBending.h"
0010
0011
0012
0013
0014 MatchedHitRZCorrectionFromBending::MatchedHitRZCorrectionFromBending(DetId detId, const TrackerTopology *tTopo)
0015 : rFixup(nullptr), zFixup(nullptr) {
0016 if (detId.subdetId() == SiStripDetId::TIB && tTopo->tibIsDoubleSide(detId))
0017 zFixup = tibMatchedHitZFixup;
0018 }
0019
0020 MatchedHitRZCorrectionFromBending::MatchedHitRZCorrectionFromBending(const DetLayer *layer,
0021 const TrackerTopology *tTopo)
0022 : rFixup(nullptr), zFixup(nullptr) {
0023 if (layer->subDetector() == GeomDetEnumerators::TIB) {
0024 const GeometricSearchDet *tibLayer = layer;
0025
0026 if (tTopo->tibIsDoubleSide(tibLayer->basicComponents()[0]->geographicalId()))
0027 zFixup = tibMatchedHitZFixup;
0028 }
0029 }
0030
0031 double MatchedHitRZCorrectionFromBending::tibMatchedHitZFixup(const ThirdHitPredictionFromCircle &pred,
0032 double curvature,
0033 double r,
0034 const TrackingRecHit &hit,
0035 const TrackerTopology *tTopo) {
0036
0037 static const double factors[2][2] = {{-2.4, 2.4}, {2.4, -2.4}};
0038
0039 unsigned int layer = tTopo->tibLayer(hit.det()->geographicalId()) - 1;
0040 unsigned int string = !tTopo->tibIsInternalString(hit.det()->geographicalId());
0041 return factors[layer][string] * pred.angle(curvature, r);
0042 }