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 | Private Attributes
StateOnTrackerBound Class Reference

#include <StateOnTrackerBound.h>

Public Member Functions

TrajectoryStateOnSurface operator() (const TrajectoryStateOnSurface &tsos) const
 
TrajectoryStateOnSurface operator() (const FreeTrajectoryState &fts) const
 
 StateOnTrackerBound (const Propagator *prop)
 
 ~StateOnTrackerBound ()
 

Private Attributes

PropagatorthePropagator
 

Detailed Description

Propagates to the Tracker bounds, i.e. either to the barrel cylinder or to one of the forward disks that constitute the envelope of the sensitive Tracker volumes. Ported from ORCA

Definition at line 13 of file StateOnTrackerBound.h.

Constructor & Destructor Documentation

StateOnTrackerBound::StateOnTrackerBound ( const Propagator prop)

Definition at line 11 of file StateOnTrackerBound.cc.

11  :
12  thePropagator( prop->clone())
13 {}
virtual Propagator * clone() const =0
StateOnTrackerBound::~StateOnTrackerBound ( )

Definition at line 15 of file StateOnTrackerBound.cc.

References thePropagator.

16 {
17  delete thePropagator;
18 }

Member Function Documentation

TrajectoryStateOnSurface StateOnTrackerBound::operator() ( const TrajectoryStateOnSurface tsos) const

Definition at line 21 of file StateOnTrackerBound.cc.

References TrajectoryStateOnSurface::freeState().

22 {
23  return operator()(*tsos.freeState());
24 }
FreeTrajectoryState const * freeState(bool withErrors=true) const
TrajectoryStateOnSurface operator()(const TrajectoryStateOnSurface &tsos) const
TrajectoryStateOnSurface StateOnTrackerBound::operator() ( const FreeTrajectoryState fts) const

Definition at line 27 of file StateOnTrackerBound.cc.

References TrackerBounds::barrelBound(), TrajectoryStateOnSurface::globalPosition(), TrackerBounds::halfLength(), TrajectoryStateOnSurface::isValid(), FreeTrajectoryState::momentum(), TrackerBounds::negativeEndcapDisk(), PV3DBase< T, PVType, FrameType >::perp(), FreeTrajectoryState::position(), TrackerBounds::positiveEndcapDisk(), Propagator::propagate(), TrackerBounds::radius(), thePropagator, and PV3DBase< T, PVType, FrameType >::z().

28 {
29  // try to guess if propagation should be first to cylinder or first to disk
30  float tanTheta = (fts.position().perp() > 70 ) ? fts.position().perp()/fts.position().z() : fts.momentum().perp()/fts.momentum().z();
32 
33  TrajectoryStateOnSurface firstTry;
34  if (tanTheta < 0 && fabs(tanTheta) < corner) {
35  firstTry =
37 
38  if (!firstTry.isValid()) {
40  }
41  if (firstTry.globalPosition().perp() > TrackerBounds::radius()) {
42  // the propagation should have gone to the cylinder
44  }
45  else return firstTry;
46  }
47  else if (tanTheta > 0 && fabs(tanTheta) < corner) {
48  firstTry =
50  if (!firstTry.isValid()) {
52  }
53  if (firstTry.globalPosition().perp() > TrackerBounds::radius()) {
55  }
56  else return firstTry;
57  }
58  else {
59  // barrel
60  firstTry =
62  if (!firstTry.isValid()) {
63  if (tanTheta < 0 ) return thePropagator->propagate( fts,TrackerBounds::negativeEndcapDisk());
64  if (tanTheta >= 0 ) return thePropagator->propagate( fts,TrackerBounds::positiveEndcapDisk());
65  return firstTry;
66  }
67  if (firstTry.globalPosition().z() < -TrackerBounds::halfLength()) {
68  // the propagation should have gone to the negative disk
69  return thePropagator->propagate( fts,
71  }
72  else if (firstTry.globalPosition().z() > TrackerBounds::halfLength()) {
73  // the propagation should have gone to the positive disk
74  return thePropagator->propagate( fts,
76  }
77  else return firstTry;
78  }
79  return firstTry;
80 }
virtual FreeTrajectoryState propagate(const FreeTrajectoryState &ftsStart, const GlobalPoint &pDest) const final
Definition: Propagator.h:119
T perp() const
Definition: PV3DBase.h:72
static const Cylinder & barrelBound()
Definition: TrackerBounds.h:27
GlobalPoint globalPosition() const
static float halfLength()
Definition: TrackerBounds.h:34
T z() const
Definition: PV3DBase.h:64
static const Disk & negativeEndcapDisk()
Definition: TrackerBounds.h:28
GlobalVector momentum() const
static float radius()
Definition: TrackerBounds.h:33
GlobalPoint position() const
static const Disk & positiveEndcapDisk()
Definition: TrackerBounds.h:29

Member Data Documentation

Propagator* StateOnTrackerBound::thePropagator
private

Definition at line 28 of file StateOnTrackerBound.h.

Referenced by operator()(), and ~StateOnTrackerBound().