44 debug(pSet.getUntrackedParameter<bool>(
"debug",
false)),
45 nMinHitsPhi(pSet.getUntrackedParameter<int>(
"nMinHitsPhi")),
46 maxAnglePhiSegm(pSet.getUntrackedParameter<double>(
"maxAnglePhiSegm")),
58 LogTrace(
"DTDQM|DTMonitorModule|DTRunConditionVar") <<
"DTRunConditionVar: destructor called";
66 LogTrace(
"DTDQM|DTMonitorModule|DTRunConditionVar") <<
"DTRunConditionVar: bookHistograms";
68 for (
int wheel = -2; wheel <= 2; wheel++) {
69 for (
int sec = 1; sec <= 14; sec++) {
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();
175 string histoTag =
"_W" + wheel.str() +
"_Sec" + sector.str() +
"_St" + station.str();
179 LogTrace(
"DTDQM|DTMonitorModule|DTRunConditionVar")
180 <<
"[DTRunConditionVar]: booking histos in " << bookingFolder << endl;
182 string histoName = histoType + histoTag;
183 const string& histoLabel = histoType;
edm::EDGetTokenT< DTRecSegment4DCollection > dt4DSegmentsToken_
virtual void setCurrentFolder(std::string const &fullpath)
int version() const
Version numer specifying the structure of the payload. See .cc file for details.
constexpr uint32_t rawId() const
get the raw id
edm::ESGetToken< DTRecoConditions, DTRecoConditionsVdriftRcd > vDriftToken_
void analyze(const edm::Event &event, const edm::EventSetup &eventSetup) override
const DTMtime * mTimeMap_
bool getData(T &iHolder) const
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
float get(const DTWireId &wireid, double *x=nullptr) const
Get the value correspoding to the given WireId, / using x[] as parameters of the parametrization whe...
int get(int wheelId, int stationId, int sectorId, int slId, float &mTime, float &mTrms, DTTimeUnits::type unit) const
edm::ESGetToken< DTMtime, DTMtimeRcd > mTimeToken_
~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())
int station() const
Return the station number.
int wheel() const
Return the wheel number.
DTRunConditionVar(const edm::ParameterSet &pset)