58 LogTrace(
"DTDQM|DTMonitorModule|DTRunConditionVar") <<
"DTRunConditionVar: destructor called";
66 LogTrace(
"DTDQM|DTMonitorModule|DTRunConditionVar") <<
"DTRunConditionVar: bookHistograms";
87 LogTrace(
"DTDQM|DTMonitorModule|DTRunConditionVar")
88 <<
"--- [DTRunConditionVar] Event analysed #Run: " <<
event.id().run() <<
" #Event: " <<
event.id().event()
101 throw cms::Exception(
"Configuration") <<
"only version 1 is presently supported for VDriftDB";
114 uint32_t indexCh = DTid.
rawId();
117 if ((*segment).hasPhi()) {
118 int nHitsPhi = (*segment).phiSegment()->degreesOfFreedom() + 2;
119 double xdir = (*segment).phiSegment()->localDirection().x();
120 double zdir = (*segment).phiSegment()->localDirection().z();
122 double anglePhiSegm = fabs(atan(
xdir / zdir)) * 180. /
TMath::Pi();
125 double segmentVDrift = segment->phiSegment()->vDrift();
130 float vDriftPhi1(0.), vDriftPhi2(0.);
131 float ResPhi1(0.), ResPhi2(0.);
136 if (status1 != 0 || status2 != 0) {
138 throw cms::Exception(
"DTRunConditionVarClient") <<
"Could not find vDrift entry in DB for" << sl << endl;
145 float vDriftMed = (vDriftPhi1 + vDriftPhi2) / 2.;
147 segmentVDrift = vDriftMed * (1. - segmentVDrift);
149 double segmentT0 = segment->phiSegment()->t0();
151 if (segment->phiSegment()->ist0Valid())
153 if (segmentVDrift != vDriftMed)
164 int wh = dtCh.
wheel();
174 string bookingFolder =
"DT/02-Segments/Wheel" +
wheel.str() +
"/Sector" + sector.str() +
"/Station" +
station.str();
179 LogTrace(
"DTDQM|DTMonitorModule|DTRunConditionVar")
180 <<
"[DTRunConditionVar]: booking histos in " << bookingFolder << endl;
int station() const
Return the station number.
float get(const DTWireId &wireid, double *x=nullptr) const
Get the value correspoding to the given WireId, / using x[] as parameters of the parametrization when...
edm::EDGetTokenT< DTRecSegment4DCollection > dt4DSegmentsToken_
virtual void setCurrentFolder(std::string const &fullpath)
edm::ESGetToken< DTRecoConditions, DTRecoConditionsVdriftRcd > vDriftToken_
int version() const
Version numer specifying the structure of the payload. See .cc file for details.
void analyze(const edm::Event &event, const edm::EventSetup &eventSetup) override
int get(int wheelId, int stationId, int sectorId, int slId, float &mTime, float &mTrms, DTTimeUnits::type unit) const
const DTMtime * mTimeMap_
C::const_iterator const_iterator
constant access iterator type
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
edm::ESGetToken< DTGeometry, MuonGeometryRecord > muonGeomToken_
void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
const DTRecoConditions * vDriftMap_
std::map< uint32_t, std::map< std::string, MonitorElement * > > chamberHistos
constexpr uint32_t rawId() const
get the raw id
edm::ESGetToken< DTMtime, DTMtimeRcd > mTimeToken_
int wheel() const
Return the wheel number.
~DTRunConditionVar() override
void bookChamberHistos(DQMStore::IBooker &, const DTChamberId &dtCh, std::string histoType, int, float, float)
const DTGeometry * dtGeom
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
DTRunConditionVar(const edm::ParameterSet &pset)