CMS 3D CMS Logo

List of all members | Public Member Functions
TSCBLBuilderNoMaterial Class Reference

#include <TSCBLBuilderNoMaterial.h>

Inheritance diagram for TSCBLBuilderNoMaterial:
TrajectoryStateClosestToBeamLineBuilder

Public Member Functions

TrajectoryStateClosestToBeamLine operator() (const FTS &originalFTS, const reco::BeamSpot &beamSpot) const override
 
 ~TSCBLBuilderNoMaterial () override
 
- Public Member Functions inherited from TrajectoryStateClosestToBeamLineBuilder
virtual ~TrajectoryStateClosestToBeamLineBuilder ()=default
 

Additional Inherited Members

- Public Types inherited from TrajectoryStateClosestToBeamLineBuilder
typedef FreeTrajectoryState FTS
 

Detailed Description

This class builds a TrajectoryStateClosestToBeamLine given an original FreeTrajectoryState. This new state is then defined at the point of closest approach to the beam line. It is to be used when there is no material between the state and the BeamLine

Definition at line 13 of file TSCBLBuilderNoMaterial.h.

Constructor & Destructor Documentation

◆ ~TSCBLBuilderNoMaterial()

TSCBLBuilderNoMaterial::~TSCBLBuilderNoMaterial ( )
inlineoverride

Definition at line 17 of file TSCBLBuilderNoMaterial.h.

17 {};

Member Function Documentation

◆ operator()()

TrajectoryStateClosestToBeamLine TSCBLBuilderNoMaterial::operator() ( const FTS originalFTS,
const reco::BeamSpot beamSpot 
) const
overridevirtual

Implements TrajectoryStateClosestToBeamLineBuilder.

Definition at line 8 of file TSCBLBuilderNoMaterial.cc.

References pwdgSkimBPark_cfi::beamSpot, TwoTrackMinimumDistance::calculate(), FreeTrajectoryState::charge(), FreeTrajectoryState::curvilinearError(), TwoTrackMinimumDistance::firstAngle(), FreeTrajectoryState::hasError(), AnalyticalCurvilinearJacobian::jacobian(), LogDebug, GlobalTrajectoryParameters::magneticField(), CurvilinearTrajectoryError::matrix(), FreeTrajectoryState::momentum(), FreeTrajectoryState::parameters(), TwoTrackMinimumDistance::pathLength(), PV3DBase< T, PVType, FrameType >::perp(), TwoTrackMinimumDistance::points(), hiPixelPairStep_cff::points, alignCSCRings::s, mps_update::status, and PV3DBase< T, PVType, FrameType >::z().

9  {
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 }
T perp() const
Definition: PV3DBase.h:69
const CurvilinearTrajectoryError & curvilinearError() const
T z() const
Definition: PV3DBase.h:61
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepStd< double, 5, 5 > > AlgebraicMatrix55
const GlobalTrajectoryParameters & parameters() const
bool calculate(const TrajectoryStateOnSurface &sta, const TrajectoryStateOnSurface &stb) override
TrackCharge charge() const
GlobalVector momentum() const
std::pair< GlobalPoint, GlobalPoint > points() const override
const AlgebraicSymMatrix55 & matrix() const
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
const MagneticField & magneticField() const
std::pair< double, double > pathLength() const
Global3DVector GlobalVector
Definition: GlobalVector.h:10
#define LogDebug(id)
const AlgebraicMatrix55 & jacobian() const