CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes
PixelInactiveAreaFinder Class Reference

#include <PixelInactiveAreaFinder.h>

Classes

struct  DetGroupSpan
 
class  InactiveAreas
 

Public Types

using Area = AreaSeededTrackingRegionsBuilder::Area
 
using DetGroupSpanContainer = std::vector< DetGroupSpan >
 
using LayerSetIndex = SeedingLayerSetsHits::LayerSetIndex
 
using SeedingLayerId = SeedingLayerSetsBuilder::SeedingLayerId
 

Public Member Functions

InactiveAreas inactiveAreas (const edm::Event &iEvent, const edm::EventSetup &iSetup)
 
 PixelInactiveAreaFinder (const edm::ParameterSet &iConfig, const std::vector< SeedingLayerId > &seedingLayers, const SeedingLayerSetsLooper &seedingLayerSetsLooper, edm::ConsumesCollector &&iC)
 
 ~PixelInactiveAreaFinder ()=default
 

Static Public Member Functions

static void fillDescriptions (edm::ParameterSetDescription &desc)
 

Private Types

using det_t = uint32_t
 
using DetContainer = std::vector< uint32_t >
 
using DetectorSet = std::set< uint32_t >
 
using DetGroup = std::vector< uint32_t >
 
using DetGroupContainer = std::vector< DetGroup >
 
using DetGroupSpanContainerPair = std::pair< DetGroupSpanContainer, DetGroupSpanContainer >
 
using OverlapSpans = std::vector< DetGroupSpan >
 
using OverlapSpansContainer = std::vector< OverlapSpans >
 
using Stream = std::stringstream
 

Private Member Functions

DetGroup badAdjecentDetsBarrel (const det_t &det)
 
DetGroup badAdjecentDetsEndcap (const det_t &det)
 
DetGroupContainer badDetGroupsBarrel ()
 
DetGroupContainer badDetGroupsEndcap ()
 
void createPlottingFiles ()
 
DetGroupSpanContainerPair detGroupSpans ()
 
void detInfo (const det_t &det, Stream &ss)
 
bool detWorks (det_t det)
 
void getBadPixelDets (const edm::Event &iEvent, const edm::EventSetup &iSetup)
 
void getPhiSpanBarrel (const DetGroup &detGroup, DetGroupSpan &cspan)
 
void getPhiSpanEndcap (const DetGroup &detGroup, DetGroupSpan &cspan)
 
void getRSpan (const DetGroup &detGroup, DetGroupSpan &cspan)
 
void getSpan (const DetGroup &detGroup, DetGroupSpan &cspan)
 
void getZSpan (const DetGroup &detGroup, DetGroupSpan &cspan)
 
void printBadDetGroups ()
 
void printBadDetGroupSpans ()
 
void printBadPixelDets ()
 
void printPixelDets ()
 
DetGroup reachableDetGroup (const det_t &initDet, DetectorSet &foundDets)
 
void updatePixelDets (const edm::EventSetup &iSetup)
 

Private Attributes

DetContainer badPixelDetsBarrel_
 
DetContainer badPixelDetsEndcap_
 
std::vector< edm::EDGetTokenT< PixelFEDChannelCollection > > badPixelFEDChannelsTokens_
 
const bool createPlottingFiles_
 
const bool debug_
 
edm::ESWatcher< TrackerDigiGeometryRecordgeometryWatcher_
 
const bool ignoreSingleFPixPanelModules_
 
std::vector< SeedingLayerIdinactiveLayers_
 
std::vector< std::pair< unsigned short, unsigned short > > inactiveLayerSetIndices_
 
std::vector< edm::EDGetTokenT< DetIdCollection > > inactivePixelDetectorTokens_
 
std::vector< std::vector< LayerSetIndex > > layerSetIndexInactiveToActive_
 
std::array< unsigned short, 4 > nBPixLadders
 
unsigned short nModulesPerLadder
 
DetContainer pixelDetsBarrel_
 
DetContainer pixelDetsEndcap_
 
const SiPixelQualitypixelQuality_ = nullptr
 
const TrackerGeometrytrackerGeometry_ = nullptr
 
const TrackerTopologytrackerTopology_ = nullptr
 

Detailed Description

Definition at line 21 of file PixelInactiveAreaFinder.h.

Member Typedef Documentation

◆ Area

Definition at line 23 of file PixelInactiveAreaFinder.h.

◆ det_t

using PixelInactiveAreaFinder::det_t = uint32_t
private

Definition at line 99 of file PixelInactiveAreaFinder.h.

◆ DetContainer

using PixelInactiveAreaFinder::DetContainer = std::vector<uint32_t>
private

Definition at line 100 of file PixelInactiveAreaFinder.h.

◆ DetectorSet

using PixelInactiveAreaFinder::DetectorSet = std::set<uint32_t>
private

Definition at line 103 of file PixelInactiveAreaFinder.h.

◆ DetGroup

using PixelInactiveAreaFinder::DetGroup = std::vector<uint32_t>
private

Definition at line 101 of file PixelInactiveAreaFinder.h.

◆ DetGroupContainer

Definition at line 102 of file PixelInactiveAreaFinder.h.

◆ DetGroupSpanContainer

Definition at line 36 of file PixelInactiveAreaFinder.h.

◆ DetGroupSpanContainerPair

Definition at line 92 of file PixelInactiveAreaFinder.h.

◆ LayerSetIndex

Definition at line 25 of file PixelInactiveAreaFinder.h.

◆ OverlapSpans

Definition at line 93 of file PixelInactiveAreaFinder.h.

◆ OverlapSpansContainer

Definition at line 94 of file PixelInactiveAreaFinder.h.

◆ SeedingLayerId

Definition at line 24 of file PixelInactiveAreaFinder.h.

◆ Stream

using PixelInactiveAreaFinder::Stream = std::stringstream
private

Definition at line 104 of file PixelInactiveAreaFinder.h.

Constructor & Destructor Documentation

◆ PixelInactiveAreaFinder()

PixelInactiveAreaFinder::PixelInactiveAreaFinder ( const edm::ParameterSet iConfig,
const std::vector< SeedingLayerId > &  seedingLayers,
const SeedingLayerSetsLooper seedingLayerSetsLooper,
edm::ConsumesCollector &&  iC 
)

Definition at line 462 of file PixelInactiveAreaFinder.cc.

467  : debug_(iConfig.getUntrackedParameter<bool>("debug")),
468  createPlottingFiles_(iConfig.getUntrackedParameter<bool>("createPlottingFiles")),
469  ignoreSingleFPixPanelModules_(iConfig.getParameter<bool>("ignoreSingleFPixPanelModules")),
471  edm::vector_transform(iConfig.getParameter<std::vector<edm::InputTag>>("inactivePixelDetectorLabels"),
472  [&](const auto& tag) { return iC.consumes<DetIdCollection>(tag); })),
474  edm::vector_transform(iConfig.getParameter<std::vector<edm::InputTag>>("badPixelFEDChannelCollectionLabels"),
475  [&](const auto& tag) { return iC.consumes<PixelFEDChannelCollection>(tag); })) {
476 #ifdef EDM_ML_DEBUG
477  for (const auto& layer : seedingLayers) {
478  LogTrace("PixelInactiveAreaFinder") << "Input layer subdet " << std::get<0>(layer) << " side "
479  << static_cast<unsigned int>(std::get<1>(layer)) << " layer "
480  << std::get<2>(layer);
481  }
482 #endif
483 
484  auto findOrAdd = [&](SeedingLayerId layer) -> unsigned short {
485  auto found = std::find(inactiveLayers_.cbegin(), inactiveLayers_.cend(), layer);
486  if (found == inactiveLayers_.cend()) {
487  auto ret = inactiveLayers_.size();
488  inactiveLayers_.push_back(layer);
489  return ret;
490  }
491  return std::distance(inactiveLayers_.cbegin(), found);
492  };
493 
494  // mapping from active layer pairs to inactive layer pairs
495  const auto activeToInactiveMap = createActiveToInactiveMap();
496 
497  // convert input layer pairs (that are for active layers) to layer
498  // pairs to look for inactive areas
499  LayerSetIndex i = 0;
500  for (const auto& layerSet : seedingLayerSetsLooper.makeRange(seedingLayers)) {
501  assert(layerSet.size() == 2);
502  auto found = activeToInactiveMap.find(std::make_pair(layerSet[0], layerSet[1]));
503  if (found == activeToInactiveMap.end()) {
504  throw cms::Exception("Configuration")
505  << "Encountered layer pair " << layerSet[0] << "+" << layerSet[1]
506  << " not found from the internal 'active layer pairs' to 'inactive layer pairs' mapping; either fix the "
507  "input or the mapping (in PixelInactiveAreaFinder.cc)";
508  }
509 
510  LogTrace("PixelInactiveAreaFinder") << "Input layer set " << layerSet[0] << "+" << layerSet[1];
511  for (const auto& inactiveLayerSet : found->second) {
512  auto innerInd = findOrAdd(inactiveLayerSet.first);
513  auto outerInd = findOrAdd(inactiveLayerSet.second);
514 
515  auto found = std::find(
516  inactiveLayerSetIndices_.cbegin(), inactiveLayerSetIndices_.cend(), std::make_pair(innerInd, outerInd));
517  if (found == inactiveLayerSetIndices_.end()) {
518  inactiveLayerSetIndices_.emplace_back(innerInd, outerInd);
519  layerSetIndexInactiveToActive_.push_back(std::vector<LayerSetIndex>{i});
520  } else {
522  .push_back(i); // TODO: move to operator[] once finished
523  }
524 
525  LogTrace("PixelInactiveAreaFinder")
526  << " inactive layer set " << inactiveLayerSet.first << "+" << inactiveLayerSet.second;
527  }
528 
529  ++i;
530  }
531 
532 #ifdef EDM_ML_DEBUG
533  LogDebug("PixelInactiveAreaFinder") << "All inactive layer sets";
534  for (const auto& idxPair : inactiveLayerSetIndices_) {
535  LogTrace("PixelInactiveAreaFinder") << " " << inactiveLayers_[idxPair.first] << "+"
536  << inactiveLayers_[idxPair.second];
537  }
538 #endif
539 }

References GlobalPosition_Frontier_DevDB_cff::tag.

◆ ~PixelInactiveAreaFinder()

PixelInactiveAreaFinder::~PixelInactiveAreaFinder ( )
default

Member Function Documentation

◆ badAdjecentDetsBarrel()

PixelInactiveAreaFinder::DetGroup PixelInactiveAreaFinder::badAdjecentDetsBarrel ( const det_t det)
private

Definition at line 898 of file PixelInactiveAreaFinder.cc.

898  {
899  using std::remove_if;
900 
901  DetGroup adj;
902  auto const tTopo = trackerTopology_;
903  auto const& detId = DetId(det);
904  unsigned int layer = tTopo->pxbLayer(detId);
905  unsigned int ladder = tTopo->pxbLadder(detId);
906  unsigned int module = tTopo->pxbModule(detId);
907  unsigned int nLads = nBPixLadders[layer];
908  //add detectors from next and previous ladder
909  adj.push_back(tTopo->pxbDetId(layer, ((ladder - 1) + 1) % nLads + 1, module)());
910  adj.push_back(tTopo->pxbDetId(layer, ((ladder - 1) - 1 + nLads) % nLads + 1, module)());
911  //add adjecent detectors from same ladder
912  if (module == 1) {
913  adj.push_back(tTopo->pxbDetId(layer, ladder, module + 1)());
914  } else if (module == nModulesPerLadder) {
915  adj.push_back(tTopo->pxbDetId(layer, ladder, module - 1)());
916  } else {
917  adj.push_back(tTopo->pxbDetId(layer, ladder, module + 1)());
918  adj.push_back(tTopo->pxbDetId(layer, ladder, module - 1)());
919  }
920  //remove working detectors from list
921  adj.erase(remove_if(adj.begin(), adj.end(), [&](auto c) { return this->detWorks(c); }), adj.end());
922  return adj;
923 }

References HltBtagPostValidation_cff::c, detWorks(), PVValHelper::ladder, nBPixLadders, nModulesPerLadder, and trackerTopology_.

Referenced by reachableDetGroup().

◆ badAdjecentDetsEndcap()

PixelInactiveAreaFinder::DetGroup PixelInactiveAreaFinder::badAdjecentDetsEndcap ( const det_t det)
private

Definition at line 924 of file PixelInactiveAreaFinder.cc.

924  {
925  // this might be faster if adjecent
926  using std::ignore;
927  using std::tie;
928  DetGroup adj;
929  Span_t phiSpan, phiSpanComp;
930  float z, zComp;
931  unsigned int disk, diskComp;
932  auto const& detSurf = trackerGeometry_->idToDet(DetId(det))->surface();
933  phiSpan = detSurf.phiSpan();
934  tie(z, ignore) = detSurf.zSpan();
935  disk = trackerTopology_->pxfDisk(DetId(det));
936  // add detectors from same disk whose phi ranges overlap to the adjecent list
937  for (auto const& detComp : badPixelDetsEndcap_) {
938  auto const& detIdComp = DetId(detComp);
939  auto const& detSurfComp = trackerGeometry_->idToDet(detIdComp)->surface();
940  diskComp = trackerTopology_->pxfDisk(detIdComp);
941  phiSpanComp = detSurfComp.phiSpan();
942  tie(zComp, ignore) = detSurfComp.zSpan();
943  if (det != detComp && disk == diskComp && z * zComp > 0 && phiRangesOverlap(phiSpan, phiSpanComp)) {
944  adj.push_back(detComp);
945  }
946  }
947  return adj;
948 }

References badPixelDetsEndcap_, TrackerGeometry::idToDet(), SequenceTypes::ignore(), Surface::phiSpan(), TrackerTopology::pxfDisk(), GeomDet::surface(), trackerGeometry_, trackerTopology_, and z.

Referenced by reachableDetGroup().

◆ badDetGroupsBarrel()

PixelInactiveAreaFinder::DetGroupContainer PixelInactiveAreaFinder::badDetGroupsBarrel ( )
private

Definition at line 978 of file PixelInactiveAreaFinder.cc.

978  {
979  DetGroupContainer detGroups;
980  DetectorSet foundDets;
981  for (auto const& badDet : badPixelDetsBarrel_) {
982  if (foundDets.find(badDet) == foundDets.end()) {
983  detGroups.push_back(this->reachableDetGroup(badDet, foundDets));
984  }
985  }
986  return detGroups;
987 }

References badPixelDetsBarrel_, and reachableDetGroup().

Referenced by detGroupSpans(), and printBadDetGroups().

◆ badDetGroupsEndcap()

PixelInactiveAreaFinder::DetGroupContainer PixelInactiveAreaFinder::badDetGroupsEndcap ( )
private

Definition at line 988 of file PixelInactiveAreaFinder.cc.

988  {
989  DetGroupContainer detGroups;
990  DetectorSet foundDets;
991  for (auto const& badDet : badPixelDetsEndcap_) {
992  if (foundDets.find(badDet) == foundDets.end()) {
993  auto adjacentDets = this->reachableDetGroup(badDet, foundDets);
994  if (ignoreSingleFPixPanelModules_ && adjacentDets.size() == 1) {
995  // size==1 means that only a single panel of a blade was inactive
996  // because of the large overlap with the other panel (i.e.
997  // redundancy in the detectory) ignoring these may help to decrease fakes
998  continue;
999  }
1000  detGroups.push_back(adjacentDets);
1001  }
1002  }
1003  return detGroups;
1004 }

References badPixelDetsEndcap_, ignoreSingleFPixPanelModules_, and reachableDetGroup().

Referenced by detGroupSpans(), and printBadDetGroups().

◆ createPlottingFiles()

void PixelInactiveAreaFinder::createPlottingFiles ( )
private

Definition at line 852 of file PixelInactiveAreaFinder.cc.

852  {
853  // All detectors to file DETECTORS
854  Stream ss;
855  std::ofstream fsDet("DETECTORS.txt");
856  for (auto const& det : pixelDetsBarrel_) {
857  detInfo(det, ss);
858  ss << std::endl;
859  }
860  edm::LogPrint("PixelInactiveAreaFinder") << "Endcap detectors;";
861  for (auto const& det : pixelDetsEndcap_) {
862  detInfo(det, ss);
863  ss << std::endl;
864  }
865  fsDet << ss.rdbuf();
866  ss.str(std::string());
867  // Bad detectors
868  std::ofstream fsBadDet("BADDETECTORS.txt");
869  for (auto const& det : badPixelDetsBarrel_) {
870  detInfo(det, ss);
871  ss << std::endl;
872  }
873  for (auto const& det : badPixelDetsEndcap_) {
874  detInfo(det, ss);
875  ss << std::endl;
876  }
877  fsBadDet << ss.rdbuf();
878  ss.str(std::string());
879  // detgroupspans
880  std::ofstream fsSpans("DETGROUPSPANS.txt");
882  for (auto const& cspan : cspans.first) {
883  detGroupSpanInfo(cspan, ss);
884  ss << std::endl;
885  }
886  for (auto const& cspan : cspans.second) {
887  detGroupSpanInfo(cspan, ss);
888  ss << std::endl;
889  }
890  fsSpans << ss.rdbuf();
891  ss.str(std::string());
892 }

References badPixelDetsBarrel_, badPixelDetsEndcap_, detGroupSpans(), detInfo(), pixelDetsBarrel_, pixelDetsEndcap_, contentValuesCheck::ss, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by inactiveAreas().

◆ detGroupSpans()

PixelInactiveAreaFinder::DetGroupSpanContainerPair PixelInactiveAreaFinder::detGroupSpans ( )
private

Definition at line 1141 of file PixelInactiveAreaFinder.cc.

1141  {
1142  DetGroupSpanContainer cspansBarrel;
1143  DetGroupSpanContainer cspansEndcap;
1144  DetGroupContainer badDetGroupsBar = badDetGroupsBarrel();
1145  DetGroupContainer badDetGroupsEnd = badDetGroupsEndcap();
1146  for (auto const& detGroup : badDetGroupsBar) {
1147  DetGroupSpan cspan;
1148  getSpan(detGroup, cspan);
1149  cspansBarrel.push_back(cspan);
1150  }
1151  for (auto const& detGroup : badDetGroupsEnd) {
1152  DetGroupSpan cspan;
1153  getSpan(detGroup, cspan);
1154  cspansEndcap.push_back(cspan);
1155  }
1156  return DetGroupSpanContainerPair(cspansBarrel, cspansEndcap);
1157 }

References badDetGroupsBarrel(), badDetGroupsEndcap(), and getSpan().

Referenced by createPlottingFiles(), inactiveAreas(), and printBadDetGroupSpans().

◆ detInfo()

void PixelInactiveAreaFinder::detInfo ( const det_t det,
Stream ss 
)
private

Definition at line 738 of file PixelInactiveAreaFinder.cc.

738  {
739  using std::fixed;
740  using std::left;
741  using std::noshowpos;
742  using std::right;
743  using std::setfill;
744  using std::setprecision;
745  using std::setw;
746  using std::showpos;
747  using std::tie;
748  std::string deli = "; ";
749  ss << "id:[" << det << "]" << deli;
750  ss << "subdetid:[" << DetId(det).subdetId() << "]" << deli;
751  if (DetId(det).subdetId() == PixelSubdetector::PixelBarrel) {
752  unsigned int layer = trackerTopology_->pxbLayer(DetId(det));
753  unsigned int ladder = trackerTopology_->pxbLadder(DetId(det));
754  unsigned int module = trackerTopology_->pxbModule(DetId(det));
755  ss << "layer:[" << layer << "]" << deli << "ladder:[" << right << setw(2) << ladder << "]" << deli << "module:["
756  << module << "]" << deli;
757  } else if (DetId(det).subdetId() == PixelSubdetector::PixelEndcap) {
758  unsigned int disk = trackerTopology_->pxfDisk(DetId(det));
759  unsigned int blade = trackerTopology_->pxfBlade(DetId(det));
760  unsigned int panel = trackerTopology_->pxfPanel(DetId(det));
761  ss << left << setw(6) << "disk:"
762  << "[" << right << disk << "]" << deli << left << setw(7) << "blade:"
763  << "[" << setw(2) << right << blade << "]" << deli << left << setw(7) << "panel:"
764  << "[" << right << panel << "]" << deli;
765  }
766  float phiA, phiB, zA, zB, rA, rB;
767  auto detSurface = trackerGeometry_->idToDet(DetId(det))->surface();
768  tie(phiA, phiB) = detSurface.phiSpan();
769  tie(zA, zB) = detSurface.zSpan();
770  tie(rA, rB) = detSurface.rSpan();
771  ss << setprecision(16) << fixed << showpos << setfill(' ') << "phi:[" << right << setw(12) << phiA << "," << left
772  << setw(12) << phiB << "]" << deli << "z:[" << right << setw(7) << zA << "," << left << setw(7) << zB << "]"
773  << deli << noshowpos << "r:[" << right << setw(10) << rA << "," << left << setw(10) << rB << "]" << deli;
774 }

References alignBH_cfg::fixed, TrackerGeometry::idToDet(), PVValHelper::ladder, Surface::phiSpan(), PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, TrackerTopology::pxbLadder(), TrackerTopology::pxbLayer(), TrackerTopology::pxbModule(), TrackerTopology::pxfBlade(), TrackerTopology::pxfDisk(), TrackerTopology::pxfPanel(), contentValuesCheck::ss, AlCaHLTBitMon_QueryRunRegistry::string, DetId::subdetId(), GeomDet::surface(), trackerGeometry_, and trackerTopology_.

Referenced by createPlottingFiles(), printBadDetGroups(), printBadPixelDets(), and printPixelDets().

◆ detWorks()

bool PixelInactiveAreaFinder::detWorks ( det_t  det)
private

Definition at line 894 of file PixelInactiveAreaFinder.cc.

894  {
895  return std::find(badPixelDetsBarrel_.begin(), badPixelDetsBarrel_.end(), det) == badPixelDetsBarrel_.end() &&
897 }

References badPixelDetsBarrel_, badPixelDetsEndcap_, and spr::find().

Referenced by badAdjecentDetsBarrel().

◆ fillDescriptions()

void PixelInactiveAreaFinder::fillDescriptions ( edm::ParameterSetDescription desc)
static

Definition at line 541 of file PixelInactiveAreaFinder.cc.

541  {
542  desc.add<std::vector<edm::InputTag>>("inactivePixelDetectorLabels",
543  std::vector<edm::InputTag>{{edm::InputTag("siPixelDigis")}})
544  ->setComment("One or more DetIdCollections of modules to mask on the fly for a given event");
545  desc.add<std::vector<edm::InputTag>>("badPixelFEDChannelCollectionLabels",
546  std::vector<edm::InputTag>{{edm::InputTag("siPixelDigis")}})
547  ->setComment("One or more PixelFEDChannelCollections of modules+ROCs to mask on the fly for a given event");
548  desc.add<bool>("ignoreSingleFPixPanelModules", false);
549 
550  desc.addUntracked<bool>("debug", false);
551  desc.addUntracked<bool>("createPlottingFiles", false);
552 }

References edm::ParameterSetDescription::add(), edm::ParameterSetDescription::addUntracked(), and HLT_2018_cff::InputTag.

Referenced by PixelInactiveAreaTrackingRegionsSeedingLayersProducer::fillDescriptions().

◆ getBadPixelDets()

void PixelInactiveAreaFinder::getBadPixelDets ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
private

Definition at line 691 of file PixelInactiveAreaFinder.cc.

691  {
692  auto addDetId = [&](const auto id) {
693  const auto detid = DetId(id);
694  const auto subdet = detid.subdetId();
695  if (subdet == PixelSubdetector::PixelBarrel) {
696  badPixelDetsBarrel_.push_back(detid.rawId());
697  } else if (subdet == PixelSubdetector::PixelEndcap) {
698  badPixelDetsEndcap_.push_back(detid.rawId());
699  }
700  };
701 
702  // SiPixelQuality
703  edm::ESHandle<SiPixelQuality> pixelQuality;
704  iSetup.get<SiPixelQualityRcd>().get(pixelQuality);
705 
706  for (auto const& disabledModule : pixelQuality->getBadComponentList()) {
707  addDetId(disabledModule.DetID);
708  }
709 
710  // dynamic bad modules
711  for (const auto& token : inactivePixelDetectorTokens_) {
713  iEvent.getByToken(token, detIds);
714  for (const auto& id : *detIds) {
715  addDetId(id);
716  }
717  }
718 
719  // dynamic bad ROCs ("Fed25")
720  // TODO: consider moving to finer-grained areas for inactive ROCs
721  for (const auto& token : badPixelFEDChannelsTokens_) {
722  edm::Handle<PixelFEDChannelCollection> pixelFEDChannelCollectionHandle;
723  iEvent.getByToken(token, pixelFEDChannelCollectionHandle);
724  for (const auto& disabledChannels : *pixelFEDChannelCollectionHandle) {
725  addDetId(disabledChannels.detId());
726  }
727  }
728 
729  // remove duplicates
730  std::sort(badPixelDetsBarrel_.begin(), badPixelDetsBarrel_.end());
731  std::sort(badPixelDetsEndcap_.begin(), badPixelDetsEndcap_.end());
733  badPixelDetsBarrel_.end());
735  badPixelDetsEndcap_.end());
736 }

References badPixelDetsBarrel_, badPixelDetsEndcap_, badPixelFEDChannelsTokens_, edm::EventSetup::get(), get, SiPixelQuality::getBadComponentList(), triggerObjects_cff::id, iEvent, inactivePixelDetectorTokens_, PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, unpackBuffers-CaloStage2::token, and tier0::unique().

Referenced by inactiveAreas().

◆ getPhiSpanBarrel()

void PixelInactiveAreaFinder::getPhiSpanBarrel ( const DetGroup detGroup,
DetGroupSpan cspan 
)
private

Definition at line 1006 of file PixelInactiveAreaFinder.cc.

1006  {
1007  // find phiSpan using ordered vector of unique ladders in detGroup
1008  if (detGroup.empty()) {
1009  cspan = DetGroupSpan();
1010  return;
1011  } else {
1012  cspan.layer = trackerTopology_->pxbLayer(DetId(detGroup[0]));
1013  cspan.disk = 0;
1014  }
1015  using uint = unsigned int;
1016  using LadderSet = std::set<uint>;
1017  using LadVec = std::vector<uint>;
1018  LadderSet lads;
1019  for (auto const& det : detGroup) {
1020  lads.insert(trackerTopology_->pxbLadder(DetId(det)));
1021  }
1022  LadVec ladv(lads.begin(), lads.end());
1023  uint nLadders = nBPixLadders[cspan.layer];
1024  // find start ladder of detGroup
1025  uint i = 0;
1026  uint currentLadder = ladv[0];
1027  uint previousLadder = ladv[(ladv.size() + i - 1) % ladv.size()];
1028  // loop until discontinuity is found from vector
1029  while ((nLadders + currentLadder - 1) % nLadders == previousLadder) {
1030  ++i;
1031  currentLadder = ladv[i % ladv.size()];
1032  previousLadder = ladv[(ladv.size() + i - 1) % ladv.size()];
1033  if (i == ladv.size()) {
1034  cspan.phiSpan.first = std::numeric_limits<float>::epsilon();
1035  cspan.phiSpan.second = -std::numeric_limits<float>::epsilon();
1036  return;
1037  }
1038  }
1039  uint startLadder = currentLadder;
1040  uint endLadder = previousLadder;
1041  auto detStart = trackerTopology_->pxbDetId(cspan.layer, startLadder, 1);
1042  auto detEnd = trackerTopology_->pxbDetId(cspan.layer, endLadder, 1);
1043  cspan.phiSpan.first = trackerGeometry_->idToDet(detStart)->surface().phiSpan().first;
1044  cspan.phiSpan.second = trackerGeometry_->idToDet(detEnd)->surface().phiSpan().second;
1045 }

References PixelInactiveAreaFinder::DetGroupSpan::disk, geometryDiff::epsilon, mps_fire::i, TrackerGeometry::idToDet(), createfilelist::int, PixelInactiveAreaFinder::DetGroupSpan::layer, nBPixLadders, PixelInactiveAreaFinder::DetGroupSpan::phiSpan, Surface::phiSpan(), TrackerTopology::pxbDetId(), TrackerTopology::pxbLadder(), TrackerTopology::pxbLayer(), GeomDet::surface(), trackerGeometry_, trackerTopology_, and parallelization::uint.

Referenced by getSpan(), and printBadDetGroups().

◆ getPhiSpanEndcap()

void PixelInactiveAreaFinder::getPhiSpanEndcap ( const DetGroup detGroup,
DetGroupSpan cspan 
)
private

Definition at line 1046 of file PixelInactiveAreaFinder.cc.

1046  {
1047  // this is quite naive/bruteforce method
1048  // 1) it starts by taking one detector from detGroup and starts to compare it to others
1049  // 2) when it finds overlapping detector in clockwise direction it starts comparing
1050  // found detector to others
1051  // 3) search stops until no overlapping detectors in clockwise detector or all detectors
1052  // have been work detector
1053  Stream ss;
1054  bool found = false;
1055  auto const tGeom = trackerGeometry_;
1056  DetGroup::const_iterator startDetIter = detGroup.begin();
1057  Span_t phiSpan, phiSpanComp;
1058  unsigned int counter = 0;
1059  while (!found) {
1060  phiSpan = tGeom->idToDet(DetId(*startDetIter))->surface().phiSpan();
1061  for (DetGroup::const_iterator compDetIter = detGroup.begin(); compDetIter != detGroup.end(); ++compDetIter) {
1062  phiSpanComp = tGeom->idToDet(DetId(*compDetIter))->surface().phiSpan();
1063  if (phiRangesOverlap(phiSpan, phiSpanComp) && phiMoreClockwise(phiSpanComp.first, phiSpan.first) &&
1064  startDetIter != compDetIter) {
1065  ++counter;
1066  if (counter > detGroup.size()) {
1067  cspan.phiSpan.first = std::numeric_limits<float>::epsilon();
1068  cspan.phiSpan.second = -std::numeric_limits<float>::epsilon();
1069  return;
1070  }
1071  startDetIter = compDetIter;
1072  break;
1073  } else if (compDetIter == detGroup.end() - 1) {
1074  found = true;
1075  }
1076  }
1077  }
1078  cspan.phiSpan.first = phiSpan.first;
1079  // second with same method}
1080  found = false;
1081  DetGroup::const_iterator endDetIter = detGroup.begin();
1082  counter = 0;
1083  while (!found) {
1084  phiSpan = tGeom->idToDet(DetId(*endDetIter))->surface().phiSpan();
1085  for (DetGroup::const_iterator compDetIter = detGroup.begin(); compDetIter != detGroup.end(); ++compDetIter) {
1086  phiSpanComp = tGeom->idToDet(DetId(*compDetIter))->surface().phiSpan();
1087  if (phiRangesOverlap(phiSpan, phiSpanComp) && phiMoreCounterclockwise(phiSpanComp.second, phiSpan.second) &&
1088  endDetIter != compDetIter) {
1089  ++counter;
1090  if (counter > detGroup.size()) {
1091  cspan.phiSpan.first = std::numeric_limits<float>::epsilon();
1092  cspan.phiSpan.second = -std::numeric_limits<float>::epsilon();
1093  return;
1094  }
1095  endDetIter = compDetIter;
1096  break;
1097  } else if (compDetIter == detGroup.end() - 1) {
1098  found = true;
1099  }
1100  }
1101  }
1102  cspan.phiSpan.second = phiSpan.second;
1103 }

References counter, geometryDiff::epsilon, newFWLiteAna::found, PixelInactiveAreaFinder::DetGroupSpan::phiSpan, contentValuesCheck::ss, and trackerGeometry_.

Referenced by getSpan(), and printBadDetGroups().

◆ getRSpan()

void PixelInactiveAreaFinder::getRSpan ( const DetGroup detGroup,
DetGroupSpan cspan 
)
private

Definition at line 1114 of file PixelInactiveAreaFinder.cc.

1114  {
1115  auto cmpFun = [this](det_t detA, det_t detB) {
1116  return trackerGeometry_->idToDet(DetId(detA))->surface().rSpan().first <
1117  trackerGeometry_->idToDet(DetId(detB))->surface().rSpan().first;
1118  };
1119 
1120  auto minmaxIters = std::minmax_element(detGroup.begin(), detGroup.end(), cmpFun);
1121  cspan.rSpan.first = trackerGeometry_->idToDet(DetId(*(minmaxIters.first)))->surface().rSpan().first;
1122  cspan.rSpan.second = trackerGeometry_->idToDet(DetId(*(minmaxIters.second)))->surface().rSpan().second;
1123 }

References TrackerGeometry::idToDet(), PixelInactiveAreaFinder::DetGroupSpan::rSpan, Surface::rSpan(), GeomDet::surface(), and trackerGeometry_.

Referenced by getSpan(), and printBadDetGroups().

◆ getSpan()

void PixelInactiveAreaFinder::getSpan ( const DetGroup detGroup,
DetGroupSpan cspan 
)
private

Definition at line 1124 of file PixelInactiveAreaFinder.cc.

1124  {
1125  auto firstDetIt = detGroup.begin();
1126  if (firstDetIt != detGroup.end()) {
1127  cspan.subdetId = DetId(*firstDetIt).subdetId();
1128  if (cspan.subdetId == 1) {
1129  cspan.layer = trackerTopology_->pxbLayer(DetId(*firstDetIt));
1130  cspan.disk = 0;
1131  getPhiSpanBarrel(detGroup, cspan);
1132  } else if (cspan.subdetId == 2) {
1133  cspan.disk = trackerTopology_->pxfDisk(DetId(*firstDetIt));
1134  cspan.layer = 0;
1135  getPhiSpanEndcap(detGroup, cspan);
1136  }
1137  getZSpan(detGroup, cspan);
1138  getRSpan(detGroup, cspan);
1139  }
1140 }

References PixelInactiveAreaFinder::DetGroupSpan::disk, getPhiSpanBarrel(), getPhiSpanEndcap(), getRSpan(), getZSpan(), PixelInactiveAreaFinder::DetGroupSpan::layer, TrackerTopology::pxbLayer(), TrackerTopology::pxfDisk(), PixelInactiveAreaFinder::DetGroupSpan::subdetId, DetId::subdetId(), and trackerTopology_.

Referenced by detGroupSpans().

◆ getZSpan()

void PixelInactiveAreaFinder::getZSpan ( const DetGroup detGroup,
DetGroupSpan cspan 
)
private

Definition at line 1104 of file PixelInactiveAreaFinder.cc.

1104  {
1105  auto cmpFun = [this](det_t detA, det_t detB) {
1106  return trackerGeometry_->idToDet(DetId(detA))->surface().zSpan().first <
1107  trackerGeometry_->idToDet(DetId(detB))->surface().zSpan().first;
1108  };
1109 
1110  auto minmaxIters = std::minmax_element(detGroup.begin(), detGroup.end(), cmpFun);
1111  cspan.zSpan.first = trackerGeometry_->idToDet(DetId(*(minmaxIters.first)))->surface().zSpan().first;
1112  cspan.zSpan.second = trackerGeometry_->idToDet(DetId(*(minmaxIters.second)))->surface().zSpan().second;
1113 }

References TrackerGeometry::idToDet(), GeomDet::surface(), trackerGeometry_, PixelInactiveAreaFinder::DetGroupSpan::zSpan, and Surface::zSpan().

Referenced by getSpan(), and printBadDetGroups().

◆ inactiveAreas()

PixelInactiveAreaFinder::InactiveAreas PixelInactiveAreaFinder::inactiveAreas ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)

Definition at line 554 of file PixelInactiveAreaFinder.cc.

555  {
556  // Set data to handles
557  {
558  edm::ESHandle<TrackerGeometry> trackerGeometry;
559  iSetup.get<TrackerDigiGeometryRecord>().get(trackerGeometry);
560  trackerGeometry_ = trackerGeometry.product();
561 
562  edm::ESHandle<TrackerTopology> trackerTopology;
563  iSetup.get<TrackerTopologyRcd>().get(trackerTopology);
564  trackerTopology_ = trackerTopology.product();
565  }
566 
567  // assign data to instance variables
568  updatePixelDets(iSetup);
569  getBadPixelDets(iEvent, iSetup);
570 
571  //write files for plotting
572  if (createPlottingFiles_) {
574  }
575 
576  // find detGroupSpans ie phi,r,z limits for detector detGroups that are not working
577  // returns pair where first is barrel spans and second endcap spans
579 
580  // map spans to a vector with consistent indexing with inactiveLayers_ and inactiveLayerSetIndices_
581  // TODO: try to move the inner logic towards this direction as well
582  std::vector<DetGroupSpanContainer> spans(inactiveLayers_.size());
583 
584  auto doWork = [&](const DetGroupSpanContainer& container) {
585  for (const auto& span : container) {
586  const auto subdet = span.subdetId == PixelSubdetector::PixelBarrel ? GeomDetEnumerators::PixelBarrel
588  const auto side = (subdet == GeomDetEnumerators::PixelBarrel
590  : (span.zSpan.first < 0 ? TrackerDetSide::NegEndcap : TrackerDetSide::PosEndcap));
591  const auto layer = subdet == GeomDetEnumerators::PixelBarrel ? span.layer : span.disk;
592  auto found = std::find(inactiveLayers_.begin(), inactiveLayers_.end(), SeedingLayerId(subdet, side, layer));
593  if (found != inactiveLayers_.end()) { // it is possible that this layer is ignored by the configuration
594  spans[std::distance(inactiveLayers_.begin(), found)].push_back(span);
595  }
596  }
597  };
598  doWork(cspans.first);
599  doWork(cspans.second);
600 
601  auto ret =
603 
604  if (debug_) {
605  printOverlapSpans(ret);
606  }
607 
608  return ret;
609 }

References Barrel, createPlottingFiles(), createPlottingFiles_, debug_, detGroupSpans(), HLT_2018_cff::distance, spr::find(), newFWLiteAna::found, edm::EventSetup::get(), get, getBadPixelDets(), iEvent, inactiveLayers_, inactiveLayerSetIndices_, layerSetIndexInactiveToActive_, eostools::move(), NegEndcap, PixelSubdetector::PixelBarrel, GeomDetEnumerators::PixelBarrel, GeomDetEnumerators::PixelEndcap, PosEndcap, edm::ESHandle< T >::product(), runTheMatrix::ret, trackerGeometry_, trackerTopology_, and updatePixelDets().

Referenced by PixelInactiveAreaTrackingRegionsSeedingLayersProducer::produce().

◆ printBadDetGroups()

void PixelInactiveAreaFinder::printBadDetGroups ( )
private

Definition at line 805 of file PixelInactiveAreaFinder.cc.

805  {
806  DetGroupContainer badDetGroupsBar = badDetGroupsBarrel();
807  DetGroupContainer badDetGroupsEnd = badDetGroupsEndcap();
808  Stream ss;
809  for (auto const& detGroup : badDetGroupsBar) {
810  ss << std::setfill(' ') << std::left << std::setw(16) << "DetGroup:";
811  DetGroupSpan cspan;
812  getPhiSpanBarrel(detGroup, cspan);
813  getZSpan(detGroup, cspan);
814  getRSpan(detGroup, cspan);
815  detGroupSpanInfo(cspan, ss);
816  ss << std::endl;
817  for (auto const& det : detGroup) {
818  detInfo(det, ss);
819  ss << std::endl;
820  }
821  ss << std::endl;
822  }
823  for (auto const& detGroup : badDetGroupsEnd) {
824  ss << std::setfill(' ') << std::left << std::setw(16) << "DetGroup:";
825  DetGroupSpan cspan;
826  getPhiSpanEndcap(detGroup, cspan);
827  getZSpan(detGroup, cspan);
828  getRSpan(detGroup, cspan);
829  detGroupSpanInfo(cspan, ss);
830  ss << std::endl;
831  for (auto const& det : detGroup) {
832  detInfo(det, ss);
833  ss << std::endl;
834  }
835  ss << std::endl;
836  }
837  edm::LogPrint("PixelInactiveAreaFinder") << ss.str();
838 }

References badDetGroupsBarrel(), badDetGroupsEndcap(), detInfo(), getPhiSpanBarrel(), getPhiSpanEndcap(), getRSpan(), getZSpan(), and contentValuesCheck::ss.

◆ printBadDetGroupSpans()

void PixelInactiveAreaFinder::printBadDetGroupSpans ( )
private

Definition at line 839 of file PixelInactiveAreaFinder.cc.

839  {
841  Stream ss;
842  for (auto const& cspan : cspans.first) {
843  detGroupSpanInfo(cspan, ss);
844  ss << std::endl;
845  }
846  for (auto const& cspan : cspans.second) {
847  detGroupSpanInfo(cspan, ss);
848  ss << std::endl;
849  }
850  edm::LogPrint("PixelInactiveAreaFinder") << ss.str();
851 }

References detGroupSpans(), and contentValuesCheck::ss.

◆ printBadPixelDets()

void PixelInactiveAreaFinder::printBadPixelDets ( )
private

Definition at line 790 of file PixelInactiveAreaFinder.cc.

790  {
791  edm::LogPrint("PixelInactiveAreaFinder") << "Bad barrel detectors:";
792  Stream ss;
793  for (auto const& det : badPixelDetsBarrel_) {
794  detInfo(det, ss);
795  edm::LogPrint("PixelInactiveAreaFinder") << ss.str();
796  ss.str(std::string());
797  }
798  edm::LogPrint("PixelInactiveAreaFinder") << "Endcap detectors;";
799  for (auto const& det : badPixelDetsEndcap_) {
800  detInfo(det, ss);
801  edm::LogPrint("PixelInactiveAreaFinder") << ss.str();
802  ss.str(std::string());
803  }
804 }

References badPixelDetsBarrel_, badPixelDetsEndcap_, detInfo(), contentValuesCheck::ss, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ printPixelDets()

void PixelInactiveAreaFinder::printPixelDets ( )
private

Definition at line 775 of file PixelInactiveAreaFinder.cc.

775  {
776  edm::LogPrint("PixelInactiveAreaFinder") << "Barrel detectors:";
777  Stream ss;
778  for (auto const& det : pixelDetsBarrel_) {
779  detInfo(det, ss);
780  edm::LogPrint("PixelInactiveAreaFinder") << ss.str();
781  ss.str(std::string());
782  }
783  edm::LogPrint("PixelInactiveAreaFinder") << "Endcap detectors;";
784  for (auto const& det : pixelDetsEndcap_) {
785  detInfo(det, ss);
786  edm::LogPrint("PixelInactiveAreaFinder") << ss.str();
787  ss.str(std::string());
788  }
789 }

References detInfo(), pixelDetsBarrel_, pixelDetsEndcap_, contentValuesCheck::ss, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ reachableDetGroup()

PixelInactiveAreaFinder::DetGroup PixelInactiveAreaFinder::reachableDetGroup ( const det_t initDet,
DetectorSet foundDets 
)
private

Definition at line 949 of file PixelInactiveAreaFinder.cc.

950  {
952  std::queue<det_t> workQueue;
953  det_t workDet;
954  DetGroup badAdjDets;
955  foundDets.insert(initDet);
956  workQueue.push(initDet);
957  reachableDetGroup.push_back(initDet);
958  while (!workQueue.empty()) {
959  workDet = workQueue.front();
960  workQueue.pop();
961  if (DetId(workDet).subdetId() == PixelSubdetector::PixelBarrel) {
962  badAdjDets = this->badAdjecentDetsBarrel(workDet);
963  } else if (DetId(workDet).subdetId() == PixelSubdetector::PixelEndcap) {
964  badAdjDets = this->badAdjecentDetsEndcap(workDet);
965  } else {
966  badAdjDets = {};
967  }
968  for (auto const& badDet : badAdjDets) {
969  if (foundDets.find(badDet) == foundDets.end()) {
970  reachableDetGroup.push_back(badDet);
971  foundDets.insert(badDet);
972  workQueue.push(badDet);
973  }
974  }
975  }
976  return reachableDetGroup;
977 }

References badAdjecentDetsBarrel(), badAdjecentDetsEndcap(), PixelSubdetector::PixelBarrel, and PixelSubdetector::PixelEndcap.

Referenced by badDetGroupsBarrel(), and badDetGroupsEndcap().

◆ updatePixelDets()

void PixelInactiveAreaFinder::updatePixelDets ( const edm::EventSetup iSetup)
private

Definition at line 612 of file PixelInactiveAreaFinder.cc.

612  {
613  if (!geometryWatcher_.check(iSetup))
614  return;
615 
616  // deduce the number of ladders per layer and the number of modules per ladder
617  {
618  // sanity checks
620  throw cms::Exception("NotImplemented")
621  << "This module supports only a detector with 4 pixel barrel layers, the current geometry has "
623  }
625  throw cms::Exception("NotImplemented")
626  << "This module supports only a detector with 3 pixel forward disks, the current geometry has "
628  }
629 
630  std::array<std::array<unsigned short, 100>, 4> counts = {}; // assume at most 100 ladders per layer
631  for (const auto& det : trackerGeometry_->detsPXB()) {
632  const auto layer = trackerTopology_->layer(det->geographicalId());
633  const auto ladder = trackerTopology_->pxbLadder(det->geographicalId());
634  if (ladder >= 100) {
635  throw cms::Exception("LogicError")
636  << "Got a ladder with number " << ladder
637  << " while the expected maximum was 100; either something is wrong or the maximum has to be increased.";
638  }
639  counts[layer - 1][ladder - 1] += 1; // numbering of layer and ladder starts at 1
640  }
641 
642  // take number of modules per ladder from the first ladder of the first layer (such better exist)
643  // other ladders better have the same number
644  nModulesPerLadder = counts[0][0];
645  if (nModulesPerLadder == 0) {
646  throw cms::Exception("LogicError") << "Ladder 1 of layer 1 has 0 modules, something fishy is going on.";
647  }
648 
649  LogDebug("PixelInactiveAreaFinder") << "Number of modules per ladder " << nModulesPerLadder
650  << "; below are number of ladders per layer";
651 
652  // number of ladders
653  for (unsigned layer = 0; layer < 4; ++layer) {
654  nBPixLadders[layer] =
655  std::count_if(counts[layer].begin(), counts[layer].end(), [](unsigned short val) { return val > 0; });
656  LogTrace("PixelInactiveAreaFinder")
657  << "BPix layer " << (layer + 1) << " has " << nBPixLadders[layer] << " ladders";
658 
659  auto fail = std::count_if(counts[layer].begin(), counts[layer].end(), [&](unsigned short val) {
660  return val != nModulesPerLadder && val > 0;
661  });
662  if (fail != 0) {
663  throw cms::Exception("LogicError")
664  << "Layer " << (layer + 1) << " had " << fail
665  << " ladders whose number of modules/ladder differed from the ladder 1 of layer 1 (" << nModulesPerLadder
666  << "). Something fishy is going on.";
667  }
668  }
669  }
670 
671  // don't bother with the rest if not needed
673  return;
674 
675  pixelDetsBarrel_.clear();
676  pixelDetsEndcap_.clear();
677 
678  for (auto const& geomDetPtr : trackerGeometry_->detsPXB()) {
679  if (geomDetPtr->geographicalId().subdetId() == PixelSubdetector::PixelBarrel) {
680  pixelDetsBarrel_.push_back(geomDetPtr->geographicalId().rawId());
681  }
682  }
683  for (auto const& geomDetPtr : trackerGeometry_->detsPXF()) {
684  if (geomDetPtr->geographicalId().subdetId() == PixelSubdetector::PixelEndcap) {
685  pixelDetsEndcap_.push_back(geomDetPtr->geographicalId().rawId());
686  }
687  }
688  std::sort(pixelDetsBarrel_.begin(), pixelDetsBarrel_.end());
689  std::sort(pixelDetsEndcap_.begin(), pixelDetsEndcap_.end());
690 }

References begin, edm::ESWatcher< T >::check(), dqmiodumpmetadata::counts, createPlottingFiles_, TrackerGeometry::detsPXB(), TrackerGeometry::detsPXF(), end, Exception, geometryWatcher_, PVValHelper::ladder, TrackerTopology::layer(), LogDebug, LogTrace, nBPixLadders, nModulesPerLadder, TrackerGeometry::numberOfLayers(), PixelSubdetector::PixelBarrel, pixelDetsBarrel_, pixelDetsEndcap_, PixelSubdetector::PixelEndcap, TrackerTopology::pxbLadder(), trackerGeometry_, trackerTopology_, and heppy_batch::val.

Referenced by inactiveAreas().

Member Data Documentation

◆ badPixelDetsBarrel_

DetContainer PixelInactiveAreaFinder::badPixelDetsBarrel_
private

◆ badPixelDetsEndcap_

DetContainer PixelInactiveAreaFinder::badPixelDetsEndcap_
private

◆ badPixelFEDChannelsTokens_

std::vector<edm::EDGetTokenT<PixelFEDChannelCollection> > PixelInactiveAreaFinder::badPixelFEDChannelsTokens_
private

Definition at line 89 of file PixelInactiveAreaFinder.h.

Referenced by getBadPixelDets().

◆ createPlottingFiles_

const bool PixelInactiveAreaFinder::createPlottingFiles_
private

Definition at line 80 of file PixelInactiveAreaFinder.h.

Referenced by inactiveAreas(), and updatePixelDets().

◆ debug_

const bool PixelInactiveAreaFinder::debug_
private

Definition at line 79 of file PixelInactiveAreaFinder.h.

Referenced by inactiveAreas().

◆ geometryWatcher_

edm::ESWatcher<TrackerDigiGeometryRecord> PixelInactiveAreaFinder::geometryWatcher_
private

Definition at line 106 of file PixelInactiveAreaFinder.h.

Referenced by updatePixelDets().

◆ ignoreSingleFPixPanelModules_

const bool PixelInactiveAreaFinder::ignoreSingleFPixPanelModules_
private

Definition at line 81 of file PixelInactiveAreaFinder.h.

Referenced by badDetGroupsEndcap().

◆ inactiveLayers_

std::vector<SeedingLayerId> PixelInactiveAreaFinder::inactiveLayers_
private

◆ inactiveLayerSetIndices_

std::vector<std::pair<unsigned short, unsigned short> > PixelInactiveAreaFinder::inactiveLayerSetIndices_
private

Definition at line 84 of file PixelInactiveAreaFinder.h.

Referenced by inactiveAreas().

◆ inactivePixelDetectorTokens_

std::vector<edm::EDGetTokenT<DetIdCollection> > PixelInactiveAreaFinder::inactivePixelDetectorTokens_
private

Definition at line 88 of file PixelInactiveAreaFinder.h.

Referenced by getBadPixelDets().

◆ layerSetIndexInactiveToActive_

std::vector<std::vector<LayerSetIndex> > PixelInactiveAreaFinder::layerSetIndexInactiveToActive_
private

◆ nBPixLadders

std::array<unsigned short, 4> PixelInactiveAreaFinder::nBPixLadders
private

◆ nModulesPerLadder

unsigned short PixelInactiveAreaFinder::nModulesPerLadder
private

Definition at line 97 of file PixelInactiveAreaFinder.h.

Referenced by badAdjecentDetsBarrel(), and updatePixelDets().

◆ pixelDetsBarrel_

DetContainer PixelInactiveAreaFinder::pixelDetsBarrel_
private

Definition at line 112 of file PixelInactiveAreaFinder.h.

Referenced by createPlottingFiles(), printPixelDets(), and updatePixelDets().

◆ pixelDetsEndcap_

DetContainer PixelInactiveAreaFinder::pixelDetsEndcap_
private

Definition at line 113 of file PixelInactiveAreaFinder.h.

Referenced by createPlottingFiles(), printPixelDets(), and updatePixelDets().

◆ pixelQuality_

const SiPixelQuality* PixelInactiveAreaFinder::pixelQuality_ = nullptr
private

Definition at line 108 of file PixelInactiveAreaFinder.h.

◆ trackerGeometry_

const TrackerGeometry* PixelInactiveAreaFinder::trackerGeometry_ = nullptr
private

◆ trackerTopology_

const TrackerTopology* PixelInactiveAreaFinder::trackerTopology_ = nullptr
private
runTheMatrix.ret
ret
prodAgent to be discontinued
Definition: runTheMatrix.py:355
TrackerGeometry::idToDet
const TrackerGeomDet * idToDet(DetId) const override
Definition: TrackerGeometry.cc:193
edm::ESWatcher::check
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:52
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
PixelInactiveAreaFinder::detGroupSpans
DetGroupSpanContainerPair detGroupSpans()
Definition: PixelInactiveAreaFinder.cc:1141
PixelInactiveAreaFinder::badAdjecentDetsEndcap
DetGroup badAdjecentDetsEndcap(const det_t &det)
Definition: PixelInactiveAreaFinder.cc:924
counter
Definition: counter.py:1
alignBH_cfg.fixed
fixed
Definition: alignBH_cfg.py:54
mps_fire.i
i
Definition: mps_fire.py:355
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
PixelSubdetector::PixelEndcap
Definition: PixelSubdetector.h:11
PixelSubdetector::PixelBarrel
Definition: PixelSubdetector.h:11
SiPixelQualityRcd
Definition: SiPixelQualityRcd.h:13
PixelInactiveAreaFinder::badDetGroupsEndcap
DetGroupContainer badDetGroupsEndcap()
Definition: PixelInactiveAreaFinder.cc:988
PixelInactiveAreaFinder::detWorks
bool detWorks(det_t det)
Definition: PixelInactiveAreaFinder.cc:894
TrackerTopology::pxbLadder
unsigned int pxbLadder(const DetId &id) const
Definition: TrackerTopology.h:155
cms::cuda::assert
assert(be >=bs)
HLT_2018_cff.distance
distance
Definition: HLT_2018_cff.py:6417
SeedingLayerSetsLooper::makeRange
LayerSetRange< T > makeRange(const T &container) const
Definition: SeedingLayerSetsLooper.h:92
TrackerTopology::layer
unsigned int layer(const DetId &id) const
Definition: TrackerTopology.cc:47
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
PixelInactiveAreaFinder::DetectorSet
std::set< uint32_t > DetectorSet
Definition: PixelInactiveAreaFinder.h:103
newFWLiteAna.found
found
Definition: newFWLiteAna.py:118
edm::Handle
Definition: AssociativeIterator.h:50
parallelization.uint
uint
Definition: parallelization.py:124
PixelInactiveAreaFinder::createPlottingFiles
void createPlottingFiles()
Definition: PixelInactiveAreaFinder.cc:852
end
#define end
Definition: vmac.h:39
geometryDiff.epsilon
int epsilon
Definition: geometryDiff.py:26
Surface::phiSpan
std::pair< float, float > const & phiSpan() const
Definition: Surface.h:90
PixelInactiveAreaFinder::trackerGeometry_
const TrackerGeometry * trackerGeometry_
Definition: PixelInactiveAreaFinder.h:109
TrackerGeometry::numberOfLayers
unsigned int numberOfLayers(int subdet) const
Definition: TrackerGeometry.cc:211
TrackerTopology::pxbLayer
unsigned int pxbLayer(const DetId &id) const
Definition: TrackerTopology.h:144
TrackerTopology::pxfPanel
unsigned int pxfPanel(const DetId &id) const
Definition: TrackerTopology.h:450
TrackerGeometry::detsPXB
const DetContainer & detsPXB() const
Definition: TrackerGeometry.cc:171
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
DetId
Definition: DetId.h:17
GeomDetEnumerators::PixelBarrel
Definition: GeomDetEnumerators.h:11
GeomDet::surface
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
PixelInactiveAreaFinder::badPixelDetsEndcap_
DetContainer badPixelDetsEndcap_
Definition: PixelInactiveAreaFinder.h:115
PixelInactiveAreaFinder::badPixelFEDChannelsTokens_
std::vector< edm::EDGetTokenT< PixelFEDChannelCollection > > badPixelFEDChannelsTokens_
Definition: PixelInactiveAreaFinder.h:89
TrackerDetSide::Barrel
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
PixelInactiveAreaFinder::det_t
uint32_t det_t
Definition: PixelInactiveAreaFinder.h:99
PixelInactiveAreaFinder::Stream
std::stringstream Stream
Definition: PixelInactiveAreaFinder.h:104
PixelInactiveAreaFinder::badDetGroupsBarrel
DetGroupContainer badDetGroupsBarrel()
Definition: PixelInactiveAreaFinder.cc:978
PixelInactiveAreaFinder::ignoreSingleFPixPanelModules_
const bool ignoreSingleFPixPanelModules_
Definition: PixelInactiveAreaFinder.h:81
GlobalPosition_Frontier_DevDB_cff.tag
tag
Definition: GlobalPosition_Frontier_DevDB_cff.py:11
Surface::zSpan
std::pair< float, float > const & zSpan() const
Definition: Surface.h:91
TrackerDigiGeometryRecord
Definition: TrackerDigiGeometryRecord.h:15
PixelInactiveAreaFinder::trackerTopology_
const TrackerTopology * trackerTopology_
Definition: PixelInactiveAreaFinder.h:110
DDAxes::z
edm::ESHandle< SiPixelQuality >
TrackerGeometry::detsPXF
const DetContainer & detsPXF() const
Definition: TrackerGeometry.cc:173
TrackerDetSide::NegEndcap
PixelInactiveAreaFinder::updatePixelDets
void updatePixelDets(const edm::EventSetup &iSetup)
Definition: PixelInactiveAreaFinder.cc:612
PixelInactiveAreaFinder::debug_
const bool debug_
Definition: PixelInactiveAreaFinder.h:79
DetId::subdetId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
Definition: DetId.h:48
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::vector_transform
auto vector_transform(std::vector< InputType > const &input, Function predicate) -> std::vector< typename std::remove_cv< typename std::remove_reference< decltype(predicate(input.front()))>::type >::type >
Definition: transform.h:11
PixelInactiveAreaFinder::nModulesPerLadder
unsigned short nModulesPerLadder
Definition: PixelInactiveAreaFinder.h:97
edm::ParameterSetDescription::addUntracked
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:100
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
PixelInactiveAreaFinder::getSpan
void getSpan(const DetGroup &detGroup, DetGroupSpan &cspan)
Definition: PixelInactiveAreaFinder.cc:1124
PixelInactiveAreaFinder::getPhiSpanBarrel
void getPhiSpanBarrel(const DetGroup &detGroup, DetGroupSpan &cspan)
Definition: PixelInactiveAreaFinder.cc:1006
PixelInactiveAreaFinder::getRSpan
void getRSpan(const DetGroup &detGroup, DetGroupSpan &cspan)
Definition: PixelInactiveAreaFinder.cc:1114
PixelInactiveAreaFinder::pixelDetsBarrel_
DetContainer pixelDetsBarrel_
Definition: PixelInactiveAreaFinder.h:112
PixelInactiveAreaFinder::reachableDetGroup
DetGroup reachableDetGroup(const det_t &initDet, DetectorSet &foundDets)
Definition: PixelInactiveAreaFinder.cc:949
PixelInactiveAreaFinder::inactiveLayerSetIndices_
std::vector< std::pair< unsigned short, unsigned short > > inactiveLayerSetIndices_
Definition: PixelInactiveAreaFinder.h:84
createfilelist.int
int
Definition: createfilelist.py:10
iEvent
int iEvent
Definition: GenABIO.cc:224
TrackerTopology::pxfDisk
unsigned int pxfDisk(const DetId &id) const
Definition: TrackerTopology.h:446
edm::LogPrint
Definition: MessageLogger.h:342
counter
static std::atomic< unsigned int > counter
Definition: SharedResourceNames.cc:15
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
PixelInactiveAreaFinder::DetGroupSpanContainerPair
std::pair< DetGroupSpanContainer, DetGroupSpanContainer > DetGroupSpanContainerPair
Definition: PixelInactiveAreaFinder.h:92
module
Definition: vlib.h:198
SequenceTypes.ignore
def ignore(seq)
Definition: SequenceTypes.py:630
get
#define get
PixelInactiveAreaFinder::getPhiSpanEndcap
void getPhiSpanEndcap(const DetGroup &detGroup, DetGroupSpan &cspan)
Definition: PixelInactiveAreaFinder.cc:1046
PixelInactiveAreaFinder::layerSetIndexInactiveToActive_
std::vector< std::vector< LayerSetIndex > > layerSetIndexInactiveToActive_
Definition: PixelInactiveAreaFinder.h:86
PixelInactiveAreaFinder::createPlottingFiles_
const bool createPlottingFiles_
Definition: PixelInactiveAreaFinder.h:80
TrackerDetSide::PosEndcap
SiPixelQuality::getBadComponentList
const std::vector< disabledModuleType > getBadComponentList() const
Definition: SiPixelQuality.h:100
PixelInactiveAreaFinder::LayerSetIndex
SeedingLayerSetsHits::LayerSetIndex LayerSetIndex
Definition: PixelInactiveAreaFinder.h:25
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
heppy_batch.val
val
Definition: heppy_batch.py:351
eostools.move
def move(src, dest)
Definition: eostools.py:511
PixelInactiveAreaFinder::detInfo
void detInfo(const det_t &det, Stream &ss)
Definition: PixelInactiveAreaFinder.cc:738
tier0.unique
def unique(seq, keepstr=True)
Definition: tier0.py:24
PixelInactiveAreaFinder::DetGroupContainer
std::vector< DetGroup > DetGroupContainer
Definition: PixelInactiveAreaFinder.h:102
TrackerTopology::pxbModule
unsigned int pxbModule(const DetId &id) const
Definition: TrackerTopology.h:160
HLT_2018_cff.seedingLayers
seedingLayers
Definition: HLT_2018_cff.py:8534
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
Exception
Definition: hltDiff.cc:246
PixelInactiveAreaFinder::badAdjecentDetsBarrel
DetGroup badAdjecentDetsBarrel(const det_t &det)
Definition: PixelInactiveAreaFinder.cc:898
PixelInactiveAreaFinder::badPixelDetsBarrel_
DetContainer badPixelDetsBarrel_
Definition: PixelInactiveAreaFinder.h:114
dqmiodumpmetadata.counts
counts
Definition: dqmiodumpmetadata.py:25
PVValHelper::ladder
Definition: PVValidationHelpers.h:72
PixelInactiveAreaFinder::inactiveLayers_
std::vector< SeedingLayerId > inactiveLayers_
Definition: PixelInactiveAreaFinder.h:83
PixelInactiveAreaFinder::getZSpan
void getZSpan(const DetGroup &detGroup, DetGroupSpan &cspan)
Definition: PixelInactiveAreaFinder.cc:1104
PixelInactiveAreaFinder::geometryWatcher_
edm::ESWatcher< TrackerDigiGeometryRecord > geometryWatcher_
Definition: PixelInactiveAreaFinder.h:106
GeomDetEnumerators::PixelEndcap
Definition: GeomDetEnumerators.h:12
PixelInactiveAreaFinder::getBadPixelDets
void getBadPixelDets(const edm::Event &iEvent, const edm::EventSetup &iSetup)
Definition: PixelInactiveAreaFinder.cc:691
DetGroup
Definition: DetGroup.h:41
TrackerTopology::pxfBlade
unsigned int pxfBlade(const DetId &id) const
Definition: TrackerTopology.h:447
Surface::rSpan
std::pair< float, float > const & rSpan() const
Definition: Surface.h:92
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:671
TrackerTopologyRcd
Definition: TrackerTopologyRcd.h:10
TrackerTopology::pxbDetId
DetId pxbDetId(uint32_t layer, uint32_t ladder, uint32_t module) const
Definition: TrackerTopology.h:455
PixelInactiveAreaFinder::SeedingLayerId
SeedingLayerSetsBuilder::SeedingLayerId SeedingLayerId
Definition: PixelInactiveAreaFinder.h:24
PixelInactiveAreaFinder::DetGroupSpanContainer
std::vector< DetGroupSpan > DetGroupSpanContainer
Definition: PixelInactiveAreaFinder.h:36
begin
#define begin
Definition: vmac.h:32
PixelInactiveAreaFinder::pixelDetsEndcap_
DetContainer pixelDetsEndcap_
Definition: PixelInactiveAreaFinder.h:113
PixelInactiveAreaFinder::inactivePixelDetectorTokens_
std::vector< edm::EDGetTokenT< DetIdCollection > > inactivePixelDetectorTokens_
Definition: PixelInactiveAreaFinder.h:88
unpackBuffers-CaloStage2.token
token
Definition: unpackBuffers-CaloStage2.py:316
PixelInactiveAreaFinder::nBPixLadders
std::array< unsigned short, 4 > nBPixLadders
Definition: PixelInactiveAreaFinder.h:96