|
|
Go to the documentation of this file.
33 dataLabel_(iConfig.getUntrackedParameter<
std::
string>(
"dataLabel",
"")),
34 TkMapFileName_(iConfig.getUntrackedParameter<
std::
string>(
"TkMapFileName",
"")),
35 saveTkHistoMap_(iConfig.getUntrackedParameter<
bool>(
"SaveTkHistoMap",
true)),
37 tkMapFullIOVs(nullptr),
38 addBadCompFromFedErr_(iConfig.getUntrackedParameter<
bool>(
"AddBadComponentsFromFedErrors",
false)),
39 fedErrCutoff_(
float(iConfig.getUntrackedParameter<double>(
"FedErrorBadComponentsCutoff", 0.8))) {
42 .getUntrackedParameter<edm::FileInPath>(
"file",
56 mergedQuality.add(fedErrQuality.get());
57 mergedQuality.cleanUp();
58 mergedQuality.fillBadComponents();
83 tkhisto = std::make_unique<TkHistoMap>(tkDetMapHandle.
product(),
"BadComp",
"BadComp", -1.);
108 for (
int i = 0;
i < 4; ++
i) {
110 for (
int j = 0;
j < 19; ++
j) {
112 for (
int k = 0;
k < 4; ++
k)
121 std::stringstream
ss;
123 std::vector<uint32_t>::const_iterator idet = detids.begin();
124 for (; idet != detids.end(); ++idet) {
125 ss <<
"detid " << (*idet) <<
" IsModuleUsable " << siStripQuality->
IsModuleUsable((*idet)) <<
"\n";
129 LogDebug(
"SiStripQualityStatistics") <<
ss.str() << std::endl;
133 for (
size_t i = 0;
i < BC.size(); ++
i) {
144 ((BC[
i].BadApvs >> 2) & 0
x1) + ((BC[
i].BadApvs >> 1) & 0
x1) + ((BC[
i].BadApvs) & 0
x1);
189 float percentage = 0;
195 uint32_t detid = rp->detid;
198 int component = -999;
219 for (
int it = 0; it < sqrange.second - sqrange.first; it++) {
229 edm::LogError(
"SiStripQualityStatistics") <<
"PROBLEM detid " << detid <<
" value " << percentage << std::endl;
234 tkhisto->fill(detid, percentage);
242 ss <<
"\n-----------------\nNew IOV starting from run " <<
run_.
run() <<
" chacheID " <<
m_cacheID_
243 <<
"\n-----------------\n";
244 ss <<
"\n-----------------\nGlobal Info\n-----------------";
245 ss <<
"\nBadComponent \t Modules \tFibers "
246 "\tApvs\tStrips\n----------------------------------------------------------------";
260 for (
int i = 1;
i < 5; ++
i)
264 for (
int i = 1;
i < 4; ++
i)
267 for (
int i = 4;
i < 7; ++
i)
271 for (
int i = 1;
i < 7; ++
i)
275 for (
int i = 1;
i < 10; ++
i)
278 for (
int i = 10;
i < 19; ++
i)
283 ss <<
"\n----------------------------------------------------------------\n\t\t Detid \tModules Fibers "
284 "Apvs\n----------------------------------------------------------------";
285 for (
int i = 1;
i < 5; ++
i)
286 ss <<
"\nTIB Layer " <<
i <<
" :" <<
ssV[0][
i].
str();
288 for (
int i = 1;
i < 4; ++
i)
289 ss <<
"\nTID+ Disk " <<
i <<
" :" <<
ssV[1][
i].
str();
290 for (
int i = 4;
i < 7; ++
i)
291 ss <<
"\nTID- Disk " <<
i - 3 <<
" :" <<
ssV[1][
i].
str();
293 for (
int i = 1;
i < 7; ++
i)
294 ss <<
"\nTOB Layer " <<
i <<
" :" <<
ssV[2][
i].
str();
296 for (
int i = 1;
i < 10; ++
i)
297 ss <<
"\nTEC+ Disk " <<
i <<
" :" <<
ssV[3][
i].
str();
298 for (
int i = 10;
i < 19; ++
i)
299 ss <<
"\nTEC- Disk " <<
i - 9 <<
" :" <<
ssV[3][
i].
str();
301 edm::LogInfo(
"SiStripQualityStatistics") <<
ss.str() << std::endl;
304 std::stringstream sRun;
306 sRun <<
"_Run_" << std::setw(6) << std::setfill(
'0') <<
run_.
run() << std::setw(0);
SiStripDetInfoFileReader * reader
T const * product() const
SiStripQualityStatistics(const edm::ParameterSet &)
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)
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
std::unique_ptr< SiStripQuality > badStripFromFedErr(dqm::harvesting::DQMStore::IGetter &dqmStore, const SiStripFedCabling &fedCabling, float cutoff)
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
unsigned int tidSide(const DetId &id) const
const std::vector< uint32_t > & getAllDetIds() 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