#include <TrackingTools/GeomPropagators/interface/StateOnTrackerBound.h>
Public Member Functions | |
TrajectoryStateOnSurface | operator() (const FreeTrajectoryState &fts) const |
TrajectoryStateOnSurface | operator() (const TrajectoryStateOnSurface &tsos) const |
StateOnTrackerBound (const Propagator *prop) | |
~StateOnTrackerBound () | |
Private Attributes | |
Propagator * | thePropagator |
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 15 of file StateOnTrackerBound.h.
StateOnTrackerBound::StateOnTrackerBound | ( | const Propagator * | prop | ) |
Definition at line 13 of file StateOnTrackerBound.cc.
00013 : 00014 thePropagator( prop->clone()) 00015 {}
StateOnTrackerBound::~StateOnTrackerBound | ( | ) |
Definition at line 17 of file StateOnTrackerBound.cc.
References thePropagator.
00018 { 00019 delete thePropagator; 00020 }
TrajectoryStateOnSurface StateOnTrackerBound::operator() | ( | const FreeTrajectoryState & | fts | ) | const |
Definition at line 29 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().
00030 { 00031 // try to guess if propagation should be first to cylinder or first to disk 00032 float tanTheta = (fts.position().perp() > 70 ) ? fts.position().perp()/fts.position().z() : fts.momentum().perp()/fts.momentum().z(); 00033 float corner = TrackerBounds::radius() / TrackerBounds::halfLength(); 00034 00035 TrajectoryStateOnSurface firstTry; 00036 if (tanTheta < 0 && fabs(tanTheta) < corner) { 00037 firstTry = 00038 thePropagator->propagate( fts, TrackerBounds::negativeEndcapDisk()); 00039 00040 if (!firstTry.isValid()) { 00041 return thePropagator->propagate( fts, TrackerBounds::barrelBound()); 00042 } 00043 if (firstTry.globalPosition().perp() > TrackerBounds::radius()) { 00044 // the propagation should have gone to the cylinder 00045 return thePropagator->propagate( fts, TrackerBounds::barrelBound()); 00046 } 00047 else return firstTry; 00048 } 00049 else if (tanTheta > 0 && fabs(tanTheta) < corner) { 00050 firstTry = 00051 thePropagator->propagate( fts, TrackerBounds::positiveEndcapDisk()); 00052 if (!firstTry.isValid()) { 00053 return thePropagator->propagate( fts, TrackerBounds::barrelBound()); 00054 } 00055 if (firstTry.globalPosition().perp() > TrackerBounds::radius()) { 00056 return thePropagator->propagate( fts, TrackerBounds::barrelBound()); 00057 } 00058 else return firstTry; 00059 } 00060 else { 00061 // barrel 00062 firstTry = 00063 thePropagator->propagate( fts, TrackerBounds::barrelBound()); 00064 if (!firstTry.isValid()) { 00065 if (tanTheta < 0 ) return thePropagator->propagate( fts,TrackerBounds::negativeEndcapDisk()); 00066 if (tanTheta >= 0 ) return thePropagator->propagate( fts,TrackerBounds::positiveEndcapDisk()); 00067 return firstTry; 00068 } 00069 if (firstTry.globalPosition().z() < -TrackerBounds::halfLength()) { 00070 // the propagation should have gone to the negative disk 00071 return thePropagator->propagate( fts, 00072 TrackerBounds::negativeEndcapDisk()); 00073 } 00074 else if (firstTry.globalPosition().z() > TrackerBounds::halfLength()) { 00075 // the propagation should have gone to the positive disk 00076 return thePropagator->propagate( fts, 00077 TrackerBounds::positiveEndcapDisk()); 00078 } 00079 else return firstTry; 00080 } 00081 }
TrajectoryStateOnSurface StateOnTrackerBound::operator() | ( | const TrajectoryStateOnSurface & | tsos | ) | const |
Definition at line 23 of file StateOnTrackerBound.cc.
References TrajectoryStateOnSurface::freeState().
00024 { 00025 return operator()(*tsos.freeState()); 00026 }
Propagator* StateOnTrackerBound::thePropagator [private] |
Definition at line 30 of file StateOnTrackerBound.h.
Referenced by operator()(), and ~StateOnTrackerBound().