CMS 3D CMS Logo

DirectTrackerNavigation Class Reference

#include <RecoMuon/GlobalTrackingTools/interface/DirectTrackerNavigation.h>

List of all members.

Public Member Functions

DirectTrackerNavigationclone () const
 clone
std::vector< const DetLayer * > compatibleLayers (const FreeTrajectoryState &fts, PropagationDirection timeDirection) const
 find compatible layers for a given trajectory state
 DirectTrackerNavigation (const edm::ESHandle< GeometricSearchTracker > &, bool outOnly=true)
 constructor
virtual ~DirectTrackerNavigation ()
 destructor

Private Member Functions

float calculateEta (float r, float z) const
bool checkCompatible (const FreeTrajectoryState &, const ForwardDetLayer *) const
bool checkCompatible (const FreeTrajectoryState &, const BarrelDetLayer *) const
void inOutBPx (const FreeTrajectoryState &, std::vector< const DetLayer * > &) const
void inOutBTEC (const FreeTrajectoryState &, std::vector< const DetLayer * > &) const
void inOutBTID (const FreeTrajectoryState &, std::vector< const DetLayer * > &) const
void inOutFPx (const FreeTrajectoryState &, std::vector< const DetLayer * > &) const
void inOutFTEC (const FreeTrajectoryState &, std::vector< const DetLayer * > &) const
void inOutFTID (const FreeTrajectoryState &, std::vector< const DetLayer * > &) const
void inOutPx (const FreeTrajectoryState &, std::vector< const DetLayer * > &) const
void inOutTIB (const FreeTrajectoryState &, std::vector< const DetLayer * > &) const
void inOutTOB (const FreeTrajectoryState &, std::vector< const DetLayer * > &) const
bool outward (const FreeTrajectoryState &) const

Private Attributes

float theEpsilon
edm::ESHandle
< GeometricSearchTracker
theGeometricSearchTracker
bool theOutLayerOnlyFlag


Detailed Description

Definition at line 28 of file DirectTrackerNavigation.h.


Constructor & Destructor Documentation

DirectTrackerNavigation::DirectTrackerNavigation ( const edm::ESHandle< GeometricSearchTracker > &  tkLayout,
bool  outOnly = true 
)

constructor

Definition at line 34 of file DirectTrackerNavigation.cc.

Referenced by clone().

00035                                                                : 
00036  theGeometricSearchTracker(tkLayout), theOutLayerOnlyFlag(outOnly), theEpsilon(-0.09) {
00037 
00038 }

virtual DirectTrackerNavigation::~DirectTrackerNavigation (  )  [inline, virtual]

destructor

Definition at line 37 of file DirectTrackerNavigation.h.

00037 {}


Member Function Documentation

float DirectTrackerNavigation::calculateEta ( float  r,
float  z 
) const [private]

Definition at line 264 of file DirectTrackerNavigation.cc.

References funct::log(), and funct::tan().

Referenced by checkCompatible().

00264                                                                   {
00265 
00266   if ( z > 0 ) return -log((tan(atan(r/z)/2.)));
00267   return log(-(tan(atan(r/z)/2.)));
00268 
00269 }

bool DirectTrackerNavigation::checkCompatible ( const FreeTrajectoryState fts,
const ForwardDetLayer dl 
) const [private]

Definition at line 232 of file DirectTrackerNavigation.cc.

References calculateEta(), PV3DBase< T, PVType, FrameType >::eta(), BoundDisk::innerRadius(), BoundDisk::outerRadius(), GloballyPositioned< T >::position(), FreeTrajectoryState::position(), ForwardDetLayer::specificSurface(), theEpsilon, and z.

00232                                                                                                             {
00233 
00234   float eta0 = fts.position().eta();
00235 
00236   const BoundDisk& bd = dl->specificSurface();
00237 
00238   float outRadius = bd.outerRadius();
00239   float inRadius = bd.innerRadius();
00240   float z = bd.position().z();
00241 
00242   float etaOut = calculateEta(outRadius, z);
00243   float etaIn = calculateEta(inRadius, z);
00244  
00245   if ( eta0 > 0 ) return ( eta0 > ( etaOut - theEpsilon) && eta0 < (etaIn + theEpsilon) );
00246   else return ( eta0 < (etaOut + theEpsilon ) && eta0 > ( etaIn - theEpsilon ) );
00247 
00248 }

bool DirectTrackerNavigation::checkCompatible ( const FreeTrajectoryState fts,
const BarrelDetLayer dl 
) const [private]

Definition at line 214 of file DirectTrackerNavigation.cc.

References BoundSurface::bounds(), calculateEta(), eta, PV3DBase< T, PVType, FrameType >::eta(), Bounds::length(), FreeTrajectoryState::position(), Cylinder::radius(), radius(), BarrelDetLayer::specificSurface(), and theEpsilon.

00214                                                                                                            {
00215 
00216   float eta0 = fts.position().eta();
00217 
00218   const BoundCylinder& bc = dl->specificSurface();
00219   float radius = bc.radius();
00220   float length = bc.bounds().length()/2.;
00221 
00222   float eta = calculateEta(radius, length);
00223 
00224   return ( fabs(eta0) <= (fabs(eta) + theEpsilon) );
00225 
00226 }

DirectTrackerNavigation* DirectTrackerNavigation::clone ( void   )  const [inline]

clone

Definition at line 40 of file DirectTrackerNavigation.h.

References DirectTrackerNavigation().

00040                                            {
00041       return new DirectTrackerNavigation(*this);
00042     }

vector< const DetLayer * > DirectTrackerNavigation::compatibleLayers ( const FreeTrajectoryState fts,
PropagationDirection  timeDirection 
) const

find compatible layers for a given trajectory state

Definition at line 45 of file DirectTrackerNavigation.cc.

References PV3DBase< T, PVType, FrameType >::eta(), inOutBPx(), inOutBTEC(), inOutBTID(), inOutFPx(), inOutFTEC(), inOutFTID(), inOutPx(), inOutTIB(), inOutTOB(), LogTrace, oppositeToMomentum, output(), outward(), FreeTrajectoryState::position(), and theOutLayerOnlyFlag.

Referenced by TSGFromPropagation::trackerSeeds().

00046                                                                           {
00047 
00048   bool inOut = outward(fts);
00049   double eta0 = fts.position().eta();
00050 
00051   vector<const DetLayer*> output;
00052 
00053   // check eta of DetLayers for compatibility
00054 
00055   if (inOut) { 
00056 
00057       if ( !theOutLayerOnlyFlag ) {
00058          inOutPx(fts,output);
00059 
00060          if ( eta0 > 1.55) inOutFPx(fts,output);
00061          else if ( eta0 < -1.55 ) inOutBPx(fts,output);
00062 
00063          if ( fabs(eta0) < 1.67 ) inOutTIB(fts,output); 
00064 
00065          if ( eta0 > 1.17 ) inOutFTID(fts,output);
00066          else if ( eta0 < -1.17 ) inOutBTID(fts,output);
00067       }
00068 
00069       if ( fabs(eta0) < 1.35 ) inOutTOB(fts,output);
00070 
00071       if ( eta0 > 0.97 ) inOutFTEC(fts,output);
00072       else if ( eta0 < -0.97 )  inOutBTEC(fts,output);
00073 
00074    } else {
00075       LogTrace("Muon|RecoMuon|DirectionTrackerNavigation")<<"No implementation for inward state at this moment. ";
00076    }
00077 
00078   if ( dir == oppositeToMomentum ) std::reverse(output.begin(),output.end());
00079 
00080   return output;
00081 
00082 }

void DirectTrackerNavigation::inOutBPx ( const FreeTrajectoryState ,
std::vector< const DetLayer * > &   
) const [private]

Referenced by compatibleLayers().

void DirectTrackerNavigation::inOutBTEC ( const FreeTrajectoryState ,
std::vector< const DetLayer * > &   
) const [private]

Referenced by compatibleLayers().

void DirectTrackerNavigation::inOutBTID ( const FreeTrajectoryState ,
std::vector< const DetLayer * > &   
) const [private]

Referenced by compatibleLayers().

void DirectTrackerNavigation::inOutFPx ( const FreeTrajectoryState ,
std::vector< const DetLayer * > &   
) const [private]

Referenced by compatibleLayers().

void DirectTrackerNavigation::inOutFTEC ( const FreeTrajectoryState ,
std::vector< const DetLayer * > &   
) const [private]

Referenced by compatibleLayers().

void DirectTrackerNavigation::inOutFTID ( const FreeTrajectoryState ,
std::vector< const DetLayer * > &   
) const [private]

Referenced by compatibleLayers().

void DirectTrackerNavigation::inOutPx ( const FreeTrajectoryState ,
std::vector< const DetLayer * > &   
) const [private]

Referenced by compatibleLayers().

void DirectTrackerNavigation::inOutTIB ( const FreeTrajectoryState ,
std::vector< const DetLayer * > &   
) const [private]

Referenced by compatibleLayers().

void DirectTrackerNavigation::inOutTOB ( const FreeTrajectoryState ,
std::vector< const DetLayer * > &   
) const [private]

Referenced by compatibleLayers().

bool DirectTrackerNavigation::outward ( const FreeTrajectoryState fts  )  const [private]

Definition at line 254 of file DirectTrackerNavigation.cc.

References PV3DBase< T, PVType, FrameType >::basicVector(), FreeTrajectoryState::momentum(), and FreeTrajectoryState::position().

Referenced by compatibleLayers().

00254                                                                           {
00255  
00256   return (fts.position().basicVector().dot(fts.momentum().basicVector()) > 0);
00257 
00258 }


Member Data Documentation

float DirectTrackerNavigation::theEpsilon [private]

Definition at line 83 of file DirectTrackerNavigation.h.

Referenced by checkCompatible().

edm::ESHandle<GeometricSearchTracker> DirectTrackerNavigation::theGeometricSearchTracker [private]

Definition at line 79 of file DirectTrackerNavigation.h.

bool DirectTrackerNavigation::theOutLayerOnlyFlag [private]

Definition at line 81 of file DirectTrackerNavigation.h.

Referenced by compatibleLayers().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:18:27 2009 for CMSSW by  doxygen 1.5.4