|
|
Go to the documentation of this file.
30 : TkMapFileName_(iConfig.getUntrackedParameter<
std::
string>(
"TkMapFileName",
"")),
31 saveTkHistoMap_(iConfig.getUntrackedParameter<
bool>(
"SaveTkHistoMap",
true)),
33 tkMapFullIOVs(nullptr),
41 tkMapFullIOVs =
new TrackerMap(
"BadComponents");
48 desc.addUntracked<
bool>(
"SaveTkHistoMap",
true);
51 descriptions.
add(
"siStripQualityStatistics",
desc);
85 for (
int i = 0;
i < 4; ++
i) {
87 for (
int j = 0;
j < 19; ++
j) {
89 for (
int k = 0;
k < 4; ++
k)
100 std::vector<uint32_t>::const_iterator idet = detids.begin();
101 for (; idet != detids.end(); ++idet) {
102 ss <<
"detid " << (*idet) <<
" IsModuleUsable " << siStripQuality->
IsModuleUsable((*idet)) <<
"\n";
106 LogDebug(
"SiStripQualityStatistics") <<
ss.str() << std::endl;
110 for (
size_t i = 0;
i < BC.size(); ++
i) {
121 ((BC[
i].BadApvs >> 2) & 0
x1) + ((BC[
i].BadApvs >> 1) & 0
x1) + ((BC[
i].BadApvs) & 0
x1);
134 component =
tTopo_->tibLayer(BC[
i].detid);
142 component =
tTopo_->tidSide(BC[
i].detid) == 2 ?
tTopo_->tidWheel(BC[
i].detid) :
tTopo_->tidWheel(BC[
i].detid) + 3;
150 component =
tTopo_->tobLayer(BC[
i].detid);
158 component =
tTopo_->tecSide(BC[
i].detid) == 2 ?
tTopo_->tecWheel(BC[
i].detid) :
tTopo_->tecWheel(BC[
i].detid) + 9;
166 float percentage = 0;
172 uint32_t detid = rp->detid;
175 int component = -999;
180 component =
tTopo_->tibLayer(detid);
183 component =
tTopo_->tidSide(detid) == 2 ?
tTopo_->tidWheel(detid) :
tTopo_->tidWheel(detid) + 3;
186 component =
tTopo_->tobLayer(detid);
189 component =
tTopo_->tecSide(detid) == 2 ?
tTopo_->tecWheel(detid) :
tTopo_->tecWheel(detid) + 9;
196 for (
int it = 0; it < sqrange.second - sqrange.first; it++) {
206 edm::LogError(
"SiStripQualityStatistics") <<
"PROBLEM detid " << detid <<
" value " << percentage << std::endl;
211 tkhisto->fill(detid, percentage);
219 ss <<
"\n-----------------\nNew IOV starting from run " <<
run_.
run() <<
"\n-----------------\n";
220 ss <<
"\n-----------------\nGlobal Info\n-----------------";
221 ss <<
"\nBadComponent \t Modules \tFibers "
222 "\tApvs\tStrips\n----------------------------------------------------------------";
236 for (
int i = 1;
i < 5; ++
i)
240 for (
int i = 1;
i < 4; ++
i)
243 for (
int i = 4;
i < 7; ++
i)
247 for (
int i = 1;
i < 7; ++
i)
251 for (
int i = 1;
i < 10; ++
i)
254 for (
int i = 10;
i < 19; ++
i)
259 ss <<
"\n----------------------------------------------------------------\n\t\t Detid \tModules Fibers "
260 "Apvs\n----------------------------------------------------------------";
261 for (
int i = 1;
i < 5; ++
i)
262 ss <<
"\nTIB Layer " <<
i <<
" :" <<
ssV[0][
i].
str();
264 for (
int i = 1;
i < 4; ++
i)
265 ss <<
"\nTID+ Disk " <<
i <<
" :" <<
ssV[1][
i].
str();
266 for (
int i = 4;
i < 7; ++
i)
267 ss <<
"\nTID- Disk " <<
i - 3 <<
" :" <<
ssV[1][
i].
str();
269 for (
int i = 1;
i < 7; ++
i)
270 ss <<
"\nTOB Layer " <<
i <<
" :" <<
ssV[2][
i].
str();
272 for (
int i = 1;
i < 10; ++
i)
273 ss <<
"\nTEC+ Disk " <<
i <<
" :" <<
ssV[3][
i].
str();
274 for (
int i = 10;
i < 19; ++
i)
275 ss <<
"\nTEC- Disk " <<
i - 9 <<
" :" <<
ssV[3][
i].
str();
277 edm::LogInfo(
"SiStripQualityStatistics") <<
ss.str() << std::endl;
280 std::stringstream sRun;
282 sRun <<
"_Run_" << std::setw(6) << std::setfill(
'0') <<
run_.
run() << std::setw(0);
static void fillDescription(edm::ParameterSetDescription &desc)
const SiStripQuality & getMergedQuality(dqm::harvesting::DQMStore::IGetter &getter)
const std::vector< uint32_t > & getAllDetIds() const noexcept
SiStripQualityStatistics(const edm::ParameterSet &)
data decode(const unsigned int &value) const
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
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
SiStripDetInfo read(std::string filePath)
std::pair< ContainerIterator, ContainerIterator > Range
const std::vector< BadComponent > & getBadComponentList() const
RegistryIterator getRegistryVectorBegin() const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
int NBadComponent[4][19][4]
const std::pair< unsigned short, double > getNumberOfApvsAndStripLength(uint32_t detId) const
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_
SiStripQualityWithFromFedErrorsHelper withFedErrHelper_
std::unique_ptr< TrackerTopology > tTopo_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Log< level::Error, false > LogError
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)
void endRun(edm::Run const &, edm::EventSetup const &) override
static constexpr auto TEC
std::stringstream ssV[4][19]
constexpr static char const *const kDefaultFile
static constexpr auto TOB
Registry::const_iterator RegistryIterator
void SetBadComponents(int, int, SiStripQuality::BadComponent &)
bool addBadCompFromFedErr() const
TrackerMap * tkMapFullIOVs
std::unique_ptr< TkHistoMap > tkhisto
RegistryIterator getRegistryVectorEnd() const
static constexpr auto TID
std::string fullPath() const
const edm::ESGetToken< SiStripQuality, SiStripQualityRcd > & qualityToken() const
void fillc(int idmod, int RGBcode)
bool endRun(const edm::EventSetup &)
void updateAndSave(const SiStripQuality *siStripQuality)