CMS 3D CMS Logo

Public Member Functions | Private Attributes

TSCBLBuilderWithPropagator Class Reference

#include <TSCBLBuilderWithPropagator.h>

Inheritance diagram for TSCBLBuilderWithPropagator:
TrajectoryStateClosestToBeamLineBuilder

List of all members.

Public Member Functions

virtual
TrajectoryStateClosestToBeamLine 
operator() (const FTS &originalFTS, const reco::BeamSpot &beamSpot) const
 TSCBLBuilderWithPropagator (const Propagator &u)
 constructor with user-supplied propagator
 TSCBLBuilderWithPropagator (const MagneticField *field)
 constructor with default geometrical propagator
virtual ~TSCBLBuilderWithPropagator ()

Private Attributes

DeepCopyPointerByClone
< Propagator
thePropagator

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 a specific propagator has to be used.

Definition at line 16 of file TSCBLBuilderWithPropagator.h.


Constructor & Destructor Documentation

TSCBLBuilderWithPropagator::TSCBLBuilderWithPropagator ( const MagneticField field)

constructor with default geometrical propagator

Definition at line 8 of file TSCBLBuilderWithPropagator.cc.

TSCBLBuilderWithPropagator::TSCBLBuilderWithPropagator ( const Propagator u)

constructor with user-supplied propagator

Definition at line 11 of file TSCBLBuilderWithPropagator.cc.

References anyDirection, and thePropagator.

                                                                           :
  thePropagator(u.clone()) 
{
  thePropagator->setPropagationDirection(anyDirection);
}
virtual TSCBLBuilderWithPropagator::~TSCBLBuilderWithPropagator ( ) [inline, virtual]

Definition at line 26 of file TSCBLBuilderWithPropagator.h.

{};

Member Function Documentation

TrajectoryStateClosestToBeamLine TSCBLBuilderWithPropagator::operator() ( const FTS originalFTS,
const reco::BeamSpot beamSpot 
) const [virtual]

Implements TrajectoryStateClosestToBeamLineBuilder.

Definition at line 20 of file TSCBLBuilderWithPropagator.cc.

References ExpressReco_HICollisions_FallBack::beamSpot, Line::direction(), TrajectoryExtrapolatorToLine::extrapolate(), TrajectoryStateOnSurface::freeState(), TrajectoryStateOnSurface::globalPosition(), prof2calltree::l, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

{

  GlobalPoint bspos(beamSpot.position().x(), beamSpot.position().y(), beamSpot.position().z());
  GlobalVector bsvec(beamSpot.dxdz(), beamSpot.dydz(), 1.);
  Line bsline(bspos,bsvec);

  TrajectoryExtrapolatorToLine tetl;

  TrajectoryStateOnSurface tsosfinal = tetl.extrapolate(originalFTS,bsline,*thePropagator);

  //Compute point on beamline of closest approach
  GlobalPoint tp = tsosfinal.globalPosition(); //position of trajectory closest approach
  GlobalVector hyp(tp.x() - bspos.x(),tp.y() - bspos.y(),tp.z() - bspos.z()); //difference between traj and beamline reference
  double l=bsline.direction().dot(hyp); //length along beamline away from reference point
  GlobalPoint closepoint = bspos + l*bsvec;

  //Get the free state and return the TSCBL
  const FreeTrajectoryState theFTS = *tsosfinal.freeState();
  return TrajectoryStateClosestToBeamLine(theFTS, closepoint, beamSpot);
}

Member Data Documentation

Definition at line 32 of file TSCBLBuilderWithPropagator.h.

Referenced by TSCBLBuilderWithPropagator().