5 #include "CLHEP/Units/PhysicalConstants.h"
7 namespace StubPtConsistency {
12 double mMagneticFieldStrength,
14 if (!(nPar == 4 || nPar == 5))
15 throw cms::Exception(
"IncorrectInput") <<
"Not a valid nPar option!";
17 double trk_bendchi2 = 0.0;
18 double bend_resolution = 0.483;
20 float speedOfLightConverted = CLHEP::c_light / 1.0E5;
24 float trk_signedPt = speedOfLightConverted * mMagneticFieldStrength / aTrack.
rInv();
28 int nStubs = stubRefs.size();
30 for (
const auto& stubRef : stubRefs) {
31 DetId detIdStub = theTrackerGeom->
idToDet((stubRef->clusterRef(0))->getDetId())->geographicalId();
32 MeasurementPoint coords = stubRef->clusterRef(0)->findAverageLocalCoordinatesCentered();
36 float stub_r = posStub.
perp();
37 float stub_z = posStub.
z();
47 float stripPitch = topo.
pitch().first;
53 float sensorSpacing =
sqrt((modMaxR - modMinR) * (modMaxR - modMinR) + (modMaxZ - modMinZ) * (modMaxZ - modMinZ));
56 bool tiltedBarrel = (isBarrel && tTopo->
tobSide(detIdStub) != 3);
57 float gradient = 0.886454;
58 float intercept = 0.504148;
61 correction = gradient * fabs(stub_z) / stub_r + intercept;
65 correction = fabs(stub_z) / stub_r;
67 float stubBend = stubRef->bendFE();
68 if (!isBarrel && stub_z < 0.0)
71 float trackBend = -(sensorSpacing * stub_r * mMagneticFieldStrength * (speedOfLightConverted / 2)) /
73 float bendDiff = trackBend - stubBend;
75 trk_bendchi2 += (bendDiff * bendDiff) / (bend_resolution * bend_resolution);
78 float bendchi2 = trk_bendchi2 / nStubs;
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
virtual const Topology & topology() const
std::vector< edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > > > getStubRefs() const
Track components.
const Plane & surface() const
The nominal surface of the GeomDet.
DetId partnerDetId(const DetId &id) const
const Surface::PositionType & position() const
The position (origin of the R.F.)
double rInv() const
Track curvature.
unsigned int tobSide(const DetId &id) const
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
static constexpr auto TOB
const TrackerGeomDet * idToDet(DetId) const override
Class to store the L1 Track Trigger tracks.
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
constexpr float correction(int sizeM1, int q_f, int q_l, uint16_t upper_edge_first_pix, uint16_t lower_edge_last_pix, float lorentz_shift, float theThickness, float cot_angle, float pitch, bool first_is_big, bool last_is_big)
virtual std::pair< float, float > pitch() const =0
Basic3DVector unit() const
float getConsistency(TTTrack< Ref_Phase2TrackerDigi_ > aTrack, const TrackerGeometry *theTrackerGeom, const TrackerTopology *tTopo, double mMagneticFieldStrength, int nPar)