![]() |
![]() |
00001 #include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHit.h" 00002 #include "Geometry/CommonDetUnit/interface/GeomDet.h" 00003 #include "Geometry/CommonDetUnit/interface/GeomDetEnumerators.h" 00004 #include "DataFormats/SiStripDetId/interface/TIBDetId.h" 00005 #include "RecoTracker/TkDetLayers/interface/TIBLayer.h" 00006 #include "RecoPixelVertexing/PixelTriplets/interface/ThirdHitPredictionFromCircle.h" 00007 00008 #include "MatchedHitRZCorrectionFromBending.h" 00009 00010 // Note: only the TIB layers seem to cause a significant effect, 00011 // so only z correction is implemented 00012 00013 MatchedHitRZCorrectionFromBending:: 00014 MatchedHitRZCorrectionFromBending(DetId detId) 00015 : rFixup(0), zFixup(0) 00016 { 00017 if (detId.subdetId() == SiStripDetId::TIB && 00018 TIBDetId(detId).isDoubleSide()) 00019 zFixup = tibMatchedHitZFixup; 00020 } 00021 00022 MatchedHitRZCorrectionFromBending:: 00023 MatchedHitRZCorrectionFromBending(const DetLayer *layer) 00024 : rFixup(0), zFixup(0) 00025 { 00026 if (layer->subDetector() == GeomDetEnumerators::TIB) { 00027 const TIBLayer *tibLayer = static_cast<const TIBLayer*>(layer); 00028 TIBDetId tibDetId(tibLayer->basicComponents()[0]->geographicalId()); 00029 if (tibDetId.isDoubleSide()) 00030 zFixup = tibMatchedHitZFixup; 00031 } 00032 } 00033 00034 double MatchedHitRZCorrectionFromBending:: 00035 tibMatchedHitZFixup(const ThirdHitPredictionFromCircle &pred, 00036 double curvature, double r, 00037 const TransientTrackingRecHit &hit) 00038 { 00039 // the factors for [ TIB1=0, TIB2=1 ] [ inner string=0, outer string=1 ] 00040 static const double factors[2][2] = { { -2.4, 2.4 }, { 2.4, -2.4 } }; 00041 00042 TIBDetId det(hit.det()->geographicalId()); 00043 unsigned int layer = det.layer() - 1; 00044 unsigned int string = !det.isInternalString(); 00045 return factors[layer][string] * pred.angle(curvature, r); 00046 }