76 string CheckHistoName;
79 TH1F *hAverageNoiseHisto;
80 TH1F *hAverageNoiseIntegratedHisto;
81 TH1F *hAverageNoiseHistoPerCh;
82 TH1F *hAverageNoiseIntegratedHistoPerCh;
86 string AverageNoiseName;
87 string AverageNoiseIntegratedName;
88 string AverageNoiseNamePerCh;
89 string AverageNoiseIntegratedNamePerCh;
94 vector<DTChamber*>::const_iterator ch_it =
dtGeom->chambers().begin();
95 vector<DTChamber*>::const_iterator ch_end =
dtGeom->chambers().end();
97 for (; ch_it != ch_end; ++ch_it) {
99 vector<const DTSuperLayer*>::const_iterator sl_it = (*ch_it)->superLayers().begin();
100 vector<const DTSuperLayer*>::const_iterator sl_end = (*ch_it)->superLayers().end();
102 for(; sl_it != sl_end; ++sl_it) {
104 vector<const DTLayer*>::const_iterator l_it = (*sl_it)->layers().begin();
105 vector<const DTLayer*>::const_iterator l_end = (*sl_it)->layers().end();
107 for(; l_it != l_end; ++l_it) {
112 CheckHistoName =
"DigiOccupancy_" +
getLayerName(dtLId);
113 TH1F *hCheckHisto = (TH1F *)
theFile->Get(CheckHistoName.c_str());
116 stringstream wheel; wheel << ch.
wheel();
120 TString histoName_someHowNoisy =
"somehowNoisyCell_W"+wheel.str()+
"_St"+station.str();
126 TString histoName_noisy =
"noisyCell_W"+wheel.str()+
"_St"+station.str();
134 hAverageNoiseHisto =
new TH1F(AverageNoiseName.c_str(), AverageNoiseName.c_str(), 200, 0, 10000);
136 hAverageNoiseIntegratedHisto =
new TH1F(AverageNoiseIntegratedName.c_str(), AverageNoiseIntegratedName.c_str(), 200, 0, 10000);
140 cout <<
" New Average Noise Histo per SuperLayer : " << hAverageNoiseHisto->GetName() << endl;
141 cout <<
" New Average Noise Integrated Histo per SuperLayer : " << hAverageNoiseHisto->GetName() << endl;
146 hAverageNoiseHistoPerCh =
new TH1F(AverageNoiseNamePerCh.c_str(), AverageNoiseNamePerCh.c_str(), 200, 0, 10000);
147 AverageNoiseIntegratedNamePerCh =
"AverageNoiseIntegrated_" +
getChamberName(dtLId);
148 hAverageNoiseIntegratedHistoPerCh =
new TH1F(AverageNoiseIntegratedNamePerCh.c_str(), AverageNoiseIntegratedNamePerCh.c_str(), 200, 0, 10000);
152 cout <<
" New Average Noise Histo per chamber : " << hAverageNoiseHistoPerCh->GetName() << endl;
157 hOccHisto = (TH1F *)
theFile->Get(HistoName.c_str());
158 int numBin = hOccHisto->GetXaxis()->GetNbins();
173 hOccHisto = (TH1F *)
theFile->Get(HistoName.c_str());
174 numBin = hOccHisto->GetXaxis()->GetNbins();
178 if(hOccHisto->GetBinContent(
bin)<100){
180 AvNoise += hOccHisto->GetBinContent(
bin);
182 if(hOccHisto->GetBinContent(
bin)>100 && hOccHisto->GetBinContent(
bin)<500){
184 cout<<
"filling somehow noisy cell"<<endl;
186 if(hOccHisto->GetBinContent(
bin)>500){
188 cout<<
"filling noisy cell"<<endl;
191 AvNoise = AvNoise/numCell;
192 cout<<
"theAverageNoise for layer "<<
getLayerName(dtLId)<<
" is : "<<AvNoise << endl;
197 for(
int evt=0; evt<updates; evt++){
198 stringstream toAppend; toAppend << evt;
199 Histo2Name =
"DigiPerWirePerEvent_" +
getLayerName(dtLId) +
"_" + toAppend.str();
201 hEvtHisto = (TH2F *)
theFile->Get(Histo2Name.c_str());
204 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