CMS 3D CMS Logo

TSCBLBuilderNoMaterial.cc
Go to the documentation of this file.
5 
6 using namespace std;
7 
9  const reco::BeamSpot& beamSpot) const {
11  bool status = ttmd.calculate(
12  originalFTS.parameters(),
13  GlobalTrajectoryParameters(GlobalPoint(beamSpot.position().x(), beamSpot.position().y(), beamSpot.position().z()),
14  GlobalVector(beamSpot.dxdz(), beamSpot.dydz(), 1.),
15  0,
16  &(originalFTS.parameters().magneticField())));
17  if (!status) {
18  LogDebug("TrackingTools|PatternTools")
19  << "TSCBLBuilderNoMaterial: Failure in TTMD when searching for PCA of track to beamline.\n"
20  << "TrajectoryStateClosestToBeamLine is now invalid.";
22  }
23 
24  pair<GlobalPoint, GlobalPoint> points = ttmd.points();
25 
26  GlobalPoint xTrack = points.first;
27  GlobalVector pTrack = GlobalVector(
28  GlobalVector::Cylindrical(originalFTS.momentum().perp(), ttmd.firstAngle(), originalFTS.momentum().z()));
29 
30  double s = ttmd.pathLength().first;
31 
32  FreeTrajectoryState theFTS;
33  if (originalFTS.hasError()) {
34  const AlgebraicSymMatrix55& errorMatrix = originalFTS.curvilinearError().matrix();
35  AnalyticalCurvilinearJacobian curvilinJacobian(originalFTS.parameters(), xTrack, pTrack, s);
36  const AlgebraicMatrix55& jacobian = curvilinJacobian.jacobian();
37  CurvilinearTrajectoryError cte(ROOT::Math::Similarity(jacobian, errorMatrix));
38 
39  theFTS = FreeTrajectoryState(
40  GlobalTrajectoryParameters(xTrack, pTrack, originalFTS.charge(), &(originalFTS.parameters().magneticField())),
41  cte);
42  } else {
43  theFTS = FreeTrajectoryState(
44  GlobalTrajectoryParameters(xTrack, pTrack, originalFTS.charge(), &(originalFTS.parameters().magneticField())));
45  }
46  return TrajectoryStateClosestToBeamLine(theFTS, points.second, beamSpot);
47 }
Vector3DBase
Definition: Vector3DBase.h:8
HLT_2018_cff.points
points
Definition: HLT_2018_cff.py:20125
TSCBLBuilderNoMaterial.h
FreeTrajectoryState::momentum
GlobalVector momentum() const
Definition: FreeTrajectoryState.h:68
TrajectoryStateClosestToBeamLine
Definition: TrajectoryStateClosestToBeamLine.h:15
AnalyticalCurvilinearJacobian::jacobian
const AlgebraicMatrix55 & jacobian() const
Definition: AnalyticalCurvilinearJacobian.h:51
AnalyticalCurvilinearJacobian
Definition: AnalyticalCurvilinearJacobian.h:21
pwdgSkimBPark_cfi.beamSpot
beamSpot
Definition: pwdgSkimBPark_cfi.py:5
MessageLogger.h
FreeTrajectoryState::hasError
bool hasError() const
Definition: FreeTrajectoryState.h:77
mps_update.status
status
Definition: mps_update.py:69
TwoTrackMinimumDistance
Definition: TwoTrackMinimumDistance.h:20
FreeTrajectoryState::charge
TrackCharge charge() const
Definition: FreeTrajectoryState.h:69
TwoTrackMinimumDistance::firstAngle
double firstAngle() const
Definition: TwoTrackMinimumDistance.cc:18
AnalyticalCurvilinearJacobian.h
GlobalVector
Global3DVector GlobalVector
Definition: GlobalVector.h:10
TSCBLBuilderNoMaterial::operator()
TrajectoryStateClosestToBeamLine operator()(const FTS &originalFTS, const reco::BeamSpot &beamSpot) const override
Definition: TSCBLBuilderNoMaterial.cc:8
TwoTrackMinimumDistance.h
TwoTrackMinimumDistance::calculate
bool calculate(const TrajectoryStateOnSurface &sta, const TrajectoryStateOnSurface &stb) override
Definition: TwoTrackMinimumDistance.cc:83
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
alignCSCRings.s
s
Definition: alignCSCRings.py:92
CurvilinearTrajectoryError
Definition: CurvilinearTrajectoryError.h:27
AlgebraicMatrix55
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepStd< double, 5, 5 > > AlgebraicMatrix55
Definition: AlgebraicROOTObjects.h:55
FreeTrajectoryState::curvilinearError
const CurvilinearTrajectoryError & curvilinearError() const
Definition: FreeTrajectoryState.h:89
Geom::Cylindrical2Cartesian
Definition: CoordinateSets.h:34
reco::BeamSpot
Definition: BeamSpot.h:21
GlobalTrajectoryParameters
Definition: GlobalTrajectoryParameters.h:15
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
Point3DBase< float, GlobalTag >
TwoTrackMinimumDistance::points
std::pair< GlobalPoint, GlobalPoint > points() const override
Definition: TwoTrackMinimumDistance.cc:75
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
FreeTrajectoryState::parameters
const GlobalTrajectoryParameters & parameters() const
Definition: FreeTrajectoryState.h:79
TwoTrackMinimumDistance::pathLength
std::pair< double, double > pathLength() const
Definition: TwoTrackMinimumDistance.cc:56
std
Definition: JetResolutionObject.h:76
FreeTrajectoryState
Definition: FreeTrajectoryState.h:27
GlobalTrajectoryParameters::magneticField
const MagneticField & magneticField() const
Definition: GlobalTrajectoryParameters.h:106
AlgebraicSymMatrix55
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
Definition: AlgebraicROOTObjects.h:23
PV3DBase::perp
T perp() const
Definition: PV3DBase.h:69
CurvilinearTrajectoryError::matrix
const AlgebraicSymMatrix55 & matrix() const
Definition: CurvilinearTrajectoryError.h:61