CMS 3D CMS Logo

Public Member Functions

TSCBLBuilderNoMaterial Class Reference

#include <TSCBLBuilderNoMaterial.h>

Inheritance diagram for TSCBLBuilderNoMaterial:
TrajectoryStateClosestToBeamLineBuilder

List of all members.

Public Member Functions

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

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 ( ) [inline, virtual]

Definition at line 20 of file TSCBLBuilderNoMaterial.h.

{};

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 ntuplemaker::status.

{
  TwoTrackMinimumDistance ttmd;
  bool status = ttmd.calculate( originalFTS.parameters(), 
        GlobalTrajectoryParameters(
                GlobalPoint(beamSpot.position().x(), beamSpot.position().y(), beamSpot.position().z()), 
                GlobalVector(beamSpot.dxdz(), beamSpot.dydz(), 1.), 
                0, &(originalFTS.parameters().magneticField()) ) );
  if (!status) {
    LogDebug  ("TrackingTools|PatternTools")
      << "TSCBLBuilderNoMaterial: Failure in TTMD when searching for PCA of track to beamline.\n"
      << "TrajectoryStateClosestToBeamLine is now invalid.";
    return TrajectoryStateClosestToBeamLine();
  }

  pair<GlobalPoint, GlobalPoint> points = ttmd.points();

  GlobalPoint xTrack = points.first;
  GlobalVector pTrack = GlobalVector ( GlobalVector::Cylindrical(originalFTS.momentum().perp(), ttmd.firstAngle(), originalFTS.momentum().z()) );

  double s =  ttmd.pathLength().first;

  FreeTrajectoryState theFTS;
  if (originalFTS.hasError()) {
    const AlgebraicSymMatrix55 &errorMatrix = originalFTS.curvilinearError().matrix();
    AnalyticalCurvilinearJacobian curvilinJacobian(originalFTS.parameters(), xTrack,
                                                   pTrack, s);
    const AlgebraicMatrix55 &jacobian = curvilinJacobian.jacobian();
    CurvilinearTrajectoryError cte( ROOT::Math::Similarity(jacobian, errorMatrix) );
  
    theFTS = FreeTrajectoryState(GlobalTrajectoryParameters(xTrack, pTrack, originalFTS.charge(), 
                                        &(originalFTS.parameters().magneticField())),
                                cte);
  }
  else {
    theFTS = FreeTrajectoryState(GlobalTrajectoryParameters(xTrack, pTrack, originalFTS.charge(),
                                        &(originalFTS.parameters().magneticField())));
  }
  return TrajectoryStateClosestToBeamLine(theFTS, points.second, beamSpot);
}