|
|
Go to the documentation of this file.
31 dataLabel_(iConfig.getUntrackedParameter<
std::
string>(
"dataLabel",
"")),
32 TkMapFileName_(iConfig.getUntrackedParameter<
std::
string>(
"TkMapFileName",
"")),
33 saveTkHistoMap_(iConfig.getUntrackedParameter<
bool>(
"SaveTkHistoMap",
true)),
35 tkMapFullIOVs(nullptr),
36 addBadCompFromFedErr_(iConfig.getUntrackedParameter<
bool>(
"AddBadComponentsFromFedErrors",
false)),
37 fedErrCutoff_(
float(iConfig.getUntrackedParameter<double>(
"FedErrorBadComponentsCutoff", 0.8))),
41 fedCablingToken_(addBadCompFromFedErr_ ? decltype(fedCablingToken_){esConsumes<edm::Transition::EndRun>()}
42 : decltype(fedCablingToken_){}) {
45 .getUntrackedParameter<edm::FileInPath>(
"file",
49 tkMapFullIOVs =
new TrackerMap(
"BadComponents");
59 mergedQuality.add(fedErrQuality.get());
60 mergedQuality.cleanUp();
61 mergedQuality.fillBadComponents();
98 for (
int i = 0;
i < 4; ++
i) {
100 for (
int j = 0;
j < 19; ++
j) {
102 for (
int k = 0;
k < 4; ++
k)
111 std::stringstream
ss;
113 std::vector<uint32_t>::const_iterator idet = detids.begin();
114 for (; idet != detids.end(); ++idet) {
115 ss <<
"detid " << (*idet) <<
" IsModuleUsable " << siStripQuality->
IsModuleUsable((*idet)) <<
"\n";
119 LogDebug(
"SiStripQualityStatistics") <<
ss.str() << std::endl;
123 for (
size_t i = 0;
i < BC.size(); ++
i) {
134 ((BC[
i].BadApvs >> 2) & 0
x1) + ((BC[
i].BadApvs >> 1) & 0
x1) + ((BC[
i].BadApvs) & 0
x1);
179 float percentage = 0;
185 uint32_t detid = rp->detid;
188 int component = -999;
209 for (
int it = 0; it < sqrange.second - sqrange.first; it++) {
219 edm::LogError(
"SiStripQualityStatistics") <<
"PROBLEM detid " << detid <<
" value " << percentage << std::endl;
224 tkhisto->fill(detid, percentage);
232 ss <<
"\n-----------------\nNew IOV starting from run " <<
run_.
run() <<
" chacheID " <<
m_cacheID_
233 <<
"\n-----------------\n";
234 ss <<
"\n-----------------\nGlobal Info\n-----------------";
235 ss <<
"\nBadComponent \t Modules \tFibers "
236 "\tApvs\tStrips\n----------------------------------------------------------------";
250 for (
int i = 1;
i < 5; ++
i)
254 for (
int i = 1;
i < 4; ++
i)
257 for (
int i = 4;
i < 7; ++
i)
261 for (
int i = 1;
i < 7; ++
i)
265 for (
int i = 1;
i < 10; ++
i)
268 for (
int i = 10;
i < 19; ++
i)
273 ss <<
"\n----------------------------------------------------------------\n\t\t Detid \tModules Fibers "
274 "Apvs\n----------------------------------------------------------------";
275 for (
int i = 1;
i < 5; ++
i)
276 ss <<
"\nTIB Layer " <<
i <<
" :" <<
ssV[0][
i].
str();
278 for (
int i = 1;
i < 4; ++
i)
279 ss <<
"\nTID+ Disk " <<
i <<
" :" <<
ssV[1][
i].
str();
280 for (
int i = 4;
i < 7; ++
i)
281 ss <<
"\nTID- Disk " <<
i - 3 <<
" :" <<
ssV[1][
i].
str();
283 for (
int i = 1;
i < 7; ++
i)
284 ss <<
"\nTOB Layer " <<
i <<
" :" <<
ssV[2][
i].
str();
286 for (
int i = 1;
i < 10; ++
i)
287 ss <<
"\nTEC+ Disk " <<
i <<
" :" <<
ssV[3][
i].
str();
288 for (
int i = 10;
i < 19; ++
i)
289 ss <<
"\nTEC- Disk " <<
i - 9 <<
" :" <<
ssV[3][
i].
str();
291 edm::LogInfo(
"SiStripQualityStatistics") <<
ss.str() << std::endl;
294 std::stringstream sRun;
296 sRun <<
"_Run_" << std::setw(6) << std::setfill(
'0') <<
run_.
run() << std::setw(0);
SiStripDetInfoFileReader * reader
bool check(const edm::EventSetup &iSetup)
edm::ESGetToken< SiStripQuality, SiStripQualityRcd > stripQualityToken_
SiStripQualityStatistics(const edm::ParameterSet &)
std::unique_ptr< SiStripQuality > badStripFromFedErr(dqm::harvesting::DQMStore::IGetter &dqmStore, const SiStripFedCabling &fedCabling, float cutoff)
edm::ESGetToken< SiStripFedCabling, SiStripFedCablingRcd > fedCablingToken_
data decode(const unsigned int &value) const
bool IsModuleUsable(const uint32_t &detid) const
std::string TkMapFileName_
void fill(int layer, int ring, int nmod, float x)
Log< level::Info, false > LogInfo
edm::ESGetToken< TkDetMap, TrackerTopologyRcd > tkDetMapToken_
ContainerIterator getDataVectorBegin() const
~SiStripQualityStatistics() override
unsigned int tidWheel(const DetId &id) const
bool addBadCompFromFedErr_
std::pair< ContainerIterator, ContainerIterator > Range
const std::vector< BadComponent > & getBadComponentList() const
RegistryIterator getRegistryVectorBegin() const
int NBadComponent[4][19][4]
static constexpr auto TIB
void print(bool print_total=true, float minval=0., float maxval=0., std::string s="svgmap")
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
unsigned int tidSide(const DetId &id) const
edm::ESWatcher< SiStripQualityRcd > stripQualityWatcher_
Log< level::Error, false > LogError
const std::vector< uint32_t > & getAllDetIds() const
bool getData(T &iHolder) const
void save(bool print_total=true, float minval=0., float maxval=0., std::string s="svgmap.svg", int width=1500, int height=800)
unsigned int tobLayer(const DetId &id) const
void endRun(edm::Run const &, edm::EventSetup const &) override
const std::pair< unsigned short, double > getNumberOfApvsAndStripLength(uint32_t detId) const
static constexpr auto TEC
std::stringstream ssV[4][19]
static constexpr auto TOB
Registry::const_iterator RegistryIterator
const TrackerTopology * tTopo_
void SetBadComponents(int, int, SiStripQuality::BadComponent &)
TrackerMap * tkMapFullIOVs
std::unique_ptr< TkHistoMap > tkhisto
unsigned long long m_cacheID_
unsigned int tecWheel(const DetId &id) const
const SiStripFedCabling * fedCabling_
RegistryIterator getRegistryVectorEnd() const
const SiStripQuality * siStripQuality_
static constexpr auto TID
void fillc(int idmod, int RGBcode)
unsigned int tibLayer(const DetId &id) const
void updateAndSave(const SiStripQuality *siStripQuality)
unsigned int tecSide(const DetId &id) const