39 metname_ =
"InterChannelSynchDBValidation";
47 if (
pset.exists(
"t0TestName"))
51 if (
pset.exists(
"OutputFileName")) {
60 metname_ =
"InterChannelSynchDBValidation";
89 int channelId =
tzero->channelId;
98 <<
" T0 mean (TDC counts): " << t0mean <<
" T0_rms (TDC counts): " << t0rms;
114 int channelId =
tzero->channelId;
123 <<
" T0 mean (TDC counts): " << t0mean <<
" T0_rms (TDC counts): " << t0rms;
125 t0Map_[wireId].push_back(t0mean);
126 t0Map_[wireId].push_back(t0rms);
129 double difference = 0;
133 difference =
t0Map_[(*theMap).first][0] - (*theMap).second[0];
136 DTLayerId layerId = (*theMap).first.layerId();
144 LogTrace(
metname_) <<
"Filling the histo for wire: " << (*theMap).first <<
" difference: " << difference;
145 t0DiffHistos_[layerId]->Fill((*theMap).first.wire(), difference);
155 const QReport *theDiffQReport = (*hDiff).second->getQReport(testCriterionName);
156 if (theDiffQReport) {
157 int xBin = ((*hDiff).first.station() - 1) * 12 + (*hDiff).first.layer() + 4 * ((*hDiff).first.superlayer() - 1);
158 if ((*hDiff).first.station() == 4 && (*hDiff).first.superlayer() == 3)
159 xBin = ((*hDiff).first.station() - 1) * 12 + (*hDiff).first.layer() + 4 * ((*hDiff).first.superlayer() - 2);
161 int qReportStatus = theDiffQReport->
getStatus() / 100;
162 wheelSummary_[(*hDiff).first.wheel()]->setBinContent(
xBin, (*hDiff).first.sector(), qReportStatus);
165 <<
" ------- " << theDiffQReport->
getStatus() <<
" ------- " << setprecision(3)
167 vector<dqm::me_util::Channel> badChannels = theDiffQReport->
getBadChannels();
168 for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin(); channel != badChannels.end();
170 LogVerbatim(
metname_) <<
"layer: " << (*hDiff).first <<
" Bad channel: " << (*channel).getBin()
171 <<
" Contents : " << (*channel).getContents();
196 stringstream superLayer;
201 string lHistoName =
"_W" +
wheel.str() +
"_St" +
station.str() +
"_Sec" + sector.str() +
"_SL" + superLayer.str() +
205 "/Sector" + sector.str() +
"/SuperLayer" + superLayer.str());
208 hDifference =
dbe_->
book1D(
"T0Difference" + lHistoName,
209 "difference between the two t0 values",
210 lastWire - firstWire + 1,
223 "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.
constexpr std::array< uint8_t, layerIndexSize > layer
const_iterator begin() const
int firstChannel() const
Returns the wire number of the first wire.
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_
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.