test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
TSCBLBuilderNoMaterial Class Reference

#include <TSCBLBuilderNoMaterial.h>

Inheritance diagram for TSCBLBuilderNoMaterial:
TrajectoryStateClosestToBeamLineBuilder

Public Member Functions

virtual
TrajectoryStateClosestToBeamLine 
operator() (const FTS &originalFTS, const reco::BeamSpot &beamSpot) const
 
virtual ~TSCBLBuilderNoMaterial ()
 

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

virtual TSCBLBuilderNoMaterial::~TSCBLBuilderNoMaterial ( )
inlinevirtual

Definition at line 20 of file TSCBLBuilderNoMaterial.h.

20 {};

Member Function Documentation

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

Implements TrajectoryStateClosestToBeamLineBuilder.

Definition at line 10 of file TSCBLBuilderNoMaterial.cc.

References SiPixelRawToDigiRegional_cfi::beamSpot, TwoTrackMinimumDistance::calculate(), FreeTrajectoryState::curvilinearError(), TwoTrackMinimumDistance::firstAngle(), AnalyticalCurvilinearJacobian::jacobian(), LogDebug, CurvilinearTrajectoryError::matrix(), TwoTrackMinimumDistance::pathLength(), TwoTrackMinimumDistance::points(), alignCSCRings::s, and mps_update::status.

12 {
14  bool status = ttmd.calculate( originalFTS.parameters(),
16  GlobalPoint(beamSpot.position().x(), beamSpot.position().y(), beamSpot.position().z()),
17  GlobalVector(beamSpot.dxdz(), beamSpot.dydz(), 1.),
18  0, &(originalFTS.parameters().magneticField()) ) );
19  if (!status) {
20  LogDebug ("TrackingTools|PatternTools")
21  << "TSCBLBuilderNoMaterial: Failure in TTMD when searching for PCA of track to beamline.\n"
22  << "TrajectoryStateClosestToBeamLine is now invalid.";
24  }
25 
26  pair<GlobalPoint, GlobalPoint> points = ttmd.points();
27 
28  GlobalPoint xTrack = points.first;
29  GlobalVector pTrack = GlobalVector ( GlobalVector::Cylindrical(originalFTS.momentum().perp(), ttmd.firstAngle(), originalFTS.momentum().z()) );
30 
31  double s = ttmd.pathLength().first;
32 
33  FreeTrajectoryState theFTS;
34  if (originalFTS.hasError()) {
35  const AlgebraicSymMatrix55 &errorMatrix = originalFTS.curvilinearError().matrix();
36  AnalyticalCurvilinearJacobian curvilinJacobian(originalFTS.parameters(), xTrack,
37  pTrack, s);
38  const AlgebraicMatrix55 &jacobian = curvilinJacobian.jacobian();
39  CurvilinearTrajectoryError cte( ROOT::Math::Similarity(jacobian, errorMatrix) );
40 
41  theFTS = FreeTrajectoryState(GlobalTrajectoryParameters(xTrack, pTrack, originalFTS.charge(),
42  &(originalFTS.parameters().magneticField())),
43  cte);
44  }
45  else {
46  theFTS = FreeTrajectoryState(GlobalTrajectoryParameters(xTrack, pTrack, originalFTS.charge(),
47  &(originalFTS.parameters().magneticField())));
48  }
49  return TrajectoryStateClosestToBeamLine(theFTS, points.second, beamSpot);
50 }
#define LogDebug(id)
virtual bool calculate(const TrajectoryStateOnSurface &sta, const TrajectoryStateOnSurface &stb)
T perp() const
Definition: PV3DBase.h:72
const GlobalTrajectoryParameters & parameters() const
const AlgebraicMatrix55 & jacobian() const
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
TrackCharge charge() const
const CurvilinearTrajectoryError & curvilinearError() const
double dydz() const
dydz slope
Definition: BeamSpot.h:84
T z() const
Definition: PV3DBase.h:64
GlobalVector momentum() const
double dxdz() const
dxdz slope
Definition: BeamSpot.h:82
std::pair< double, double > pathLength() const
const AlgebraicSymMatrix55 & matrix() const
const MagneticField & magneticField() const
const Point & position() const
position
Definition: BeamSpot.h:62
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepStd< double, 5, 5 > > AlgebraicMatrix55
virtual std::pair< GlobalPoint, GlobalPoint > points() const
Global3DVector GlobalVector
Definition: GlobalVector.h:10
tuple status
Definition: mps_update.py:57