CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

DirectTrackerNavigation Class Reference

#include <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().

                                                               : 
 theGeometricSearchTracker(tkLayout), theOutLayerOnlyFlag(outOnly), theEpsilon(-0.01) {

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

destructor

Definition at line 37 of file DirectTrackerNavigation.h.

{}

Member Function Documentation

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

Definition at line 264 of file DirectTrackerNavigation.cc.

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

Referenced by checkCompatible().

                                                                  {

  if ( z > 0 ) return -log((tan(atan(r/z)/2.)));
  return log(-(tan(atan(r/z)/2.)));

}
bool DirectTrackerNavigation::checkCompatible ( const FreeTrajectoryState fts,
const BarrelDetLayer dl 
) const [private]
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.

                                                                                                            {

  float eta0 = fts.position().eta();

  const BoundDisk& bd = dl->specificSurface();

  float outRadius = bd.outerRadius();
  float inRadius = bd.innerRadius();
  float z = bd.position().z();

  float etaOut = calculateEta(outRadius, z);
  float etaIn = calculateEta(inRadius, z);
 
  if ( eta0 > 0 ) return ( eta0 > ( etaOut - theEpsilon) && eta0 < (etaIn + theEpsilon) );
  else return ( eta0 < (etaOut + theEpsilon ) && eta0 > ( etaIn - theEpsilon ) );

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

clone

Definition at line 40 of file DirectTrackerNavigation.h.

References DirectTrackerNavigation().

                                           {
      return new DirectTrackerNavigation(*this);
    }
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, convertSQLitetoXML_cfg::output, outward(), FreeTrajectoryState::position(), and theOutLayerOnlyFlag.

Referenced by FastTSGFromPropagation::trackerSeeds(), and TSGFromPropagation::trackerSeeds().

                                                                          {

  bool inOut = outward(fts);
  double eta0 = fts.position().eta();

  vector<const DetLayer*> output;

  // check eta of DetLayers for compatibility

  if (inOut) { 

      if ( !theOutLayerOnlyFlag ) {
         inOutPx(fts,output);

         if ( eta0 > 1.55) inOutFPx(fts,output);
         else if ( eta0 < -1.55 ) inOutBPx(fts,output);

         if ( fabs(eta0) < 1.67 ) inOutTIB(fts,output); 

         if ( eta0 > 1.17 ) inOutFTID(fts,output);
         else if ( eta0 < -1.17 ) inOutBTID(fts,output);
      }

      if ( fabs(eta0) < 1.35 ) inOutTOB(fts,output);

      if ( eta0 > 0.97 ) inOutFTEC(fts,output);
      else if ( eta0 < -0.97 )  inOutBTEC(fts,output);

   } else {
      LogTrace("Muon|RecoMuon|DirectionTrackerNavigation")<<"No implementation for inward state at this moment. ";
   }

  if ( dir == oppositeToMomentum ) std::reverse(output.begin(),output.end());

  return output;

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

Definition at line 172 of file DirectTrackerNavigation.cc.

References checkCompatible(), and theGeometricSearchTracker.

Referenced by compatibleLayers().

                                                                                                            {

  const vector<ForwardDetLayer*>& forward = theGeometricSearchTracker->negPixelForwardLayers();

  for (vector<ForwardDetLayer*>::const_iterator iter_E = forward.begin(); iter_E != forward.end(); iter_E++) {
    if ( checkCompatible(fts,(*iter_E)) ) output.push_back((*iter_E));
  }

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

Definition at line 200 of file DirectTrackerNavigation.cc.

References checkCompatible(), and theGeometricSearchTracker.

Referenced by compatibleLayers().

                                                                                                             {

  const vector<ForwardDetLayer*>& forward = theGeometricSearchTracker->negTecLayers();

  for (vector<ForwardDetLayer*>::const_iterator iter_E = forward.begin(); iter_E != forward.end(); iter_E++) {
    if ( checkCompatible(fts,(*iter_E)) ) output.push_back((*iter_E));
  }

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

Definition at line 186 of file DirectTrackerNavigation.cc.

References checkCompatible(), and theGeometricSearchTracker.

Referenced by compatibleLayers().

                                                                                                             {

  const vector<ForwardDetLayer*>& forward = theGeometricSearchTracker->negTidLayers();

  for (vector<ForwardDetLayer*>::const_iterator iter_E = forward.begin(); iter_E != forward.end(); iter_E++) {
      if ( checkCompatible(fts,(*iter_E)) ) output.push_back((*iter_E));
  }

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

Definition at line 130 of file DirectTrackerNavigation.cc.

References checkCompatible(), and theGeometricSearchTracker.

Referenced by compatibleLayers().

                                                                                                            {

  const vector<ForwardDetLayer*>& forward = theGeometricSearchTracker->posPixelForwardLayers();

  for (vector<ForwardDetLayer*>::const_iterator iter_E = forward.begin(); iter_E != forward.end(); iter_E++) {
    if ( checkCompatible(fts,(*iter_E)) ) output.push_back((*iter_E));
  }

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

Definition at line 158 of file DirectTrackerNavigation.cc.

References checkCompatible(), and theGeometricSearchTracker.

Referenced by compatibleLayers().

                                                                                                             {

  const vector<ForwardDetLayer*>& forward = theGeometricSearchTracker->posTecLayers();

  for (vector<ForwardDetLayer*>::const_iterator iter_E = forward.begin(); iter_E != forward.end(); iter_E++) {
    if ( checkCompatible(fts,(*iter_E)) ) output.push_back((*iter_E));
  }

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

Definition at line 144 of file DirectTrackerNavigation.cc.

References checkCompatible(), and theGeometricSearchTracker.

Referenced by compatibleLayers().

                                                                                                             {

  const vector<ForwardDetLayer*>& forward = theGeometricSearchTracker->posTidLayers();

  for (vector<ForwardDetLayer*>::const_iterator iter_E = forward.begin(); iter_E != forward.end(); iter_E++) {
    if ( checkCompatible(fts,(*iter_E)) ) output.push_back((*iter_E));
  }

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

Definition at line 88 of file DirectTrackerNavigation.cc.

References Reference_intrackfit_cff::barrel, checkCompatible(), and theGeometricSearchTracker.

Referenced by compatibleLayers().

                                                                                                           {

  const vector<BarrelDetLayer*>& barrel = theGeometricSearchTracker->pixelBarrelLayers();

  for (vector<BarrelDetLayer*>::const_iterator iter_B = barrel.begin(); iter_B != barrel.end(); iter_B++) {
    if ( checkCompatible(fts,(*iter_B)) ) output.push_back((*iter_B));
  }

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

Definition at line 102 of file DirectTrackerNavigation.cc.

References Reference_intrackfit_cff::barrel, checkCompatible(), and theGeometricSearchTracker.

Referenced by compatibleLayers().

                                                                                                            {

  const vector<BarrelDetLayer*>& barrel = theGeometricSearchTracker->tibLayers();

  for (vector<BarrelDetLayer*>::const_iterator iter_B = barrel.begin(); iter_B != barrel.end(); iter_B++) {
    if ( checkCompatible(fts,(*iter_B)) ) output.push_back((*iter_B));
  }

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

Definition at line 116 of file DirectTrackerNavigation.cc.

References Reference_intrackfit_cff::barrel, checkCompatible(), and theGeometricSearchTracker.

Referenced by compatibleLayers().

                                                                                                            {

  const vector<BarrelDetLayer*>& barrel = theGeometricSearchTracker->tobLayers();

  for (vector<BarrelDetLayer*>::const_iterator iter_B = barrel.begin(); iter_B != barrel.end(); iter_B++) {
    if ( checkCompatible(fts,(*iter_B)) ) output.push_back((*iter_B));
  }

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

Member Data Documentation

Definition at line 83 of file DirectTrackerNavigation.h.

Referenced by checkCompatible().

Definition at line 81 of file DirectTrackerNavigation.h.

Referenced by compatibleLayers().