5 #include "CLHEP/Units/PhysicalConstants.h"
12 double mMagneticFieldStrength,
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));
57 float gradient = 0.886454;
58 float intercept = 0.504148;
61 correction = gradient * fabs(stub_z) / stub_r + intercept;
67 float stubBend = stubRef->bendFE();
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;