48 debug(pSet.getUntrackedParameter<bool>(
"debug",
false)),
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";
72 for(
int wheel=-2;wheel<=2;wheel++){
73 for(
int sec=1; sec<=14; sec++) {
74 for(
int stat=1; stat<=4; stat++) {
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;
185 string histoLabel = histoType;
188 ibooker.
book1D(histoName,histoLabel,nbins,min,max);
edm::ESHandle< DTMtime > mTime
edm::EDGetTokenT< DTRecSegment4DCollection > dt4DSegmentsToken_
const DTMtime * mTimeMap_
uint32_t rawId() const
get the raw id
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
MonitorElement * book1D(Args &&...args)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
std::map< uint32_t, std::map< std::string, MonitorElement * > > chamberHistos
void analyze(const edm::Event &event, const edm::EventSetup &eventSetup)
void setCurrentFolder(const std::string &fullpath)
int get(int wheelId, int stationId, int sectorId, int slId, float &mTime, float &mTrms, DTTimeUnits::type unit) const
void bookChamberHistos(DQMStore::IBooker &, const DTChamberId &dtCh, std::string histoType, int, float, float)
volatile std::atomic< bool > shutdown_flag false
int station() const
Return the station number.
int wheel() const
Return the wheel number.
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
edm::ESHandle< DTGeometry > dtGeom
void dqmBeginRun(const edm::Run &, const edm::EventSetup &)
DTRunConditionVar(const edm::ParameterSet &pset)