CMS 3D CMS Logo

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

#include <TSCBLBuilderWithPropagator.h>

Inheritance diagram for TSCBLBuilderWithPropagator:
TrajectoryStateClosestToBeamLineBuilder

Public Member Functions

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

Private Attributes

DeepCopyPointerByClone
< Propagator
thePropagator
 

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 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, Propagator::setPropagationDirection(), and thePropagator.

11  :
12  thePropagator(u.clone())
13 {
15 }
virtual void setPropagationDirection(PropagationDirection dir)
Definition: Propagator.h:144
DeepCopyPointerByClone< Propagator > thePropagator
virtual Propagator * clone() const =0
virtual TSCBLBuilderWithPropagator::~TSCBLBuilderWithPropagator ( )
inlinevirtual

Definition at line 26 of file TSCBLBuilderWithPropagator.h.

26 {};

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 SiPixelRawToDigiRegional_cfi::beamSpot, Line::direction(), Vector3DBase< T, FrameTag >::dot(), TrajectoryExtrapolatorToLine::extrapolate(), TrajectoryStateOnSurface::freeState(), TrajectoryStateOnSurface::globalPosition(), TrajectoryStateOnSurface::isValid(), prof2calltree::l, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

22 {
23 
24  GlobalPoint bspos(beamSpot.position().x(), beamSpot.position().y(), beamSpot.position().z());
25  GlobalVector bsvec(beamSpot.dxdz(), beamSpot.dydz(), 1.);
26  Line bsline(bspos,bsvec);
27 
29 
30  TrajectoryStateOnSurface tsosfinal = tetl.extrapolate(originalFTS,bsline,*thePropagator);
31 
32  if (!tsosfinal.isValid())
34 
35  //Compute point on beamline of closest approach
36  GlobalPoint tp = tsosfinal.globalPosition(); //position of trajectory closest approach
37  GlobalVector hyp(tp.x() - bspos.x(),tp.y() - bspos.y(),tp.z() - bspos.z()); //difference between traj and beamline reference
38  double l=bsline.direction().dot(hyp); //length along beamline away from reference point
39  GlobalPoint closepoint = bspos + l*bsvec;
40 
41  //Get the free state and return the TSCBL
42  const FreeTrajectoryState theFTS = *tsosfinal.freeState();
43  return TrajectoryStateClosestToBeamLine(theFTS, closepoint, beamSpot);
44 }
Definition: Line.h:10
DeepCopyPointerByClone< Propagator > thePropagator
T y() const
Definition: PV3DBase.h:63
GlobalPoint globalPosition() const
double dydz() const
dydz slope
Definition: BeamSpot.h:84
FreeTrajectoryState const * freeState(bool withErrors=true) const
T z() const
Definition: PV3DBase.h:64
double dxdz() const
dxdz slope
Definition: BeamSpot.h:82
const Point & position() const
position
Definition: BeamSpot.h:62
T x() const
Definition: PV3DBase.h:62
TrajectoryStateOnSurface extrapolate(const FreeTrajectoryState &fts, const Line &L, const Propagator &p) const
extrapolation with user-supplied propagator

Member Data Documentation

DeepCopyPointerByClone<Propagator> TSCBLBuilderWithPropagator::thePropagator
private

Definition at line 32 of file TSCBLBuilderWithPropagator.h.

Referenced by TSCBLBuilderWithPropagator().