CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 : thePropagator(prop->clone()) {}
virtual Propagator * clone() const =0
StateOnTrackerBound::~StateOnTrackerBound ( )

Definition at line 13 of file StateOnTrackerBound.cc.

References thePropagator.

13 { delete thePropagator; }

Member Function Documentation

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

Definition at line 15 of file StateOnTrackerBound.cc.

References TrajectoryStateOnSurface::freeState().

15  {
16  return operator()(*tsos.freeState());
17 }
FreeTrajectoryState const * freeState(bool withErrors=true) const
TrajectoryStateOnSurface operator()(const TrajectoryStateOnSurface &tsos) const
TrajectoryStateOnSurface StateOnTrackerBound::operator() ( const FreeTrajectoryState fts) const

Definition at line 19 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().

19  {
20  // try to guess if propagation should be first to cylinder or first to disk
21  float tanTheta = (fts.position().perp() > 70) ? fts.position().perp() / fts.position().z()
22  : fts.momentum().perp() / fts.momentum().z();
24 
25  TrajectoryStateOnSurface firstTry;
26  if (tanTheta < 0 && fabs(tanTheta) < corner) {
28 
29  if (!firstTry.isValid()) {
31  }
32  if (firstTry.globalPosition().perp() > TrackerBounds::radius()) {
33  // the propagation should have gone to the cylinder
35  } else
36  return firstTry;
37  } else if (tanTheta > 0 && fabs(tanTheta) < corner) {
39  if (!firstTry.isValid()) {
41  }
42  if (firstTry.globalPosition().perp() > TrackerBounds::radius()) {
44  } else
45  return firstTry;
46  } else {
47  // barrel
49  if (!firstTry.isValid()) {
50  if (tanTheta < 0)
52  if (tanTheta >= 0)
54  return firstTry;
55  }
56  if (firstTry.globalPosition().z() < -TrackerBounds::halfLength()) {
57  // the propagation should have gone to the negative disk
59  } else if (firstTry.globalPosition().z() > TrackerBounds::halfLength()) {
60  // the propagation should have gone to the positive disk
62  } else
63  return firstTry;
64  }
65  return firstTry;
66 }
T perp() const
Definition: PV3DBase.h:69
static const Cylinder & barrelBound()
Definition: TrackerBounds.h:26
GlobalPoint globalPosition() const
static float halfLength()
Definition: TrackerBounds.h:33
T z() const
Definition: PV3DBase.h:61
static const Disk & negativeEndcapDisk()
Definition: TrackerBounds.h:27
GlobalVector momentum() const
static float radius()
Definition: TrackerBounds.h:32
GlobalPoint position() const
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
Definition: Propagator.h:50
static const Disk & positiveEndcapDisk()
Definition: TrackerBounds.h:28

Member Data Documentation

Propagator* StateOnTrackerBound::thePropagator
private

Definition at line 24 of file StateOnTrackerBound.h.

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