47 debug(pSet.getUntrackedParameter<bool>(
"debug",
false)),
48 nMinHitsPhi(pSet.getUntrackedParameter<int>(
"nMinHitsPhi")),
49 maxAnglePhiSegm(pSet.getUntrackedParameter<double>(
"maxAnglePhiSegm")),
51 pSet.getParameter<
InputTag>(
"recoSegments")))
63 LogTrace(
"DTDQM|DTMonitorModule|DTRunConditionVar")
64 <<
"DTRunConditionVar: destructor called";
73 LogTrace(
"DTDQM|DTMonitorModule|DTRunConditionVar")
74 <<
"DTRunConditionVar: beginOfJob";
76 for(
int wheel=-2;wheel<=2;wheel++){
77 for(
int sec=1; sec<=14; sec++) {
78 for(
int stat=1; stat<=4; stat++) {
108 LogTrace(
"DTDQM|DTMonitorModule|DTRunConditionVar")
109 <<
"DTRunConditionVar: endOfJob";
120 LogTrace(
"DTDQM|DTMonitorModule|DTRunConditionVar") <<
121 "--- [DTRunConditionVar] Event analysed #Run: " <<
122 event.id().run() <<
" #Event: " <<
event.id().event() << endl;
138 segment != all4DSegments->end(); ++segment){
142 uint32_t indexCh = DTid.
rawId();
145 if( (*segment).hasPhi() ) {
147 int nHitsPhi = (*segment).phiSegment()->degreesOfFreedom()+2;
148 double xdir = (*segment).phiSegment()->localDirection().x();
149 double zdir = (*segment).phiSegment()->localDirection().z();
151 double anglePhiSegm = fabs(atan(xdir/zdir))*180./
TMath::Pi();
155 double segmentVDrift = segment->phiSegment()->vDrift();
161 float vDriftPhi1(0.), vDriftPhi2(0.);
162 float ResPhi1(0.), ResPhi2(0.);
166 if(status1 != 0 || status2 != 0) {
168 throw cms::Exception(
"DTRunConditionVarClient") <<
"Could not find vDrift entry in DB for"
172 float vDriftMed = (vDriftPhi1 + vDriftPhi2) / 2.;
174 segmentVDrift = vDriftMed*(1. - segmentVDrift);
176 double segmentT0 = segment->phiSegment()->t0();
178 if( segment->phiSegment()->ist0Valid() ) (
chamberHistos[indexCh])[
"T0_FromSegm"]->Fill(segmentT0);
179 if( segmentVDrift != vDriftMed ) (
chamberHistos[indexCh])[
"VDrift_FromSegm"]->
Fill(segmentVDrift);
202 int wh = dtCh.
wheel();
205 stringstream wheel; wheel << wh;
206 stringstream
station; station << st;
207 stringstream sector; sector << sc;
209 string bookingFolder =
"DT/02-Segments/Wheel" + wheel.str() +
"/Sector" + sector.str() +
"/Station" + station.str();
210 string histoTag =
"_W" + wheel.str() +
"_Sec" + sector.str() +
"_St" + station.str();
212 theDbe->setCurrentFolder(bookingFolder);
214 LogTrace (
"DTDQM|DTMonitorModule|DTRunConditionVar")
215 <<
"[DTRunConditionVar]: booking histos in " << bookingFolder << endl;
218 string histoLabel = histoType;
221 theDbe->book1D(histoName,histoLabel,nbins,min,max);
edm::ESHandle< DTMtime > mTime
edm::EDGetTokenT< DTRecSegment4DCollection > dt4DSegmentsToken_
void bookChamberHistos(const DTChamberId &dtCh, std::string histoType, int, float, float)
const DTMtime * mTimeMap_
void beginRun(const edm::Run &, const edm::EventSetup &)
uint32_t rawId() const
get the raw id
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
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)
int get(int wheelId, int stationId, int sectorId, int slId, float &mTime, float &mTrms, DTTimeUnits::type unit) const
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
DTRunConditionVar(const edm::ParameterSet &pset)