41 LogVerbatim(
"DTNoiseTask") <<
"[DTNoiseTask]: Constructor" << endl;
71 std::map<DTChamberId, int> segmentsChId;
91 for (dtLayerId_It = dtdigis->begin(); dtLayerId_It != dtdigis->end(); ++dtLayerId_It) {
93 digiIt != ((*dtLayerId_It).second).
second;
96 int tdcTime = (*digiIt).countsTDC();
99 tbHistos[(*dtLayerId_It).first.superlayerId()]->Fill(tdcTime);
104 if (
doSegmentVeto && segmentsChId.find((*dtLayerId_It).first.superlayerId().chamberId()) != segmentsChId.end())
109 TH2D* noise_root =
noiseHistos[(*dtLayerId_It).first.superlayerId().chamberId()]->getTH2D();
111 if (
mapEvt.find((*dtLayerId_It).first.superlayerId().chamberId()) !=
mapEvt.end()) {
112 LogVerbatim(
"DTNoiseTask") <<
" Last fill: # of events: " 113 <<
mapEvt[(*dtLayerId_It).first.superlayerId().chamberId()] << endl;
118 int yBin = (*dtLayerId_It).first.layer() + (4 * ((*dtLayerId_It).first.superlayerId().superlayer() - 1));
119 noise_root->Fill((*digiIt).wire(),
yBin);
122 LogVerbatim(
"DTNoiseTask") << (*dtLayerId_It).first <<
" wire: " << (*digiIt).wire()
123 <<
" # counts: " << noise_root->GetBinContent((*digiIt).wire(),
yBin)
129 LogVerbatim(
"DTNoiseTask") <<
" noise rate: " << noise_root->GetBinContent((*digiIt).wire(),
yBin) << endl;
145 "/Sector" +
sector.str());
150 LogVerbatim(
"DTNoiseTask") <<
"[DTNoiseTask]: booking chamber histo:" << endl;
152 <<
"DT/05-Noise/Wheel" +
wheel.str() +
154 "/Sector" +
sector.str() +
"/" 161 const vector<const DTSuperLayer*>& superlayers = dtchamber->
superLayers();
164 for (vector<const DTSuperLayer*>::const_iterator sl = superlayers.begin(); sl != superlayers.end();
166 vector<const DTLayer*>
layers = (*sl)->layers();
167 for (vector<const DTLayer*>::const_iterator lay =
layers.begin(); lay !=
layers.end(); ++lay) {
168 int nWires = (*lay)->specificTopology().channels();
169 if (nWires > nWires_max)
175 ibooker.
book2DD(
histoName,
"Noise rate (Hz) per channel", nWires_max, 1, nWires_max + 1, 12, 1, 13);
199 stringstream superlayer;
208 LogVerbatim(
"DTNoiseTask") <<
"[DTNoiseTask]: booking SL histo:" << endl;
210 <<
"DT/05-Noise/Wheel" +
wheel.str() +
"/Station" +
station.str() +
"/Sector" +
219 LogVerbatim(
"DTNoiseTask") <<
"[DTNoiseTask]: Begin of run" << endl;
233 vector<const DTChamber*>::const_iterator ch_it =
dtGeom->
chambers().begin();
234 vector<const DTChamber*>::const_iterator ch_end =
dtGeom->
chambers().end();
235 for (; ch_it != ch_end; ++ch_it) {
239 vector<const DTSuperLayer*>::const_iterator sl_it = (*ch_it)->superLayers().begin();
240 vector<const DTSuperLayer*>::const_iterator sl_end = (*ch_it)->superLayers().end();
242 for (; sl_it != sl_end; ++sl_it) {
258 LogVerbatim(
"DTNoiseTask") <<
"[DTNoiseTask]: End LS, update rates in all histos" << endl;
261 for (map<DTChamberId, MonitorElement*>::const_iterator meAndChamber =
noiseHistos.begin();
265 TH2D* noise_root = (*meAndChamber).second->getTH2D();
270 LogVerbatim(
"DTNoiseTask") <<
" Ch: " << chId <<
" Last fill: # of events: " <<
mapEvt[chId] << endl;
Log< level::Info, true > LogVerbatim
int station() const
Return the station number.
std::map< DTChamberId, int > mapEvt
MonitorElement * bookFloat(TString const &name, FUNC onbooking=NOOP())
virtual void setCurrentFolder(std::string const &fullpath)
MonitorElement * nEventMonitor
void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override
T getUntrackedParameter(std::string const &, T const &) const
U second(std::pair< T, U > const &p)
DTChamberId chamberId() const
Return the corresponding ChamberId.
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Analyze.
edm::EDGetTokenT< DTRecSegment4DCollection > recHits4DToken_
void endLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &setup) override
edm::EDGetTokenT< DTDigiCollection > dtDigiToken_
const std::vector< const DTSuperLayer * > & superLayers() const
Return the superlayers in the chamber.
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
std::map< DTSuperLayerId, MonitorElement * > tbHistos
void bookHistos(DQMStore::IBooker &, DTChamberId chId)
int superlayer() const
Return the superlayer number (deprecated method name)
std::map< DTChamberId, double > tTrigStMap
const DTGeometry * dtGeom
std::vector< DigiType >::const_iterator const_iterator
MonitorElement * book2DD(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
int get(int wheelId, int stationId, int sectorId, int slId, float &tTrig, float &tTrms, float &kFact, DTTimeUnits::type unit) const
get content
edm::ESGetToken< DTTtrig, DTTtrigRcd > tTrigMapToken_
int wheel() const
Return the wheel number.
DTNoiseTask(const edm::ParameterSet &ps)
Constructor.
std::map< DTChamberId, MonitorElement * > noiseHistos
const std::vector< const DTChamber * > & chambers() const
Return a vector of all Chamber.
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
const DTChamber * chamber(const DTChamberId &id) const
Return a DTChamber given its id.
edm::ESGetToken< DTGeometry, MuonGeometryRecord > muonGeomToken_
~DTNoiseTask() override
Destructor.