CMS 3D CMS Logo

AlignmentMonitorMuonSystemMap1D.cc
Go to the documentation of this file.
1 /*
2  * Package: CommonAlignmentProducer
3  * Class : AlignmentMonitorMuonSystemMap1D
4  *
5  * Original Author: Jim Pivarski
6  * Created: Mon Nov 12 13:30:14 CST 2007
7  *
8  * $Id: AlignmentMonitorMuonSystemMap1D.cc,v 1.5 2011/04/15 23:09:37 khotilov Exp $
9  */
10 
14 
24 
25 #include "TH1F.h"
26 #include "TH2F.h"
27 
34 
36 public:
38  ~AlignmentMonitorMuonSystemMap1D() override = default;
39  static void fillDescriptions(edm::ConfigurationDescriptions &descriptions);
40 
41  void book() override;
42 
43  void event(const edm::Event &iEvent,
44  const edm::EventSetup &iSetup,
45  const ConstTrajTrackPairCollection &iTrajTracks) override;
47 
48  void afterAlignment() override;
49 
50 private:
51  // es token
57 
58  // parameters
60  const double m_minTrackPt;
61  const double m_maxTrackPt;
62  const double m_minTrackP;
63  const double m_maxTrackP;
64  const double m_maxDxy;
65  const int m_minTrackerHits;
66  const double m_maxTrackerRedChi2;
67  const bool m_allowTIDTEC;
69  const int m_minDT13Hits;
70  const int m_minDT2Hits;
71  const int m_minCSCHits;
72  const bool m_doDT;
73  const bool m_doCSC;
74  const bool m_useStubPosition;
75  const bool m_createNtuple;
78 
79  // counter
90 
91  // histogram helper
93  public:
96  int bins,
97  double low,
98  double high,
99  bool xy,
100  bool add_1d);
101 
102  void fill_x_1d(double residx, double chi2, int dof);
103  void fill_x(char charge, double abscissa, double residx, double chi2, int dof);
104  void fill_y(char charge, double abscissa, double residy, double chi2, int dof);
105  void fill_dxdz(char charge, double abscissa, double slopex, double chi2, int dof);
106  void fill_dydz(char charge, double abscissa, double slopey, double chi2, int dof);
107 
108  private:
110  int m_bins;
111  bool m_xy;
112  bool m_1d;
113  TH1F *m_x_1d;
115  };
116 
117  MuonSystemMapPlot1D *m_DTvsz_station[4][14]; // [station][sector]
118  MuonSystemMapPlot1D *m_CSCvsr_me[2][4][36]; // [endcap][station][chamber]
119  MuonSystemMapPlot1D *m_DTvsphi_station[4][5]; // [station][wheel]
120  MuonSystemMapPlot1D *m_CSCvsphi_me[2][4][3]; // [endcap][station][ring]
121 
122  std::vector<MuonSystemMapPlot1D *> m_plots;
123 
124  std::string num02d(int num);
125 
126  // optional debug ntuple
127  TTree *m_cscnt;
128 
129  struct MyCSCDetId {
130  void init(CSCDetId &id) {
131  e = id.endcap();
132  s = id.station();
133  r = id.ring();
134  c = id.chamber();
135  t = id.iChamberType();
136  }
137  Short_t e, s, r, c;
138  Short_t t; // type 1-10: ME1/a,1/b,1/2,1/3,2/1...4/2
139  };
141 
142  struct MyTrack {
143  Int_t q;
144  Float_t pt, pz;
145  };
147 
148  struct MyResidual {
149  Float_t res, slope, rho, phi, z;
150  };
152 
153  UInt_t m_run;
154 };
155 
158  : AlignmentMonitorBase(cfg, iC, "AlignmentMonitorMuonSystemMap1D"),
159  m_esTokenGBTGeom(iC.esConsumes()),
160  m_esTokenDetId(iC.esConsumes(edm::ESInputTag("", "MuonDetIdAssociator"))),
161  m_esTokenProp(iC.esConsumes(edm::ESInputTag("", "SteppingHelixPropagatorAny"))),
162  m_esTokenMF(iC.esConsumes()),
163  m_esTokenBuilder(iC.esConsumes(MuonResidualsFromTrack::builderESInputTag())),
164  m_muonCollectionTag(cfg.getParameter<edm::InputTag>("muonCollectionTag")),
165  m_minTrackPt(cfg.getParameter<double>("minTrackPt")),
166  m_maxTrackPt(cfg.getParameter<double>("maxTrackPt")),
167  m_minTrackP(cfg.getParameter<double>("minTrackP")),
168  m_maxTrackP(cfg.getParameter<double>("maxTrackP")),
169  m_maxDxy(cfg.getParameter<double>("maxDxy")),
170  m_minTrackerHits(cfg.getParameter<int>("minTrackerHits")),
171  m_maxTrackerRedChi2(cfg.getParameter<double>("maxTrackerRedChi2")),
172  m_allowTIDTEC(cfg.getParameter<bool>("allowTIDTEC")),
173  m_minNCrossedChambers(cfg.getParameter<int>("minNCrossedChambers")),
174  m_minDT13Hits(cfg.getParameter<int>("minDT13Hits")),
175  m_minDT2Hits(cfg.getParameter<int>("minDT2Hits")),
176  m_minCSCHits(cfg.getParameter<int>("minCSCHits")),
177  m_doDT(cfg.getParameter<bool>("doDT")),
178  m_doCSC(cfg.getParameter<bool>("doCSC")),
179  m_useStubPosition(cfg.getParameter<bool>("useStubPosition")),
180  m_createNtuple(cfg.getParameter<bool>("createNtuple")),
181  bsToken_(iC.consumes<reco::BeamSpot>(m_beamSpotTag)),
182  muonToken_(iC.consumes<reco::MuonCollection>(m_muonCollectionTag)) {
183  if (m_createNtuple) {
185  m_cscnt = fs->make<TTree>("mualNtuple", "mualNtuple");
186  m_cscnt->Branch("id", &m_id.e, "e/S:s:r:c:t");
187  m_cscnt->Branch("tr", &m_tr.q, "q/I:pt/F:pz");
188  m_cscnt->Branch("re", &m_re.res, "res/F:slope:rho:phi:z");
189  m_cscnt->Branch("run", &m_run, "run/i");
190  }
191 }
192 
195  desc.add<edm::InputTag>("muonCollectionTag", edm::InputTag(""));
196  desc.addUntracked<edm::InputTag>("beamSpotTag", edm::InputTag("offlineBeamSpot"));
197  desc.add<double>("minTrackPt", 100.);
198  desc.add<double>("maxTrackPt", 200.);
199  desc.add<double>("minTrackP", 0.);
200  desc.add<double>("maxTrackP", 99999.);
201  desc.add<double>("maxDxy", 100.);
202  desc.add<int>("minTrackerHits", 15);
203  desc.add<double>("maxTrackerRedChi2", 10.);
204  desc.add<bool>("allowTIDTEC", true);
205  desc.add<int>("minNCrossedChambers", 3);
206  desc.add<int>("minDT13Hits", 8);
207  desc.add<int>("minDT2Hits", 4);
208  desc.add<int>("minCSCHits", 6);
209  desc.add<bool>("doDT", true);
210  desc.add<bool>("doCSC", true);
211  desc.add<bool>("useStubPosition", false);
212  desc.add<bool>("createNtuple", false);
213  descriptions.add("alignmentMonitorMuonSystemMap1D", desc);
214 }
215 
217  assert(num >= 0 && num < 100);
218  char tmp[4];
219  sprintf(tmp, "%02d", num);
220  return std::string(tmp);
221 }
222 
224  std::string wheel_label[5] = {"A", "B", "C", "D", "E"};
225 
226  for (unsigned char station = 1; station <= 4; station++) {
227  std::string s_station = std::to_string(station);
228 
229  bool do_y = true;
230  if (station == 4)
231  do_y = false;
232 
233  // *** DT ***
234  if (m_doDT)
235  for (int sector = 1; sector <= 14; sector++) {
236  if ((station < 4 && sector <= 12) || station == 4) {
238  "DTvsz_st" + s_station + "sec" + num02d(sector), this, 60, -660., 660., do_y, false);
239  m_plots.push_back(m_DTvsz_station[station - 1][sector - 1]);
240  }
241  }
242 
243  if (m_doDT)
244  for (int wheel = -2; wheel <= 2; wheel++) {
246  "DTvsphi_st" + s_station + "wh" + wheel_label[wheel + 2], this, 180, -M_PI, M_PI, do_y, false);
247  m_plots.push_back(m_DTvsphi_station[station - 1][wheel + 2]);
248  }
249 
250  // *** CSC ***
251  if (m_doCSC)
252  for (int endcap = 1; endcap <= 2; endcap++) {
253  std::string s_endcap("m");
254  if (endcap == 1)
255  s_endcap = "p";
256 
257  for (int chamber = 1; chamber <= 36; chamber++) {
259  "CSCvsr_me" + s_endcap + s_station + "ch" + num02d(chamber), this, 60, 100., 700., false, false);
260  m_plots.push_back(m_CSCvsr_me[endcap - 1][station - 1][chamber - 1]);
261  }
262 
263  for (int ring = 1; ring <= 3; ring++) // the ME1/a (ring4) is not independent from ME1/b (ring1)
264  {
265  std::string s_ring = std::to_string(ring);
266  if ((station > 1 && ring <= 2) || station == 1) {
267  m_CSCvsphi_me[endcap - 1][station - 1][ring - 1] =
268  new MuonSystemMapPlot1D("CSCvsphi_me" + s_endcap + s_station + s_ring,
269  this,
270  180,
271  -M_PI / 180. * 5.,
272  M_PI * (2. - 5. / 180.),
273  false,
274  true);
275  m_plots.push_back(m_CSCvsphi_me[endcap - 1][station - 1][ring - 1]);
276  }
277  }
278  } // endcaps
279  } // stations
280 
281  m_counter_event = 0;
282  m_counter_track = 0;
284  m_counter_trackdxy = 0;
286  m_counter_dt = 0;
288  m_counter_2numhits = 0;
289  m_counter_csc = 0;
291 }
292 
294  const edm::EventSetup &iSetup,
295  const ConstTrajTrackPairCollection &trajtracks) {
296  m_counter_event++;
297 
299 
300  const GlobalTrackingGeometry *globalGeometry = &iSetup.getData(m_esTokenGBTGeom);
301  const DetIdAssociator *muonDetIdAssociator_ = &iSetup.getData(m_esTokenDetId);
302  const Propagator *prop = &iSetup.getData(m_esTokenProp);
304  auto builder = iSetup.getHandle(m_esTokenBuilder);
305 
306  if (m_muonCollectionTag.label().empty()) // use trajectories
307  {
308  for (ConstTrajTrackPairCollection::const_iterator trajtrack = trajtracks.begin(); trajtrack != trajtracks.end();
309  ++trajtrack) {
310  m_counter_track++;
311  const Trajectory *traj = (*trajtrack).first;
312  const reco::Track *track = (*trajtrack).second;
313 
314  if (m_minTrackPt < track->pt() && track->pt() < m_maxTrackPt && m_minTrackP < track->p() &&
315  track->p() < m_maxTrackP) {
317  if (fabs(track->dxy(beamSpot->position())) < m_maxDxy) {
319 
320  MuonResidualsFromTrack muonResidualsFromTrack(
321  builder, magneticField, globalGeometry, muonDetIdAssociator_, prop, traj, track, pNavigator(), 1000.);
322  processMuonResidualsFromTrack(muonResidualsFromTrack, iEvent);
323  }
324  } // end if track has acceptable momentum
325  } // end loop over tracks
326  } else {
328 
329  for (reco::MuonCollection::const_iterator muon = muons->begin(); muon != muons->end(); ++muon) {
330  if (!(muon->isTrackerMuon() && muon->innerTrack().isNonnull()))
331  continue;
332 
333  m_counter_track++;
334 
335  if (m_minTrackPt < muon->pt() && muon->pt() < m_maxTrackPt && m_minTrackP < muon->p() &&
336  muon->p() < m_maxTrackP) {
338  if (fabs(muon->innerTrack()->dxy(beamSpot->position())) < m_maxDxy) {
340 
341  MuonResidualsFromTrack muonResidualsFromTrack(globalGeometry, &(*muon), pNavigator(), 100.);
342  processMuonResidualsFromTrack(muonResidualsFromTrack, iEvent);
343  }
344  }
345  }
346  }
347 }
348 
350  const edm::Event &iEvent) {
351  if (mrft.trackerNumHits() < m_minTrackerHits)
352  return;
353  if (!m_allowTIDTEC && mrft.contains_TIDTEC())
354  return;
355  if (mrft.normalizedChi2() > m_maxTrackerRedChi2)
356  return;
357 
358  int nMuChambers = 0;
359  std::vector<DetId> chamberIds = mrft.chamberIds();
360  for (unsigned ch = 0; ch < chamberIds.size(); ch++)
361  if (chamberIds[ch].det() == DetId::Muon)
362  nMuChambers++;
363  if (nMuChambers < m_minNCrossedChambers)
364  return;
365 
366  char charge = (mrft.getTrack()->charge() > 0 ? 1 : -1);
367  // double qoverpt = track->charge() / track->pt();
368  // double qoverpz = track->charge() / track->pz();
369 
371 
372  for (std::vector<DetId>::const_iterator chamberId = chamberIds.begin(); chamberId != chamberIds.end(); ++chamberId) {
373  if (chamberId->det() != DetId::Muon)
374  continue;
375 
376  if (m_doDT && chamberId->subdetId() == MuonSubdetId::DT) {
379  DTChamberId id(chamberId->rawId());
380 
381  m_counter_dt++;
382 
383  if (id.station() < 4 && dt13 != nullptr && dt13->numHits() >= m_minDT13Hits && dt2 != nullptr &&
384  dt2->numHits() >= m_minDT2Hits && (dt2->chi2() / double(dt2->ndof())) < 2.0) {
386 
387  double residual = dt13->global_residual();
388  double resslope = dt13->global_resslope();
389  double chi2 = dt13->chi2();
390  int dof = dt13->ndof();
391 
392  align::GlobalPoint gpos;
393  if (m_useStubPosition)
394  gpos = dt13->global_stubpos();
395  else
396  gpos = dt13->global_trackpos();
397  double phi = atan2(gpos.y(), gpos.x());
398  double z = gpos.z();
399 
400  assert(1 <= id.sector() && id.sector() <= 14);
401 
402  m_DTvsz_station[id.station() - 1][id.sector() - 1]->fill_x(charge, z, residual, chi2, dof);
403  m_DTvsz_station[id.station() - 1][id.sector() - 1]->fill_dxdz(charge, z, resslope, chi2, dof);
404  m_DTvsphi_station[id.station() - 1][id.wheel() + 2]->fill_x(charge, phi, residual, chi2, dof);
405  m_DTvsphi_station[id.station() - 1][id.wheel() + 2]->fill_dxdz(charge, phi, resslope, chi2, dof);
406 
408 
409  residual = dt2->global_residual();
410  resslope = dt2->global_resslope();
411  chi2 = dt2->chi2();
412  dof = dt2->ndof();
413 
414  if (m_useStubPosition)
415  gpos = dt2->global_stubpos();
416  else
417  gpos = dt2->global_trackpos();
418  phi = atan2(gpos.y(), gpos.x());
419  z = gpos.z();
420 
421  assert(1 <= id.sector() && id.sector() <= 14);
422 
423  m_DTvsz_station[id.station() - 1][id.sector() - 1]->fill_y(charge, z, residual, chi2, dof);
424  m_DTvsz_station[id.station() - 1][id.sector() - 1]->fill_dydz(charge, z, resslope, chi2, dof);
425  m_DTvsphi_station[id.station() - 1][id.wheel() + 2]->fill_y(charge, phi, residual, chi2, dof);
426  m_DTvsphi_station[id.station() - 1][id.wheel() + 2]->fill_dydz(charge, phi, resslope, chi2, dof);
427  }
428 
429  if (id.station() == 4 && dt13 != nullptr && dt13->numHits() >= m_minDT13Hits) {
431 
432  double residual = dt13->global_residual();
433  double resslope = dt13->global_resslope();
434  double chi2 = dt13->chi2();
435  int dof = dt13->ndof();
436 
437  align::GlobalPoint gpos;
438  if (m_useStubPosition)
439  gpos = dt13->global_stubpos();
440  else
441  gpos = dt13->global_trackpos();
442  double phi = atan2(gpos.y(), gpos.x());
443  double z = gpos.z();
444 
445  assert(1 <= id.sector() && id.sector() <= 14);
446 
447  m_DTvsz_station[id.station() - 1][id.sector() - 1]->fill_x(charge, z, residual, chi2, dof);
448  m_DTvsz_station[id.station() - 1][id.sector() - 1]->fill_dxdz(charge, z, resslope, chi2, dof);
449  m_DTvsphi_station[id.station() - 1][id.wheel() + 2]->fill_x(charge, phi, residual, chi2, dof);
450  m_DTvsphi_station[id.station() - 1][id.wheel() + 2]->fill_dxdz(charge, phi, resslope, chi2, dof);
451  }
452  }
453 
454  else if (m_doCSC && chamberId->subdetId() == MuonSubdetId::CSC) {
456  CSCDetId id(chamberId->rawId());
457 
458  int ring = id.ring();
459  if (id.ring() == 4)
460  ring = 1; // combine ME1/a + ME1/b
461 
462  m_counter_csc++;
463 
464  if (csc != nullptr && csc->numHits() >= m_minCSCHits) {
466 
467  double residual = csc->global_residual();
468  double resslope = csc->global_resslope();
469  double chi2 = csc->chi2();
470  int dof = csc->ndof();
471 
472  align::GlobalPoint gpos;
473  if (m_useStubPosition)
474  gpos = csc->global_stubpos();
475  else
476  gpos = csc->global_trackpos();
477  double phi = atan2(gpos.y(), gpos.x());
478  // start phi from -5deg
479  if (phi < -M_PI / 180. * 5.)
480  phi += 2. * M_PI;
481  double R = sqrt(pow(gpos.x(), 2) + pow(gpos.y(), 2));
482 
483  int chamber = id.chamber() - 1;
484  if (id.station() > 1 && ring == 1)
485  chamber *= 2;
486 
487  assert(1 <= id.endcap() && id.endcap() <= 2 && 0 <= chamber && chamber <= 35);
488 
489  if (R > 0.)
490  m_CSCvsphi_me[id.endcap() - 1][id.station() - 1][ring - 1]->fill_x_1d(residual / R, chi2, dof);
491 
492  m_CSCvsr_me[id.endcap() - 1][id.station() - 1][chamber]->fill_x(charge, R, residual, chi2, dof);
493  m_CSCvsr_me[id.endcap() - 1][id.station() - 1][chamber]->fill_dxdz(charge, R, resslope, chi2, dof);
494  m_CSCvsphi_me[id.endcap() - 1][id.station() - 1][ring - 1]->fill_x(charge, phi, residual, chi2, dof);
495  m_CSCvsphi_me[id.endcap() - 1][id.station() - 1][ring - 1]->fill_dxdz(charge, phi, resslope, chi2, dof);
496 
497  if (m_createNtuple && chi2 > 0.) { // && TMath::Prob(chi2, dof) < 0.95)
498  m_id.init(id);
499  m_tr.q = charge;
500  m_tr.pt = mrft.getTrack()->pt();
501  m_tr.pz = mrft.getTrack()->pz();
502  m_re.res = residual;
503  m_re.slope = resslope;
504  m_re.rho = R;
505  m_re.phi = phi;
506  m_re.z = gpos.z();
507  m_run = iEvent.id().run();
508  m_cscnt->Fill();
509  }
510  }
511  }
512 
513  //else { assert(false); }
514  } // end loop over chambers
515 }
516 
518  edm::LogVerbatim("AlignmentMuonSystemMap") << "AlignmentMonitorMuonSystemMap1D counters:";
519  edm::LogVerbatim("AlignmentMuonSystemMap") << " monitor m_counter_event = " << m_counter_event;
520  edm::LogVerbatim("AlignmentMuonSystemMap") << " monitor m_counter_track = " << m_counter_track;
521  edm::LogVerbatim("AlignmentMuonSystemMap") << " monitor m_counter_trackppt = " << m_counter_trackmoment;
522  edm::LogVerbatim("AlignmentMuonSystemMap") << " monitor m_counter_trackdxy = " << m_counter_trackdxy;
523  edm::LogVerbatim("AlignmentMuonSystemMap") << " monitor m_counter_trackokay = " << m_counter_trackokay;
524  edm::LogVerbatim("AlignmentMuonSystemMap") << " monitor m_counter_dt = " << m_counter_dt;
525  edm::LogVerbatim("AlignmentMuonSystemMap") << " monitor m_counter_13numhits = " << m_counter_13numhits;
526  edm::LogVerbatim("AlignmentMuonSystemMap") << " monitor m_counter_2numhits = " << m_counter_2numhits;
527  edm::LogVerbatim("AlignmentMuonSystemMap") << " monitor m_counter_csc = " << m_counter_csc;
528  edm::LogVerbatim("AlignmentMuonSystemMap") << " monitor m_counter_cscnumhits = " << m_counter_cscnumhits;
529 }
530 
532  std::string name, AlignmentMonitorMuonSystemMap1D *module, int bins, double low, double high, bool xy, bool add_1d)
533  : m_name(name), m_bins(bins), m_xy(xy), m_1d(add_1d) {
534  m_x_2d = m_y_2d = m_dxdz_2d = m_dydz_2d = nullptr;
535  std::stringstream name_x_2d, name_y_2d, name_dxdz_2d, name_dydz_2d;
536  name_x_2d << m_name << "_x_2d";
537  name_y_2d << m_name << "_y_2d";
538  name_dxdz_2d << m_name << "_dxdz_2d";
539  name_dydz_2d << m_name << "_dydz_2d";
540 
541  const int nbins = 200;
542  const double window = 100.;
543 
544  m_x_2d = module->book2D("/iterN/", name_x_2d.str(), "", m_bins, low, high, nbins, -window, window);
545  if (m_xy)
546  m_y_2d = module->book2D("/iterN/", name_y_2d.str(), "", m_bins, low, high, nbins, -window, window);
547  m_dxdz_2d = module->book2D("/iterN/", name_dxdz_2d.str(), "", m_bins, low, high, nbins, -window, window);
548  if (m_xy)
549  m_dydz_2d = module->book2D("/iterN/", name_dydz_2d.str(), "", m_bins, low, high, nbins, -window, window);
550 
551  m_x_1d = nullptr;
552  if (m_1d) {
553  std::stringstream name_x_1d; //, name_y_1d, name_dxdz_1d, name_dydz_1d;
554  name_x_1d << m_name << "_x_1d";
555  m_x_1d = module->book1D("/iterN/", name_x_1d.str(), "", nbins, -window, window);
556  }
557 }
558 
560  if (m_1d && chi2 > 0.) {
561  // assume that residx was in radians
562  double residual = residx * 1000.;
563  m_x_1d->Fill(residual);
564  }
565 }
566 
568  char charge, double abscissa, double residx, double chi2, int dof) {
569  if (chi2 > 0.) {
570  double residual = residx * 10.;
571  //double weight = dof / chi2;
572  m_x_2d->Fill(abscissa, residual);
573  }
574 }
575 
577  char charge, double abscissa, double residy, double chi2, int dof) {
578  if (m_xy && chi2 > 0.) {
579  double residual = residy * 10.;
580  //double weight = dof / chi2;
581  m_y_2d->Fill(abscissa, residual);
582  }
583 }
584 
586  char charge, double abscissa, double slopex, double chi2, int dof) {
587  if (chi2 > 0.) {
588  double residual = slopex * 1000.;
589  //double weight = dof / chi2;
590  m_dxdz_2d->Fill(abscissa, residual);
591  }
592 }
593 
595  char charge, double abscissa, double slopey, double chi2, int dof) {
596  if (m_xy && chi2 > 0.) {
597  double residual = slopey * 1000.;
598  //double weight = dof / chi2;
599  m_dydz_2d->Fill(abscissa, residual);
600  }
601 }
602 
Log< level::Info, true > LogVerbatim
AlignableNavigator * pNavigator()
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
void fill_x(char charge, double abscissa, double residx, double chi2, int dof)
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
void fill_dydz(char charge, double abscissa, double slopey, double chi2, int dof)
void fill_y(char charge, double abscissa, double residy, double chi2, int dof)
const edm::ESGetToken< GlobalTrackingGeometry, GlobalTrackingGeometryRecord > m_esTokenGBTGeom
T z() const
Definition: PV3DBase.h:61
align::GlobalPoint global_trackpos()
AlignmentMonitorMuonSystemMap1D(const edm::ParameterSet &cfg, edm::ConsumesCollector iC)
std::string to_string(const V &value)
Definition: OMSAccess.h:71
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
MuonSystemMapPlot1D * m_CSCvsr_me[2][4][36]
std::string const & label() const
Definition: InputTag.h:36
MuonSystemMapPlot1D * m_CSCvsphi_me[2][4][3]
const edm::ESGetToken< Propagator, TrackingComponentsRecord > m_esTokenProp
assert(be >=bs)
~AlignmentMonitorMuonSystemMap1D() override=default
std::vector< Muon > MuonCollection
collection of Muon objects
Definition: MuonFwd.h:9
const edm::EDGetTokenT< reco::BeamSpot > bsToken_
void book() override
Book or retrieve histograms; MUST be reimplemented.
double pt() const
track transverse momentum
Definition: TrackBase.h:637
void event(const edm::Event &iEvent, const edm::EventSetup &iSetup, const ConstTrajTrackPairCollection &iTrajTracks) override
Called for each event (by "run()"): may be reimplemented.
T x() const
Definition: PV3DBase.h:59
T y() const
Definition: PV3DBase.h:60
int charge() const
track electric charge
Definition: TrackBase.h:596
int iEvent
Definition: GenABIO.cc:224
T sqrt(T t)
Definition: SSEVec.h:19
const reco::Track * getTrack()
def window(xmin, xmax, ymin, ymax, x=0, y=0, width=100, height=100, xlogbase=None, ylogbase=None, minusInfinity=-1000, flipx=False, flipy=True)
Definition: svgfig.py:643
std::vector< ConstTrajTrackPair > ConstTrajTrackPairCollection
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:130
Definition: L1Track.h:19
#define M_PI
void fill_dxdz(char charge, double abscissa, double slopex, double chi2, int dof)
std::vector< MuonSystemMapPlot1D * > m_plots
double global_residual() const
const MuonResidualsFromTrack::BuilderToken m_esTokenBuilder
const std::vector< DetId > chamberIds() const
double pz() const
z coordinate of momentum vector
Definition: TrackBase.h:646
void add(std::string const &label, ParameterSetDescription const &psetDescription)
align::GlobalPoint global_stubpos()
fixed size matrix
HLT enums.
const edm::EDGetTokenT< reco::MuonCollection > muonToken_
MuonSystemMapPlot1D(std::string name, AlignmentMonitorMuonSystemMap1D *module, int bins, double low, double high, bool xy, bool add_1d)
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > m_esTokenMF
#define DEFINE_EDM_PLUGIN(factory, type, name)
void processMuonResidualsFromTrack(MuonResidualsFromTrack &mrft, const edm::Event &iEvent)
static constexpr int DT
Definition: MuonSubdetId.h:11
tmp
align.sh
Definition: createJobs.py:716
static constexpr int CSC
Definition: MuonSubdetId.h:12
const edm::ESGetToken< DetIdAssociator, DetIdAssociatorRecord > m_esTokenDetId
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
MuonChamberResidual * chamberResidual(DetId chamberId, int type)
double global_resslope() const