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.

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 }

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(), HLT_FULL_cff::points, alignCSCRings::s, mps_update::status, and PV3DBase< T, PVType, FrameType >::z().

Vector3DBase
Definition: Vector3DBase.h:8
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
FreeTrajectoryState::hasError
bool hasError() const
Definition: FreeTrajectoryState.h:77
HLT_FULL_cff.points
points
Definition: HLT_FULL_cff.py:21453
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
GlobalVector
Global3DVector GlobalVector
Definition: GlobalVector.h:10
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
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:233
FreeTrajectoryState::parameters
const GlobalTrajectoryParameters & parameters() const
Definition: FreeTrajectoryState.h:79
TwoTrackMinimumDistance::pathLength
std::pair< double, double > pathLength() const
Definition: TwoTrackMinimumDistance.cc:56
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