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 
23 
24 #include "TH1F.h"
25 #include "TH2F.h"
26 
33 
35 public:
38 
39  void book() override;
40 
41  void event(const edm::Event &iEvent,
42  const edm::EventSetup &iSetup,
43  const ConstTrajTrackPairCollection &iTrajTracks) override;
45 
46  void afterAlignment() override;
47 
48 private:
49  // es token
54 
55  // parameters
57  double m_minTrackPt;
58  double m_maxTrackPt;
59  double m_minTrackP;
60  double m_maxTrackP;
61  double m_maxDxy;
69  bool m_doDT;
70  bool m_doCSC;
73 
74  // counter
85 
86  // histogram helper
88  public:
91  int bins,
92  double low,
93  double high,
94  bool xy,
95  bool add_1d);
96 
97  void fill_x_1d(double residx, double chi2, int dof);
98  void fill_x(char charge, double abscissa, double residx, double chi2, int dof);
99  void fill_y(char charge, double abscissa, double residy, double chi2, int dof);
100  void fill_dxdz(char charge, double abscissa, double slopex, double chi2, int dof);
101  void fill_dydz(char charge, double abscissa, double slopey, double chi2, int dof);
102 
103  private:
105  int m_bins;
106  bool m_xy;
107  bool m_1d;
108  TH1F *m_x_1d;
110  };
111 
112  MuonSystemMapPlot1D *m_DTvsz_station[4][14]; // [station][sector]
113  MuonSystemMapPlot1D *m_CSCvsr_me[2][4][36]; // [endcap][station][chamber]
114  MuonSystemMapPlot1D *m_DTvsphi_station[4][5]; // [station][wheel]
115  MuonSystemMapPlot1D *m_CSCvsphi_me[2][4][3]; // [endcap][station][ring]
116 
117  std::vector<MuonSystemMapPlot1D *> m_plots;
118 
119  std::string num02d(int num);
120 
121  // optional debug ntuple
122  TTree *m_cscnt;
123 
124  struct MyCSCDetId {
125  void init(CSCDetId &id) {
126  e = id.endcap();
127  s = id.station();
128  r = id.ring();
129  c = id.chamber();
130  t = id.iChamberType();
131  }
132  Short_t e, s, r, c;
133  Short_t t; // type 1-10: ME1/a,1/b,1/2,1/3,2/1...4/2
134  };
136 
137  struct MyTrack {
138  Int_t q;
139  Float_t pt, pz;
140  };
142 
143  struct MyResidual {
144  Float_t res, slope, rho, phi, z;
145  };
147 
148  UInt_t m_run;
149 };
150 
153  : AlignmentMonitorBase(cfg, iC, "AlignmentMonitorMuonSystemMap1D"),
154  m_esTokenGBTGeom(iC.esConsumes()),
155  m_esTokenDetId(iC.esConsumes(edm::ESInputTag("", "MuonDetIdAssociator"))),
156  m_esTokenProp(iC.esConsumes(edm::ESInputTag("", "SteppingHelixPropagatorAny"))),
157  m_esTokenMF(iC.esConsumes()),
158  m_muonCollectionTag(cfg.getParameter<edm::InputTag>("muonCollectionTag")),
159  m_minTrackPt(cfg.getParameter<double>("minTrackPt")),
160  m_maxTrackPt(cfg.getParameter<double>("maxTrackPt")),
161  m_minTrackP(cfg.getParameter<double>("minTrackP")),
162  m_maxTrackP(cfg.getParameter<double>("maxTrackP")),
163  m_maxDxy(cfg.getParameter<double>("maxDxy")),
164  m_minTrackerHits(cfg.getParameter<int>("minTrackerHits")),
165  m_maxTrackerRedChi2(cfg.getParameter<double>("maxTrackerRedChi2")),
166  m_allowTIDTEC(cfg.getParameter<bool>("allowTIDTEC")),
167  m_minNCrossedChambers(cfg.getParameter<int>("minNCrossedChambers")),
168  m_minDT13Hits(cfg.getParameter<int>("minDT13Hits")),
169  m_minDT2Hits(cfg.getParameter<int>("minDT2Hits")),
170  m_minCSCHits(cfg.getParameter<int>("minCSCHits")),
171  m_doDT(cfg.getParameter<bool>("doDT")),
172  m_doCSC(cfg.getParameter<bool>("doCSC")),
173  m_useStubPosition(cfg.getParameter<bool>("useStubPosition")),
174  m_createNtuple(cfg.getParameter<bool>("createNtuple")) {
175  if (m_createNtuple) {
177  m_cscnt = fs->make<TTree>("mualNtuple", "mualNtuple");
178  m_cscnt->Branch("id", &m_id.e, "e/S:s:r:c:t");
179  m_cscnt->Branch("tr", &m_tr.q, "q/I:pt/F:pz");
180  m_cscnt->Branch("re", &m_re.res, "res/F:slope:rho:phi:z");
181  m_cscnt->Branch("run", &m_run, "run/i");
182  }
183 }
184 
186  assert(num >= 0 && num < 100);
187  char tmp[4];
188  sprintf(tmp, "%02d", num);
189  return std::string(tmp);
190 }
191 
193  std::string wheel_label[5] = {"A", "B", "C", "D", "E"};
194 
195  for (unsigned char station = 1; station <= 4; station++) {
196  std::string s_station = std::to_string(station);
197 
198  bool do_y = true;
199  if (station == 4)
200  do_y = false;
201 
202  // *** DT ***
203  if (m_doDT)
204  for (int sector = 1; sector <= 14; sector++) {
205  if ((station < 4 && sector <= 12) || station == 4) {
206  m_DTvsz_station[station - 1][sector - 1] = new MuonSystemMapPlot1D(
207  "DTvsz_st" + s_station + "sec" + num02d(sector), this, 60, -660., 660., do_y, false);
208  m_plots.push_back(m_DTvsz_station[station - 1][sector - 1]);
209  }
210  }
211 
212  if (m_doDT)
213  for (int wheel = -2; wheel <= 2; wheel++) {
215  "DTvsphi_st" + s_station + "wh" + wheel_label[wheel + 2], this, 180, -M_PI, M_PI, do_y, false);
216  m_plots.push_back(m_DTvsphi_station[station - 1][wheel + 2]);
217  }
218 
219  // *** CSC ***
220  if (m_doCSC)
221  for (int endcap = 1; endcap <= 2; endcap++) {
222  std::string s_endcap("m");
223  if (endcap == 1)
224  s_endcap = "p";
225 
226  for (int chamber = 1; chamber <= 36; chamber++) {
228  "CSCvsr_me" + s_endcap + s_station + "ch" + num02d(chamber), this, 60, 100., 700., false, false);
229  m_plots.push_back(m_CSCvsr_me[endcap - 1][station - 1][chamber - 1]);
230  }
231 
232  for (int ring = 1; ring <= 3; ring++) // the ME1/a (ring4) is not independent from ME1/b (ring1)
233  {
234  std::string s_ring = std::to_string(ring);
235  if ((station > 1 && ring <= 2) || station == 1) {
236  m_CSCvsphi_me[endcap - 1][station - 1][ring - 1] =
237  new MuonSystemMapPlot1D("CSCvsphi_me" + s_endcap + s_station + s_ring,
238  this,
239  180,
240  -M_PI / 180. * 5.,
241  M_PI * (2. - 5. / 180.),
242  false,
243  true);
244  m_plots.push_back(m_CSCvsphi_me[endcap - 1][station - 1][ring - 1]);
245  }
246  }
247  } // endcaps
248  } // stations
249 
250  m_counter_event = 0;
251  m_counter_track = 0;
253  m_counter_trackdxy = 0;
255  m_counter_dt = 0;
257  m_counter_2numhits = 0;
258  m_counter_csc = 0;
260 }
261 
263  const edm::EventSetup &iSetup,
264  const ConstTrajTrackPairCollection &trajtracks) {
265  m_counter_event++;
266 
268  iEvent.getByLabel(m_beamSpotTag, beamSpot);
269 
270  const GlobalTrackingGeometry *globalGeometry = &iSetup.getData(m_esTokenGBTGeom);
271  const DetIdAssociator *muonDetIdAssociator_ = &iSetup.getData(m_esTokenDetId);
272  const Propagator *prop = &iSetup.getData(m_esTokenProp);
274 
275  if (m_muonCollectionTag.label().empty()) // use trajectories
276  {
277  for (ConstTrajTrackPairCollection::const_iterator trajtrack = trajtracks.begin(); trajtrack != trajtracks.end();
278  ++trajtrack) {
279  m_counter_track++;
280  const Trajectory *traj = (*trajtrack).first;
281  const reco::Track *track = (*trajtrack).second;
282 
283  if (m_minTrackPt < track->pt() && track->pt() < m_maxTrackPt && m_minTrackP < track->p() &&
284  track->p() < m_maxTrackP) {
286  if (fabs(track->dxy(beamSpot->position())) < m_maxDxy) {
288 
289  MuonResidualsFromTrack muonResidualsFromTrack(
290  iSetup, magneticField, globalGeometry, muonDetIdAssociator_, prop, traj, track, pNavigator(), 1000.);
291  processMuonResidualsFromTrack(muonResidualsFromTrack, iEvent);
292  }
293  } // end if track has acceptable momentum
294  } // end loop over tracks
295  } else {
297  iEvent.getByLabel(m_muonCollectionTag, muons);
298 
299  for (reco::MuonCollection::const_iterator muon = muons->begin(); muon != muons->end(); ++muon) {
300  if (!(muon->isTrackerMuon() && muon->innerTrack().isNonnull()))
301  continue;
302 
303  m_counter_track++;
304 
305  if (m_minTrackPt < muon->pt() && muon->pt() < m_maxTrackPt && m_minTrackP < muon->p() &&
306  muon->p() < m_maxTrackP) {
308  if (fabs(muon->innerTrack()->dxy(beamSpot->position())) < m_maxDxy) {
310 
311  MuonResidualsFromTrack muonResidualsFromTrack(globalGeometry, &(*muon), pNavigator(), 100.);
312  processMuonResidualsFromTrack(muonResidualsFromTrack, iEvent);
313  }
314  }
315  }
316  }
317 }
318 
320  const edm::Event &iEvent) {
321  if (mrft.trackerNumHits() < m_minTrackerHits)
322  return;
323  if (!m_allowTIDTEC && mrft.contains_TIDTEC())
324  return;
325  if (mrft.normalizedChi2() > m_maxTrackerRedChi2)
326  return;
327 
328  int nMuChambers = 0;
329  std::vector<DetId> chamberIds = mrft.chamberIds();
330  for (unsigned ch = 0; ch < chamberIds.size(); ch++)
331  if (chamberIds[ch].det() == DetId::Muon)
332  nMuChambers++;
333  if (nMuChambers < m_minNCrossedChambers)
334  return;
335 
336  char charge = (mrft.getTrack()->charge() > 0 ? 1 : -1);
337  // double qoverpt = track->charge() / track->pt();
338  // double qoverpz = track->charge() / track->pz();
339 
341 
342  for (std::vector<DetId>::const_iterator chamberId = chamberIds.begin(); chamberId != chamberIds.end(); ++chamberId) {
343  if (chamberId->det() != DetId::Muon)
344  continue;
345 
346  if (m_doDT && chamberId->subdetId() == MuonSubdetId::DT) {
349  DTChamberId id(chamberId->rawId());
350 
351  m_counter_dt++;
352 
353  if (id.station() < 4 && dt13 != nullptr && dt13->numHits() >= m_minDT13Hits && dt2 != nullptr &&
354  dt2->numHits() >= m_minDT2Hits && (dt2->chi2() / double(dt2->ndof())) < 2.0) {
356 
357  double residual = dt13->global_residual();
358  double resslope = dt13->global_resslope();
359  double chi2 = dt13->chi2();
360  int dof = dt13->ndof();
361 
362  align::GlobalPoint gpos;
363  if (m_useStubPosition)
364  gpos = dt13->global_stubpos();
365  else
366  gpos = dt13->global_trackpos();
367  double phi = atan2(gpos.y(), gpos.x());
368  double z = gpos.z();
369 
370  assert(1 <= id.sector() && id.sector() <= 14);
371 
372  m_DTvsz_station[id.station() - 1][id.sector() - 1]->fill_x(charge, z, residual, chi2, dof);
373  m_DTvsz_station[id.station() - 1][id.sector() - 1]->fill_dxdz(charge, z, resslope, chi2, dof);
374  m_DTvsphi_station[id.station() - 1][id.wheel() + 2]->fill_x(charge, phi, residual, chi2, dof);
375  m_DTvsphi_station[id.station() - 1][id.wheel() + 2]->fill_dxdz(charge, phi, resslope, chi2, dof);
376 
378 
379  residual = dt2->global_residual();
380  resslope = dt2->global_resslope();
381  chi2 = dt2->chi2();
382  dof = dt2->ndof();
383 
384  if (m_useStubPosition)
385  gpos = dt2->global_stubpos();
386  else
387  gpos = dt2->global_trackpos();
388  phi = atan2(gpos.y(), gpos.x());
389  z = gpos.z();
390 
391  assert(1 <= id.sector() && id.sector() <= 14);
392 
393  m_DTvsz_station[id.station() - 1][id.sector() - 1]->fill_y(charge, z, residual, chi2, dof);
394  m_DTvsz_station[id.station() - 1][id.sector() - 1]->fill_dydz(charge, z, resslope, chi2, dof);
395  m_DTvsphi_station[id.station() - 1][id.wheel() + 2]->fill_y(charge, phi, residual, chi2, dof);
396  m_DTvsphi_station[id.station() - 1][id.wheel() + 2]->fill_dydz(charge, phi, resslope, chi2, dof);
397  }
398 
399  if (id.station() == 4 && dt13 != nullptr && dt13->numHits() >= m_minDT13Hits) {
401 
402  double residual = dt13->global_residual();
403  double resslope = dt13->global_resslope();
404  double chi2 = dt13->chi2();
405  int dof = dt13->ndof();
406 
407  align::GlobalPoint gpos;
408  if (m_useStubPosition)
409  gpos = dt13->global_stubpos();
410  else
411  gpos = dt13->global_trackpos();
412  double phi = atan2(gpos.y(), gpos.x());
413  double z = gpos.z();
414 
415  assert(1 <= id.sector() && id.sector() <= 14);
416 
417  m_DTvsz_station[id.station() - 1][id.sector() - 1]->fill_x(charge, z, residual, chi2, dof);
418  m_DTvsz_station[id.station() - 1][id.sector() - 1]->fill_dxdz(charge, z, resslope, chi2, dof);
419  m_DTvsphi_station[id.station() - 1][id.wheel() + 2]->fill_x(charge, phi, residual, chi2, dof);
420  m_DTvsphi_station[id.station() - 1][id.wheel() + 2]->fill_dxdz(charge, phi, resslope, chi2, dof);
421  }
422  }
423 
424  else if (m_doCSC && chamberId->subdetId() == MuonSubdetId::CSC) {
426  CSCDetId id(chamberId->rawId());
427 
428  int ring = id.ring();
429  if (id.ring() == 4)
430  ring = 1; // combine ME1/a + ME1/b
431 
432  m_counter_csc++;
433 
434  if (csc != nullptr && csc->numHits() >= m_minCSCHits) {
436 
437  double residual = csc->global_residual();
438  double resslope = csc->global_resslope();
439  double chi2 = csc->chi2();
440  int dof = csc->ndof();
441 
442  align::GlobalPoint gpos;
443  if (m_useStubPosition)
444  gpos = csc->global_stubpos();
445  else
446  gpos = csc->global_trackpos();
447  double phi = atan2(gpos.y(), gpos.x());
448  // start phi from -5deg
449  if (phi < -M_PI / 180. * 5.)
450  phi += 2. * M_PI;
451  double R = sqrt(pow(gpos.x(), 2) + pow(gpos.y(), 2));
452 
453  int chamber = id.chamber() - 1;
454  if (id.station() > 1 && ring == 1)
455  chamber *= 2;
456 
457  assert(1 <= id.endcap() && id.endcap() <= 2 && 0 <= chamber && chamber <= 35);
458 
459  if (R > 0.)
460  m_CSCvsphi_me[id.endcap() - 1][id.station() - 1][ring - 1]->fill_x_1d(residual / R, chi2, dof);
461 
462  m_CSCvsr_me[id.endcap() - 1][id.station() - 1][chamber]->fill_x(charge, R, residual, chi2, dof);
463  m_CSCvsr_me[id.endcap() - 1][id.station() - 1][chamber]->fill_dxdz(charge, R, resslope, chi2, dof);
464  m_CSCvsphi_me[id.endcap() - 1][id.station() - 1][ring - 1]->fill_x(charge, phi, residual, chi2, dof);
465  m_CSCvsphi_me[id.endcap() - 1][id.station() - 1][ring - 1]->fill_dxdz(charge, phi, resslope, chi2, dof);
466 
467  if (m_createNtuple && chi2 > 0.) // && TMath::Prob(chi2, dof) < 0.95)
468  {
469  m_id.init(id);
470  m_tr.q = charge;
471  m_tr.pt = mrft.getTrack()->pt();
472  m_tr.pz = mrft.getTrack()->pz();
473  m_re.res = residual;
474  m_re.slope = resslope;
475  m_re.rho = R;
476  m_re.phi = phi;
477  m_re.z = gpos.z();
478  m_run = iEvent.id().run();
479  m_cscnt->Fill();
480  }
481  }
482  }
483 
484  //else { assert(false); }
485  } // end loop over chambers
486 }
487 
489  std::cout << "AlignmentMonitorMuonSystemMap1D counters:" << std::endl;
490  std::cout << " monitor m_counter_event = " << m_counter_event << std::endl;
491  std::cout << " monitor m_counter_track = " << m_counter_track << std::endl;
492  std::cout << " monitor m_counter_trackppt = " << m_counter_trackmoment << std::endl;
493  std::cout << " monitor m_counter_trackdxy = " << m_counter_trackdxy << std::endl;
494  std::cout << " monitor m_counter_trackokay = " << m_counter_trackokay << std::endl;
495  std::cout << " monitor m_counter_dt = " << m_counter_dt << std::endl;
496  std::cout << " monitor m_counter_13numhits = " << m_counter_13numhits << std::endl;
497  std::cout << " monitor m_counter_2numhits = " << m_counter_2numhits << std::endl;
498  std::cout << " monitor m_counter_csc = " << m_counter_csc << std::endl;
499  std::cout << " monitor m_counter_cscnumhits = " << m_counter_cscnumhits << std::endl;
500 }
501 
503  std::string name, AlignmentMonitorMuonSystemMap1D *module, int bins, double low, double high, bool xy, bool add_1d)
504  : m_name(name), m_bins(bins), m_xy(xy), m_1d(add_1d) {
505  m_x_2d = m_y_2d = m_dxdz_2d = m_dydz_2d = nullptr;
506  std::stringstream name_x_2d, name_y_2d, name_dxdz_2d, name_dydz_2d;
507  name_x_2d << m_name << "_x_2d";
508  name_y_2d << m_name << "_y_2d";
509  name_dxdz_2d << m_name << "_dxdz_2d";
510  name_dydz_2d << m_name << "_dydz_2d";
511 
512  const int nbins = 200;
513  const double window = 100.;
514 
515  m_x_2d = module->book2D("/iterN/", name_x_2d.str(), "", m_bins, low, high, nbins, -window, window);
516  if (m_xy)
517  m_y_2d = module->book2D("/iterN/", name_y_2d.str(), "", m_bins, low, high, nbins, -window, window);
518  m_dxdz_2d = module->book2D("/iterN/", name_dxdz_2d.str(), "", m_bins, low, high, nbins, -window, window);
519  if (m_xy)
520  m_dydz_2d = module->book2D("/iterN/", name_dydz_2d.str(), "", m_bins, low, high, nbins, -window, window);
521 
522  m_x_1d = nullptr;
523  if (m_1d) {
524  std::stringstream name_x_1d; //, name_y_1d, name_dxdz_1d, name_dydz_1d;
525  name_x_1d << m_name << "_x_1d";
526  m_x_1d = module->book1D("/iterN/", name_x_1d.str(), "", nbins, -window, window);
527  }
528 }
529 
531  if (m_1d && chi2 > 0.) {
532  // assume that residx was in radians
533  double residual = residx * 1000.;
534  m_x_1d->Fill(residual);
535  }
536 }
537 
539  char charge, double abscissa, double residx, double chi2, int dof) {
540  if (chi2 > 0.) {
541  double residual = residx * 10.;
542  //double weight = dof / chi2;
543  m_x_2d->Fill(abscissa, residual);
544  }
545 }
546 
548  char charge, double abscissa, double residy, double chi2, int dof) {
549  if (m_xy && chi2 > 0.) {
550  double residual = residy * 10.;
551  //double weight = dof / chi2;
552  m_y_2d->Fill(abscissa, residual);
553  }
554 }
555 
557  char charge, double abscissa, double slopex, double chi2, int dof) {
558  if (chi2 > 0.) {
559  double residual = slopex * 1000.;
560  //double weight = dof / chi2;
561  m_dxdz_2d->Fill(abscissa, residual);
562  }
563 }
564 
566  char charge, double abscissa, double slopey, double chi2, int dof) {
567  if (m_xy && chi2 > 0.) {
568  double residual = slopey * 1000.;
569  //double weight = dof / chi2;
570  m_dydz_2d->Fill(abscissa, residual);
571  }
572 }
573 
AlignmentMonitorMuonSystemMap1D::m_minCSCHits
int m_minCSCHits
Definition: AlignmentMonitorMuonSystemMap1D.cc:68
Propagator.h
AlignmentMonitorMuonSystemMap1D::m_plots
std::vector< MuonSystemMapPlot1D * > m_plots
Definition: AlignmentMonitorMuonSystemMap1D.cc:117
PDWG_BPHSkim_cff.muons
muons
Definition: PDWG_BPHSkim_cff.py:47
AlignmentMonitorMuonSystemMap1D::m_minNCrossedChambers
int m_minNCrossedChambers
Definition: AlignmentMonitorMuonSystemMap1D.cc:65
MuonSubdetId::CSC
static constexpr int CSC
Definition: MuonSubdetId.h:12
AlignmentMonitorMuonSystemMap1D::m_counter_2numhits
long m_counter_2numhits
Definition: AlignmentMonitorMuonSystemMap1D.cc:82
electrons_cff.bool
bool
Definition: electrons_cff.py:366
AlignmentMonitorMuonSystemMap1D::m_counter_trackdxy
long m_counter_trackdxy
Definition: AlignmentMonitorMuonSystemMap1D.cc:78
DOFs::dof
dof
Definition: AlignPCLThresholdsWriter.cc:37
pwdgSkimBPark_cfi.beamSpot
beamSpot
Definition: pwdgSkimBPark_cfi.py:5
AlignmentMonitorMuonSystemMap1D::m_minDT2Hits
int m_minDT2Hits
Definition: AlignmentMonitorMuonSystemMap1D.cc:67
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11724
MessageLogger.h
AlignmentMonitorMuonSystemMap1D::m_esTokenProp
const edm::ESGetToken< Propagator, TrackingComponentsRecord > m_esTokenProp
Definition: AlignmentMonitorMuonSystemMap1D.cc:52
ESInputTag
AlignmentMonitorMuonSystemMap1D::MyTrack::pt
Float_t pt
Definition: AlignmentMonitorMuonSystemMap1D.cc:139
AlignmentMonitorMuonSystemMap1D::MyResidual
Definition: AlignmentMonitorMuonSystemMap1D.cc:143
muon
Definition: MuonCocktails.h:17
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
AlignmentMonitorMuonSystemMap1D::m_counter_13numhits
long m_counter_13numhits
Definition: AlignmentMonitorMuonSystemMap1D.cc:81
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
AlignmentMonitorMuonSystemMap1D::m_minTrackerHits
int m_minTrackerHits
Definition: AlignmentMonitorMuonSystemMap1D.cc:62
AlignmentMonitorMuonSystemMap1D::MuonSystemMapPlot1D::m_dydz_2d
TH2F * m_dydz_2d
Definition: AlignmentMonitorMuonSystemMap1D.cc:109
relativeConstraints.station
station
Definition: relativeConstraints.py:67
edm
HLT enums.
Definition: AlignableModifier.h:19
AlignmentMonitorMuonSystemMap1D::m_minTrackPt
double m_minTrackPt
Definition: AlignmentMonitorMuonSystemMap1D.cc:57
AlignmentMonitorMuonSystemMap1D::MuonSystemMapPlot1D::MuonSystemMapPlot1D
MuonSystemMapPlot1D(std::string name, AlignmentMonitorMuonSystemMap1D *module, int bins, double low, double high, bool xy, bool add_1d)
Definition: AlignmentMonitorMuonSystemMap1D.cc:502
AlignmentMonitorMuonSystemMap1D::m_counter_cscnumhits
long m_counter_cscnumhits
Definition: AlignmentMonitorMuonSystemMap1D.cc:84
gather_cfg.cout
cout
Definition: gather_cfg.py:144
AlignmentMonitorMuonSystemMap1D::m_id
MyCSCDetId m_id
Definition: AlignmentMonitorMuonSystemMap1D.cc:135
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89301
MuonResidualsFromTrack::chamberResidual
MuonChamberResidual * chamberResidual(DetId chamberId, int type)
Definition: MuonResidualsFromTrack.cc:735
AlignmentMonitorMuonSystemMap1D::m_maxTrackP
double m_maxTrackP
Definition: AlignmentMonitorMuonSystemMap1D.cc:60
AlignmentMonitorMuonSystemMap1D::MuonSystemMapPlot1D::m_xy
bool m_xy
Definition: AlignmentMonitorMuonSystemMap1D.cc:106
AlignmentMonitorMuonSystemMap1D::afterAlignment
void afterAlignment() override
Definition: AlignmentMonitorMuonSystemMap1D.cc:488
MuonResidualsFromTrack::trackerNumHits
int trackerNumHits() const
Definition: MuonResidualsFromTrack.h:78
svgfig.window
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
AlignmentMonitorMuonSystemMap1D::processMuonResidualsFromTrack
void processMuonResidualsFromTrack(MuonResidualsFromTrack &mrft, const edm::Event &iEvent)
Definition: AlignmentMonitorMuonSystemMap1D.cc:319
cms::cuda::assert
assert(be >=bs)
AlignmentMonitorMuonSystemMap1D::MyCSCDetId::s
Short_t s
Definition: AlignmentMonitorMuonSystemMap1D.cc:132
AlignmentMonitorMuonSystemMap1D::MyCSCDetId::t
Short_t t
Definition: AlignmentMonitorMuonSystemMap1D.cc:133
AlignmentMonitorPluginFactory
AlignmentMonitorMuonSystemMap1D::m_counter_event
long m_counter_event
Definition: AlignmentMonitorMuonSystemMap1D.cc:75
hltPixelTracks_cff.chi2
chi2
Definition: hltPixelTracks_cff.py:25
makeMuonMisalignmentScenario.endcap
endcap
Definition: makeMuonMisalignmentScenario.py:320
HLT_FULL_cff.magneticField
magneticField
Definition: HLT_FULL_cff.py:348
AlignmentMonitorMuonSystemMap1D::num02d
std::string num02d(int num)
Definition: AlignmentMonitorMuonSystemMap1D.cc:185
createJobs.tmp
tmp
align.sh
Definition: createJobs.py:716
edm::Handle< reco::BeamSpot >
AlignmentMonitorMuonSystemMap1D::MyResidual::rho
Float_t rho
Definition: AlignmentMonitorMuonSystemMap1D.cc:144
MuonChamberResidual::global_stubpos
align::GlobalPoint global_stubpos()
Definition: MuonChamberResidual.cc:45
AlignmentMonitorBase::pNavigator
AlignableNavigator * pNavigator()
Definition: AlignmentMonitorBase.h:115
AlignmentMonitorMuonSystemMap1D::m_CSCvsphi_me
MuonSystemMapPlot1D * m_CSCvsphi_me[2][4][3]
Definition: AlignmentMonitorMuonSystemMap1D.cc:115
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
AlignmentMonitorMuonSystemMap1D::m_maxTrackPt
double m_maxTrackPt
Definition: AlignmentMonitorMuonSystemMap1D.cc:58
AlignmentMonitorMuonSystemMap1D::MuonSystemMapPlot1D::m_x_1d
TH1F * m_x_1d
Definition: AlignmentMonitorMuonSystemMap1D.cc:108
MuonChamberResidual::global_residual
double global_residual() const
Definition: MuonChamberResidual.cc:49
reco::TrackBase::pt
double pt() const
track transverse momentum
Definition: TrackBase.h:637
AlignmentMonitorMuonSystemMap1D::m_counter_csc
long m_counter_csc
Definition: AlignmentMonitorMuonSystemMap1D.cc:83
edm::InputTag::label
std::string const & label() const
Definition: InputTag.h:36
Propagator
Definition: Propagator.h:44
csc
Definition: L1Track.h:19
AlignmentMonitorMuonSystemMap1D::MyTrack::pz
Float_t pz
Definition: AlignmentMonitorMuonSystemMap1D.cc:139
AlignmentMonitorMuonSystemMap1D::MyTrack
Definition: AlignmentMonitorMuonSystemMap1D.cc:137
AlignmentMonitorMuonSystemMap1D::MuonSystemMapPlot1D::m_name
std::string m_name
Definition: AlignmentMonitorMuonSystemMap1D.cc:104
GlobalTrackingGeometry
Definition: GlobalTrackingGeometry.h:20
HLT_FULL_cff.muon
muon
Definition: HLT_FULL_cff.py:11725
Service.h
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
DDAxes::z
reco::Track
Definition: Track.h:27
IdealMagneticFieldRecord.h
AlignmentMonitorMuonSystemMap1D::MuonSystemMapPlot1D
Definition: AlignmentMonitorMuonSystemMap1D.cc:87
MuonResidualsFromTrack
Definition: MuonResidualsFromTrack.h:52
MuonResidualsFromTrack::getTrack
const reco::Track * getTrack()
Definition: MuonResidualsFromTrack.h:75
AlignmentMonitorMuonSystemMap1D::MyResidual::phi
Float_t phi
Definition: AlignmentMonitorMuonSystemMap1D.cc:144
AlignmentMonitorMuonSystemMap1D::event
void event(const edm::Event &iEvent, const edm::EventSetup &iSetup, const ConstTrajTrackPairCollection &iTrajTracks) override
Called for each event (by "run()"): may be reimplemented.
Definition: AlignmentMonitorMuonSystemMap1D.cc:262
LaserClient_cfi.nbins
nbins
Definition: LaserClient_cfi.py:51
MuonChamberResidual::chi2
double chi2() const
Definition: MuonChamberResidual.h:59
MuonResidualsFromTrack::chamberIds
const std::vector< DetId > chamberIds() const
Definition: MuonResidualsFromTrack.h:86
AlignmentMonitorMuonSystemMap1D::m_counter_trackmoment
long m_counter_trackmoment
Definition: AlignmentMonitorMuonSystemMap1D.cc:77
reco::TrackBase::charge
int charge() const
track electric charge
Definition: TrackBase.h:596
MuonSubdetId::DT
static constexpr int DT
Definition: MuonSubdetId.h:11
Point3DBase< Scalar, GlobalTag >
MuonResidualsFromTrack::normalizedChi2
double normalizedChi2() const
Definition: MuonResidualsFromTrack.cc:729
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition: PluginFactory.h:124
geometryCSVtoXML.xy
xy
Definition: geometryCSVtoXML.py:19
AlignmentMonitorPluginFactory.h
AlignmentMonitorMuonSystemMap1D::m_esTokenMF
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > m_esTokenMF
Definition: AlignmentMonitorMuonSystemMap1D.cc:53
GlobalTrackingGeometryRecord.h
AlignmentMonitorMuonSystemMap1D::AlignmentMonitorMuonSystemMap1D
AlignmentMonitorMuonSystemMap1D(const edm::ParameterSet &cfg, edm::ConsumesCollector iC)
Definition: AlignmentMonitorMuonSystemMap1D.cc:151
AlignmentMonitorMuonSystemMap1D::m_doCSC
bool m_doCSC
Definition: AlignmentMonitorMuonSystemMap1D.cc:70
TFileService.h
DetIdAssociator
Definition: DetIdAssociator.h:45
AlignmentMonitorMuonSystemMap1D::MuonSystemMapPlot1D::m_1d
bool m_1d
Definition: AlignmentMonitorMuonSystemMap1D.cc:107
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
MuonChamberResidual::kDT2
Definition: MuonChamberResidual.h:28
AlignmentMonitorMuonSystemMap1D::m_minDT13Hits
int m_minDT13Hits
Definition: AlignmentMonitorMuonSystemMap1D.cc:66
edm::ParameterSet
Definition: ParameterSet.h:47
MuonChamberResidual::numHits
int numHits() const
Definition: MuonChamberResidual.h:52
AlignmentMonitorMuonSystemMap1D::MuonSystemMapPlot1D::fill_x
void fill_x(char charge, double abscissa, double residx, double chi2, int dof)
Definition: AlignmentMonitorMuonSystemMap1D.cc:538
AlignmentMonitorMuonSystemMap1D::m_re
MyResidual m_re
Definition: AlignmentMonitorMuonSystemMap1D.cc:146
AlignmentMonitorMuonSystemMap1D::m_doDT
bool m_doDT
Definition: AlignmentMonitorMuonSystemMap1D.cc:69
AlignmentMonitorMuonSystemMap1D::m_cscnt
TTree * m_cscnt
Definition: AlignmentMonitorMuonSystemMap1D.cc:122
AlignmentMonitorMuonSystemMap1D::m_muonCollectionTag
edm::InputTag m_muonCollectionTag
Definition: AlignmentMonitorMuonSystemMap1D.cc:56
AlignmentMonitorBase.h
AlignmentMonitorMuonSystemMap1D::MuonSystemMapPlot1D::m_dxdz_2d
TH2F * m_dxdz_2d
Definition: AlignmentMonitorMuonSystemMap1D.cc:109
AlignmentMonitorMuonSystemMap1D::m_CSCvsr_me
MuonSystemMapPlot1D * m_CSCvsr_me[2][4][36]
Definition: AlignmentMonitorMuonSystemMap1D.cc:113
AlignmentMonitorMuonSystemMap1D::MuonSystemMapPlot1D::fill_dxdz
void fill_dxdz(char charge, double abscissa, double slopex, double chi2, int dof)
Definition: AlignmentMonitorMuonSystemMap1D.cc:556
CSCDetId
Definition: CSCDetId.h:26
AlignmentMonitorMuonSystemMap1D::m_run
UInt_t m_run
Definition: AlignmentMonitorMuonSystemMap1D.cc:148
AlignmentMonitorMuonSystemMap1D::MyResidual::slope
Float_t slope
Definition: AlignmentMonitorMuonSystemMap1D.cc:144
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
AlignmentMonitorBase
Definition: AlignmentMonitorBase.h:43
makeMuonMisalignmentScenario.wheel
wheel
Definition: makeMuonMisalignmentScenario.py:319
edm::Service< TFileService >
createfilelist.int
int
Definition: createfilelist.py:10
MuonChamberResidual
Definition: MuonChamberResidual.h:26
iEvent
int iEvent
Definition: GenABIO.cc:224
AlignmentMonitorMuonSystemMap1D::MyTrack::q
Int_t q
Definition: AlignmentMonitorMuonSystemMap1D.cc:138
AlignmentMonitorMuonSystemMap1D::MyResidual::z
Float_t z
Definition: AlignmentMonitorMuonSystemMap1D.cc:144
AlignmentMonitorMuonSystemMap1D::MyCSCDetId::e
Short_t e
Definition: AlignmentMonitorMuonSystemMap1D.cc:132
AlignmentMonitorMuonSystemMap1D::m_useStubPosition
bool m_useStubPosition
Definition: AlignmentMonitorMuonSystemMap1D.cc:71
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:49
MuonResidualsFromTrack::contains_TIDTEC
bool contains_TIDTEC() const
Definition: MuonResidualsFromTrack.h:84
AlignmentMonitorMuonSystemMap1D::MyResidual::res
Float_t res
Definition: AlignmentMonitorMuonSystemMap1D.cc:144
AlignmentMonitorBase::m_beamSpotTag
const edm::InputTag m_beamSpotTag
Definition: AlignmentMonitorBase.h:117
DetIdAssociatorRecord.h
AlignmentMonitorMuonSystemMap1D::m_counter_dt
long m_counter_dt
Definition: AlignmentMonitorMuonSystemMap1D.cc:80
MagneticField.h
edm::EventSetup
Definition: EventSetup.h:58
MuonChamberResidual::kCSC
Definition: MuonChamberResidual.h:28
MuonResidualsFromTrack.h
AlignmentMonitorMuonSystemMap1D::m_allowTIDTEC
bool m_allowTIDTEC
Definition: AlignmentMonitorMuonSystemMap1D.cc:64
TFileService::make
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ESGetToken< GlobalTrackingGeometry, GlobalTrackingGeometryRecord >
EgammaValidation_cff.num
num
Definition: EgammaValidation_cff.py:33
AlignmentMonitorMuonSystemMap1D::m_maxDxy
double m_maxDxy
Definition: AlignmentMonitorMuonSystemMap1D.cc:61
InputTag.h
MuonChamberResidual::global_trackpos
align::GlobalPoint global_trackpos()
Definition: MuonChamberResidual.cc:41
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:127
looper.cfg
cfg
Definition: looper.py:296
AlignmentMonitorMuonSystemMap1D::m_esTokenDetId
const edm::ESGetToken< DetIdAssociator, DetIdAssociatorRecord > m_esTokenDetId
Definition: AlignmentMonitorMuonSystemMap1D.cc:51
AlignmentMonitorMuonSystemMap1D::MuonSystemMapPlot1D::m_bins
int m_bins
Definition: AlignmentMonitorMuonSystemMap1D.cc:105
callgraph.module
module
Definition: callgraph.py:61
DDAxes::phi
AlignmentMonitorMuonSystemMap1D::m_createNtuple
bool m_createNtuple
Definition: AlignmentMonitorMuonSystemMap1D.cc:72
AlignmentMonitorMuonSystemMap1D::MyCSCDetId::r
Short_t r
Definition: AlignmentMonitorMuonSystemMap1D.cc:132
LaserClient_cfi.high
high
Definition: LaserClient_cfi.py:50
AlignmentMonitorMuonSystemMap1D::m_tr
MyTrack m_tr
Definition: AlignmentMonitorMuonSystemMap1D.cc:141
AlignmentMonitorMuonSystemMap1D::MuonSystemMapPlot1D::m_x_2d
TH2F * m_x_2d
Definition: AlignmentMonitorMuonSystemMap1D.cc:109
Trajectory
Definition: Trajectory.h:38
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
DetIdAssociator.h
TrackingComponentsRecord.h
AlignmentMonitorMuonSystemMap1D::MuonSystemMapPlot1D::fill_x_1d
void fill_x_1d(double residx, double chi2, int dof)
Definition: AlignmentMonitorMuonSystemMap1D.cc:530
AlignmentMonitorMuonSystemMap1D::m_maxTrackerRedChi2
double m_maxTrackerRedChi2
Definition: AlignmentMonitorMuonSystemMap1D.cc:63
relativeConstraints.ring
ring
Definition: relativeConstraints.py:68
AlignmentMonitorMuonSystemMap1D::MuonSystemMapPlot1D::fill_y
void fill_y(char charge, double abscissa, double residy, double chi2, int dof)
Definition: AlignmentMonitorMuonSystemMap1D.cc:547
relativeConstraints.chamber
chamber
Definition: relativeConstraints.py:53
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
EventSetup.h
AlignmentMonitorMuonSystemMap1D::m_DTvsphi_station
MuonSystemMapPlot1D * m_DTvsphi_station[4][5]
Definition: AlignmentMonitorMuonSystemMap1D.cc:114
AlignmentMonitorMuonSystemMap1D::~AlignmentMonitorMuonSystemMap1D
~AlignmentMonitorMuonSystemMap1D() override
Definition: AlignmentMonitorMuonSystemMap1D.cc:37
AlignmentMonitorMuonSystemMap1D::MuonSystemMapPlot1D::m_y_2d
TH2F * m_y_2d
Definition: AlignmentMonitorMuonSystemMap1D.cc:109
AlignmentMonitorMuonSystemMap1D::MuonSystemMapPlot1D::fill_dydz
void fill_dydz(char charge, double abscissa, double slopey, double chi2, int dof)
Definition: AlignmentMonitorMuonSystemMap1D.cc:565
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
reco::TrackBase::pz
double pz() const
z coordinate of momentum vector
Definition: TrackBase.h:646
AlignmentMonitorBase::ConstTrajTrackPairCollection
std::vector< ConstTrajTrackPair > ConstTrajTrackPairCollection
Definition: AlignmentMonitorBase.h:46
AlignmentMonitorMuonSystemMap1D::MyCSCDetId::c
Short_t c
Definition: AlignmentMonitorMuonSystemMap1D.cc:132
DetId::Muon
Definition: DetId.h:26
MuonChamberResidual::ndof
int ndof() const
Definition: MuonChamberResidual.h:60
DTChamberId
Definition: DTChamberId.h:14
trigObjTnPSource_cfi.bins
bins
Definition: trigObjTnPSource_cfi.py:20
AlignmentMonitorMuonSystemMap1D::m_counter_track
long m_counter_track
Definition: AlignmentMonitorMuonSystemMap1D.cc:76
AlignmentMonitorMuonSystemMap1D::m_DTvsz_station
MuonSystemMapPlot1D * m_DTvsz_station[4][14]
Definition: AlignmentMonitorMuonSystemMap1D.cc:112
ParameterSet.h
AlignmentMonitorMuonSystemMap1D::MyCSCDetId
Definition: AlignmentMonitorMuonSystemMap1D.cc:124
DeDxTools::esConsumes
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
GlobalTrackingGeometry.h
MuonChamberResidual::kDT13
Definition: MuonChamberResidual.h:28
edm::Event
Definition: Event.h:73
AlignmentMonitorMuonSystemMap1D::m_esTokenGBTGeom
const edm::ESGetToken< GlobalTrackingGeometry, GlobalTrackingGeometryRecord > m_esTokenGBTGeom
Definition: AlignmentMonitorMuonSystemMap1D.cc:50
MagneticField
Definition: MagneticField.h:19
AlignmentMonitorMuonSystemMap1D::MyCSCDetId::init
void init(CSCDetId &id)
Definition: AlignmentMonitorMuonSystemMap1D.cc:125
MuonChamberResidual::global_resslope
double global_resslope() const
Definition: MuonChamberResidual.cc:51
dttmaxenums::R
Definition: DTTMax.h:29
LaserClient_cfi.low
low
Definition: LaserClient_cfi.py:52
edm::InputTag
Definition: InputTag.h:15
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
AlignmentMonitorMuonSystemMap1D
Definition: AlignmentMonitorMuonSystemMap1D.cc:34
AlignmentMonitorMuonSystemMap1D::m_minTrackP
double m_minTrackP
Definition: AlignmentMonitorMuonSystemMap1D.cc:59
AlignmentMonitorMuonSystemMap1D::m_counter_trackokay
long m_counter_trackokay
Definition: AlignmentMonitorMuonSystemMap1D.cc:79
AlignmentMonitorMuonSystemMap1D::book
void book() override
Book or retrieve histograms; MUST be reimplemented.
Definition: AlignmentMonitorMuonSystemMap1D.cc:192