69 string CheckHistoName;
72 TH1F *hAverageNoiseHisto;
73 TH1F *hAverageNoiseIntegratedHisto;
74 TH1F *hAverageNoiseHistoPerCh;
75 TH1F *hAverageNoiseIntegratedHistoPerCh;
79 string AverageNoiseName;
80 string AverageNoiseIntegratedName;
81 string AverageNoiseNamePerCh;
82 string AverageNoiseIntegratedNamePerCh;
87 vector<const DTChamber *>::const_iterator ch_it =
dtGeom->
chambers().begin();
88 vector<const DTChamber *>::const_iterator ch_end =
dtGeom->
chambers().end();
90 for (; ch_it != ch_end; ++ch_it) {
92 vector<const DTSuperLayer *>::const_iterator sl_it = (*ch_it)->superLayers().begin();
93 vector<const DTSuperLayer *>::const_iterator sl_end = (*ch_it)->superLayers().end();
95 for (; sl_it != sl_end; ++sl_it) {
97 vector<const DTLayer *>::const_iterator l_it = (*sl_it)->layers().begin();
98 vector<const DTLayer *>::const_iterator l_end = (*sl_it)->layers().end();
100 for (; l_it != l_end; ++l_it) {
105 CheckHistoName =
"DigiOccupancy_" +
getLayerName(dtLId);
106 TH1F *hCheckHisto = (TH1F *)
theFile->Get(CheckHistoName.c_str());
113 TString histoName_someHowNoisy =
"somehowNoisyCell_W" + wheel +
"_St" +
station;
120 TString histoName_noisy =
"noisyCell_W" + wheel +
"_St" +
station;
128 hAverageNoiseHisto =
new TH1F(AverageNoiseName.c_str(), AverageNoiseName.c_str(), 200, 0, 10000);
130 hAverageNoiseIntegratedHisto =
131 new TH1F(AverageNoiseIntegratedName.c_str(), AverageNoiseIntegratedName.c_str(), 200, 0, 10000);
135 cout <<
" New Average Noise Histo per SuperLayer : " << hAverageNoiseHisto->GetName() << endl;
136 cout <<
" New Average Noise Integrated Histo per SuperLayer : " << hAverageNoiseHisto->GetName()
142 hAverageNoiseHistoPerCh =
143 new TH1F(AverageNoiseNamePerCh.c_str(), AverageNoiseNamePerCh.c_str(), 200, 0, 10000);
144 AverageNoiseIntegratedNamePerCh =
"AverageNoiseIntegrated_" +
getChamberName(dtLId);
145 hAverageNoiseIntegratedHistoPerCh =
new TH1F(
146 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();
157 for (
int bin = 1;
bin <= numBin;
bin++) {
171 hOccHisto = (TH1F *)
theFile->Get(HistoName.c_str());
172 numBin = hOccHisto->GetXaxis()->GetNbins();
173 for (
int bin = 1;
bin <= numBin;
bin++) {
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;
194 for (
int evt = 0; evt < updates; evt++) {
195 Histo2Name =
"DigiPerWirePerEvent_" +
getLayerName(dtLId) +
"_" + std::to_string(evt);
197 hEvtHisto = (TH2F *)
theFile->Get(Histo2Name.c_str());
200 cout <<
" New Histo with the number of events per evt per wire: " << hEvtHisto->GetName() << endl;
const std::vector< const DTChamber * > & chambers() const
Return a vector of all Chamber.
int getMaxNumBins(const DTChamberId &chId) const
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.
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
std::map< std::pair< int, int >, TH1F * > noisyC
std::map< DTWireId, double > theAverageNoise
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< std::pair< int, int >, TH1F * > someHowNoisyC
std::map< DTSuperLayerId, TH1F * > AvNoisePerSuperLayer
std::string getSuperLayerName(const DTSuperLayerId &slId) const
Get the name of the superLayer.
int station() const
Return the station number.
int wheel() const
Return the wheel number.
std::map< DTChamberId, TH1F * > AvNoiseIntegratedPerChamber