49 debug(pSet.getUntrackedParameter<bool>(
"debug",
false)),
50 nMinHitsPhi(pSet.getUntrackedParameter<int>(
"nMinHitsPhi")),
51 maxAnglePhiSegm(pSet.getUntrackedParameter<double>(
"maxAnglePhiSegm")),
52 thedt4DSegments_(pSet.getParameter<
InputTag>(
"recoSegments"))
64 LogTrace(
"DTDQM|DTMonitorModule|DTRunConditionVar")
65 <<
"DTRunConditionVar: destructor called";
74 LogTrace(
"DTDQM|DTMonitorModule|DTRunConditionVar")
75 <<
"DTRunConditionVar: beginOfJob";
77 for(
int wheel=-2;wheel<=2;wheel++){
78 for(
int sec=1; sec<=14; sec++) {
79 for(
int stat=1; stat<=4; stat++) {
109 LogTrace(
"DTDQM|DTMonitorModule|DTRunConditionVar")
110 <<
"DTRunConditionVar: endOfJob";
121 LogTrace(
"DTDQM|DTMonitorModule|DTRunConditionVar") <<
122 "--- [DTRunConditionVar] Event analysed #Run: " <<
123 event.id().run() <<
" #Event: " <<
event.id().event() << endl;
139 segment != all4DSegments->end(); ++segment){
143 uint32_t indexCh = DTid.
rawId();
146 if( (*segment).hasPhi() ) {
148 int nHitsPhi = (*segment).phiSegment()->degreesOfFreedom()+2;
149 double xdir = (*segment).phiSegment()->localDirection().x();
150 double zdir = (*segment).phiSegment()->localDirection().z();
152 double anglePhiSegm = fabs(atan(xdir/zdir))*180./
TMath::Pi();
156 double segmentVDrift = segment->phiSegment()->vDrift();
162 float vDriftPhi1(0.), vDriftPhi2(0.);
163 float ResPhi1(0.), ResPhi2(0.);
167 if(status1 != 0 || status2 != 0) {
169 throw cms::Exception(
"DTRunConditionVarClient") <<
"Could not find vDrift entry in DB for"
173 float vDriftMed = (vDriftPhi1 + vDriftPhi2) / 2.;
175 segmentVDrift = vDriftMed*(1. - segmentVDrift);
177 double segmentT0 = segment->phiSegment()->t0();
179 if( segment->phiSegment()->ist0Valid() ) (
chamberHistos[indexCh])[
"T0_FromSegm"]->Fill(segmentT0);
180 if( segmentVDrift != vDriftMed ) (
chamberHistos[indexCh])[
"VDrift_FromSegm"]->
Fill(segmentVDrift);
203 int wh = dtCh.
wheel();
206 stringstream wheel; wheel << wh;
207 stringstream
station; station << st;
208 stringstream sector; sector << sc;
210 string bookingFolder =
"DT/02-Segments/Wheel" + wheel.str() +
"/Sector" + sector.str() +
"/Station" + station.str();
211 string histoTag =
"_W" + wheel.str() +
"_Sec" + sector.str() +
"_St" + station.str();
215 LogTrace (
"DTDQM|DTMonitorModule|DTRunConditionVar")
216 <<
"[DTRunConditionVar]: booking histos in " << bookingFolder << endl;
218 string histoName = histoType + histoTag;
219 string histoLabel = histoType;
edm::ESHandle< DTMtime > mTime
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
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
C::const_iterator const_iterator
constant access iterator type
const T & max(const T &a, const T &b)
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
edm::InputTag thedt4DSegments_
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
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 setCurrentFolder(const std::string &fullpath)
DTRunConditionVar(const edm::ParameterSet &pset)