49 nMinHitsPhi(pSet.getUntrackedParameter<
int>(
"nMinHitsPhi")),
50 maxAnglePhiSegm(pSet.getUntrackedParameter<double>(
"maxAnglePhiSegm")),
52 pSet.getParameter<
InputTag>(
"recoSegments")))
59 LogTrace(
"DTDQM|DTMonitorModule|DTRunConditionVar")
60 <<
"DTRunConditionVar: destructor called";
69 LogTrace(
"DTDQM|DTMonitorModule|DTRunConditionVar")
70 <<
"DTRunConditionVar: bookHistograms";
73 for(
int sec=1; sec<=14; sec++) {
99 LogTrace(
"DTDQM|DTMonitorModule|DTRunConditionVar") <<
100 "--- [DTRunConditionVar] Event analysed #Run: " <<
101 event.id().run() <<
" #Event: " <<
event.id().event() << endl;
117 segment != all4DSegments->end(); ++segment){
121 uint32_t indexCh = DTid.
rawId();
124 if( (*segment).hasPhi() ) {
126 int nHitsPhi = (*segment).phiSegment()->degreesOfFreedom()+2;
127 double xdir = (*segment).phiSegment()->localDirection().x();
128 double zdir = (*segment).phiSegment()->localDirection().z();
130 double anglePhiSegm = fabs(atan(xdir/zdir))*180./
TMath::Pi();
134 double segmentVDrift = segment->phiSegment()->vDrift();
140 float vDriftPhi1(0.), vDriftPhi2(0.);
141 float ResPhi1(0.), ResPhi2(0.);
145 if(status1 != 0 || status2 != 0) {
147 throw cms::Exception(
"DTRunConditionVarClient") <<
"Could not find vDrift entry in DB for" 151 float vDriftMed = (vDriftPhi1 + vDriftPhi2) / 2.;
153 segmentVDrift = vDriftMed*(1. - segmentVDrift);
155 double segmentT0 = segment->phiSegment()->t0();
157 if( segment->phiSegment()->ist0Valid() ) (
chamberHistos[indexCh])[
"T0_FromSegm"]->Fill(segmentT0);
158 if( segmentVDrift != vDriftMed ) (
chamberHistos[indexCh])[
"VDrift_FromSegm"]->
Fill(segmentVDrift);
169 int wh = dtCh.
wheel();
172 stringstream
wheel; wheel << wh;
173 stringstream
station; station << st;
174 stringstream sector; sector <<
sc;
176 string bookingFolder =
"DT/02-Segments/Wheel" + wheel.str() +
"/Sector" + sector.str() +
"/Station" + station.str();
177 string histoTag =
"_W" + wheel.str() +
"_Sec" + sector.str() +
"_St" + station.str();
181 LogTrace (
"DTDQM|DTMonitorModule|DTRunConditionVar")
182 <<
"[DTRunConditionVar]: booking histos in " << bookingFolder << endl;
184 string histoName = histoType + histoTag;
188 ibooker.
book1D(histoName,histoLabel,nbins,min,max);
edm::ESHandle< DTMtime > mTime
edm::EDGetTokenT< DTRecSegment4DCollection > dt4DSegmentsToken_
constexpr uint32_t rawId() const
get the raw id
def setup(process, global_tag, zero_tesla=False)
void analyze(const edm::Event &event, const edm::EventSetup &eventSetup) override
const DTMtime * mTimeMap_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
void setCurrentFolder(std::string const &fullpath)
void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
MonitorElement * book1D(Args &&...args)
std::map< uint32_t, std::map< std::string, MonitorElement * > > chamberHistos
int get(int wheelId, int stationId, int sectorId, int slId, float &mTime, float &mTrms, DTTimeUnits::type unit) const
~DTRunConditionVar() override
void bookChamberHistos(DQMStore::IBooker &, const DTChamberId &dtCh, std::string histoType, int, float, float)
int station() const
Return the station number.
int wheel() const
Return the wheel number.
edm::ESHandle< DTGeometry > dtGeom
DTRunConditionVar(const edm::ParameterSet &pset)