74 string CheckHistoName;
77 TH1F *hAverageNoiseHisto;
78 TH1F *hAverageNoiseIntegratedHisto;
79 TH1F *hAverageNoiseHistoPerCh;
80 TH1F *hAverageNoiseIntegratedHistoPerCh;
84 string AverageNoiseName;
85 string AverageNoiseIntegratedName;
86 string AverageNoiseNamePerCh;
87 string AverageNoiseIntegratedNamePerCh;
92 vector<const DTChamber*>::const_iterator ch_it =
dtGeom->chambers().begin();
93 vector<const DTChamber*>::const_iterator ch_end =
dtGeom->chambers().end();
95 for (; ch_it != ch_end; ++ch_it) {
97 vector<const DTSuperLayer*>::const_iterator sl_it = (*ch_it)->superLayers().begin();
98 vector<const DTSuperLayer*>::const_iterator sl_end = (*ch_it)->superLayers().end();
100 for(; sl_it != sl_end; ++sl_it) {
102 vector<const DTLayer*>::const_iterator l_it = (*sl_it)->layers().begin();
103 vector<const DTLayer*>::const_iterator l_end = (*sl_it)->layers().end();
105 for(; l_it != l_end; ++l_it) {
110 CheckHistoName =
"DigiOccupancy_" +
getLayerName(dtLId);
111 TH1F *hCheckHisto = (TH1F *)
theFile->Get(CheckHistoName.c_str());
114 stringstream wheel; wheel << ch.
wheel();
118 TString histoName_someHowNoisy =
"somehowNoisyCell_W"+wheel.str()+
"_St"+station.str();
124 TString histoName_noisy =
"noisyCell_W"+wheel.str()+
"_St"+station.str();
132 hAverageNoiseHisto =
new TH1F(AverageNoiseName.c_str(), AverageNoiseName.c_str(), 200, 0, 10000);
134 hAverageNoiseIntegratedHisto =
new TH1F(AverageNoiseIntegratedName.c_str(), AverageNoiseIntegratedName.c_str(), 200, 0, 10000);
138 cout <<
" New Average Noise Histo per SuperLayer : " << hAverageNoiseHisto->GetName() << endl;
139 cout <<
" New Average Noise Integrated Histo per SuperLayer : " << hAverageNoiseHisto->GetName() << endl;
144 hAverageNoiseHistoPerCh =
new TH1F(AverageNoiseNamePerCh.c_str(), AverageNoiseNamePerCh.c_str(), 200, 0, 10000);
145 AverageNoiseIntegratedNamePerCh =
"AverageNoiseIntegrated_" +
getChamberName(dtLId);
146 hAverageNoiseIntegratedHistoPerCh =
new TH1F(AverageNoiseIntegratedNamePerCh.c_str(), AverageNoiseIntegratedNamePerCh.c_str(), 200, 0, 10000);
150 cout <<
" New Average Noise Histo per chamber : " << hAverageNoiseHistoPerCh->GetName() << endl;
155 hOccHisto = (TH1F *)
theFile->Get(HistoName.c_str());
156 int numBin = hOccHisto->GetXaxis()->GetNbins();
171 hOccHisto = (TH1F *)
theFile->Get(HistoName.c_str());
172 numBin = hOccHisto->GetXaxis()->GetNbins();
176 if(hOccHisto->GetBinContent(
bin)<100){
178 AvNoise += hOccHisto->GetBinContent(
bin);
180 if(hOccHisto->GetBinContent(
bin)>100 && hOccHisto->GetBinContent(
bin)<500){
182 cout<<
"filling somehow noisy cell"<<endl;
184 if(hOccHisto->GetBinContent(
bin)>500){
186 cout<<
"filling noisy cell"<<endl;
189 AvNoise = AvNoise/numCell;
190 cout<<
"theAverageNoise for layer "<<
getLayerName(dtLId)<<
" is : "<<AvNoise << endl;
195 for(
int evt=0; evt<updates; evt++){
196 stringstream toAppend; toAppend << evt;
197 Histo2Name =
"DigiPerWirePerEvent_" +
getLayerName(dtLId) +
"_" + toAppend.str();
199 hEvtHisto = (TH2F *)
theFile->Get(Histo2Name.c_str());
202 cout <<
" New Histo with the number of events per evt per wire: " << hEvtHisto->GetName() << endl;
int getMaxNumBins(const DTChamberId &chId) const
std::map< std::pair< int, int >, TH1F * > someHowNoisyC
DTChamberId chamberId() const
Return the corresponding ChamberId.
edm::ESHandle< DTGeometry > dtGeom
std::map< DTLayerId, std::vector< TH2F * > > theEvtMap
DTSuperLayerId superlayerId() const
Return the corresponding SuperLayerId.
std::string getChamberName(const DTLayerId &lId) const
Get the name of the chamber.
std::map< std::pair< int, int >, TH1F * > noisyC
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
std::map< DTChamberId, TH1F * > AvNoisePerChamber
std::map< DTSuperLayerId, TH1F * > AvNoiseIntegratedPerSuperLayer
std::string getLayerName(const DTLayerId &lId) const
Get the name of the layer.
std::map< DTSuperLayerId, TH1F * > AvNoisePerSuperLayer
std::string getSuperLayerName(const DTSuperLayerId &slId) const
Get the name of the superLayer.
std::map< DTWireId, double > theAverageNoise
int station() const
Return the station number.
int wheel() const
Return the wheel number.
std::map< DTChamberId, TH1F * > AvNoiseIntegratedPerChamber