39 metname_ =
"InterChannelSynchDBValidation";
43 usesResource(
"DQMStore");
48 if (
pset.exists(
"t0TestName"))
52 if (
pset.exists(
"OutputFileName")) {
61 metname_ =
"InterChannelSynchDBValidation";
99 <<
" T0 mean (TDC counts): " << t0mean <<
" T0_rms (TDC counts): " << t0rms;
124 <<
" T0 mean (TDC counts): " << t0mean <<
" T0_rms (TDC counts): " << t0rms;
126 t0Map_[wireId].push_back(t0mean);
127 t0Map_[wireId].push_back(t0rms);
130 double difference = 0;
134 difference =
t0Map_[(*theMap).first][0] - (*theMap).second[0];
137 DTLayerId layerId = (*theMap).first.layerId();
145 LogTrace(
metname_) <<
"Filling the histo for wire: " << (*theMap).first <<
" difference: " << difference;
146 t0DiffHistos_[layerId]->Fill((*theMap).first.wire(), difference);
156 const QReport *theDiffQReport = (*hDiff).second->getQReport(testCriterionName);
157 if (theDiffQReport) {
158 int xBin = ((*hDiff).first.station() - 1) * 12 + (*hDiff).first.layer() + 4 * ((*hDiff).first.superlayer() - 1);
159 if ((*hDiff).first.station() == 4 && (*hDiff).first.superlayer() == 3)
160 xBin = ((*hDiff).first.station() - 1) * 12 + (*hDiff).first.layer() + 4 * ((*hDiff).first.superlayer() - 2);
162 int qReportStatus = theDiffQReport->
getStatus() / 100;
163 wheelSummary_[(*hDiff).first.wheel()]->setBinContent(
xBin, (*hDiff).first.sector(), qReportStatus);
166 <<
" ------- " << theDiffQReport->
getStatus() <<
" ------- " << setprecision(3)
168 vector<dqm::me_util::Channel> badChannels = theDiffQReport->
getBadChannels();
169 for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin(); channel != badChannels.end();
171 LogVerbatim(
metname_) <<
"layer: " << (*hDiff).first <<
" Bad channel: " << (*channel).getBin()
172 <<
" Contents : " << (*channel).getContents();
197 stringstream superLayer;
202 string lHistoName =
"_W" +
wheel.str() +
"_St" +
station.str() +
"_Sec" +
sector.str() +
"_SL" + superLayer.str() +
206 "/Sector" +
sector.str() +
"/SuperLayer" + superLayer.str());
209 hDifference =
dbe_->
book1D(
"T0Difference" + lHistoName,
210 "difference between the two t0 values",
211 lastWire - firstWire + 1,
224 "SummaryWrongT0_W" + wh.str(),
"W" + wh.str() +
": summary of wrong t0 differences", 44, 1, 45, 14, 1, 15);
Log< level::Info, true > LogVerbatim
int station() const
Return the station number.
void endRun(edm::Run const &, edm::EventSetup const &) override
std::map< DTLayerId, MonitorElement * > t0DiffHistos_
edm::ESGetToken< DTT0, DTT0Rcd > labelDB_
std::map< int, MonitorElement * > wheelSummary_
const DTT0 * tZeroRefMap_
float getQTresult() const
get test result i.e. prob value
const std::vector< DQMChannel > & getBadChannels() const
void setCurrentFolder(std::string const &fullpath) override
const_iterator end() const
std::vector< DTT0Data >::const_iterator const_iterator
Access methods to data.
const_iterator begin() const
int firstChannel() const
Returns the wire number of the first wire.
constexpr std::array< uint8_t, layerIndexSize< TrackerTraits > > layer
std::map< DTWireId, std::vector< float > > t0RefMap_
DTChamberId chamberId() const
Return the corresponding ChamberId.
DTt0DBValidation(const edm::ParameterSet &pset)
Constructor.
std::string outputFileName_
const DTTopology & specificTopology() const
~DTt0DBValidation() override
Destructor.
edm::ESGetToken< DTGeometry, MuonGeometryRecord > muonGeomToken_
const DTGeometry * dtGeom
const std::string & getMessage() const
get message attached to test
int superlayer() const
Return the superlayer number (deprecated method name)
void beginRun(const edm::Run &run, const edm::EventSetup &setup) override
Operations.
const std::string & version() const
access version
edm::ESGetToken< DTT0, DTT0Rcd > labelDBRef_
uint8_t channelId(const VFATFrame &frame)
retrieve this channel identifier
MonitorElement * book2D(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, int layerId, int cellId, float &t0mean, float &t0rms, DTTimeUnits::type unit) const
bool outputMEsInRootFile_
int layer() const
Return the layer number.
DQM_DEPRECATED void save(std::string const &filename, std::string const &path="")
int wheel() const
Return the wheel number.
std::map< DTWireId, std::vector< float > > t0Map_
void bookHistos(DTLayerId lId, int firstWire, int lastWire)
int lastChannel() const
Returns the wire number of the last wire.
static const double tzero[3]
int getStatus() const
get test status
DTSuperLayerId superlayerId() const
Return the corresponding SuperLayerId.
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
const DTLayer * layer(const DTLayerId &id) const
Return a layer given its id.