|
|
Go to the documentation of this file.
41 LogVerbatim(
"DTNoiseTask") <<
"[DTNoiseTask]: Constructor" << endl;
70 std::map<DTChamberId, int> segmentsChId;
79 for (chamberId = all4DSegments->id_begin(); chamberId != all4DSegments->id_end(); ++chamberId) {
80 segmentsChId[*chamberId] = 1;
90 for (dtLayerId_It = dtdigis->begin(); dtLayerId_It != dtdigis->end(); ++dtLayerId_It) {
92 digiIt != ((*dtLayerId_It).second).
second;
95 int tdcTime = (*digiIt).countsTDC();
98 tbHistos[(*dtLayerId_It).first.superlayerId()]->Fill(tdcTime);
99 if (tdcTime > upperLimit)
103 if (
doSegmentVeto && segmentsChId.find((*dtLayerId_It).first.superlayerId().chamberId()) != segmentsChId.end())
108 TH2F* noise_root =
noiseHistos[(*dtLayerId_It).first.superlayerId().chamberId()]->getTH2F();
110 if (
mapEvt.find((*dtLayerId_It).first.superlayerId().chamberId()) !=
mapEvt.end()) {
111 LogVerbatim(
"DTNoiseTask") <<
" Last fill: # of events: "
112 <<
mapEvt[(*dtLayerId_It).first.superlayerId().chamberId()] << endl;
117 int yBin = (*dtLayerId_It).first.layer() + (4 * ((*dtLayerId_It).first.superlayerId().superlayer() - 1));
118 noise_root->Fill((*digiIt).wire(),
yBin);
121 LogVerbatim(
"DTNoiseTask") << (*dtLayerId_It).first <<
" wire: " << (*digiIt).wire()
122 <<
" # counts: " << noise_root->GetBinContent((*digiIt).wire(),
yBin)
123 <<
" Time interval: " << upperLimit <<
" # of events: " <<
evtNumber << endl;
125 normalization = double(1
e-9 * upperLimit *
mapEvt[(*dtLayerId_It).first.superlayerId().chamberId()]);
128 LogVerbatim(
"DTNoiseTask") <<
" noise rate: " << noise_root->GetBinContent((*digiIt).wire(),
yBin) << endl;
144 "/Sector" + sector.str());
149 LogVerbatim(
"DTNoiseTask") <<
"[DTNoiseTask]: booking chamber histo:" << endl;
151 <<
"DT/05-Noise/Wheel" +
wheel.str() +
153 "/Sector" + sector.str() +
"/"
160 const vector<const DTSuperLayer*>& superlayers = dtchamber->
superLayers();
163 for (vector<const DTSuperLayer*>::const_iterator sl = superlayers.begin(); sl != superlayers.end();
165 vector<const DTLayer*>
layers = (*sl)->layers();
166 for (vector<const DTLayer*>::const_iterator lay =
layers.begin(); lay !=
layers.end(); ++lay) {
167 int nWires = (*lay)->specificTopology().channels();
168 if (nWires > nWires_max)
174 ibooker.
book2D(
histoName,
"Noise rate (Hz) per channel", nWires_max, 1, nWires_max + 1, 12, 1, 13);
198 stringstream superlayer;
205 string(
"TimeBox") +
"_W" +
wheel.str() +
"_St" +
station.str() +
"_Sec" + sector.str() +
"_SL" + superlayer.str();
207 LogVerbatim(
"DTNoiseTask") <<
"[DTNoiseTask]: booking SL histo:" << endl;
209 <<
"DT/05-Noise/Wheel" +
wheel.str() +
"/Station" +
station.str() +
"/Sector" +
218 LogVerbatim(
"DTNoiseTask") <<
"[DTNoiseTask]: Begin of run" << endl;
232 vector<const DTChamber*>::const_iterator ch_it =
dtGeom->
chambers().begin();
233 vector<const DTChamber*>::const_iterator ch_end =
dtGeom->
chambers().end();
234 for (; ch_it != ch_end; ++ch_it) {
238 vector<const DTSuperLayer*>::const_iterator sl_it = (*ch_it)->superLayers().begin();
239 vector<const DTSuperLayer*>::const_iterator sl_end = (*ch_it)->superLayers().end();
241 for (; sl_it != sl_end; ++sl_it) {
257 LogVerbatim(
"DTNoiseTask") <<
"[DTNoiseTask]: End LS, update rates in all histos" << endl;
260 for (map<DTChamberId, MonitorElement*>::const_iterator meAndChamber =
noiseHistos.begin();
264 TH2F* noise_root = (*meAndChamber).second->getTH2F();
269 LogVerbatim(
"DTNoiseTask") <<
" Ch: " << chId <<
" Last fill: # of events: " <<
mapEvt[chId] << endl;
std::map< DTChamberId, MonitorElement * > noiseHistos
~DTNoiseTask() override
Destructor.
MonitorElement * bookFloat(TString const &name, FUNC onbooking=NOOP())
std::map< DTChamberId, int > mapEvt
virtual void setCurrentFolder(std::string const &fullpath)
void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override
U second(std::pair< T, U > const &p)
T getUntrackedParameter(std::string const &, T const &) const
int superlayer() const
Return the superlayer number (deprecated method name)
MonitorElement * nEventMonitor
std::vector< DigiType >::const_iterator const_iterator
const DTChamber * chamber(const DTChamberId &id) const
Return a DTChamber given its id.
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Analyze.
const std::vector< const DTChamber * > & chambers() const
Return a vector of all Chamber.
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
int get(int wheelId, int stationId, int sectorId, int slId, float &tTrig, float &tTrms, float &kFact, DTTimeUnits::type unit) const
get content
void bookHistos(DQMStore::IBooker &, DTChamberId chId)
edm::EDGetTokenT< DTRecSegment4DCollection > recHits4DToken_
std::map< DTSuperLayerId, MonitorElement * > tbHistos
std::map< DTChamberId, double > tTrigStMap
void endLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &setup) override
DTChamberId chamberId() const
Return the corresponding ChamberId.
const std::vector< const DTSuperLayer * > & superLayers() const
Return the superlayers in the chamber.
edm::EDGetTokenT< DTDigiCollection > dtDigiToken_
edm::ESGetToken< DTTtrig, DTTtrigRcd > tTrigMapToken_
DTNoiseTask(const edm::ParameterSet &ps)
Constructor.
const DTGeometry * dtGeom
Log< level::Info, true > LogVerbatim
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
T getParameter(std::string const &) const
edm::ESGetToken< DTGeometry, MuonGeometryRecord > muonGeomToken_
int wheel() const
Return the wheel number.
int station() const
Return the station number.
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())