CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
TSCBLBuilderWithPropagator Class Reference

#include <TSCBLBuilderWithPropagator.h>

Inheritance diagram for TSCBLBuilderWithPropagator:
TrajectoryStateClosestToBeamLineBuilder

Public Member Functions

TrajectoryStateClosestToBeamLine operator() (const FTS &originalFTS, const reco::BeamSpot &beamSpot) const override
 
 TSCBLBuilderWithPropagator (const MagneticField *field)
 constructor with default geometrical propagator More...
 
 TSCBLBuilderWithPropagator (const Propagator &u)
 constructor with user-supplied propagator More...
 
 ~TSCBLBuilderWithPropagator () override
 
- Public Member Functions inherited from TrajectoryStateClosestToBeamLineBuilder
virtual ~TrajectoryStateClosestToBeamLineBuilder ()=default
 

Private Attributes

DeepCopyPointerByClone< PropagatorthePropagator
 

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() [1/2]

TSCBLBuilderWithPropagator::TSCBLBuilderWithPropagator ( const MagneticField field)

constructor with default geometrical propagator

Definition at line 8 of file TSCBLBuilderWithPropagator.cc.

◆ TSCBLBuilderWithPropagator() [2/2]

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  : thePropagator(u.clone()) {
13 }
virtual void setPropagationDirection(PropagationDirection dir)
Definition: Propagator.h:130
DeepCopyPointerByClone< Propagator > thePropagator
virtual Propagator * clone() const =0

◆ ~TSCBLBuilderWithPropagator()

TSCBLBuilderWithPropagator::~TSCBLBuilderWithPropagator ( )
inlineoverride

Definition at line 24 of file TSCBLBuilderWithPropagator.h.

24 {};

Member Function Documentation

◆ operator()()

TrajectoryStateClosestToBeamLine TSCBLBuilderWithPropagator::operator() ( const FTS originalFTS,
const reco::BeamSpot beamSpot 
) const
overridevirtual

Implements TrajectoryStateClosestToBeamLineBuilder.

Definition at line 15 of file TSCBLBuilderWithPropagator.cc.

References pwdgSkimBPark_cfi::beamSpot, Line::direction(), Vector3DBase< T, FrameTag >::dot(), TrajectoryExtrapolatorToLine::extrapolate(), TrajectoryStateOnSurface::freeState(), TrajectoryStateOnSurface::globalPosition(), TrajectoryStateOnSurface::isValid(), MainPageGenerator::l, thePropagator, and cmsswSequenceInfo::tp.

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

Member Data Documentation

◆ thePropagator

DeepCopyPointerByClone<Propagator> TSCBLBuilderWithPropagator::thePropagator
private

Definition at line 29 of file TSCBLBuilderWithPropagator.h.

Referenced by operator()(), and TSCBLBuilderWithPropagator().