CMS 3D CMS Logo

Public Member Functions | Private Attributes

GeometricSearchTracker Class Reference

#include <GeometricSearchTracker.h>

Inheritance diagram for GeometricSearchTracker:
DetLayerGeometry

List of all members.

Public Member Functions

std::vector< DetLayer * > const & allLayers () const
std::vector< BarrelDetLayer * >
const & 
barrelLayers () const
const DetLayerdetLayer (const DetId &id) const
 obsolete method. Use idToLayer() instead.
std::vector< ForwardDetLayer * >
const & 
forwardLayers () const
 GeometricSearchTracker (const std::vector< BarrelDetLayer * > &pxlBar, const std::vector< BarrelDetLayer * > &tib, const std::vector< BarrelDetLayer * > &tob, const std::vector< ForwardDetLayer * > &negPxlFwd, const std::vector< ForwardDetLayer * > &negTid, const std::vector< ForwardDetLayer * > &negTec, const std::vector< ForwardDetLayer * > &posPxlFwd, const std::vector< ForwardDetLayer * > &posTid, const std::vector< ForwardDetLayer * > &posTec)
virtual const DetLayeridToLayer (const DetId &detId) const
 Give the DetId of a module, returns the pointer to the corresponding DetLayer.
std::vector< ForwardDetLayer * >
const & 
negForwardLayers () const
std::vector< ForwardDetLayer * >
const & 
negPixelForwardLayers () const
std::vector< ForwardDetLayer * >
const & 
negTecLayers () const
std::vector< ForwardDetLayer * >
const & 
negTidLayers () const
std::vector< BarrelDetLayer * >
const & 
pixelBarrelLayers () const
std::vector< ForwardDetLayer * >
const & 
posForwardLayers () const
std::vector< ForwardDetLayer * >
const & 
posPixelForwardLayers () const
std::vector< ForwardDetLayer * >
const & 
posTecLayers () const
std::vector< ForwardDetLayer * >
const & 
posTidLayers () const
std::vector< BarrelDetLayer * >
const & 
tibLayers () const
std::vector< BarrelDetLayer * >
const & 
tobLayers () const
virtual ~GeometricSearchTracker ()

Private Attributes

std::vector< DetLayer * > theAllLayers
std::vector< BarrelDetLayer * > theBarrelLayers
std::vector< ForwardDetLayer * > theForwardLayers
std::vector< ForwardDetLayer * > theNegForwardLayers
std::vector< ForwardDetLayer * > theNegPixelForwardLayers
std::vector< ForwardDetLayer * > theNegTecLayers
std::vector< ForwardDetLayer * > theNegTidLayers
std::vector< BarrelDetLayer * > thePixelBarrelLayers
std::vector< ForwardDetLayer * > thePosForwardLayers
std::vector< ForwardDetLayer * > thePosPixelForwardLayers
std::vector< ForwardDetLayer * > thePosTecLayers
std::vector< ForwardDetLayer * > thePosTidLayers
std::vector< BarrelDetLayer * > theTibLayers
std::vector< BarrelDetLayer * > theTobLayers

Detailed Description

GeometricSearchTracker implementation

Definition at line 13 of file GeometricSearchTracker.h.


Constructor & Destructor Documentation

GeometricSearchTracker::GeometricSearchTracker ( const std::vector< BarrelDetLayer * > &  pxlBar,
const std::vector< BarrelDetLayer * > &  tib,
const std::vector< BarrelDetLayer * > &  tob,
const std::vector< ForwardDetLayer * > &  negPxlFwd,
const std::vector< ForwardDetLayer * > &  negTid,
const std::vector< ForwardDetLayer * > &  negTec,
const std::vector< ForwardDetLayer * > &  posPxlFwd,
const std::vector< ForwardDetLayer * > &  posTid,
const std::vector< ForwardDetLayer * > &  posTec 
)

Definition at line 6 of file GeometricSearchTracker.cc.

References barrelLayers(), prof2calltree::l, negForwardLayers(), negPixelForwardLayers(), negTecLayers(), negTidLayers(), pixelBarrelLayers(), posForwardLayers(), posPixelForwardLayers(), posTecLayers(), posTidLayers(), theAllLayers, theBarrelLayers, theForwardLayers, theNegForwardLayers, theNegPixelForwardLayers, theNegTecLayers, theNegTidLayers, thePixelBarrelLayers, thePosForwardLayers, thePosPixelForwardLayers, thePosTecLayers, thePosTidLayers, theTibLayers, theTobLayers, tibLayers(), and tobLayers().

                                                                                      :
  thePixelBarrelLayers(pxlBar.begin(),pxlBar.end()),
  theTibLayers(tib.begin(),tib.end()),
  theTobLayers(tob.begin(),tob.end()),
  theNegPixelForwardLayers(negPxlFwd.begin(),negPxlFwd.end()),
  theNegTidLayers(negTid.begin(),negTid.end()),
  theNegTecLayers(negTec.begin(),negTec.end()),
  thePosPixelForwardLayers(posPxlFwd.begin(),posPxlFwd.end()),
  thePosTidLayers(posTid.begin(),posTid.end()),
  thePosTecLayers(posTec.begin(),posTec.end())
{
  theBarrelLayers.assign(thePixelBarrelLayers.begin(),thePixelBarrelLayers.end());
  theBarrelLayers.insert(theBarrelLayers.end(),theTibLayers.begin(),theTibLayers.end());
  theBarrelLayers.insert(theBarrelLayers.end(),theTobLayers.begin(),theTobLayers.end());

  theNegForwardLayers.assign(theNegPixelForwardLayers.begin(),theNegPixelForwardLayers.end());
  theNegForwardLayers.insert(theNegForwardLayers.end(),theNegTidLayers.begin(),theNegTidLayers.end());
  theNegForwardLayers.insert(theNegForwardLayers.end(),theNegTecLayers.begin(),theNegTecLayers.end());

  thePosForwardLayers.assign(thePosPixelForwardLayers.begin(),thePosPixelForwardLayers.end());
  thePosForwardLayers.insert(thePosForwardLayers.end(),thePosTidLayers.begin(),thePosTidLayers.end());
  thePosForwardLayers.insert(thePosForwardLayers.end(),thePosTecLayers.begin(),thePosTecLayers.end());


  theForwardLayers.assign(theNegForwardLayers.begin(),theNegForwardLayers.end());
  theForwardLayers.insert(theForwardLayers.end(),thePosForwardLayers.begin(),thePosForwardLayers.end());
  theAllLayers.assign(theBarrelLayers.begin(),theBarrelLayers.end());
  theAllLayers.insert(theAllLayers.end(),
                      theForwardLayers.begin(),
                      theForwardLayers.end());

  // number the layers 
  int sq=0;
  for (auto l : theAllLayers) 
    (*l).setSeqNum(sq++);

  edm::LogInfo("TkDetLayers")
    << "------ GeometricSearchTracker constructed with: ------" << "\n"
    << "n pxlBarLayers: " << this->pixelBarrelLayers().size() << "\n"
    << "n tibLayers:    " << this->tibLayers().size() << "\n"
    << "n tobLayers:    " << this->tobLayers().size() << "\n"
    << "n negPxlFwdLayers: " << this->negPixelForwardLayers().size() << "\n"
    << "n posPxlFwdLayers: " << this->posPixelForwardLayers().size() << "\n"
    << "n negTidLayers: " << this->negTidLayers().size() << "\n"
    << "n posTidLayers: " << this->posTidLayers().size() << "\n"
    << "n negTecLayers: " << this->negTecLayers().size() << "\n"
    << "n posTecLayers: " << this->posTecLayers().size() << "\n"
    
    << "n barreLayers:  " << this->barrelLayers().size() << "\n"
    << "n negforwardLayers: " << this->negForwardLayers().size() << "\n"
    << "n posForwardLayers: " << this->posForwardLayers().size() 
    << "\nn Total :     "     << theAllLayers.size() << " " << sq
    << std::endl;

    for (auto l : theAllLayers)
      edm::LogInfo("TkDetLayers") << (*l).seqNum()<< ": " << (*l).subDetector() << ", ";
    edm::LogInfo("TkDetLayers") << std::endl;

}
GeometricSearchTracker::~GeometricSearchTracker ( ) [virtual]

Definition at line 75 of file GeometricSearchTracker.cc.

References theAllLayers.

                                               {
  for(vector<DetLayer*>::const_iterator it=theAllLayers.begin(); it!=theAllLayers.end();it++){
    delete *it;
  }
  
}

Member Function Documentation

std::vector<DetLayer*> const& GeometricSearchTracker::allLayers ( ) const [inline]
std::vector<BarrelDetLayer*> const& GeometricSearchTracker::barrelLayers ( ) const [inline]
const DetLayer* GeometricSearchTracker::detLayer ( const DetId id) const [inline]
std::vector<ForwardDetLayer*> const& GeometricSearchTracker::forwardLayers ( ) const [inline]
const DetLayer * GeometricSearchTracker::idToLayer ( const DetId detId) const [virtual]

Give the DetId of a module, returns the pointer to the corresponding DetLayer.

Reimplemented from DetLayerGeometry.

Definition at line 93 of file GeometricSearchTracker.cc.

References PXFDetId::disk(), TIBDetId::layer(), TOBDetId::layer(), PXBDetId::layer(), PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, StripSubdetector::TEC, theNegPixelForwardLayers, theNegTecLayers, theNegTidLayers, thePixelBarrelLayers, thePosPixelForwardLayers, thePosTecLayers, thePosTidLayers, theTibLayers, theTobLayers, StripSubdetector::TIB, StripSubdetector::TID, StripSubdetector::TOB, TIDDetId::wheel(), and TECDetId::wheel().

Referenced by GlobalDetLayerGeometry::idToLayer().

{
  switch(id.subdetId()) {
  case StripSubdetector::TIB:
    //edm::LogInfo(TkDetLayers) << "TIB layer n: " << TIBDetId(id).layer() ;
    return theTibLayers[TIBDetId(id).layer()-1];
    break;

  case StripSubdetector::TOB:
    //edm::LogInfo(TkDetLayers) << "TOB layer n: " << TOBDetId(id).layer() ;
    return theTobLayers[TOBDetId(id).layer()-1];
    break;

  case StripSubdetector::TID:
    //edm::LogInfo(TkDetLayers) << "TID wheel n: " << TIDDetId(id).wheel() ;
    if(TIDDetId(id).side() ==1 ) {
      return theNegTidLayers[TIDDetId(id).wheel()-1];
    }else if( TIDDetId(id).side() == 2 ) {
      return thePosTidLayers[TIDDetId(id).wheel()-1];
    }
    break;

  case StripSubdetector::TEC:
    //edm::LogInfo(TkDetLayers) << "TEC wheel n: " << TECDetId(id).wheel() ;
    if(TECDetId(id).side() ==1 ) {
      return theNegTecLayers[TECDetId(id).wheel()-1];
    }else if( TECDetId(id).side() == 2 ) {
      return thePosTecLayers[TECDetId(id).wheel()-1];
    }
    break;

  case PixelSubdetector::PixelBarrel:
    //edm::LogInfo(TkDetLayers) << "PixelBarrel layer n: " << PXBDetId(id).layer() ;
    return thePixelBarrelLayers[PXBDetId(id).layer()-1];
    break;

  case PixelSubdetector::PixelEndcap:
    //edm::LogInfo(TkDetLayers) << "PixelEndcap disk n: " << PXFDetId(id).disk() ;
    if(PXFDetId(id).side() ==1 ) {
      return theNegPixelForwardLayers[PXFDetId(id).disk()-1];
    }else if( PXFDetId(id).side() == 2 ) {
      return thePosPixelForwardLayers[PXFDetId(id).disk()-1];
    }
    break;

  default:    
    edm::LogError("TkDetLayers") << "ERROR:layer not found!" ;
    // throw(something);
  }
  return 0; //just to avoid compile warnings
}
std::vector<ForwardDetLayer*> const& GeometricSearchTracker::negForwardLayers ( ) const [inline]
std::vector<ForwardDetLayer*> const& GeometricSearchTracker::negPixelForwardLayers ( ) const [inline]
std::vector<ForwardDetLayer*> const& GeometricSearchTracker::negTecLayers ( ) const [inline]
std::vector<ForwardDetLayer*> const& GeometricSearchTracker::negTidLayers ( ) const [inline]
std::vector<BarrelDetLayer*> const& GeometricSearchTracker::pixelBarrelLayers ( ) const [inline]
std::vector<ForwardDetLayer*> const& GeometricSearchTracker::posForwardLayers ( ) const [inline]
std::vector<ForwardDetLayer*> const& GeometricSearchTracker::posPixelForwardLayers ( ) const [inline]
std::vector<ForwardDetLayer*> const& GeometricSearchTracker::posTecLayers ( ) const [inline]
std::vector<ForwardDetLayer*> const& GeometricSearchTracker::posTidLayers ( ) const [inline]
std::vector<BarrelDetLayer*> const& GeometricSearchTracker::tibLayers ( ) const [inline]
std::vector<BarrelDetLayer*> const& GeometricSearchTracker::tobLayers ( ) const [inline]

Member Data Documentation

Definition at line 57 of file GeometricSearchTracker.h.

Referenced by barrelLayers(), and GeometricSearchTracker().

Definition at line 58 of file GeometricSearchTracker.h.

Referenced by forwardLayers(), and GeometricSearchTracker().

Definition at line 59 of file GeometricSearchTracker.h.

Referenced by GeometricSearchTracker(), and negForwardLayers().

Definition at line 68 of file GeometricSearchTracker.h.

Referenced by GeometricSearchTracker(), idToLayer(), and negTecLayers().

Definition at line 67 of file GeometricSearchTracker.h.

Referenced by GeometricSearchTracker(), idToLayer(), and negTidLayers().

Definition at line 62 of file GeometricSearchTracker.h.

Referenced by GeometricSearchTracker(), idToLayer(), and pixelBarrelLayers().

Definition at line 60 of file GeometricSearchTracker.h.

Referenced by GeometricSearchTracker(), and posForwardLayers().

Definition at line 71 of file GeometricSearchTracker.h.

Referenced by GeometricSearchTracker(), idToLayer(), and posTecLayers().

Definition at line 70 of file GeometricSearchTracker.h.

Referenced by GeometricSearchTracker(), idToLayer(), and posTidLayers().

Definition at line 63 of file GeometricSearchTracker.h.

Referenced by GeometricSearchTracker(), idToLayer(), and tibLayers().

Definition at line 64 of file GeometricSearchTracker.h.

Referenced by GeometricSearchTracker(), idToLayer(), and tobLayers().