7 : cacheID_quality(0xFFFFFFFF), cacheID_noise(0xFFFFFFFF) {
10 edm::LogError(
"TkLayerMap") <<
"\n------------------------------------------" 11 "\nUnAvailable Service SiStripDetInfoFileReader: please insert in " 12 "the configuration file an instance like" 13 "\n\tprocess.SiStripDetInfoFileReader = " 14 "cms.Service(\"SiStripDetInfoFileReader\")" 15 "\n------------------------------------------";
19 file =
new TFile(
"correlTest.root",
"RECREATE");
64 const uint32_t detid = rp->detid;
76 for (
int it = 0; it < sqrange.second - sqrange.first; it++) {
88 edm::LogError(
"SiStripQualityStatistics") <<
"PROBLEM detid " << detid <<
" value " << percentage << std::endl;
93 edm::LogInfo(
"") <<
"percentage " << detid <<
" " << percentage;
98 const uint32_t &firstStrip,
99 const uint32_t &range) {
100 std::vector<TH2F *>
histos;
103 edm::LogInfo(
"Domenico") <<
"detid " << detid <<
" first " << firstStrip <<
" range " << range;
104 float meanAPVNoise =
getMeanNoise(noiseRange, firstStrip / 128, 128);
107 for (
size_t theStrip = firstStrip; theStrip < firstStrip + range; theStrip++) {
108 float meanNoiseHotStrips =
getMeanNoise(noiseRange, theStrip, 1);
112 float yvalue = range < 21 ? 1. * range : 21;
114 for (
size_t i = 0;
i < histos.size(); ++
i)
115 histos[
i]->
Fill(meanNoiseHotStrips / meanAPVNoise - 1., yvalue);
117 if (meanNoiseHotStrips / meanAPVNoise - 1. < -0.3)
125 const uint32_t &firstStrip,
126 const uint32_t &range) {
128 for (
size_t istrip = firstStrip; istrip < firstStrip + range; istrip++) {
131 return mean / (1. * range);
136 std::vector<TH2F *> &
histos) {
140 int component = -999;
156 int index = 100 + subdet * 100 + component;
163 if (
vTH2.size() < index + 1)
164 vTH2.resize(index + 1,
nullptr);
166 if (
vTH2[index] ==
nullptr) {
168 sprintf(name,
"%lu", index);
169 edm::LogInfo(
"") <<
"[getHisto] creating index " << index << std::endl;
170 vTH2[
index] =
new TH2F(name, name, 50, -2., 2., 21, 0.5, 21.5);
177 for (
size_t i = 0;
i <
vTH2.size();
i++)
178 if (
vTH2[
i] !=
nullptr)
184 tkmap->
save(
true, 0, 0,
"testTkMap.png");
void beginRun(const edm::Run &run, const edm::EventSetup &es) override
SiStripDetInfoFileReader * fr
unsigned int tibLayer(const DetId &id) const
TH2F * getHisto(const long unsigned int &index)
const std::pair< unsigned short, double > getNumberOfApvsAndStripLength(uint32_t detId) const
edm::ESHandle< SiStripNoises > noiseHandle_
void iterateOnBadStrips(const uint32_t &detid, const TrackerTopology *tTopo, SiStripQuality::Range &sqrange)
unsigned int tidWheel(const DetId &id) const
void getHistos(const uint32_t &detid, const TrackerTopology *tTopo, std::vector< TH2F * > &histos)
Registry::const_iterator RegistryIterator
~SiStripCorrelateBadStripAndNoise() override
static float getNoise(uint16_t strip, const Range &range)
unsigned long long getQualityCache(const edm::EventSetup &eSetup)
RegistryIterator getRegistryVectorEnd() const
unsigned int tidSide(const DetId &id) const
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
void iterateOnDets(const TrackerTopology *tTopo)
void save(bool print_total=true, float minval=0., float maxval=0., std::string s="svgmap.svg", int width=1500, int height=800)
unsigned long long getNoiseCache(const edm::EventSetup &eSetup)
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
unsigned long long cacheID_quality
edm::ESHandle< SiStripQuality > qualityHandle_
SiStripCorrelateBadStripAndNoise(const edm::ParameterSet &)
void fillc(int idmod, int RGBcode)
float getMeanNoise(const SiStripNoises::Range &noiseRange, const uint32_t &first, const uint32_t &range)
ContainerIterator getDataVectorBegin() const
Detector identifier class for the strip tracker.
unsigned short firstStrip
unsigned long long cacheID_noise
RegistryIterator getRegistryVectorBegin() const
const Range getRange(const uint32_t detID) const
std::pair< ContainerIterator, ContainerIterator > Range
void DoAnalysis(const edm::EventSetup &)
std::pair< ContainerIterator, ContainerIterator > Range
unsigned int tecWheel(const DetId &id) const
T const * product() const
data decode(const unsigned int &value) const
unsigned int tobLayer(const DetId &id) const
void correlateWithNoise(const uint32_t &detid, const TrackerTopology *tTopo, const uint32_t &firstStrip, const uint32_t &range)
unsigned int tecSide(const DetId &id) const
std::vector< TH2F * > vTH2