10 refNoise(0),oldGain(0),newGain(0),cacheID_noise(0xFFFFFFFF),cacheID_gain(0xFFFFFFFF)
15 "\n------------------------------------------"
16 "\nUnAvailable Service SiStripDetInfoFileReader: please insert in the configuration file an instance like"
17 "\n\tprocess.SiStripDetInfoFileReader = cms.Service(\"SiStripDetInfoFileReader\")"
18 "\n------------------------------------------";
22 file =
new TFile(
"correlTest.root",
"RECREATE");
52 sprintf(dir,
"Run_%d",
theRun);
86 TCanvas *
C=
new TCanvas();
90 sprintf(outName,
"Run_%d.png",
theRun);
91 for(
size_t i=0;
i<
vTH1.size();
i++)
95 vTH1[
i]->SetLineColor(
i/100);
97 C->cd(
i/100)->SetLogy();
109 sprintf(dir,
"Run_%d_TkMap.png",
theRun);
118 typedef std::vector<SiStripNoises::ratioData>
collection;
128 std::vector<TH1F *>
histos;
130 collection::const_iterator iter=divNoise.begin();
131 collection::const_iterator iterE=divNoise.end();
136 for(;iter!=iterE;++iter){
139 size_t strip=0, stripE= iter->values.size();
142 for (;strip<stripE;++strip){
148 edm::LogInfo(
"") <<
"[Doanalysis] detid " << iter->detid <<
" strip " << strip <<
" apvNb " << apvNb;
151 value=iter->values[strip]*gainRatio;
153 for(
size_t i=0;
i<histos.size();++
i)
154 histos[
i]->
Fill(value);
165 if(oldRange.first==oldRange.second ||
166 newRange.first==newRange.second)
177 for (
size_t istrip=firstStrip;istrip<firstStrip+range;istrip++){
180 return mean/(1.*range);
188 int subdet=-999;
int component=-999;
204 int index=100+subdet*100+component;
207 histos.push_back(
getHisto(100+100*subdet));
214 if(
vTH1.size()<index+1)
215 vTH1.resize(index+1,0);
228 sprintf(name,
"%d_%lu__%s",
theRun,index,SubD.c_str());
229 edm::LogInfo(
"")<<
"[getHisto] creating index " << index << std::endl;
230 vTH1[
index]=
new TH1F(name,name,200,-0.5,10.5);
TH1F * getHisto(const long unsigned int &index)
unsigned long long cacheID_noise
void getHistos(const uint32_t &detid, const TrackerTopology *tTopo, std::vector< TH1F * > &histos)
unsigned int tibLayer(const DetId &id) const
std::vector< TH1F * > vTH1
static float getApvGain(uint16_t apv, const Range &range)
float getMeanNoise(const SiStripNoises::Range &noiseRange, const uint32_t &first, const uint32_t &range)
unsigned int tidWheel(const DetId &id) const
void DoAnalysis(const edm::EventSetup &, const SiStripNoises &, SiStripNoises &)
virtual void beginRun(const edm::Run &run, const edm::EventSetup &es)
unsigned int tidSide(const DetId &id) const
edm::ESHandle< SiStripApvGain > gainHandle_
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
void save(bool print_total=true, float minval=0., float maxval=0., std::string s="svgmap.svg", int width=1500, int height=800)
std::pair< ContainerIterator, ContainerIterator > Range
float getGainRatio(const uint32_t &detid, const uint16_t &apv)
unsigned long long getNoiseCache(const edm::EventSetup &eSetup)
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
Detector identifier class for the strip tracker.
T const * product() const
edm::ESHandle< SiStripNoises > noiseHandle_
unsigned long long cacheID_gain
unsigned long long getGainCache(const edm::EventSetup &eSetup)
const Range getRange(const uint32_t detID) const
SiStripCorrelateNoise(const edm::ParameterSet &)
void checkGainCache(const edm::EventSetup &es)
std::pair< ContainerIterator, ContainerIterator > Range
unsigned int tecWheel(const DetId &id) const
SiStripDetInfoFileReader * fr
void fill(int layer, int ring, int nmod, float x)
unsigned int tobLayer(const DetId &id) const
unsigned int tecSide(const DetId &id) const