CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
SiStripBadComponentInfo Class Reference

#include <SiStripBadComponentInfo.h>

Inheritance diagram for SiStripBadComponentInfo:
DQMEDHarvester edm::one::EDProducer< edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::EndProcessBlockProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 SiStripBadComponentInfo (edm::ParameterSet const &ps)
 Constructor. More...
 
 ~SiStripBadComponentInfo () override
 
- Public Member Functions inherited from DQMEDHarvester
void accumulate (edm::Event const &ev, edm::EventSetup const &es) final
 
void beginJob () override
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &) override
 
virtual void dqmAnalyze (DQMStore::IBooker &, DQMStore::IGetter &, edm::Event const &, edm::EventSetup const &)
 
 DQMEDHarvester (edm::ParameterSet const &iConfig)
 
 DQMEDHarvester ()
 
virtual void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void dqmEndRun (DQMStore::IBooker &, DQMStore::IGetter &, edm::Run const &, edm::EventSetup const &)
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &es) final
 
void endProcessBlockProduce (edm::ProcessBlock &) final
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
void endRunProduce (edm::Run &run, edm::EventSetup const &es) final
 
 ~DQMEDHarvester () override=default
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::EndProcessBlockProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources, edm::Accumulator >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const *> const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Protected Member Functions

void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &) override
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
- Protected Member Functions inherited from edm::ProducerBase
template<Transition Tr = Transition::Event>
auto produces (std::string instanceName) noexcept
 declare what type of product will make and with which optional label More...
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
template<Transition Tr = Transition::Event>
auto produces () noexcept
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Private Member Functions

void bookBadComponentHistos (DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
 
void checkBadComponents (edm::EventSetup const &eSetup)
 
void createSummary (MonitorElement *me, const std::map< std::pair< int, int >, float > &map)
 
void fillBadComponentMaps (const SiStripQuality *siStripQuality)
 
void fillBadComponentMaps (int xbin, int component, SiStripQuality::BadComponent const &BC)
 

Private Attributes

MonitorElementbadAPVME_
 
MonitorElementbadFiberME_
 
MonitorElementbadStripME_
 
bool bookedStatus_
 
std::map< std::pair< int, int >, float > mapBadAPV
 
std::map< std::pair< int, int >, float > mapBadFiber
 
std::map< std::pair< int, int >, float > mapBadStrip
 
int nSubSystem_
 
std::unique_ptr< TrackerTopologytTopo_
 
edm::ESGetToken< TrackerTopology, TrackerTopologyRcdtTopoToken_
 
SiStripQualityWithFromFedErrorsHelper withFedErrHelper_
 

Additional Inherited Members

- Public Types inherited from DQMEDHarvester
typedef dqm::harvesting::DQMStore DQMStore
 
typedef dqm::harvesting::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
template<typename T >
using BranchAliasSetterT = ProductRegistryHelper::BranchAliasSetterT< T >
 
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Attributes inherited from DQMEDHarvester
DQMStoredqmstore_
 
edm::GetterOfProducts< DQMTokenjobmegetter_
 
edm::EDPutTokenT< DQMTokenjobToken_
 
edm::GetterOfProducts< DQMTokenlumimegetter_
 
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::GetterOfProducts< DQMTokenrunmegetter_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

DQM/SiStripMonitorCluster/interface/SiStripBadComponentInfo.h

Description: Checks the # of SiStrip FEDs from DAQ Usage: <usage>

Definition at line 42 of file SiStripBadComponentInfo.h.

Constructor & Destructor Documentation

◆ SiStripBadComponentInfo()

SiStripBadComponentInfo::SiStripBadComponentInfo ( edm::ParameterSet const &  ps)

Constructor.

Definition at line 23 of file SiStripBadComponentInfo.cc.

References edm::EDConsumerBase::consumesCollector().

24  : bookedStatus_(false),
25  nSubSystem_(6),
26  tTopoToken_(esConsumes<edm::Transition::EndRun>()),
28  // Create MessageSender
29  LogDebug("SiStripBadComponentInfo") << "SiStripBadComponentInfo::Creating SiStripBadComponentInfo ";
30 }
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
SiStripQualityWithFromFedErrorsHelper withFedErrHelper_
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
#define LogDebug(id)

◆ ~SiStripBadComponentInfo()

SiStripBadComponentInfo::~SiStripBadComponentInfo ( )
override

Definition at line 32 of file SiStripBadComponentInfo.cc.

References LogDebug.

32  {
33  LogDebug("SiStripBadComponentInfo") << "SiStripBadComponentInfo::Deleting SiStripBadComponentInfo ";
34 }
#define LogDebug(id)

Member Function Documentation

◆ bookBadComponentHistos()

void SiStripBadComponentInfo::bookBadComponentHistos ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
private

Definition at line 155 of file SiStripBadComponentInfo.cc.

References badAPVME_, badFiberME_, badStripME_, dqm::implementation::IBooker::book2D(), bookedStatus_, dqm::implementation::NavigatorBase::cd(), dqm::implementation::IGetter::dirExists(), mps_fire::i, names, nSubSystem_, dqm::implementation::NavigatorBase::pwd(), dqm::impl::MonitorElement::setAxisTitle(), dqm::impl::MonitorElement::setBinLabel(), dqm::implementation::NavigatorBase::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by dqmEndJob().

155  {
156  if (!bookedStatus_) {
157  std::string strip_dir = "";
158  ibooker.cd();
159  // SiStripUtility::getTopFolderPath(dqmStore_, "SiStrip", strip_dir);
160  if (igetter.dirExists("SiStrip")) {
161  ibooker.cd("SiStrip");
162  strip_dir = ibooker.pwd();
163  }
164  edm::LogInfo("SiStripBadComponentInfo")
165  << "SiStripBadComponentInfo::bookBadComponentHistos ==> " << strip_dir << " " << ibooker.pwd() << std::endl;
166  if (!strip_dir.empty())
167  ibooker.setCurrentFolder(strip_dir + "/EventInfo");
168  else
169  ibooker.setCurrentFolder("SiStrip/EventInfo");
170 
171  ibooker.cd();
172  if (!strip_dir.empty())
173  ibooker.setCurrentFolder(strip_dir + "/EventInfo/BadComponentContents");
174 
175  std::string hname, htitle;
176  hname = "BadAPVMap";
177  htitle = "SiStrip Bad APVs";
178  badAPVME_ = ibooker.book2D(hname, htitle, nSubSystem_, 0.5, nSubSystem_ + 0.5, 10, 0.5, 10.5);
179  badAPVME_->setAxisTitle("Sub Detector Type", 1);
180  badAPVME_->setAxisTitle("Layer/Disc Number", 2);
181 
182  hname = "BadFiberMap";
183  htitle = "SiStrip Bad Fibers";
184  badFiberME_ = ibooker.book2D(hname, htitle, nSubSystem_, 0.5, nSubSystem_ + 0.5, 10, 0.5, 10.5);
185  badFiberME_->setAxisTitle("Sub Detector Type", 1);
186  badFiberME_->setAxisTitle("Layer/Disc Number", 2);
187 
188  hname = "BadStripMap";
189  htitle = "SiStrip Bad Strips";
190  badStripME_ = ibooker.book2D(hname, htitle, nSubSystem_, 0.5, nSubSystem_ + 0.5, 10, 0.5, 10.5);
191  badStripME_->setAxisTitle("Sub Detector Type", 1);
192  badStripME_->setAxisTitle("Layer/Disc Number", 2);
193 
194  std::vector<std::string> names;
195  names.push_back("TECB");
196  names.push_back("TECF");
197  names.push_back("TIB");
198  names.push_back("TIDB");
199  names.push_back("TIDF");
200  names.push_back("TOB");
201 
202  for (unsigned int i = 0; i < names.size(); i++) {
203  badAPVME_->setBinLabel(i + 1, names[i]);
204  badFiberME_->setBinLabel(i + 1, names[i]);
205  badStripME_->setBinLabel(i + 1, names[i]);
206  }
207 
208  bookedStatus_ = true;
209  ibooker.cd();
210  }
211 }
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
virtual std::string pwd()
Definition: DQMStore.cc:20
virtual bool dirExists(std::string const &path) const
Definition: DQMStore.cc:747
const std::string names[nVars_]
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
Log< level::Info, false > LogInfo
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:212
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)

◆ checkBadComponents()

void SiStripBadComponentInfo::checkBadComponents ( edm::EventSetup const &  eSetup)
private

◆ createSummary()

void SiStripBadComponentInfo::createSummary ( MonitorElement me,
const std::map< std::pair< int, int >, float > &  map 
)
private

Definition at line 229 of file SiStripBadComponentInfo.cc.

References mps_fire::i, dqmdumpme::k, genParticles_cff::map, hlt_dqm_clientPB-live_cfg::me, and nSubSystem_.

Referenced by dqmEndJob().

229  {
230  for (int i = 1; i < nSubSystem_ + 1; i++) {
231  float sum = 0.0;
232  for (int k = 1; k < me->getNbinsY(); k++) {
233  auto index = std::make_pair(i, k);
234  if (map.find(index) != map.end()) {
235  me->setBinContent(i, k, map.at(index)); // fill the layer/wheel bins
236  sum += map.at(index);
237  }
238  }
239  me->setBinContent(i, me->getNbinsY(), sum); // fill the summary bin (last one)
240  }
241 }

◆ dqmEndJob()

void SiStripBadComponentInfo::dqmEndJob ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
overrideprotectedvirtual

Implements DQMEDHarvester.

Definition at line 142 of file SiStripBadComponentInfo.cc.

References SiStripQualityWithFromFedErrorsHelper::addBadCompFromFedErr(), badAPVME_, badFiberME_, badStripME_, bookBadComponentHistos(), createSummary(), fillBadComponentMaps(), SiStripQualityWithFromFedErrorsHelper::getMergedQuality(), LogDebug, mapBadAPV, mapBadFiber, mapBadStrip, and withFedErrHelper_.

142  {
143  LogDebug("SiStripBadComponentInfo") << "SiStripBadComponentInfo::dqmEndRun";
146  }
147  bookBadComponentHistos(ibooker, igetter);
151 }
void createSummary(MonitorElement *me, const std::map< std::pair< int, int >, float > &map)
std::map< std::pair< int, int >, float > mapBadFiber
void fillBadComponentMaps(const SiStripQuality *siStripQuality)
void bookBadComponentHistos(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
std::map< std::pair< int, int >, float > mapBadAPV
SiStripQualityWithFromFedErrorsHelper withFedErrHelper_
const SiStripQuality & getMergedQuality(dqm::harvesting::DQMStore::IGetter &getter)
std::map< std::pair< int, int >, float > mapBadStrip
#define LogDebug(id)

◆ endRun()

void SiStripBadComponentInfo::endRun ( edm::Run const &  run,
edm::EventSetup const &  eSetup 
)
overrideprotected

Definition at line 39 of file SiStripBadComponentInfo.cc.

References SiStripQualityWithFromFedErrorsHelper::addBadCompFromFedErr(), SiStripQualityWithFromFedErrorsHelper::endRun(), fillBadComponentMaps(), edm::EventSetup::getData(), LogDebug, SiStripQualityWithFromFedErrorsHelper::qualityToken(), tTopo_, tTopoToken_, and withFedErrHelper_.

39  {
40  LogDebug("SiStripBadComponentInfo") << "SiStripBadComponentInfo:: End of Run";
41 
42  // Retrieve tracker topology from geometry
43  tTopo_ = std::make_unique<TrackerTopology>(eSetup.getData(tTopoToken_));
44 
47  }
48 }
void fillBadComponentMaps(const SiStripQuality *siStripQuality)
std::unique_ptr< TrackerTopology > tTopo_
const edm::ESGetToken< SiStripQuality, SiStripQualityRcd > & qualityToken() const
SiStripQualityWithFromFedErrorsHelper withFedErrHelper_
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
#define LogDebug(id)

◆ fillBadComponentMaps() [1/2]

void SiStripBadComponentInfo::fillBadComponentMaps ( const SiStripQuality siStripQuality)
private

Definition at line 50 of file SiStripBadComponentInfo.cc.

References SiStripBadStrip::decode(), SiStripQuality::getBadComponentList(), SiStripBadStrip::getDataVectorBegin(), SiStripBadStrip::getRegistryVectorBegin(), SiStripBadStrip::getRegistryVectorEnd(), mps_fire::i, mapBadStrip, FastTimerService_cff::range, SiStripBadStrip::data::range, DetId::subdetId(), StripSubdetector::TEC, StripSubdetector::TIB, StripSubdetector::TID, StripSubdetector::TOB, tTopo_, and heppy_batch::val.

Referenced by dqmEndJob(), and endRun().

50  {
51  auto const& BC = siStripQuality->getBadComponentList();
52 
53  for (size_t i = 0; i < BC.size(); ++i) {
54  int subdet = -999;
55  int component = -999;
56 
57  //&&&&&&&&&&&&&&&&&
58  // Single SubSyste
59  //&&&&&&&&&&&&&&&&&
60  int subDet = DetId(BC[i].detid).subdetId();
61  if (subDet == StripSubdetector::TIB) {
62  //&&&&&&&&&&&&&&&&&
63  // TIB
64  //&&&&&&&&&&&&&&&&&
65  subdet = 3;
66  component = tTopo_->tibLayer(BC[i].detid);
67  } else if (subDet == StripSubdetector::TID) {
68  //&&&&&&&&&&&&&&&&&
69  // TID
70  //&&&&&&&&&&&&&&&&&
71  if (tTopo_->tidSide(BC[i].detid) == 2)
72  subdet = 4;
73  else
74  subdet = 5;
75  component = tTopo_->tidWheel(BC[i].detid);
76  } else if (subDet == StripSubdetector::TOB) {
77  //&&&&&&&&&&&&&&&&&
78  // TOB
79  //&&&&&&&&&&&&&&&&&
80  subdet = 6;
81  component = tTopo_->tobLayer(BC[i].detid);
82  } else if (subDet == StripSubdetector::TEC) {
83  //&&&&&&&&&&&&&&&&&
84  // TEC
85  //&&&&&&&&&&&&&&&&&
86  if (tTopo_->tecSide(BC[i].detid) == 2)
87  subdet = 2;
88  else
89  subdet = 1;
90  component = tTopo_->tecWheel(BC[i].detid);
91  }
92  fillBadComponentMaps(subdet, component, BC[i]);
93  }
94 
95  //&&&&&&&&&&&&&&&&&&
96  // Single Strip Info
97  //&&&&&&&&&&&&&&&&&&
98 
101 
102  for (SiStripBadStrip::RegistryIterator rp = rbegin; rp != rend; ++rp) {
103  uint32_t detid = rp->detid;
104  int subdet = -999;
105  int component = -999;
106  DetId detectorId = DetId(detid);
107  int subDet = detectorId.subdetId();
108  if (subDet == StripSubdetector::TIB) {
109  subdet = 3;
110  component = tTopo_->tibLayer(detid);
111  } else if (subDet == StripSubdetector::TID) {
112  if (tTopo_->tidSide(detid) == 2)
113  subdet = 5;
114  else
115  subdet = 4;
116  component = tTopo_->tidWheel(detid);
117  } else if (subDet == StripSubdetector::TOB) {
118  subdet = 6;
119  component = tTopo_->tobLayer(detid);
120  } else if (subDet == StripSubdetector::TEC) {
121  if (tTopo_->tecSide(detid) == 2)
122  subdet = 2;
123  else
124  subdet = 1;
125  component = tTopo_->tecWheel(detid);
126  }
127 
128  SiStripQuality::Range sqrange = SiStripQuality::Range(siStripQuality->getDataVectorBegin() + rp->ibegin,
129  siStripQuality->getDataVectorBegin() + rp->iend);
130 
131  for (int it = 0; it < sqrange.second - sqrange.first; it++) {
132  unsigned int range = siStripQuality->decode(*(sqrange.first + it)).range;
133  float val = (mapBadStrip.find(std::make_pair(subdet, component)) != mapBadStrip.end())
134  ? mapBadStrip.at(std::make_pair(subdet, component))
135  : 0.;
136  val += range;
137  mapBadStrip[std::make_pair(subdet, component)] = val;
138  }
139  }
140 }
unsigned short range
static constexpr auto TEC
ContainerIterator getDataVectorBegin() const
Registry::const_iterator RegistryIterator
const std::vector< BadComponent > & getBadComponentList() const
void fillBadComponentMaps(const SiStripQuality *siStripQuality)
std::unique_ptr< TrackerTopology > tTopo_
RegistryIterator getRegistryVectorEnd() const
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
static constexpr auto TOB
Definition: DetId.h:17
static constexpr auto TIB
std::map< std::pair< int, int >, float > mapBadStrip
std::pair< ContainerIterator, ContainerIterator > Range
data decode(const unsigned int &value) const
static constexpr auto TID
RegistryIterator getRegistryVectorBegin() const

◆ fillBadComponentMaps() [2/2]

void SiStripBadComponentInfo::fillBadComponentMaps ( int  xbin,
int  component,
SiStripQuality::BadComponent const &  BC 
)
private

Definition at line 213 of file SiStripBadComponentInfo.cc.

References SiStripQuality::BadComponent::BadApvs, SiStripQuality::BadComponent::BadFibers, submitPVResolutionJobs::count, mapBadAPV, mapBadFiber, gpuPixelDoublets::ntot, and heppy_batch::val.

213  {
214  auto index = std::make_pair(xbin, component);
215 
216  if (BC.BadApvs) {
217  int ntot = std::bitset<16>(BC.BadApvs & 0x3f).count();
218  float val = (mapBadAPV.find(index) != mapBadAPV.end()) ? mapBadAPV.at(index) : 0.;
219  val += ntot;
220  mapBadAPV[index] = val;
221  }
222  if (BC.BadFibers) {
223  int ntot = std::bitset<16>(BC.BadFibers & 0x7).count();
224  float val = (mapBadFiber.find(index) != mapBadFiber.end()) ? mapBadFiber.at(index) : 0.;
225  val += ntot;
226  mapBadFiber[index] = val;
227  }
228 }
std::map< std::pair< int, int >, float > mapBadFiber
std::map< std::pair< int, int >, float > mapBadAPV
__shared__ uint32_t ntot

◆ fillDescriptions()

static void SiStripBadComponentInfo::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
inlinestatic

Member Data Documentation

◆ badAPVME_

MonitorElement* SiStripBadComponentInfo::badAPVME_
private

Definition at line 66 of file SiStripBadComponentInfo.h.

Referenced by bookBadComponentHistos(), and dqmEndJob().

◆ badFiberME_

MonitorElement* SiStripBadComponentInfo::badFiberME_
private

Definition at line 67 of file SiStripBadComponentInfo.h.

Referenced by bookBadComponentHistos(), and dqmEndJob().

◆ badStripME_

MonitorElement* SiStripBadComponentInfo::badStripME_
private

Definition at line 68 of file SiStripBadComponentInfo.h.

Referenced by bookBadComponentHistos(), and dqmEndJob().

◆ bookedStatus_

bool SiStripBadComponentInfo::bookedStatus_
private

Definition at line 74 of file SiStripBadComponentInfo.h.

Referenced by bookBadComponentHistos().

◆ mapBadAPV

std::map<std::pair<int, int>, float> SiStripBadComponentInfo::mapBadAPV
private

Definition at line 70 of file SiStripBadComponentInfo.h.

Referenced by dqmEndJob(), and fillBadComponentMaps().

◆ mapBadFiber

std::map<std::pair<int, int>, float> SiStripBadComponentInfo::mapBadFiber
private

Definition at line 71 of file SiStripBadComponentInfo.h.

Referenced by dqmEndJob(), and fillBadComponentMaps().

◆ mapBadStrip

std::map<std::pair<int, int>, float> SiStripBadComponentInfo::mapBadStrip
private

Definition at line 72 of file SiStripBadComponentInfo.h.

Referenced by dqmEndJob(), and fillBadComponentMaps().

◆ nSubSystem_

int SiStripBadComponentInfo::nSubSystem_
private

Definition at line 75 of file SiStripBadComponentInfo.h.

Referenced by bookBadComponentHistos(), and createSummary().

◆ tTopo_

std::unique_ptr<TrackerTopology> SiStripBadComponentInfo::tTopo_
private

Definition at line 78 of file SiStripBadComponentInfo.h.

Referenced by endRun(), and fillBadComponentMaps().

◆ tTopoToken_

edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> SiStripBadComponentInfo::tTopoToken_
private

Definition at line 77 of file SiStripBadComponentInfo.h.

Referenced by endRun().

◆ withFedErrHelper_

SiStripQualityWithFromFedErrorsHelper SiStripBadComponentInfo::withFedErrHelper_
private

Definition at line 79 of file SiStripBadComponentInfo.h.

Referenced by dqmEndJob(), and endRun().