CMS 3D CMS Logo

Classes | Public Member Functions | Private Member Functions | Private Attributes

SiPixelQuality Class Reference

#include <SiPixelQuality.h>

List of all members.

Classes

class  BadComponentStrictWeakOrdering
struct  disabledModuleType

Public Member Functions

void addDisabledModule (disabledModuleType module)
void addDisabledModule (std::vector< disabledModuleType > &idVector)
const std::vector
< disabledModuleType
getBadComponentList () const
const std::vector< LocalPointgetBadRocPositions (const uint32_t &detid, const TrackerGeometry &theTracker, const SiPixelFedCabling *map) const
short getBadRocs (const uint32_t &detid) const
bool IsAreaBad (uint32_t detid, sipixelobjects::GlobalPixel global, const edm::EventSetup &es, const SiPixelFedCabling *map) const
bool IsModuleBad (const uint32_t &detid) const
bool IsModuleUsable (const uint32_t &detid) const
bool IsRocBad (const uint32_t &detid, const short &rocNb) const
void setDisabledModuleList (std::vector< disabledModuleType > &disabledModules)
 SiPixelQuality ()
 SiPixelQuality (std::vector< disabledModuleType > &disabledModules)
virtual ~SiPixelQuality ()

Private Member Functions

bool IsFedBad (const uint32_t &detid) const

Private Attributes

std::vector< disabledModuleTypetheDisabledModules

Detailed Description

Definition at line 25 of file SiPixelQuality.h.


Constructor & Destructor Documentation

SiPixelQuality::SiPixelQuality ( ) [inline]

Definition at line 63 of file SiPixelQuality.h.

SiPixelQuality::SiPixelQuality ( std::vector< disabledModuleType > &  disabledModules) [inline]

Definition at line 66 of file SiPixelQuality.h.

: theDisabledModules(disabledModules) {;}
virtual SiPixelQuality::~SiPixelQuality ( ) [inline, virtual]

Definition at line 68 of file SiPixelQuality.h.

{;}

Member Function Documentation

void SiPixelQuality::addDisabledModule ( disabledModuleType  module) [inline]

Definition at line 75 of file SiPixelQuality.h.

References theDisabledModules.

Referenced by SiPixelFakeQualityESSource::produce().

  { theDisabledModules.push_back(module); }
void SiPixelQuality::addDisabledModule ( std::vector< disabledModuleType > &  idVector)
const std::vector<disabledModuleType> SiPixelQuality::getBadComponentList ( ) const [inline]

Definition at line 104 of file SiPixelQuality.h.

References theDisabledModules.

    { return theDisabledModules; }
const std::vector< LocalPoint > SiPixelQuality::getBadRocPositions ( const uint32_t &  detid,
const TrackerGeometry theTracker,
const SiPixelFedCabling map 
) const

Definition at line 125 of file SiPixelQuality.cc.

References sipixelobjects::GlobalPixel::col, SiPixelFedCabling::findItem(), i, sipixelobjects::PixelROC::idInDetUnit(), TrackerGeometry::idToDet(), Topology::localPosition(), path(), SiPixelFedCabling::pathToDetUnit(), sipixelobjects::GlobalPixel::row, PixelGeomDetUnit::specificTopology(), and sipixelobjects::PixelROC::toGlobal().

Referenced by MeasurementTracker::initializePixelStatus().

                                                                                                                                                           {
  std::vector<LocalPoint> badrocpositions (0);
  std::pair<uint8_t, uint8_t> coord(1,1);
   for(unsigned int i = 0; i < 16; i++){
     if (IsRocBad(detid, i) == true){
    std::vector<CablingPathToDetUnit> path = map->pathToDetUnit(detid);
    typedef  std::vector<CablingPathToDetUnit>::const_iterator IT;
       for  (IT it = path.begin(); it != path.end(); ++it) {
          const PixelROC * myroc = map->findItem(*it);
          if( myroc->idInDetUnit() == i) {
              LocalPixel::RocRowCol  local = { 39, 25};   //corresponding to center of ROC row, col
              GlobalPixel global = myroc->toGlobal( LocalPixel(local) );
              //       edm::ESHandle<TrackerGeometry> geom;
              //     es.get<TrackerDigiGeometryRecord>().get( geom );
              //    const TrackerGeometry& theTracker(*geom);
              const PixelGeomDetUnit * theGeomDet = dynamic_cast<const PixelGeomDetUnit*> (theTracker.idToDet(detid) );

              PixelTopology const * topology = &(theGeomDet->specificTopology());

              MeasurementPoint thepoint(global.row, global.col);
              LocalPoint localpoint = topology->localPosition(thepoint);
              badrocpositions.push_back(localpoint);
         break;
          }
       }
     }
   }
  return badrocpositions;
}
short SiPixelQuality::getBadRocs ( const uint32_t &  detid) const

Definition at line 116 of file SiPixelQuality.cc.

References cond::rpcobgas::detid, and python::multivaluedict::sort().

Referenced by MeasurementTracker::initializePixelStatus().

                                                           {
  std::vector<SiPixelQuality::disabledModuleType>disabledModules = theDisabledModules;
  std::sort(disabledModules.begin(),disabledModules.end(),SiPixelQuality::BadComponentStrictWeakOrdering());
  std::vector<disabledModuleType>::const_iterator iter = std::lower_bound(disabledModules.begin(),disabledModules.end(),detid,SiPixelQuality::BadComponentStrictWeakOrdering());
  if (iter != disabledModules.end() && iter->DetID==detid)
    return iter->BadRocs;
  return 0;
}
bool SiPixelQuality::IsAreaBad ( uint32_t  detid,
sipixelobjects::GlobalPixel  global,
const edm::EventSetup es,
const SiPixelFedCabling map 
) const

Definition at line 103 of file SiPixelQuality.cc.

References SiPixelFrameReverter::findRocInDet(), and IsRocBad().

                                                                                                                                             {
 
  SiPixelFrameReverter reverter(es,map);
  int rocfromarea = -1;  
  rocfromarea = reverter.findRocInDet(detid, global);

  return SiPixelQuality::IsRocBad(detid, rocfromarea);
  return false;
}
bool SiPixelQuality::IsFedBad ( const uint32_t &  detid) const [private]

Definition at line 156 of file SiPixelQuality.cc.

                                                         {
  return false;
}
bool SiPixelQuality::IsModuleBad ( const uint32_t &  detid) const

Definition at line 80 of file SiPixelQuality.cc.

References cond::rpcobgas::detid, and python::multivaluedict::sort().

                                                              {
   if(IsFedBad(detid))
     return true;
   std::vector<SiPixelQuality::disabledModuleType>disabledModules = theDisabledModules;
   std::sort(disabledModules.begin(),disabledModules.end(),SiPixelQuality::BadComponentStrictWeakOrdering());
   std::vector<disabledModuleType>::const_iterator iter = std::lower_bound(disabledModules.begin(),disabledModules.end(),detid,SiPixelQuality::BadComponentStrictWeakOrdering());
   if (iter != disabledModules.end() && iter->DetID==detid && iter->errorType == 0) //errorType 0 corresponds to "whole" dead module
      return true;
   return false;
}
bool SiPixelQuality::IsModuleUsable ( const uint32_t &  detid) const

Definition at line 68 of file SiPixelQuality.cc.

References cond::rpcobgas::detid, and python::multivaluedict::sort().

Referenced by MeasurementTracker::initializePixelStatus().

                                                               {
   if(IsFedBad(detid))
     return true;
   std::vector<SiPixelQuality::disabledModuleType>disabledModules = theDisabledModules;
   std::sort(disabledModules.begin(),disabledModules.end(),SiPixelQuality::BadComponentStrictWeakOrdering());
   std::vector<disabledModuleType>::const_iterator iter = std::lower_bound(disabledModules.begin(),disabledModules.end(),detid,SiPixelQuality::BadComponentStrictWeakOrdering());
   if (iter != disabledModules.end() && iter->DetID==detid && iter->errorType ==0)
    return false;
  return true;
}
bool SiPixelQuality::IsRocBad ( const uint32_t &  detid,
const short &  rocNb 
) const

Definition at line 92 of file SiPixelQuality.cc.

References cond::rpcobgas::detid, and python::multivaluedict::sort().

Referenced by IsAreaBad(), and PixelDataFormatter::word2digi().

                                                                             {
  if(IsModuleBad(detid))
    return true;
   std::vector<SiPixelQuality::disabledModuleType>disabledModules = theDisabledModules;
   std::sort(disabledModules.begin(),disabledModules.end(),SiPixelQuality::BadComponentStrictWeakOrdering());
   std::vector<disabledModuleType>::const_iterator iter = std::lower_bound(disabledModules.begin(),disabledModules.end(),detid,SiPixelQuality::BadComponentStrictWeakOrdering());
   if (iter != disabledModules.end() && iter->DetID == detid){
     return ((iter->BadRocs >> rocNb)&0x1);}
  return false;
}
void SiPixelQuality::setDisabledModuleList ( std::vector< disabledModuleType > &  disabledModules) [inline]

Definition at line 71 of file SiPixelQuality.h.

References theDisabledModules.

  { theDisabledModules = disabledModules; }

Member Data Documentation

Definition at line 112 of file SiPixelQuality.h.

Referenced by addDisabledModule(), getBadComponentList(), and setDisabledModuleList().