9 cacheID_quality(0xFFFFFFFF),cacheID_noise(0xFFFFFFFF)
14 "\n------------------------------------------"
15 "\nUnAvailable Service SiStripDetInfoFileReader: please insert in the configuration file an instance like"
16 "\n\tprocess.SiStripDetInfoFileReader = cms.Service(\"SiStripDetInfoFileReader\")"
17 "\n------------------------------------------";
21 file =
new TFile(
"correlTest.root",
"RECREATE");
74 const uint32_t
detid=rp->detid;
85 for(
int it=0;it<sqrange.second-sqrange.first;it++){
86 unsigned int firstStrip=
qualityHandle_->decode( *(sqrange.first+it) ).firstStrip;
87 unsigned int range=
qualityHandle_->decode( *(sqrange.first+it) ).range;
97 edm::LogError(
"SiStripQualityStatistics") <<
"PROBLEM detid " << detid <<
" value " << percentage<< std::endl;
101 edm::LogInfo(
"")<<
"percentage " << detid <<
" " << percentage;
107 std::vector<TH2F *>
histos;
110 edm::LogInfo(
"Domenico") <<
"detid " << detid <<
" first " << firstStrip <<
" range " << range;
111 float meanAPVNoise=
getMeanNoise(noiseRange,firstStrip/128,128);
114 for (
size_t theStrip=firstStrip;theStrip<firstStrip+range;theStrip++){
115 float meanNoiseHotStrips=
getMeanNoise(noiseRange,theStrip,1);
119 float yvalue=range<21?1.*range:21;
121 for(
size_t i=0;
i<histos.size();++
i)
122 histos[
i]->
Fill(meanNoiseHotStrips/meanAPVNoise-1.,yvalue);
124 if(meanNoiseHotStrips/meanAPVNoise-1.<-0.3)
135 for (
size_t istrip=firstStrip;istrip<firstStrip+range;istrip++){
138 return mean/(1.*range);
146 int subdet=-999;
int component=-999;
162 int index=100+subdet*100+component;
172 if(
vTH2.size()<index+1)
173 vTH2.resize(index+1,0);
177 sprintf(name,
"%lu",index);
178 edm::LogInfo(
"")<<
"[getHisto] creating index " << index << std::endl;
179 vTH2[
index]=
new TH2F(name,name,50,-2.,2.,21,0.5,21.5);
187 for(
size_t i=0;
i<
vTH2.size();
i++)
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
unsigned long long getQualityCache(const edm::EventSetup &eSetup)
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)
unsigned long long cacheID_quality
~SiStripCorrelateBadStripAndNoise()
std::vector< TH2F * > vTH2
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
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)
Detector identifier class for the strip tracker.
virtual void beginRun(const edm::Run &run, const edm::EventSetup &es)
T const * product() const
unsigned long long cacheID_noise
std::pair< ContainerIterator, ContainerIterator > Range
void DoAnalysis(const edm::EventSetup &)
std::pair< ContainerIterator, ContainerIterator > Range
unsigned int tecWheel(const DetId &id) 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