CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Member Functions | Private Attributes | Friends
SiPixelQuality Class Reference

#include <SiPixelQuality.h>

Classes

class  BadComponentStrictWeakOrdering
 
struct  disabledModuleType
 

Public Member Functions

void add (const SiStripDetVOff *)
 
void addDisabledModule (disabledModuleType module)
 
void addDisabledModule (std::vector< disabledModuleType > &idVector)
 
int BadModuleNumber ()
 
const std::vector< disabledModuleTypegetBadComponentList () const
 
const std::vector< LocalPointgetBadRocPositions (const uint32_t &detid, const TrackerGeometry &theTracker, const SiPixelFedCabling *map) const
 
short getBadRocs (const uint32_t &detid) 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
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

std::vector< disabledModuleTypetheDisabledModules
 

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 

Detailed Description

Definition at line 27 of file SiPixelQuality.h.

Constructor & Destructor Documentation

◆ SiPixelQuality() [1/2]

SiPixelQuality::SiPixelQuality ( )
inline

Definition at line 60 of file SiPixelQuality.h.

60 : theDisabledModules(0) { ; }

◆ SiPixelQuality() [2/2]

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

Definition at line 63 of file SiPixelQuality.h.

63 : theDisabledModules(disabledModules) { ; }

◆ ~SiPixelQuality()

virtual SiPixelQuality::~SiPixelQuality ( )
inlinevirtual

Definition at line 65 of file SiPixelQuality.h.

65 { ; }

Member Function Documentation

◆ add()

void SiPixelQuality::add ( const SiStripDetVOff Voff)

Definition at line 50 of file SiPixelQuality.cc.

50  {
51  //Get vector of Voff dets
52  std::vector<uint32_t> vdets;
53  Voff->getDetIds(vdets);
54 
55  std::vector<uint32_t>::const_iterator iter = vdets.begin();
56  std::vector<uint32_t>::const_iterator iterEnd = vdets.end();
57 
58  for (; iter != iterEnd; ++iter) {
60  BadModule.DetID = *iter;
61  BadModule.errorType = 0;
62  BadModule.BadRocs = 65535; //NOTE: here all module is bad - no difference for half modules
63  if (IsModuleUsable(BadModule.DetID))
64  addDisabledModule(BadModule);
65  }
66 }

References SiPixelQuality::disabledModuleType::BadRocs, SiPixelQuality::disabledModuleType::DetID, SiPixelQuality::disabledModuleType::errorType, and SiStripDetVOff::getDetIds().

Referenced by counter.Counter::register(), SequenceTypes.Task::remove(), and SequenceTypes.Task::replace().

◆ addDisabledModule() [1/2]

void SiPixelQuality::addDisabledModule ( disabledModuleType  module)
inline

Definition at line 71 of file SiPixelQuality.h.

71 { theDisabledModules.push_back(module); }

References theDisabledModules.

Referenced by SiPixelStatusHarvester::dqmEndRun().

◆ addDisabledModule() [2/2]

void SiPixelQuality::addDisabledModule ( std::vector< disabledModuleType > &  idVector)

Definition at line 46 of file SiPixelQuality.cc.

46  {
47  theDisabledModules.insert(theDisabledModules.end(), idVector.begin(), idVector.end());
48 }

◆ BadModuleNumber()

int SiPixelQuality::BadModuleNumber ( )

Definition at line 90 of file SiPixelQuality.cc.

90  {
91  std::vector<SiPixelQuality::disabledModuleType> disabledModules = theDisabledModules;
92  //does not distinguish between partially dead or not
93  return disabledModules.size();
94 }

◆ getBadComponentList()

const std::vector<disabledModuleType> SiPixelQuality::getBadComponentList ( ) const
inline

◆ getBadRocPositions()

const std::vector< LocalPoint > SiPixelQuality::getBadRocPositions ( const uint32_t &  detid,
const TrackerGeometry theTracker,
const SiPixelFedCabling map 
) const

Definition at line 136 of file SiPixelQuality.cc.

138  {
139  std::vector<LocalPoint> badrocpositions(0);
140  for (unsigned int i = 0; i < 16; i++) {
141  if (IsRocBad(detid, i) == true) {
142  std::vector<CablingPathToDetUnit> path = map->pathToDetUnit(detid);
143  typedef std::vector<CablingPathToDetUnit>::const_iterator IT;
144  for (IT it = path.begin(); it != path.end(); ++it) {
145  const PixelROC* myroc = map->findItem(*it);
146  if (myroc->idInDetUnit() == i) {
147  LocalPixel::RocRowCol local = {39, 25}; //corresponding to center of ROC row, col
148  GlobalPixel global = myroc->toGlobal(LocalPixel(local));
149  // edm::ESHandle<TrackerGeometry> geom;
150  // es.get<TrackerDigiGeometryRecord>().get( geom );
151  // const TrackerGeometry& theTracker(*geom);
152  const PixelGeomDetUnit* theGeomDet = dynamic_cast<const PixelGeomDetUnit*>(theTracker.idToDet(detid));
153 
154  PixelTopology const* topology = &(theGeomDet->specificTopology());
155 
156  MeasurementPoint thepoint(global.row, global.col);
157  LocalPoint localpoint = topology->localPosition(thepoint);
158  badrocpositions.push_back(localpoint);
159  break;
160  }
161  }
162  }
163  }
164  return badrocpositions;
165 }

References sipixelobjects::GlobalPixel::col, mps_fire::i, sipixelobjects::PixelROC::idInDetUnit(), TrackerGeometry::idToDet(), DTRecHitClients_cfi::local, genParticles_cff::map, castor_dqm_sourceclient_file_cfg::path, sipixelobjects::GlobalPixel::row, PixelGeomDetUnit::specificTopology(), and sipixelobjects::PixelROC::toGlobal().

◆ getBadRocs()

short SiPixelQuality::getBadRocs ( const uint32_t &  detid) const

Definition at line 126 of file SiPixelQuality.cc.

126  {
127  std::vector<SiPixelQuality::disabledModuleType> disabledModules = theDisabledModules;
128  std::sort(disabledModules.begin(), disabledModules.end(), SiPixelQuality::BadComponentStrictWeakOrdering());
129  std::vector<disabledModuleType>::const_iterator iter = std::lower_bound(
130  disabledModules.begin(), disabledModules.end(), detid, SiPixelQuality::BadComponentStrictWeakOrdering());
131  if (iter != disabledModules.end() && iter->DetID == detid)
132  return iter->BadRocs;
133  return 0;
134 }

References pfDeepBoostedJetPreprocessParams_cfi::lower_bound, and jetUpdater_cfi::sort.

◆ IsFedBad()

bool SiPixelQuality::IsFedBad ( const uint32_t &  detid) const
private

Definition at line 167 of file SiPixelQuality.cc.

167 { return false; }

◆ IsModuleBad()

bool SiPixelQuality::IsModuleBad ( const uint32_t &  detid) const

Definition at line 97 of file SiPixelQuality.cc.

97  {
98  if (IsFedBad(detid))
99  return true;
100  std::vector<SiPixelQuality::disabledModuleType> disabledModules = theDisabledModules;
101  std::sort(disabledModules.begin(), disabledModules.end(), SiPixelQuality::BadComponentStrictWeakOrdering());
102  std::vector<disabledModuleType>::const_iterator iter = std::lower_bound(
103  disabledModules.begin(), disabledModules.end(), detid, SiPixelQuality::BadComponentStrictWeakOrdering());
104  //errorType 0 corresponds to "whole" dead module
105  if (iter != disabledModules.end() && iter->DetID == detid && iter->errorType == 0)
106  return true;
107  return false;
108 }

References pfDeepBoostedJetPreprocessParams_cfi::lower_bound, and jetUpdater_cfi::sort.

Referenced by PixelBaryCentreAnalyzer::analyze(), MCMisalignmentScaler::analyze(), and TrackerGeometryCompare::fillTree().

◆ IsModuleUsable()

bool SiPixelQuality::IsModuleUsable ( const uint32_t &  detid) const

Definition at line 78 of file SiPixelQuality.cc.

78  {
79  if (IsFedBad(detid))
80  return true;
81  std::vector<SiPixelQuality::disabledModuleType> disabledModules = theDisabledModules;
82  std::sort(disabledModules.begin(), disabledModules.end(), SiPixelQuality::BadComponentStrictWeakOrdering());
83  std::vector<disabledModuleType>::const_iterator iter = std::lower_bound(
84  disabledModules.begin(), disabledModules.end(), detid, SiPixelQuality::BadComponentStrictWeakOrdering());
85  if (iter != disabledModules.end() && iter->DetID == detid && iter->errorType == 0)
86  return false;
87  return true;
88 }

References pfDeepBoostedJetPreprocessParams_cfi::lower_bound, and jetUpdater_cfi::sort.

◆ IsRocBad()

bool SiPixelQuality::IsRocBad ( const uint32_t &  detid,
const short &  rocNb 
) const

Definition at line 111 of file SiPixelQuality.cc.

111  {
112  if (IsModuleBad(detid))
113  return true;
114  std::vector<SiPixelQuality::disabledModuleType> disabledModules = theDisabledModules;
115  std::sort(disabledModules.begin(), disabledModules.end(), SiPixelQuality::BadComponentStrictWeakOrdering());
116  std::vector<disabledModuleType>::const_iterator iter = std::lower_bound(
117  disabledModules.begin(), disabledModules.end(), detid, SiPixelQuality::BadComponentStrictWeakOrdering());
118  if (iter != disabledModules.end() && iter->DetID == detid) {
119  return ((iter->BadRocs >> rocNb) & 0x1);
120  }
121  return false;
122 }

References pfDeepBoostedJetPreprocessParams_cfi::lower_bound, and jetUpdater_cfi::sort.

Referenced by SiPixelStatusHarvester::dqmEndRun(), PixelDataFormatter::interpretRawData(), Phase2TrackerDigitizerAlgorithm::module_killing_DB(), SiPixelDigitizerAlgorithm::module_killing_DB(), SiPixelROCsStatusAndMappingWrapper::SiPixelROCsStatusAndMappingWrapper(), and PixelDataFormatter::word2digi().

◆ serialize()

template<class Archive >
void SiPixelQuality::serialize ( Archive &  ar,
const unsigned int  version 
)
private

◆ setDisabledModuleList()

void SiPixelQuality::setDisabledModuleList ( std::vector< disabledModuleType > &  disabledModules)
inline

Definition at line 68 of file SiPixelQuality.h.

68 { theDisabledModules = disabledModules; }

References theDisabledModules.

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 113 of file SiPixelQuality.h.

◆ cond::serialization::access

template<typename CondSerializationT , typename Enabled >
friend struct cond::serialization::access
friend

Definition at line 113 of file SiPixelQuality.h.

Member Data Documentation

◆ theDisabledModules

std::vector<disabledModuleType> SiPixelQuality::theDisabledModules
private

Definition at line 110 of file SiPixelQuality.h.

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

TrackerGeometry::idToDet
const TrackerGeomDet * idToDet(DetId) const override
Definition: TrackerGeometry.cc:193
Point2DBase
Definition: Point2DBase.h:9
SiPixelQuality::IsModuleBad
bool IsModuleBad(const uint32_t &detid) const
Definition: SiPixelQuality.cc:97
mps_fire.i
i
Definition: mps_fire.py:428
SiPixelQuality::BadComponentStrictWeakOrdering
Definition: SiPixelQuality.h:54
SiPixelQuality::disabledModuleType
Definition: SiPixelQuality.h:29
sipixelobjects::GlobalPixel::row
int row
Definition: GlobalPixel.h:7
SiPixelQuality::disabledModuleType::errorType
int errorType
Definition: SiPixelQuality.h:31
sipixelobjects::GlobalPixel::col
int col
Definition: GlobalPixel.h:8
sipixelobjects::LocalPixel
identify pixel inside single ROC
Definition: LocalPixel.h:7
SiPixelQuality::IsModuleUsable
bool IsModuleUsable(const uint32_t &detid) const
Definition: SiPixelQuality.cc:78
sipixelobjects::GlobalPixel
global coordinates (row and column in DetUnit, as in PixelDigi)
Definition: GlobalPixel.h:6
PixelGeomDetUnit
Definition: PixelGeomDetUnit.h:15
SiStripDetVOff::getDetIds
void getDetIds(std::vector< uint32_t > &DetIds_) const
Definition: SiStripDetVOff.cc:64
Point3DBase< float, LocalTag >
PixelTopology
Definition: PixelTopology.h:10
SiPixelQuality::theDisabledModules
std::vector< disabledModuleType > theDisabledModules
Definition: SiPixelQuality.h:110
pfDeepBoostedJetPreprocessParams_cfi.lower_bound
lower_bound
Definition: pfDeepBoostedJetPreprocessParams_cfi.py:15
jetUpdater_cfi.sort
sort
Definition: jetUpdater_cfi.py:29
PixelGeomDetUnit::specificTopology
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
Definition: PixelGeomDetUnit.cc:17
SiPixelQuality::disabledModuleType::DetID
uint32_t DetID
Definition: SiPixelQuality.h:30
SiPixelQuality::addDisabledModule
void addDisabledModule(disabledModuleType module)
Definition: SiPixelQuality.h:71
sipixelobjects::PixelROC::toGlobal
GlobalPixel toGlobal(const LocalPixel &loc) const
Definition: PixelROC.h:55
IT
std::vector< LinkConnSpec >::const_iterator IT
Definition: TriggerBoardSpec.cc:5
sipixelobjects::PixelROC
Definition: PixelROC.h:23
SiPixelQuality::disabledModuleType::BadRocs
unsigned short BadRocs
Definition: SiPixelQuality.h:32
sipixelobjects::LocalPixel::RocRowCol
row and collumn in ROC representation
Definition: LocalPixel.h:13
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
DTRecHitClients_cfi.local
local
Definition: DTRecHitClients_cfi.py:10
genParticles_cff.map
map
Definition: genParticles_cff.py:11
SiPixelQuality::IsRocBad
bool IsRocBad(const uint32_t &detid, const short &rocNb) const
Definition: SiPixelQuality.cc:111
SiPixelQuality::IsFedBad
bool IsFedBad(const uint32_t &detid) const
Definition: SiPixelQuality.cc:167
sipixelobjects::PixelROC::idInDetUnit
unsigned int idInDetUnit() const
id of this ROC in DetUnit etermined by token path
Definition: PixelROC.h:37