CMS 3D CMS Logo

AlCaHOCalibProducer.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 // Dec 2015 : Added bool m_cosmic to choose cosmic or collision run through python file
3 
4 //integrate the code with some 8_0_X or 7_6_X recent IB and run the
5 // following tests: 4.22, 8.0, 25.0, 140.53. You can always activate them using
6 //runTheMatrix.py -l 4.22
7 
8 // 7th Nov 2015 : tmpHOCalib.ecal03 = iso05.sumPt; // iso03.emEt+muonenr.em;
9 // tmpHOCalib.inslumi=lumiScale->begin()->pileup();
10 //
11 // April 2015 : Remove all digi part
12 // Also look for HO geometry in CMSSW in parallel with stanalone one.
13 // Official one has problem in reco geometry, particularly tiles at the edge of wheel
14 // Remove all histogrammes except occupancy one
15 // Remove Trigger bits
16 // But addition of these variables, ilumi (analyser), inslumi (analyser), nprim
17 
18 // Feb09 2009
19 // Move the initialisation of SteppingHelixPropagator from ::beginJob() to ::produce()
20 //
21 // Oct3 2008
22 // Difference in tag V00-02-45 with previous code
23 
24 // 1. One new object on data format, which was realised in
25 // CRUZET data analysis.
26 //2. Remove all histogram and cout in the code
27 //3. An upgrade in code, which increases the acceptance of
28 // muon near the edge (this also realised in CRUZET data).
29 // Difference in wrt V00-02-45
30 // 1. initialisation tmpHOCalib.htime = -1000;
31 // 2. By mistake HLT was commented out
32 
33 // Package: AlCaHOCalibProducer
34 // Class: AlCaHOCalibProducer
35 //
68 //
69 // Original Author: Gobinda Majumder
70 // Created: Fri Jul 6 17:17:21 CEST 2007
71 //
72 //
73 
74 // system include files
75 #include <memory>
76 
77 // user include files
80 
86 
90 
95 
99 
101 
104 
107 
110 
113 #include "CLHEP/Vector/LorentzVector.h"
114 
117 
122 
129 
130 // Necessary includes for identify severity of flagged problems in HO rechits
131 //#include "RecoLocalCalo/HcalRecAlgos/interface/HcalCaloFlagLabels.h"
136 #include "CLHEP/Units/GlobalPhysicalConstants.h"
137 #include "CLHEP/Units/GlobalSystemOfUnits.h"
138 
139 #include "TH2F.h"
140 
141 /* C++ Headers */
142 #include <string>
143 
144 #include <iostream>
145 #include <fstream>
146 //
147 // class decleration
148 //
149 
150 class AlCaHOCalibProducer : public edm::one::EDProducer<edm::one::SharedResources> {
151 public:
152  explicit AlCaHOCalibProducer(const edm::ParameterSet&);
153 
157 
158 private:
159  void produce(edm::Event&, const edm::EventSetup&) override;
160  void beginJob() override;
161  void endJob() override;
162 
163  void fillHOStore(const reco::TrackRef& ncosm,
164  HOCalibVariables& tmpHOCalib,
165  std::unique_ptr<HOCalibVariableCollection>& hostore,
166  int Noccu_old,
167  int indx,
170  const edm::Event& iEvent,
172  const MagneticField&);
173 
174  void findHOEtaPhi(int iphsect, int& ietaho, int& iphiho);
175  // virtual void endRun(edm::Run const &, edm::EventSetup const &) override;
176  // ----------member data ---------------------------
177 
178  float xhor0; //x-position in ring 0
179  float yhor0; //y-position in ring 0
180  float xhor1; //x-position in ring 1
181  float yhor1; //y-position in ring 1
182  int iring; //Ring number -2,-1,0,1,2
183 
184  float localxhor0; //local x-distance from edege in ring 0
185  float localyhor0; //local y-distance from edege in ring 0
186  float localxhor1; //local x-distance from edege in ring 1
187  float localyhor1; //local y-distance from edege in ring 1
188 
189  TH2F* ho_occupency[5];
191  bool m_cosmic;
192 
193  const int netabin = 16;
194  const int nphimx = 72;
195  const int netamx = 32;
196  const int ncidmx = 5;
197  const double rHOL0 = 382.0;
198  const double rHOL1 = 407.0;
199 
200  edm::InputTag muonTags_; // cosmicMuons (for cosmic run) or muons (for collision run)
201 
205  // edm::EDGetTokenT<LumiDetails> tok_lumi_;
207 
211 
216 
217  bool m_hbinfo;
219  int m_endTS;
220  double m_sigma;
221 
223  int Noccu;
224  int nRuns;
225 
226  // SteppingHelixPropagator* stepProp;
227  FreeTrajectoryState getFreeTrajectoryState(const reco::Track& tk, const MagneticField* field, int itag, bool dir);
228 
229  unsigned int Ntp; // # of HLT trigger paths (should be the same for all events!)
230  std::map<std::string, bool> fired;
231 
232  //hcal severity ES
235  int Nevents;
236 };
237 
238 //
239 // constants, enums and typedefs
240 //
241 
242 //
243 // static data member definitions
244 //
245 
246 //
247 // constructors and destructor
248 //
250  usesResource(TFileService::kSharedResource);
251  //register your products
252 
253  m_hbinfo = iConfig.getUntrackedParameter<bool>("hbinfo", false);
254  m_sigma = iConfig.getUntrackedParameter<double>("sigma", 0.05);
255  m_occupancy = iConfig.getUntrackedParameter<bool>("plotOccupancy", false);
256  m_cosmic = iConfig.getUntrackedParameter<bool>("CosmicData", false);
257 
258  // keep InputTag muonTags_ since it is used below. - cowden
259  muonTags_ = iConfig.getUntrackedParameter<edm::InputTag>("muons");
260  tok_muonsCosmic_ = consumes<reco::TrackCollection>(muonTags_);
261  tok_muons_ = consumes<edm::View<reco::Muon> >(muonTags_);
262  tok_vertex_ = consumes<reco::VertexCollection>(iConfig.getParameter<edm::InputTag>("vertexTags"));
263  // tok_lumi_ = consumes<LumiDetails ,edm::InLumi>(iConfig.getParameter<edm::InputTag>("lumiTags"));
264  tok_lumi_ = consumes<LumiScalersCollection>(iConfig.getParameter<edm::InputTag>("lumiTags"));
265  tok_ho_ = consumes<HORecHitCollection>(iConfig.getParameter<edm::InputTag>("hoInput"));
266  tok_hbhe_ = consumes<HBHERecHitCollection>(iConfig.getParameter<edm::InputTag>("hbheInput"));
267  tok_tower_ = consumes<CaloTowerCollection>(iConfig.getParameter<edm::InputTag>("towerInput"));
268 
269  tok_hcalChStatus_ = esConsumes<HcalChannelQuality, HcalChannelQualityRcd>(edm::ESInputTag("", "withTopo"));
270  tok_geom_ = esConsumes<CaloGeometry, CaloGeometryRecord>();
271  tok_hcalSevLvlComputer_ = esConsumes<HcalSeverityLevelComputer, HcalSeverityLevelComputerRcd>();
272  tok_magField_ = esConsumes<MagneticField, IdealMagneticFieldRecord>();
273 
274  produces<HOCalibVariableCollection>("HOCalibVariableCollection").setBranchAlias("HOCalibVariableCollection");
275 
276  if (m_occupancy) {
278 
279  char title[200];
280 
281  for (int ij = 0; ij < 5; ij++) {
282  sprintf(title, "ho_occupency (>%i #sigma)", ij + 2);
283  ho_occupency[ij] =
284  fs->make<TH2F>(title, title, netamx + 1, -netamx - 0.5, netamx / 2 + 0.5, nphimx, 0.5, nphimx + 0.5);
285  }
286  }
287 }
288 
289 //
290 // member functions
291 //
292 
293 // ------------ method called to produce the data ------------
295  int irun = iEvent.id().run();
296  // int ilumi = iEvent.luminosityBlock();
297 
298  Nevents++;
299 
300  if (Nevents % 5000 == 1)
301  edm::LogInfo("HOCalib") << "AlCaHOCalibProducer Processing event # " << Nevents << " " << Noccu << " " << irun
302  << " " << iEvent.id().event();
303 
305 
306  auto hostore = std::make_unique<HOCalibVariableCollection>();
307 
309  edm::Handle<edm::View<reco::Muon> > collisionmuon;
310 
311  bool muonOK(true);
312  HOCalibVariables tmpHOCalib;
313  tmpHOCalib.nprim = -1;
314  tmpHOCalib.inslumi = -1.;
315 
316  if (m_cosmic) {
317  iEvent.getByToken(tok_muonsCosmic_, cosmicmuon);
318  muonOK = (cosmicmuon.isValid() && !cosmicmuon->empty());
319  } else {
320  iEvent.getByToken(tok_muons_, collisionmuon);
321  muonOK = (collisionmuon.isValid() && !collisionmuon->empty());
322 
323  if (iEvent.isRealData()) {
325  iEvent.getByToken(tok_vertex_, primaryVertices);
326  if (primaryVertices.isValid()) {
327  tmpHOCalib.nprim = primaryVertices->size();
328  }
329 
330  tmpHOCalib.inslumi = 0.;
331 
333  iEvent.getByToken(tok_lumi_, lumiScale);
334 
335  if (lumiScale.isValid()) {
336  if (lumiScale->empty()) {
337  edm::LogError("HOCalib") << "lumiScale collection is empty";
338  } else {
339  tmpHOCalib.inslumi = lumiScale->begin()->pileup();
340  }
341  }
342  }
343  }
344 
345  if (muonOK) {
346  int Noccu_old = Noccu;
348 
350 
351  MagneticField const& magField = iSetup.getData(tok_magField_);
352 
353  const CaloGeometry& geo = iSetup.getData(tok_geom_);
355 
356  if (m_cosmic) {
357  int indx(0);
358  for (reco::TrackCollection::const_iterator ncosm = cosmicmuon->begin(); ncosm != cosmicmuon->end();
359  ++ncosm, ++indx) {
360  if ((*ncosm).ndof() < 15)
361  continue;
362  if ((*ncosm).normalizedChi2() > 30.0)
363  continue;
364  reco::TrackRef tRef = reco::TrackRef(cosmicmuon, indx);
365  fillHOStore(tRef, tmpHOCalib, hostore, Noccu_old, indx, cosmicmuon, muon1, iEvent, gHO, magField);
366  }
367  } else {
368  for (muon1 = collisionmuon->begin(); muon1 < collisionmuon->end(); muon1++) {
369  if ((!muon1->isGlobalMuon()) || (!muon1->isTrackerMuon()))
370  continue;
371  reco::TrackRef ncosm = muon1->innerTrack();
372  fillHOStore(ncosm, tmpHOCalib, hostore, Noccu_old, 0, cosmicmuon, muon1, iEvent, gHO, magField);
373  }
374  }
375  }
376 
377  iEvent.put(std::move(hostore), "HOCalibVariableCollection");
378 }
379 
380 // ------------ method called once each job just before starting event loop ------------
382  Nevents = 0;
383  nRuns = 0;
384  Noccu = 0;
385 }
386 
387 // ------------ method called once each job just after ending the event loop ------------
389  if (m_occupancy) {
390  for (int ij = 0; ij < 5; ij++) {
391  ho_occupency[ij]->Scale(1. / std::max(1, Noccu));
392  }
393  }
394  edm::LogInfo("HOCalib") << " AlCaHOCalibProducer processed event " << Nevents;
395 }
396 
398  HOCalibVariables& tmpHOCalib,
399  std::unique_ptr<HOCalibVariableCollection>& hostore,
400  int Noccu_old,
401  int indx,
404  const edm::Event& iEvent,
405  const CaloSubdetectorGeometry* gHO,
406  const MagneticField& magField) {
407  // Get Hcal Severity Level Computer, so that the severity of each rechit flag/status may be determined
408 
409  int charge = ncosm->charge();
410 
411  double innerr = (*ncosm).innerPosition().Perp2();
412  double outerr = (*ncosm).outerPosition().Perp2();
413  int iiner = (innerr < outerr) ? 1 : 0;
414 
415  //---------------------------------------------------
416  // in_to_out Dir in_to_out Dir
417  // StandAlone ^ ^ Cosmic ^ |
418  // | | | v
419  //---------------------------------------------------Y=0
420  // StandAlone | | Cosmic ^ |
421  // v v | v
422  //----------------------------------------------------
423 
424  double posx, posy, posz;
425  double momx, momy, momz;
426 
427  if (iiner == 1) {
428  posx = (*ncosm).innerPosition().X();
429  posy = (*ncosm).innerPosition().Y();
430  posz = (*ncosm).innerPosition().Z();
431 
432  momx = (*ncosm).innerMomentum().X();
433  momy = (*ncosm).innerMomentum().Y();
434  momz = (*ncosm).innerMomentum().Z();
435 
436  } else {
437  posx = (*ncosm).outerPosition().X();
438  posy = (*ncosm).outerPosition().Y();
439  posz = (*ncosm).outerPosition().Z();
440 
441  momx = (*ncosm).outerMomentum().X();
442  momy = (*ncosm).outerMomentum().Y();
443  momz = (*ncosm).outerMomentum().Z();
444  }
445 
446  PositionType trkpos(posx, posy, posz);
447 
448  CLHEP::Hep3Vector tmpmuon3v(posx, posy, posz);
449  CLHEP::Hep3Vector tmpmuondir(momx, momy, momz);
450 
451  bool samedir = (tmpmuon3v.dot(tmpmuondir) > 0) ? true : false;
452  for (int ij = 0; ij < 3; ij++) {
453  tmpHOCalib.caloen[ij] = 0.0;
454  }
455  int inearbymuon = 0;
456  localxhor0 = localyhor0 = 20000; //GM for 22OCT07 data
457 
458  if (m_cosmic) {
459  int ind(0);
460  for (reco::TrackCollection::const_iterator ncosmcor = cosmicmuon->begin(); ncosmcor != cosmicmuon->end();
461  ++ncosmcor, ++ind) {
462  if (indx == ind)
463  continue;
464  CLHEP::Hep3Vector tmpmuon3vcor;
465  CLHEP::Hep3Vector tmpmom3v;
466  if (iiner == 1) {
467  tmpmuon3vcor = CLHEP::Hep3Vector(
468  (*ncosmcor).innerPosition().X(), (*ncosmcor).innerPosition().Y(), (*ncosmcor).innerPosition().Z());
469  tmpmom3v = CLHEP::Hep3Vector(
470  (*ncosmcor).innerMomentum().X(), (*ncosmcor).innerMomentum().Y(), (*ncosmcor).innerMomentum().Z());
471  } else {
472  tmpmuon3vcor = CLHEP::Hep3Vector(
473  (*ncosmcor).outerPosition().X(), (*ncosmcor).outerPosition().Y(), (*ncosmcor).outerPosition().Z());
474  tmpmom3v = CLHEP::Hep3Vector(
475  (*ncosmcor).outerMomentum().X(), (*ncosmcor).outerMomentum().Y(), (*ncosmcor).outerMomentum().Z());
476  }
477 
478  if (tmpmom3v.mag() < 0.2 || (*ncosmcor).ndof() < 5)
479  continue;
480 
481  double angle = tmpmuon3v.angle(tmpmuon3vcor);
482  if (angle < 7.5 * CLHEP::deg) {
483  inearbymuon = 1;
484  } // break;}
485 
486  // if (muonTagsi_.label() =="cosmicMuons") {
487  if (angle < 7.5 * CLHEP::deg) {
488  tmpHOCalib.caloen[0] += 1.;
489  }
490  if (angle < 15.0 * CLHEP::deg) {
491  tmpHOCalib.caloen[1] += 1.;
492  }
493  if (angle < 35.0 * CLHEP::deg) {
494  tmpHOCalib.caloen[2] += 1.;
495  }
496  }
497  } else {
498  // if (muonTags_.label() =="muons") {
500  iEvent.getByToken(tok_tower_, calotower);
501 
502  for (CaloTowerCollection::const_iterator calt = calotower->begin(); calt != calotower->end(); calt++) {
503  //CMSSW_2_1_x const math::XYZVector towermom = (*calt).momentum();
504  double ith = (*calt).momentum().theta();
505  double iph = (*calt).momentum().phi();
506 
507  CLHEP::Hep3Vector calo3v(sin(ith) * cos(iph), sin(ith) * sin(iph), cos(ith));
508 
509  double angle = tmpmuon3v.angle(calo3v);
510 
511  if (angle < 7.5 * CLHEP::deg) {
512  tmpHOCalib.caloen[0] += calt->emEnergy() + calt->hadEnergy();
513  }
514  if (angle < 15 * CLHEP::deg) {
515  tmpHOCalib.caloen[1] += calt->emEnergy() + calt->hadEnergy();
516  }
517  if (angle < 35 * CLHEP::deg) {
518  tmpHOCalib.caloen[2] += calt->emEnergy() + calt->hadEnergy();
519  }
520  }
521  }
522  if ((m_cosmic) || (tmpHOCalib.caloen[0] <= 10.0)) {
523  GlobalPoint glbpt(posx, posy, posz);
524 
525  double mom = sqrt(momx * momx + momy * momy + momz * momz);
526 
527  momx /= mom;
528  momy /= mom;
529  momz /= mom;
530 
531  DirectionType trkdir(momx, momy, momz);
532 
533  tmpHOCalib.trkdr = (*ncosm).d0();
534  tmpHOCalib.trkdz = (*ncosm).dz();
535  tmpHOCalib.nmuon = (m_cosmic) ? cosmicmuon->size() : 1;
536  tmpHOCalib.trkvx = glbpt.x();
537  tmpHOCalib.trkvy = glbpt.y();
538  tmpHOCalib.trkvz = glbpt.z();
539  tmpHOCalib.trkmm = mom * charge;
540  tmpHOCalib.trkth = trkdir.theta();
541  tmpHOCalib.trkph = trkdir.phi();
542  tmpHOCalib.isect2 = -2;
543  tmpHOCalib.isect = -2;
544  tmpHOCalib.hodx = -100;
545  tmpHOCalib.hody = -100;
546  tmpHOCalib.hoang = -2.0;
547  tmpHOCalib.momatho = -2;
548  tmpHOCalib.ndof = (inearbymuon == 0) ? (int)(*ncosm).ndof() : -(int)(*ncosm).ndof();
549  tmpHOCalib.chisq = (*ncosm).normalizedChi2(); // max(1.,tmpHOCalib.ndof);
550  if (!m_cosmic) {
551  reco::MuonEnergy muonenr = muon1->calEnergy();
552  reco::MuonIsolation iso03 = muon1->isolationR03();
553  reco::MuonIsolation iso05 = muon1->isolationR05();
554 
555  tmpHOCalib.tkpt03 = iso03.sumPt;
556  tmpHOCalib.ecal03 = iso05.sumPt; // iso03.emEt+muonenr.em;
557  tmpHOCalib.hcal03 = iso03.hadEt + muonenr.had;
558  }
559  tmpHOCalib.therr = 0.;
560  tmpHOCalib.pherr = 0.;
561  if (iiner == 1) {
562  reco::TrackBase::CovarianceMatrix innercov = (*ncosm).innerStateCovariance();
563  tmpHOCalib.therr = innercov(1, 1); //thetaError();
564  tmpHOCalib.pherr = innercov(2, 2); //phi0Error();
565  } else {
566  reco::TrackBase::CovarianceMatrix outercov = (*ncosm).outerStateCovariance();
567  tmpHOCalib.therr = outercov(1, 1); //thetaError();
568  tmpHOCalib.pherr = outercov(2, 2); //phi0Error();
569  }
570 
571  SteppingHelixPropagator myHelix(&magField, anyDirection);
572  myHelix.setMaterialMode(false);
573  myHelix.applyRadX0Correction(true);
574  double phiho = trkpos.phi();
575  if (phiho < 0)
576  phiho += CLHEP::twopi;
577 
578  int iphisect_dt = int(6 * (phiho + 10.0 * CLHEP::deg) / CLHEP::pi); //for u 18/12/06
579  if (iphisect_dt >= 12)
580  iphisect_dt = 0;
581 
582  int iphisect = -1;
583  bool ipath = false;
584  for (int kl = 0; kl <= 2; kl++) {
585  int iphisecttmp = (kl < 2) ? iphisect_dt + kl : iphisect_dt - 1;
586  if (iphisecttmp < 0)
587  iphisecttmp = 11;
588  if (iphisecttmp >= 12)
589  iphisecttmp = 0;
590 
591  double phipos = iphisecttmp * CLHEP::pi / 6.;
592  double phirot = phipos;
593 
594  GlobalVector xLocal(-sin(phirot), cos(phirot), 0.);
595  GlobalVector yLocal(0., 0., 1.);
596  GlobalVector zLocal = xLocal.cross(yLocal).unit();
597  // GlobalVector zLocal(cos(phirot), sin(phirot), 0.0);
598 
599  FreeTrajectoryState freetrajectorystate_ = getFreeTrajectoryState(*ncosm, &(magField), iiner, samedir);
600 
601  Surface::RotationType rot(xLocal, yLocal, zLocal);
602 
603  for (int ik = 1; ik >= 0; ik--) { //propagate track in two HO layers
604 
605  double radial = rHOL1;
606  if (ik == 0)
607  radial = rHOL0;
608 
609  Surface::PositionType pos(radial * cos(phipos), radial * sin(phipos), 0.);
611 
612  auto aPlane2 = new Plane(pos, rot);
613 
614  SteppingHelixStateInfo steppingHelixstateinfo_;
615  myHelix.propagate(SteppingHelixStateInfo(freetrajectorystate_), (*aPlane2), steppingHelixstateinfo_);
616 
617  if (steppingHelixstateinfo_.isValid()) {
618  GlobalPoint hotrkpos2xx(steppingHelixstateinfo_.position().x(),
619  steppingHelixstateinfo_.position().y(),
620  steppingHelixstateinfo_.position().z());
621 
622  if (ik == 1) {
623  HcalDetId ClosestCell = (HcalDetId)gHO->getClosestCell(hotrkpos2xx);
624  int ixeta = ClosestCell.ieta();
625  int ixphi = ClosestCell.iphi();
626  tmpHOCalib.isect2 = 100 * std::abs(ixeta + 50) + std::abs(ixphi);
627  }
628 
629  GlobalVector hotrkpos2(steppingHelixstateinfo_.position().x(),
630  steppingHelixstateinfo_.position().y(),
631  steppingHelixstateinfo_.position().z());
632  CLHEP::Hep3Vector hotrkdir2(steppingHelixstateinfo_.momentum().x(),
633  steppingHelixstateinfo_.momentum().y(),
634  steppingHelixstateinfo_.momentum().z());
635 
636  LocalVector lclvt0 = (*aPlane).toLocal(hotrkpos2);
637 
638  double xx = lclvt0.x();
639  double yy = lclvt0.y();
640 
641  if (ik == 1) {
642  if ((std::abs(yy) < 130 && xx > -64.7 && xx < 138.2) //Ring-0
643  || (std::abs(yy) > 130 && std::abs(yy) < 700 && xx > -76.3 && xx < 140.5)) { //Ring +-1,2
644  ipath = true; //Only look for tracks which as hits in layer 1
645  iphisect = iphisecttmp;
646  }
647  }
648 
649  if (iphisect != iphisecttmp)
650  continue; //Look for ring-0 only when ring1 is accepted for that sector
651 
652  switch (ik) {
653  case 0:
654  xhor0 = xx; //lclvt0.x();
655  yhor0 = yy; //lclvt0.y();
656  break;
657  case 1:
658  xhor1 = xx; //lclvt0.x();
659  yhor1 = yy; //lclvt0.y();
660  tmpHOCalib.momatho = hotrkdir2.mag();
661  tmpHOCalib.hoang = CLHEP::Hep3Vector(zLocal.x(), zLocal.y(), zLocal.z()).dot(hotrkdir2.unit());
662  break;
663  default:
664  break;
665  }
666  } else {
667  break;
668  }
669  }
670  if (ipath)
671  break;
672  }
673  if (ipath) { //If muon crossed HO laeyrs
674 
675  int ietaho = 50;
676  int iphiho = -1;
677 
678  for (int ij = 0; ij < 9; ij++) {
679  tmpHOCalib.hosig[ij] = -100.0;
680  }
681  for (int ij = 0; ij < 18; ij++) {
682  tmpHOCalib.hocorsig[ij] = -100.0;
683  }
684  for (int ij = 0; ij < 9; ij++) {
685  tmpHOCalib.hbhesig[ij] = -100.0;
686  }
687  tmpHOCalib.hocro = -100;
688  tmpHOCalib.htime = -1000;
689 
690  int isect = 0;
691 
692  findHOEtaPhi(iphisect, ietaho, iphiho);
693 
694  if (ietaho != 0 && iphiho != 0 && std::abs(iring) <= 2) { //Muon passed through a tower
695  isect = 100 * std::abs(ietaho + 50) + std::abs(iphiho);
696  if (std::abs(ietaho) >= netabin || iphiho < 0)
697  isect *= -1; //Not extrapolated to any tower
698  if (std::abs(ietaho) >= netabin)
699  isect -= 1000000; //not matched with eta
700  if (iphiho < 0)
701  isect -= 2000000; //not matched with phi
702  tmpHOCalib.isect = isect;
703 
704  tmpHOCalib.hodx = localxhor1;
705  tmpHOCalib.hody = localyhor1;
706 
707  if (iring == 0) {
708  tmpHOCalib.hocorsig[8] = localxhor0;
709  tmpHOCalib.hocorsig[9] = localyhor0;
710  }
711 
712  int etamn = -4;
713  int etamx = 4;
714  if (iring == 1) {
715  etamn = 5;
716  etamx = 10;
717  }
718  if (iring == 2) {
719  etamn = 11;
720  etamx = 16;
721  }
722  if (iring == -1) {
723  etamn = -10;
724  etamx = -5;
725  }
726  if (iring == -2) {
727  etamn = -16;
728  etamx = -11;
729  }
730 
731  int phimn = 1;
732  int phimx = 2;
733  if (iring == 0) {
734  phimx = 2 * int((iphiho + 1) / 2.);
735  phimn = phimx - 1;
736  } else {
737  phimn = 3 * int((iphiho + 1) / 3.) - 1;
738  phimx = phimn + 2;
739  }
740 
741  if (phimn < 1)
742  phimn += nphimx;
743  if (phimx > 72)
744  phimx -= nphimx;
745 
746  if (m_hbinfo) {
747  for (int ij = 0; ij < 9; ij++) {
748  tmpHOCalib.hbhesig[ij] = -100.0;
749  }
750 
751  edm::Handle<HBHERecHitCollection> hbheht; // iEvent.getByType(hbheht);
752  iEvent.getByToken(tok_hbhe_, hbheht);
753 
754  if (!(*hbheht).empty()) {
755  if ((*hbheht).empty())
756  throw(int)(*hbheht).size();
757 
758  for (HBHERecHitCollection::const_iterator jk = (*hbheht).begin(); jk != (*hbheht).end(); jk++) {
759  HcalDetId id = (*jk).id();
760  int tmpeta = id.ieta();
761  int tmpphi = id.iphi();
762 
763  int deta = tmpeta - ietaho;
764  if (tmpeta < 0 && ietaho > 0)
765  deta += 1;
766  if (tmpeta > 0 && ietaho < 0)
767  deta -= 1;
768 
769  // if (tmpeta==-1 && ietaho== 1) deta = -1;
770  // if (tmpeta== 1 && ietaho==-1) deta = 1;
771 
772  int dphi = tmpphi - iphiho;
773  if (dphi > nphimx / 2) {
774  dphi -= nphimx;
775  }
776  if (dphi < -nphimx / 2) {
777  dphi += nphimx;
778  }
779 
780  // if (phimn >phimx) {
781  // if (dphi==71) dphi=-1;
782  // if (dphi==-71) dphi=1;
783  // }
784 
785  if (m_occupancy) {
786  float signal = (*jk).energy();
787  // int tmpeta1 = (tmpeta>0) ? tmpeta -1 : -tmpeta +14;
788  if (signal > -100 && Noccu == Noccu_old) {
789  for (int ij = 0; ij < 5; ij++) {
790  if (signal > (ij + 2) * m_sigma) {
791  ho_occupency[ij]->Fill(tmpeta, tmpphi);
792  }
793  }
794  }
795  }
796 
797  int ipass2 = (std::abs(deta) <= 1 && std::abs(dphi) <= 1) ? 1 : 0; //NEED correction in full CMS detector
798  if (ipass2 == 0)
799  continue;
800 
801  float signal = (*jk).energy();
802 
803  if (3 * (deta + 1) + dphi + 1 < 9)
804  tmpHOCalib.hbhesig[3 * (deta + 1) + dphi + 1] = signal;
805  }
806  }
807  } //m_hbinfo #endif
808 
810  iEvent.getByToken(tok_ho_, hoht);
811 
812  if (!(*hoht).empty()) {
813  for (HORecHitCollection::const_iterator jk = (*hoht).begin(); jk != (*hoht).end(); jk++) {
814  HcalDetId id = (*jk).id();
815  int tmpeta = id.ieta();
816  int tmpphi = id.iphi();
817 
818  int ipass1 = 0;
819  if (tmpeta >= etamn && tmpeta <= etamx) {
820  if (phimn < phimx) {
821  ipass1 = (tmpphi >= phimn && tmpphi <= phimx) ? 1 : 0;
822  } else {
823  ipass1 = (tmpphi == 71 || tmpphi == 72 || tmpphi == 1) ? 1 : 0;
824  }
825  }
826 
827  int deta = tmpeta - ietaho;
828  int dphi = tmpphi - iphiho;
829 
830  if (tmpeta < 0 && ietaho > 0)
831  deta += 1;
832  if (tmpeta > 0 && ietaho < 0)
833  deta -= 1;
834  // if (tmpeta==-1 && ietaho== 1) deta = -1;
835  // if (tmpeta== 1 && ietaho==-1) deta = 1;
836 
837  if (dphi > nphimx / 2) {
838  dphi -= nphimx;
839  }
840  if (dphi < -nphimx / 2) {
841  dphi += nphimx;
842  }
843  // if (phimn>phimx) {
844  // if (dphi==71) dphi=-1;
845  // if (dphi==-71) dphi=1;
846  // }
847 
848  float signal = (*jk).energy();
849 
850  int ipass2 = (std::abs(deta) <= 1 && std::abs(dphi) <= 1) ? 1 : 0;
851 
852  if (ipass1 == 0 && ipass2 == 0)
853  continue;
854 
855  if (ipass1 == 1) {
856  int tmpdph = tmpphi - phimn;
857  if (tmpdph < 0)
858  tmpdph = 2; //only case of iphi==1, where phimn=71
859 
860  int ilog = 2 * (tmpeta - etamn) + tmpdph;
861  if (iring != 0) {
862  if (iring > 0) {
863  ilog = 3 * (tmpeta - etamn) + tmpdph; //Again CMS correction
864  } else {
865  ilog = 3 * (etamx - tmpeta) + tmpdph; //Again CMS correction
866  }
867  }
868  if (ilog > -1 && ilog < 18) {
869  tmpHOCalib.hocorsig[ilog] = signal;
870  }
871  }
872 
873  if (ipass2 == 1) {
874  if (3 * (deta + 1) + dphi + 1 < 9) {
875  tmpHOCalib.hosig[3 * (deta + 1) + dphi + 1] = signal; //Again CMS azimuthal near phi 1&72
876  }
877  }
878 
879  if (deta == 0 && dphi == 0) {
880  tmpHOCalib.htime = (*jk).time();
881  tmpHOCalib.hoflag = (*jk).flags();
882 
883  // Get Channel Quality information for the given detID
884  unsigned theStatusValue = theHcalChStatus->getValues(id)->getValue();
885  // Now get severity of problems for the given detID, based on the rechit flag word and the channel quality status value
886  int hitSeverity = theHcalSevLvlComputer->getSeverityLevel(id, (*jk).flags(), theStatusValue);
887  tmpHOCalib.hoflag = hitSeverity;
888  int crphi = tmpphi + 6;
889  if (crphi > 72)
890  crphi -= 72;
891 
892  for (HORecHitCollection::const_iterator jcr = (*hoht).begin(); jcr != (*hoht).end(); jcr++) {
893  const HORecHit reccr = (const HORecHit)(*jcr);
894  HcalDetId idcr = reccr.id();
895  int etacr = idcr.ieta();
896  int phicr = idcr.iphi();
897  if (tmpeta == etacr && crphi == phicr) {
898  tmpHOCalib.hocro = reccr.energy();
899  }
900  }
901  }
902  }
903  }
904  }
905 
906  //GMA Npass++;
907  if (Noccu == Noccu_old)
908  Noccu++;
909  hostore->push_back(tmpHOCalib);
910  } // if (ipath)
911  } // Cut on calo energy
912 }
913 
914 void AlCaHOCalibProducer::findHOEtaPhi(int iphisect, int& ietaho, int& iphiho) {
915  //18/12/06 : use only position, not angle phi
916 
917  const double etalow[16] = {0.025,
918  35.195,
919  70.625,
920  106.595,
921  141.565,
922  180.765,
923  220.235,
924  261.385,
925  304.525,
926  349.975,
927  410.025,
928  452.085,
929  506.645,
930  565.025,
931  627.725,
932  660.25};
933  const double etahgh[16] = {35.145,
934  70.575,
935  106.545,
936  125.505,
937  180.715,
938  220.185,
939  261.335,
940  304.475,
941  349.925,
942  392.575,
943  452.035,
944  506.595,
945  564.975,
946  627.675,
947  661.075,
948  700.25};
949 
950  const double philow[6] = {-76.27, -35.11, 0.35, 35.81, 71.77, 108.93}; //Ring+/-1 & 2
951  const double phihgh[6] = {-35.81, -0.35, 35.11, 71.07, 108.23, 140.49};
952 
953  const double philow00[6] = {-60.27, -32.91, 0.35, 33.61, 67.37, 102.23}; //Ring0 L0
954  const double phihgh00[6] = {-33.61, -0.35, 32.91, 66.67, 101.53, 129.49};
955 
956  const double philow01[6] = {-64.67, -34.91, 0.35, 35.61, 71.37, 108.33}; //Ring0 L1
957  const double phihgh01[6] = {-35.61, -0.35, 34.91, 70.67, 107.63, 138.19};
958 
959  iring = -10;
960 
961  double tmpdy = std::abs(yhor1);
962  for (int ij = 0; ij < netabin; ij++) {
963  if (tmpdy > etalow[ij] && tmpdy < etahgh[ij]) {
964  ietaho = ij + 1;
965  float tmp1 = fabs(tmpdy - etalow[ij]);
966  float tmp2 = fabs(tmpdy - etahgh[ij]);
967 
968  localyhor1 = (tmp1 < tmp2) ? -tmp1 : tmp2;
969  if (yhor1 < 0)
970  localyhor1 *= -1.;
971 
972  if (ij < 4)
973  iring = 0;
974  if (ij >= 4 && ij < 10)
975  iring = 1;
976  if (ij >= 10 && ij < netabin)
977  iring = 2;
978  break;
979  }
980  }
981 
982  int tmpphi = 0;
983  int tmpphi0 = 0;
984 
985  if (ietaho > 4) { //Ring 1 and 2
986  for (int ij = 0; ij < 6; ij++) {
987  if (xhor1 > philow[ij] && xhor1 < phihgh[ij]) {
988  tmpphi = ij + 1;
989  float tmp1 = fabs(xhor1 - philow[ij]);
990  float tmp2 = fabs(xhor1 - phihgh[ij]);
991  localxhor1 = (tmp1 < tmp2) ? -tmp1 : tmp2;
992  break;
993  }
994  }
995  } else { //Ring 0
996  for (int ij = 0; ij < 6; ij++) {
997  if (xhor1 > philow01[ij] && xhor1 < phihgh01[ij]) {
998  tmpphi = ij + 1;
999  float tmp1 = fabs(xhor1 - philow01[ij]);
1000  float tmp2 = fabs(xhor1 - phihgh01[ij]);
1001  localxhor1 = (tmp1 < tmp2) ? -tmp1 : tmp2;
1002  break;
1003  }
1004  }
1005 
1006  for (int ij = 0; ij < 6; ij++) {
1007  if (xhor0 > philow00[ij] && xhor0 < phihgh00[ij]) {
1008  tmpphi0 = ij + 1;
1009  float tmp1 = fabs(xhor0 - philow00[ij]);
1010  float tmp2 = fabs(xhor0 - phihgh00[ij]);
1011  localxhor0 = (tmp1 < tmp2) ? -tmp1 : tmp2;
1012  if (tmpphi != tmpphi0)
1013  localxhor0 += 10000.;
1014  break;
1015  }
1016  }
1017 
1018  double tmpdy = std::abs(yhor0);
1019  for (int ij = 0; ij < 4; ij++) {
1020  if (tmpdy > etalow[ij] && tmpdy < etahgh[ij]) {
1021  float tmp1 = fabs(tmpdy - etalow[ij]);
1022  float tmp2 = fabs(tmpdy - etahgh[ij]);
1023  localyhor0 = (tmp1 < tmp2) ? -tmp1 : tmp2;
1024  if (yhor0 < 0)
1025  localyhor0 *= -1.;
1026  if (ij + 1 != ietaho)
1027  localyhor0 += 10000.;
1028  break;
1029  }
1030  }
1031  }
1032 
1033  if (tmpphi != 0) {
1034  iphiho = 6 * iphisect - 2 + tmpphi;
1035  if (iphiho <= 0)
1036  iphiho += nphimx;
1037  if (iphiho > nphimx)
1038  iphiho -= nphimx;
1039  }
1040 
1041  // isect2 = 15*iring+iphisect+1;
1042 
1043  if (yhor1 < 0) {
1044  if (std::abs(ietaho) > netabin) { //Initialised with 50
1045  ietaho += 1;
1046  } else {
1047  ietaho *= -1;
1048  }
1049  // isect2 *=-1;
1050  iring *= -1;
1051  }
1052 }
1053 
1055  const MagneticField* field,
1056  int iiner,
1057  bool dir) {
1058  if (iiner == 0) {
1059  GlobalPoint gpos(tk.outerX(), tk.outerY(), tk.outerZ());
1060  GlobalVector gmom(tk.outerPx(), tk.outerPy(), tk.outerPz());
1061  if (dir)
1062  gmom *= -1.;
1063  GlobalTrajectoryParameters par(gpos, gmom, tk.charge(), field);
1064  CurvilinearTrajectoryError err(tk.extra()->outerStateCovariance());
1065  return FreeTrajectoryState(par, err);
1066  } else {
1067  GlobalPoint gpos(tk.innerPosition().X(), tk.innerPosition().Y(), tk.innerPosition().Z());
1068  GlobalVector gmom(tk.innerMomentum().X(), tk.innerMomentum().Y(), tk.innerMomentum().Z());
1069  if (dir)
1070  gmom *= -1.;
1071  GlobalTrajectoryParameters par(gpos, -gmom, tk.charge(), field);
1072  CurvilinearTrajectoryError err(tk.extra()->innerStateCovariance());
1073  return FreeTrajectoryState(par, err);
1074  }
1075 }
1076 
1078 
1079 //define this as a plug-in
dot
T dot(const Basic3DVector &v) const
Scalar product, or "dot" product, with a vector of same type.
Definition: Basic3DVectorLD.h:212
AlCaHOCalibProducer::nRuns
int nRuns
Definition: AlCaHOCalibProducer.cc:224
Vector3DBase
Definition: Vector3DBase.h:8
SteppingHelixStateInfo::momentum
GlobalVector momentum() const
Definition: SteppingHelixStateInfo.h:60
HOCalibVariables::nmuon
int nmuon
Definition: HOCalibVariables.h:7
TkRotation< float >
HOCalibVariables::tkpt03
float tkpt03
Definition: HOCalibVariables.h:51
reco::MuonEnergy
Definition: MuonEnergy.h:17
HOCalibVariables::trkph
float trkph
Definition: HOCalibVariables.h:22
LumiScalers.h
AlCaHOCalibProducer::tok_ho_
edm::EDGetTokenT< HORecHitCollection > tok_ho_
Definition: AlCaHOCalibProducer.cc:209
Basic3DVector::theta
Geom::Theta< T > theta() const
Definition: extBasic3DVector.h:139
reco::Track::outerPy
double outerPy() const
y coordinate of momentum vector at the outermost hit position
Definition: Track.h:103
runGCPTkAlMap.title
string title
Definition: runGCPTkAlMap.py:94
anyDirection
Definition: PropagationDirection.h:4
edm::ESInputTag
Definition: ESInputTag.h:87
AlCaHOCalibProducer::beginJob
void beginJob() override
Definition: AlCaHOCalibProducer.cc:381
EDProducer.h
FreeTrajectoryState.h
edm::SortedCollection< CaloTower >::const_iterator
std::vector< CaloTower >::const_iterator const_iterator
Definition: SortedCollection.h:80
Muon.h
AlCaHOCalibProducer::PositionType
Basic3DVector< float > PositionType
Definition: AlCaHOCalibProducer.cc:154
MessageLogger.h
SteppingHelixStateInfo::position
GlobalPoint position() const
Definition: SteppingHelixStateInfo.h:59
SteppingHelixPropagator.h
CaloRecHit::energy
constexpr float energy() const
Definition: CaloRecHit.h:29
AlCaHOCalibProducer::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: AlCaHOCalibProducer.cc:294
HOCalibVariables::therr
float therr
Definition: HOCalibVariables.h:28
HOCalibVariables::hoang
float hoang
Definition: HOCalibVariables.h:36
HcalDetId::iphi
constexpr int iphi() const
get the cell iphi
Definition: HcalDetId.h:157
HOCalibVariables
Definition: HOCalibVariables.h:5
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
reco::Track::outerPx
double outerPx() const
x coordinate of momentum vector at the outermost hit position
Definition: Track.h:100
HOCalibVariables::isect2
int isect2
Definition: HOCalibVariables.h:32
HORecHit
Definition: HORecHit.h:11
edm::EDGetTokenT< reco::TrackCollection >
AlCaHOCalibProducer::m_cosmic
bool m_cosmic
Definition: AlCaHOCalibProducer.cc:191
HOCalibVariables::inslumi
float inslumi
Definition: HOCalibVariables.h:10
AlCaHOCalibProducer::endJob
void endJob() override
Definition: AlCaHOCalibProducer.cc:388
pos
Definition: PixelAliasList.h:18
AlCaHOCalibProducer::tok_vertex_
edm::EDGetTokenT< reco::VertexCollection > tok_vertex_
Definition: AlCaHOCalibProducer.cc:204
DetId::Hcal
Definition: DetId.h:28
AlCaHOCalibProducer::CovarianceMatrix
math::Error< 5 >::type CovarianceMatrix
Definition: AlCaHOCalibProducer.cc:222
CaloGeometry::getSubdetectorGeometry
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:34
HOCalibVariables::hocro
float hocro
Definition: HOCalibVariables.h:47
reco::MuonEnergy::had
float had
Definition: MuonEnergy.h:36
reco::Track::outerX
double outerX() const
x coordinate of the outermost hit position
Definition: Track.h:109
AlCaHOCalibProducer::tok_muons_
edm::EDGetTokenT< edm::View< reco::Muon > > tok_muons_
Definition: AlCaHOCalibProducer.cc:203
ewkMuLumiMonitorDQM_cfi.calotower
calotower
Definition: ewkMuLumiMonitorDQM_cfi.py:36
HOCalibVariables::trkmm
float trkmm
Definition: HOCalibVariables.h:20
HOCalibVariables::hocorsig
float hocorsig[18]
Definition: HOCalibVariables.h:43
edm::one::EDProducer
Definition: EDProducer.h:30
AlCaHOCalibProducer::findHOEtaPhi
void findHOEtaPhi(int iphsect, int &ietaho, int &iphiho)
Definition: AlCaHOCalibProducer.cc:914
AlCaHOCalibProducer::localyhor1
float localyhor1
Definition: AlCaHOCalibProducer.cc:187
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
HcalChannelQuality
Definition: HcalChannelQuality.h:17
ReferenceCountingPointer< Plane >
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
AlCaHOCalibProducer::Noccu
int Noccu
Definition: AlCaHOCalibProducer.cc:223
AlCaHOCalibProducer::tok_hbhe_
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
Definition: AlCaHOCalibProducer.cc:208
edm::Handle< reco::TrackCollection >
HOCalibVariables::caloen
float caloen[3]
Definition: HOCalibVariables.h:50
reco::MuonIsolation
Definition: MuonIsolation.h:5
HcalCondObjectContainer::getValues
const Item * getValues(DetId fId, bool throwOnFail=true) const
Definition: HcalCondObjectContainer.h:159
reco::Track::extra
const TrackExtraRef & extra() const
reference to "extra" object
Definition: Track.h:139
AlCaHOCalibProducer::tok_hcalChStatus_
edm::ESGetToken< HcalChannelQuality, HcalChannelQualityRcd > tok_hcalChStatus_
Definition: AlCaHOCalibProducer.cc:212
HOCalibVariables::htime
float htime
Definition: HOCalibVariables.h:37
AlCaHOCalibProducer::localxhor1
float localxhor1
Definition: AlCaHOCalibProducer.cc:186
edm::Ref< TrackCollection >
reco::Track::outerPz
double outerPz() const
z coordinate of momentum vector at the outermost hit position
Definition: Track.h:106
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
HOCalibVariables::pherr
float pherr
Definition: HOCalibVariables.h:29
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
AlCaHOCalibProducer::m_endTS
int m_endTS
Definition: AlCaHOCalibProducer.cc:219
MakerMacros.h
reco::MuonIsolation::sumPt
float sumPt
sum-pt of tracks
Definition: MuonIsolation.h:6
AlCaHOCalibProducer::fillHOStore
void fillHOStore(const reco::TrackRef &ncosm, HOCalibVariables &tmpHOCalib, std::unique_ptr< HOCalibVariableCollection > &hostore, int Noccu_old, int indx, edm::Handle< reco::TrackCollection > cosmicmuon, edm::View< reco::Muon >::const_iterator muon1, const edm::Event &iEvent, const CaloSubdetectorGeometry *, const MagneticField &)
Definition: AlCaHOCalibProducer.cc:397
CaloGeometry
Definition: CaloGeometry.h:21
PlaneBuilder.h
reco::Track::outerZ
double outerZ() const
z coordinate of the outermost hit position
Definition: Track.h:115
reco::Track::innerMomentum
const math::XYZVector & innerMomentum() const
momentum vector at the innermost hit position
Definition: Track.h:59
SteppingHelixPropagator
Definition: SteppingHelixPropagator.h:36
HOCalibVariables::trkth
float trkth
Definition: HOCalibVariables.h:21
HOCalibVariables::hbhesig
float hbhesig[9]
Definition: HOCalibVariables.h:49
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
Track.h
TrackFwd.h
CurvilinearTrajectoryError
Definition: CurvilinearTrajectoryError.h:27
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
AlCaHOCalibProducer::m_sigma
double m_sigma
Definition: AlCaHOCalibProducer.cc:220
AlCaHOCalibProducer::tok_magField_
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > tok_magField_
Definition: AlCaHOCalibProducer.cc:215
AlCaHOCalibProducer::tok_geom_
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > tok_geom_
Definition: AlCaHOCalibProducer.cc:213
Service.h
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
HOCalibVariables::trkvy
float trkvy
Definition: HOCalibVariables.h:16
HcalSeverityLevelComputer
Definition: HcalSeverityLevelComputer.h:24
reco::Track
Definition: Track.h:27
AlCaHOCalibProducer::muonTags_
edm::InputTag muonTags_
Definition: AlCaHOCalibProducer.cc:200
IdealMagneticFieldRecord.h
AlCaHOCalibProducer::ho_occupency
TH2F * ho_occupency[5]
Definition: AlCaHOCalibProducer.cc:189
BXlumiParameters_cfi.lumiScale
lumiScale
Definition: BXlumiParameters_cfi.py:11
HOCalibVariables::momatho
float momatho
Definition: HOCalibVariables.h:19
HOCalibVariables::chisq
float chisq
Definition: HOCalibVariables.h:26
HOCalibVariables::hoflag
unsigned int hoflag
Definition: HOCalibVariables.h:38
HcalOuter
Definition: HcalAssistant.h:35
AlCaHOCalibProducer::Nevents
int Nevents
Definition: AlCaHOCalibProducer.cc:235
reco::TrackBase::charge
int charge() const
track electric charge
Definition: TrackBase.h:596
AlCaHOCalibProducer::xhor1
float xhor1
Definition: AlCaHOCalibProducer.cc:180
GlobalTrajectoryParameters
Definition: GlobalTrajectoryParameters.h:15
AlCaHOCalibProducer::m_occupancy
bool m_occupancy
Definition: AlCaHOCalibProducer.cc:190
AlCaHOCalibProducer::netabin
const int netabin
Definition: AlCaHOCalibProducer.cc:193
Point3DBase< float, GlobalTag >
IsoDeposit.h
CaloGeometryRecord.h
reco::TrackRef
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
Definition: TrackFwd.h:20
AlCaHOCalibProducer::localxhor0
float localxhor0
Definition: AlCaHOCalibProducer.cc:184
Vertex.h
SteppingHelixStateInfo
Definition: SteppingHelixStateInfo.h:27
HcalSeverityLevelComputerRcd.h
TFileService.h
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
HcalSeverityLevelComputer::getSeverityLevel
int getSeverityLevel(const DetId &myid, const uint32_t &myflag, const uint32_t &mystatus) const
Definition: HcalSeverityLevelComputer.cc:304
HcalChannelStatus::getValue
uint32_t getValue() const
Definition: HcalChannelStatus.h:60
Error.h
CaloSubdetectorGeometry.h
HcalDetId::ieta
constexpr int ieta() const
get the cell ieta
Definition: HcalDetId.h:155
AlCaHOCalibProducer::fired
std::map< std::string, bool > fired
Definition: AlCaHOCalibProducer.cc:230
edm::ParameterSet
Definition: ParameterSet.h:47
AlCaHOCalibProducer::tok_tower_
edm::EDGetTokenT< CaloTowerCollection > tok_tower_
Definition: AlCaHOCalibProducer.cc:210
AlCaHOCalibProducer::DirectionType
Basic3DVector< float > DirectionType
Definition: AlCaHOCalibProducer.cc:155
AlCaHOCalibProducer
Definition: AlCaHOCalibProducer.cc:150
Event.h
LumiDetails.h
geometryCSVtoXML.yy
yy
Definition: geometryCSVtoXML.py:19
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
HcalDetId.h
AlCaHOCalibProducer::yhor0
float yhor0
Definition: AlCaHOCalibProducer.cc:179
HOCalibVariables::trkdz
float trkdz
Definition: HOCalibVariables.h:13
AlCaHOCalibProducer::theHcalChStatus
const HcalChannelQuality * theHcalChStatus
Definition: AlCaHOCalibProducer.cc:233
SteppingHelixPropagator::applyRadX0Correction
void applyRadX0Correction(bool applyRadX0Correction)
Definition: SteppingHelixPropagator.h:133
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
AlCaHOCalibProducer::Ntp
unsigned int Ntp
Definition: AlCaHOCalibProducer.cc:229
HOCalibVariables::trkvz
float trkvz
Definition: HOCalibVariables.h:17
reco::Track::innerPosition
const math::XYZPoint & innerPosition() const
position of the innermost hit
Definition: Track.h:56
HcalDetId
Definition: HcalDetId.h:12
edm::Service< TFileService >
createfilelist.int
int
Definition: createfilelist.py:10
HOCalibVariables::hodx
float hodx
Definition: HOCalibVariables.h:33
HOCalibVariables::hosig
float hosig[9]
Definition: HOCalibVariables.h:39
iEvent
int iEvent
Definition: GenABIO.cc:224
Vector3DBase::cross
Vector3DBase< typename PreciseFloatType< T, U >::Type, FrameTag > cross(const Vector3DBase< U, FrameTag > &v) const
Definition: Vector3DBase.h:110
IdealGeometryRecord.h
MagneticField.h
edm::EventSetup
Definition: EventSetup.h:58
HcalSubdetector.h
CaloSubdetectorGeometry::getClosestCell
virtual DetId getClosestCell(const GlobalPoint &r) const
Definition: CaloSubdetectorGeometry.cc:44
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
PlaneBuilder::plane
ReturnType plane(const PositionType &pos, const RotationType &rot) const
Definition: PlaneBuilder.h:21
submitPVResolutionJobs.err
err
Definition: submitPVResolutionJobs.py:85
HOCalibVariables::ndof
float ndof
Definition: HOCalibVariables.h:24
AlCaHOCalibProducer::AlCaHOCalibProducer
AlCaHOCalibProducer(const edm::ParameterSet &)
Definition: AlCaHOCalibProducer.cc:249
SteppingHelixStateInfo::isValid
bool isValid() const
Definition: SteppingHelixStateInfo.h:65
TrajectorySeedCollection.h
edm::ESGetToken< HcalChannelQuality, HcalChannelQualityRcd >
SteppingHelixPropagator::setMaterialMode
void setMaterialMode(bool noMaterial)
Switch for material effects mode: no material effects if true.
Definition: SteppingHelixPropagator.h:124
HcalChannelQualityRcd.h
AlCaHOCalibProducer::m_hbinfo
bool m_hbinfo
Definition: AlCaHOCalibProducer.cc:217
InputTag.h
PropagationDirection.h
HOCalibVariables::isect
int isect
Definition: HOCalibVariables.h:31
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:127
HcalChannelQuality.h
CaloTowerCollection.h
HOCalibVariables::hcal03
float hcal03
Definition: HOCalibVariables.h:53
VertexFwd.h
AlCaHOCalibProducer::nphimx
const int nphimx
Definition: AlCaHOCalibProducer.cc:194
AlCaHOCalibProducer::ncidmx
const int ncidmx
Definition: AlCaHOCalibProducer.cc:196
HOCalibVariables::trkvx
float trkvx
Definition: HOCalibVariables.h:15
AlCaHOCalibProducer::yhor1
float yhor1
Definition: AlCaHOCalibProducer.cc:181
HOCalibVariables.h
CaloCellGeometry.h
eostools.move
def move(src, dest)
Definition: eostools.py:511
AlCaHOCalibProducer::theHcalSevLvlComputer
const HcalSeverityLevelComputer * theHcalSevLvlComputer
Definition: AlCaHOCalibProducer.cc:234
AlCaHOCalibProducer::tok_muonsCosmic_
edm::EDGetTokenT< reco::TrackCollection > tok_muonsCosmic_
Definition: AlCaHOCalibProducer.cc:202
AlCaHOCalibProducer::tok_lumi_
edm::EDGetTokenT< LumiScalersCollection > tok_lumi_
Definition: AlCaHOCalibProducer.cc:206
reco::MuonIsolation::hadEt
float hadEt
hcal sum-Et
Definition: MuonIsolation.h:8
FreeTrajectoryState
Definition: FreeTrajectoryState.h:27
Frameworkfwd.h
AlCaHOCalibProducer::rHOL0
const double rHOL0
Definition: AlCaHOCalibProducer.cc:197
AlCaHOCalibProducer::RotationType
Basic3DVector< float > RotationType
Definition: AlCaHOCalibProducer.cc:156
HOCalibVariables::nprim
int nprim
Definition: HOCalibVariables.h:8
math::Error::type
ErrorD< N >::type type
Definition: Error.h:32
CaloGeometry.h
TFileService::kSharedResource
static const std::string kSharedResource
Definition: TFileService.h:76
Plane
Definition: Plane.h:16
makeMuonMisalignmentScenario.rot
rot
Definition: makeMuonMisalignmentScenario.py:322
AlCaHOCalibProducer::localyhor0
float localyhor0
Definition: AlCaHOCalibProducer.cc:185
angle
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
Definition: angle.h:11
EventSetup.h
SteppingHelixPropagator::propagate
void propagate(const SteppingHelixStateInfo &ftsStart, const Surface &sDest, SteppingHelixStateInfo &out) const
Propagate to Plane given a starting point.
Definition: SteppingHelixPropagator.cc:152
CaloSubdetectorGeometry
Definition: CaloSubdetectorGeometry.h:22
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
HcalRecHitCollections.h
HcalSeverityLevelComputer.h
HORecHit::id
constexpr HcalDetId id() const
get the id
Definition: HORecHit.h:19
PlaneBuilder
Definition: PlaneBuilder.h:13
edm::View::const_iterator
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:86
AlCaHOCalibProducer::iring
int iring
Definition: AlCaHOCalibProducer.cc:182
HOCalibVariables::hody
float hody
Definition: HOCalibVariables.h:35
pi
const Double_t pi
Definition: trackSplitPlot.h:36
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
AlCaHOCalibProducer::xhor0
float xhor0
Definition: AlCaHOCalibProducer.cc:178
HOCalibVariables::trkdr
float trkdr
Definition: HOCalibVariables.h:12
ParameterSet.h
AlCaHOCalibProducer::tok_hcalSevLvlComputer_
edm::ESGetToken< HcalSeverityLevelComputer, HcalSeverityLevelComputerRcd > tok_hcalSevLvlComputer_
Definition: AlCaHOCalibProducer.cc:214
MuonGeometryRecord.h
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
reco::TrackBase::CovarianceMatrix
math::Error< dimension >::type CovarianceMatrix
5 parameter covariance matrix
Definition: TrackBase.h:74
edm::Event
Definition: Event.h:73
MagneticField
Definition: MagneticField.h:19
AlCaHOCalibProducer::m_startTS
int m_startTS
Definition: AlCaHOCalibProducer.cc:218
AlCaHOCalibProducer::getFreeTrajectoryState
FreeTrajectoryState getFreeTrajectoryState(const reco::Track &tk, const MagneticField *field, int itag, bool dir)
Definition: AlCaHOCalibProducer.cc:1054
HLT_FULL_cff.primaryVertices
primaryVertices
Definition: HLT_FULL_cff.py:51939
Basic3DVector::phi
Geom::Phi< T > phi() const
Definition: extBasic3DVector.h:132
edm::InputTag
Definition: InputTag.h:15
reco::Track::outerY
double outerY() const
y coordinate of the outermost hit position
Definition: Track.h:112
Basic3DVector< float >
geometryCSVtoXML.xx
xx
Definition: geometryCSVtoXML.py:19
HOCalibVariables::ecal03
float ecal03
Definition: HOCalibVariables.h:52
TFileService::make
T * make(const Args &... args) const
make new ROOT object
Definition: TFileService.h:64
AlCaHOCalibProducer::netamx
const int netamx
Definition: AlCaHOCalibProducer.cc:195
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23
AlCaHOCalibProducer::rHOL1
const double rHOL1
Definition: AlCaHOCalibProducer.cc:198