CMS 3D CMS Logo

DTSegment4DQuality.cc
Go to the documentation of this file.
1 /*
2  * See header file for a description of this class.
3  *
4  * \author S. Bolognesi and G. Cerminara - INFN Torino
5  */
6 
7 #include <iostream>
8 #include <map>
9 
20 
21 #include "DTSegment4DQuality.h"
22 #include "Histograms.h"
23 
24 using namespace std;
25 using namespace edm;
26 
27 namespace dtsegment4d {
28  struct Histograms {
29  std::unique_ptr<HRes4DHit> h4DHit;
30  std::unique_ptr<HRes4DHit> h4DHit_W0;
31  std::unique_ptr<HRes4DHit> h4DHit_W1;
32  std::unique_ptr<HRes4DHit> h4DHit_W2;
33  std::unique_ptr<HRes4DHit> h4DHitWS[3][4];
34 
35  std::unique_ptr<HEff4DHit> hEff_All;
36  std::unique_ptr<HEff4DHit> hEff_W0;
37  std::unique_ptr<HEff4DHit> hEff_W1;
38  std::unique_ptr<HEff4DHit> hEff_W2;
39  std::unique_ptr<HEff4DHit> hEffWS[3][4];
40  };
41 } // namespace dtsegment4d
42 using namespace dtsegment4d;
43 
44 // In phi SLs, The dependency on X and angle is specular in positive
45 // and negative wheels. Since positive and negative wheels are filled
46 // together into the same plots, it is useful to mirror negative wheels
47 // so that the actual dependency can be observerd instead of an artificially
48 // simmetrized one.
49 // Set mirrorMinusWheels to avoid this.
50 namespace {
51  constexpr bool mirrorMinusWheels = true;
52 }
53 
54 // Constructor
56  // Get the debug parameter for verbose output
57  debug_ = pset.getUntrackedParameter<bool>("debug");
59 
60  // the name of the simhit collection
61  simHitLabel_ = pset.getUntrackedParameter<InputTag>("simHitLabel");
62  simHitToken_ = consumes<PSimHitContainer>(pset.getUntrackedParameter<InputTag>("simHitLabel"));
63  // the name of the 2D rec hit collection
64  segment4DLabel_ = pset.getUntrackedParameter<InputTag>("segment4DLabel");
65  segment4DToken_ = consumes<DTRecSegment4DCollection>(pset.getUntrackedParameter<InputTag>("segment4DLabel"));
66 
67  // sigma resolution on position
68  sigmaResX_ = pset.getParameter<double>("sigmaResX");
69  sigmaResY_ = pset.getParameter<double>("sigmaResY");
70  // sigma resolution on angle
71  sigmaResAlpha_ = pset.getParameter<double>("sigmaResAlpha");
72  sigmaResBeta_ = pset.getParameter<double>("sigmaResBeta");
73  doall_ = pset.getUntrackedParameter<bool>("doall", false);
74  local_ = pset.getUntrackedParameter<bool>("local", false);
75 }
76 
78  edm::Run const &run,
79  edm::EventSetup const &setup,
80  Histograms &histograms) const {
81  histograms.h4DHit = std::make_unique<HRes4DHit>("All", booker, doall_, local_);
82  histograms.h4DHit_W0 = std::make_unique<HRes4DHit>("W0", booker, doall_, local_);
83  histograms.h4DHit_W1 = std::make_unique<HRes4DHit>("W1", booker, doall_, local_);
84  histograms.h4DHit_W2 = std::make_unique<HRes4DHit>("W2", booker, doall_, local_);
85 
86  if (doall_) {
87  histograms.hEff_All = std::make_unique<HEff4DHit>("All", booker);
88  histograms.hEff_W0 = std::make_unique<HEff4DHit>("W0", booker);
89  histograms.hEff_W1 = std::make_unique<HEff4DHit>("W1", booker);
90  histograms.hEff_W2 = std::make_unique<HEff4DHit>("W2", booker);
91  }
92 
93  if (local_) {
94  // Plots with finer granularity, not to be included in DQM
95  TString name = "W";
96  for (long w = 0; w <= 2; ++w) {
97  for (long s = 1; s <= 4; ++s) {
98  // FIXME station 4 is not filled
99  TString nameWS = (name + w + "_St" + s);
100  histograms.h4DHitWS[w][s - 1] = std::make_unique<HRes4DHit>(nameWS.Data(), booker, doall_, local_);
101  histograms.hEffWS[w][s - 1] = std::make_unique<HEff4DHit>(nameWS.Data(), booker);
102  }
103  }
104  }
105 };
106 
107 // The real analysis
109  edm::EventSetup const &setup,
110  Histograms const &histograms) const {
111  const float epsilon = 5e-5; // numerical accuracy on angles [rad}
112 
113  // Get the DT Geometry
114  const DTGeometry &dtGeom = setup.getData(muonGeomToken_);
115 
116  // Get the SimHit collection from the event
118  event.getByToken(simHitToken_, simHits); // FIXME: second string to be removed
119 
120  // Map simHits by chamber
121  map<DTChamberId, PSimHitContainer> simHitsPerCh;
122  for (const auto &simHit : *simHits) {
123  // Consider only muon simhits; the others are not considered elsewhere in
124  // this class!
125  if (abs(simHit.particleType()) == 13) {
126  // Create the id of the chamber (the simHits in the DT known their wireId)
127  DTChamberId chamberId = (((DTWireId(simHit.detUnitId())).layerId()).superlayerId()).chamberId();
128  // Fill the map
129  simHitsPerCh[chamberId].push_back(simHit);
130  }
131  }
132 
133  // Get the 4D rechits from the event
135  event.getByToken(segment4DToken_, segment4Ds);
136 
137  if (!segment4Ds.isValid()) {
138  if (debug_) {
139  cout << "[DTSegment4DQuality]**Warning: no 4D Segments with label: " << segment4DLabel_
140  << " in this event, skipping!" << endl;
141  }
142  return;
143  }
144 
145  // Loop over all chambers containing a (muon) simhit
146  for (auto &simHitsInChamber : simHitsPerCh) {
147  DTChamberId chamberId = simHitsInChamber.first;
148  int station = chamberId.station();
149  if (station == 4 && !(local_)) {
150  continue; // use DTSegment2DSLPhiQuality to analyze MB4 performaces in DQM
151  }
152  int wheel = chamberId.wheel();
153 
154  //------------------------- simHits ---------------------------//
155  // Get simHits of this chamber
156  const PSimHitContainer &simHits = simHitsInChamber.second;
157 
158  // Map simhits per wire
159  auto const &simHitsPerWire = DTHitQualityUtils::mapSimHitsPerWire(simHits);
160  auto const &muSimHitPerWire = DTHitQualityUtils::mapMuSimHitsPerWire(simHitsPerWire);
161  int nMuSimHit = muSimHitPerWire.size();
162  if (nMuSimHit < 2) { // Skip chamber with less than 2 cells with mu hits
163  continue;
164  }
165  if (debug_) {
166  cout << "=== Chamber " << chamberId << " has " << nMuSimHit << " SimHits" << endl;
167  }
168 
169  // Find outer and inner mu SimHit to build a segment
170  pair<const PSimHit *, const PSimHit *> inAndOutSimHit = DTHitQualityUtils::findMuSimSegment(muSimHitPerWire);
171 
172  // Consider only sim segments crossing at least 2 SLs
173  if ((DTWireId(inAndOutSimHit.first->detUnitId())).superlayer() ==
174  (DTWireId(inAndOutSimHit.second->detUnitId())).superLayer()) {
175  continue;
176  }
177 
178  // Find direction and position of the sim Segment in Chamber RF
179  pair<LocalVector, LocalPoint> dirAndPosSimSegm =
180  DTHitQualityUtils::findMuSimSegmentDirAndPos(inAndOutSimHit, chamberId, dtGeom);
181 
182  LocalVector simSegmLocalDir = dirAndPosSimSegm.first;
183  LocalPoint simSegmLocalPos = dirAndPosSimSegm.second;
184  const DTChamber *chamber = dtGeom.chamber(chamberId);
185  GlobalPoint simSegmGlobalPos = chamber->toGlobal(simSegmLocalPos);
186  GlobalVector simSegmGlobalDir = chamber->toGlobal(simSegmLocalDir);
187 
188  // phi and theta angle of simulated segment in Chamber RF
189  float alphaSimSeg = DTHitQualityUtils::findSegmentAlphaAndBeta(simSegmLocalDir).first;
190  float betaSimSeg = DTHitQualityUtils::findSegmentAlphaAndBeta(simSegmLocalDir).second;
191  // x, y position of simulated segment in Chamber RF
192  float xSimSeg = simSegmLocalPos.x();
193  float ySimSeg = simSegmLocalPos.y();
194  // Position (in eta, phi coordinates) in lobal RF
195  float etaSimSeg = simSegmGlobalPos.eta();
196  float phiSimSeg = simSegmGlobalPos.phi();
197 
198  double count_seg = 0;
199 
200  if (debug_) {
201  cout << " Simulated segment: local direction " << simSegmLocalDir << endl
202  << " local position " << simSegmLocalPos << endl
203  << " alpha " << alphaSimSeg << endl
204  << " beta " << betaSimSeg << endl;
205  }
206 
207  //---------------------------- recHits --------------------------//
208  // Get the range of rechit for the corresponding chamberId
209  bool recHitFound = false;
210  DTRecSegment4DCollection::range range = segment4Ds->get(chamberId);
211  int nsegm = distance(range.first, range.second);
212  if (debug_) {
213  cout << " Chamber: " << chamberId << " has " << nsegm << " 4D segments" << endl;
214  }
215 
216  if (nsegm != 0) {
217  // Find the best RecHit: look for the 4D RecHit with the phi angle closest
218  // to that of segment made of SimHits.
219  // RecHits must have delta alpha and delta position within 5 sigma of
220  // the residual distribution (we are looking for residuals of segments
221  // usefull to the track fit) for efficency purpose
222  const DTRecSegment4D *bestRecHit = nullptr;
223  double deltaAlpha = 99999;
224  double deltaBeta = 99999;
225 
226  // Loop over the recHits of this chamberId
227  for (DTRecSegment4DCollection::const_iterator segment4D = range.first; segment4D != range.second; ++segment4D) {
228  // Consider only segments with both projections
229  if (station != 4 && (*segment4D).dimension() != 4) {
230  continue;
231  }
232  // Segment Local Direction and position (in Chamber RF)
233  LocalVector recSegDirection = (*segment4D).localDirection();
234  LocalPoint recSegPosition = (*segment4D).localPosition();
235 
236  pair<double, double> ab = DTHitQualityUtils::findSegmentAlphaAndBeta(recSegDirection);
237  float recSegAlpha = ab.first;
238  float recSegBeta = ab.second;
239 
240  if (debug_) {
241  cout << &(*segment4D) << " RecSegment direction: " << recSegDirection << endl
242  << " position : " << (*segment4D).localPosition() << endl
243  << " alpha : " << recSegAlpha << endl
244  << " beta : " << recSegBeta << endl
245  << " nhits : " << (*segment4D).phiSegment()->recHits().size() << " "
246  << (((*segment4D).zSegment() != nullptr) ? (*segment4D).zSegment()->recHits().size() : 0) << endl;
247  }
248 
249  float dAlphaRecSim = fabs(recSegAlpha - alphaSimSeg);
250  float dBetaRecSim = fabs(recSegBeta - betaSimSeg);
251 
252  if ((fabs(recSegPosition.x() - simSegmLocalPos.x()) <
253  4) // require rec and sim segments to be ~in the same cell in x
254  && ((fabs(recSegPosition.y() - simSegmLocalPos.y()) < 4) ||
255  (*segment4D).dimension() < 4)) { // ~in the same cell in y, if segment has the theta view
256  ++count_seg;
257 
258  if (fabs(dAlphaRecSim - deltaAlpha) < epsilon) { // Numerically equivalent alphas, choose based on beta
259  if (dBetaRecSim < deltaBeta) {
260  deltaAlpha = dAlphaRecSim;
261  deltaBeta = dBetaRecSim;
262  bestRecHit = &(*segment4D);
263  }
264 
265  } else if (dAlphaRecSim < deltaAlpha) {
266  deltaAlpha = dAlphaRecSim;
267  deltaBeta = dBetaRecSim;
268  bestRecHit = &(*segment4D);
269  }
270  }
271 
272  } // End of Loop over all 4D RecHits
273 
274  if (bestRecHit) {
275  if (debug_) {
276  cout << endl << "Chosen: " << bestRecHit << endl;
277  }
278  // Best rechit direction and position in Chamber RF
279  LocalPoint bestRecHitLocalPos = bestRecHit->localPosition();
280  LocalVector bestRecHitLocalDir = bestRecHit->localDirection();
281  // Errors on x and y
282  LocalError bestRecHitLocalPosErr = bestRecHit->localPositionError();
283  LocalError bestRecHitLocalDirErr = bestRecHit->localDirectionError();
284 
285  pair<double, double> ab = DTHitQualityUtils::findSegmentAlphaAndBeta(bestRecHitLocalDir);
286  float alphaBestRHit = ab.first;
287  float betaBestRHit = ab.second;
288  // Errors on alpha and beta
289 
290  // Get position and direction using the rx projection (so in SL
291  // reference frame). Note that x (and y) are swapped wrt to Chamber
292  // frame
293  // if (bestRecHit->hasZed()) //
294  const DTSLRecSegment2D *zedRecSeg = bestRecHit->zSegment();
295  LocalPoint bestRecHitLocalPosRZ;
296  LocalVector bestRecHitLocalDirRZ;
297  LocalError bestRecHitLocalPosErrRZ;
298  LocalError bestRecHitLocalDirErrRZ;
299  LocalPoint simSegLocalPosRZ; // FIXME: this is not set for segments with
300  // only the phi view.
301  float alphaBestRHitRZ = 0; // angle measured in the RZ SL, in its own frame
302  float alphaSimSegRZ = betaSimSeg;
303  if (zedRecSeg) {
304  bestRecHitLocalPosRZ = zedRecSeg->localPosition();
305  bestRecHitLocalDirRZ = zedRecSeg->localDirection();
306  // Errors on x and y
307  bestRecHitLocalPosErrRZ = zedRecSeg->localPositionError();
308  bestRecHitLocalDirErrRZ = zedRecSeg->localDirectionError();
309 
310  // angle measured in the RZ SL, in its own frame
311  alphaBestRHitRZ = DTHitQualityUtils::findSegmentAlphaAndBeta(bestRecHitLocalDirRZ).first;
312 
313  // Get SimSeg position and Direction in rZ SL frame
314  const DTSuperLayer *sl = dtGeom.superLayer(zedRecSeg->superLayerId());
315  LocalPoint simSegLocalPosRZTmp = sl->toLocal(simSegmGlobalPos);
316  LocalVector simSegLocalDirRZ = sl->toLocal(simSegmGlobalDir);
317  simSegLocalPosRZ =
318  simSegLocalPosRZTmp + simSegLocalDirRZ * (-simSegLocalPosRZTmp.z() / (cos(simSegLocalDirRZ.theta())));
319  alphaSimSegRZ = DTHitQualityUtils::findSegmentAlphaAndBeta(simSegLocalDirRZ).first;
320 
321  if (debug_) {
322  cout << "RZ SL: recPos " << bestRecHitLocalPosRZ << "recDir " << bestRecHitLocalDirRZ << "recAlpha "
323  << alphaBestRHitRZ << endl
324  << "RZ SL: simPos " << simSegLocalPosRZ << "simDir " << simSegLocalDirRZ << "simAlpha "
325  << alphaSimSegRZ << endl;
326  }
327  }
328 
329  // get nhits and t0
330  const DTChamberRecSegment2D *phiSeg = bestRecHit->phiSegment();
331 
332  float t0phi = -999;
333  float t0theta = -999;
334  int nHitPhi = 0;
335  int nHitTheta = 0;
336 
337  if (phiSeg) {
338  t0phi = phiSeg->t0();
339  nHitPhi = phiSeg->recHits().size();
340  }
341 
342  if (zedRecSeg) {
343  t0theta = zedRecSeg->t0();
344  nHitTheta = zedRecSeg->recHits().size();
345  }
346 
347  recHitFound = true;
348 
349  // Mirror alpha in phi SLs so that + and - wheels can be plotted
350  // together
351  if (mirrorMinusWheels && wheel < 0) {
352  alphaSimSeg *= -1.;
353  alphaBestRHit *= -1.;
354  // Note: local X (xSimSeg, bestRecHitLocalPos.x() would have to be
355  // mirrored as well; but at the moment there is no plot of dependency
356  // vs X, except for efficiency.
357  }
358 
359  // Fill Residual histos
360  HRes4DHit *histo = nullptr;
361 
362  if (wheel == 0) {
363  histo = histograms.h4DHit_W0.get();
364  } else if (abs(wheel) == 1) {
365  histo = histograms.h4DHit_W1.get();
366  } else if (abs(wheel) == 2) {
367  histo = histograms.h4DHit_W2.get();
368  }
369 
370  float sigmaAlphaBestRhit = sqrt(DTHitQualityUtils::sigmaAngle(alphaBestRHit, bestRecHitLocalDirErr.xx()));
371  float sigmaBetaBestRhit =
372  sqrt(DTHitQualityUtils::sigmaAngle(betaBestRHit,
373  bestRecHitLocalDirErr.yy())); // FIXME this misses the contribution
374  // from uncertainty in extrapolation!
375  float sigmaAlphaBestRhitRZ = sqrt(DTHitQualityUtils::sigmaAngle(alphaBestRHitRZ, bestRecHitLocalDirErrRZ.xx()));
376 
377  histo->fill(alphaSimSeg,
378  alphaBestRHit,
379  betaSimSeg,
380  betaBestRHit,
381  xSimSeg,
382  bestRecHitLocalPos.x(),
383  ySimSeg,
384  bestRecHitLocalPos.y(),
385  etaSimSeg,
386  phiSimSeg,
387  bestRecHitLocalPosRZ.x(),
388  simSegLocalPosRZ.x(),
389  alphaBestRHitRZ,
390  alphaSimSegRZ,
391  sigmaAlphaBestRhit,
392  sigmaBetaBestRhit,
393  sqrt(bestRecHitLocalPosErr.xx()),
394  sqrt(bestRecHitLocalPosErr.yy()),
395  sigmaAlphaBestRhitRZ,
396  sqrt(bestRecHitLocalPosErrRZ.xx()),
397  nHitPhi,
398  nHitTheta,
399  t0phi,
400  t0theta);
401 
402  histograms.h4DHit->fill(alphaSimSeg,
403  alphaBestRHit,
404  betaSimSeg,
405  betaBestRHit,
406  xSimSeg,
407  bestRecHitLocalPos.x(),
408  ySimSeg,
409  bestRecHitLocalPos.y(),
410  etaSimSeg,
411  phiSimSeg,
412  bestRecHitLocalPosRZ.x(),
413  simSegLocalPosRZ.x(),
414  alphaBestRHitRZ,
415  alphaSimSegRZ,
416  sigmaAlphaBestRhit,
417  sigmaBetaBestRhit,
418  sqrt(bestRecHitLocalPosErr.xx()),
419  sqrt(bestRecHitLocalPosErr.yy()),
420  sigmaAlphaBestRhitRZ,
421  sqrt(bestRecHitLocalPosErrRZ.xx()),
422  nHitPhi,
423  nHitTheta,
424  t0phi,
425  t0theta);
426 
427  if (local_) {
428  histograms.h4DHitWS[abs(wheel)][station - 1]->fill(alphaSimSeg,
429  alphaBestRHit,
430  betaSimSeg,
431  betaBestRHit,
432  xSimSeg,
433  bestRecHitLocalPos.x(),
434  ySimSeg,
435  bestRecHitLocalPos.y(),
436  etaSimSeg,
437  phiSimSeg,
438  bestRecHitLocalPosRZ.x(),
439  simSegLocalPosRZ.x(),
440  alphaBestRHitRZ,
441  alphaSimSegRZ,
442  sigmaAlphaBestRhit,
443  sigmaBetaBestRhit,
444  sqrt(bestRecHitLocalPosErr.xx()),
445  sqrt(bestRecHitLocalPosErr.yy()),
446  sigmaAlphaBestRhitRZ,
447  sqrt(bestRecHitLocalPosErrRZ.xx()),
448  nHitPhi,
449  nHitTheta,
450  t0phi,
451  t0theta);
452  }
453 
454  } // end of if (bestRecHit)
455 
456  } // end of if (nsegm!= 0)
457 
458  // Fill Efficiency plot
459  if (doall_) {
460  HEff4DHit *heff = nullptr;
461 
462  if (wheel == 0) {
463  heff = histograms.hEff_W0.get();
464  } else if (abs(wheel) == 1) {
465  heff = histograms.hEff_W1.get();
466  } else if (abs(wheel) == 2) {
467  heff = histograms.hEff_W2.get();
468  }
469  heff->fill(etaSimSeg, phiSimSeg, xSimSeg, ySimSeg, alphaSimSeg, betaSimSeg, recHitFound, count_seg);
470  histograms.hEff_All->fill(
471  etaSimSeg, phiSimSeg, xSimSeg, ySimSeg, alphaSimSeg, betaSimSeg, recHitFound, count_seg);
472  if (local_) {
473  histograms.hEffWS[abs(wheel)][station - 1]->fill(
474  etaSimSeg, phiSimSeg, xSimSeg, ySimSeg, alphaSimSeg, betaSimSeg, recHitFound, count_seg);
475  }
476  }
477  } // End of loop over chambers
478 }
479 
480 // declare this as a framework plugin
Vector3DBase< float, LocalTag >
DTGeometry
Definition: DTGeometry.h:28
DTSLRecSegment2D
Definition: DTSLRecSegment2D.h:15
FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
DTRecSegment4D
Definition: DTRecSegment4D.h:23
DTSegment4DQuality::simHitLabel_
edm::InputTag simHitLabel_
Definition: DTSegment4DQuality.h:63
DTRecSegment4D::localDirection
LocalVector localDirection() const override
Local direction in Chamber frame.
Definition: DTRecSegment4D.h:67
DTSegment4DQuality::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &, dtsegment4d::Histograms &) const override
Book the DQM plots.
Definition: DTSegment4DQuality.cc:77
DTRecSegment4D::localDirectionError
LocalError localDirectionError() const override
Local direction error in the Chamber frame.
Definition: DTRecSegment4D.cc:166
ESHandle.h
DTRecHitCollection.h
DTRecSegment2D::t0
double t0() const
Get the segment t0 (if recomputed, 0 is returned otherwise)
Definition: DTRecSegment2D.h:114
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
edm::Run
Definition: Run.h:45
DTHitQualityUtils::mapMuSimHitsPerWire
std::map< DTWireId, const PSimHit * > mapMuSimHitsPerWire(const std::map< DTWireId, edm::PSimHitContainer > &simHitWireMap)
Create a map between the Mu SimHits and corresponding MuBarWireId ;.
DTSegment4DQuality::sigmaResY_
double sigmaResY_
Definition: DTSegment4DQuality.h:73
relativeConstraints.station
station
Definition: relativeConstraints.py:67
edm
HLT enums.
Definition: AlignableModifier.h:19
DTSLRecSegment2D::superLayerId
DTSuperLayerId superLayerId() const
The id of the superlayer on which reside the segment.
Definition: DTSLRecSegment2D.cc:24
DTHitQualityUtils::debug
std::atomic< bool > debug
Definition: DTHitQualityUtils.h:50
PV3DBase::theta
Geom::Theta< T > theta() const
Definition: PV3DBase.h:72
gather_cfg.cout
cout
Definition: gather_cfg.py:144
HEff4DHit::fill
void fill(float etaSimSegm, float phiSimSegm, float xSimSegm, float ySimSegm, float alphaSimSegm, float betaSimSegm, bool fillRecHit, int nSeg)
Definition: Histograms.h:975
DTChamber
Definition: DTChamber.h:24
PSimHitContainer.h
timingPdfMaker.histo
histo
Definition: timingPdfMaker.py:278
dtsegment4d::Histograms::hEff_W2
std::unique_ptr< HEff4DHit > hEff_W2
Definition: DTSegment4DQuality.cc:38
DTRecSegment2D::localDirectionError
LocalError localDirectionError() const override
the local direction error (xx,xy,yy) in SL frame: only xx is not 0.
Definition: DTRecSegment2D.cc:76
FastTrackerRecHitCombiner_cfi.simHits
simHits
Definition: FastTrackerRecHitCombiner_cfi.py:5
dtsegment4d::Histograms::h4DHit_W2
std::unique_ptr< HRes4DHit > h4DHit_W2
Definition: DTSegment4DQuality.cc:32
dtsegment4d::Histograms::hEff_W0
std::unique_ptr< HEff4DHit > hEff_W0
Definition: DTSegment4DQuality.cc:36
DTSegment4DQuality::DTSegment4DQuality
DTSegment4DQuality(const edm::ParameterSet &pset)
Constructor.
Definition: DTSegment4DQuality.cc:55
DTSuperLayer
Definition: DTSuperLayer.h:24
Histograms.h
DTHitQualityUtils::findSegmentAlphaAndBeta
std::pair< double, double > findSegmentAlphaAndBeta(const LocalVector &direction)
DTRecSegment2D::localPositionError
LocalError localPositionError() const override
local position error in SL frame
Definition: DTRecSegment2D.cc:74
edm::Handle
Definition: AssociativeIterator.h:50
DTRecSegment4D::localPosition
LocalPoint localPosition() const override
Local position in Chamber frame.
Definition: DTRecSegment4D.h:61
DTSegment4DQuality
Definition: DTSegment4DQuality.h:46
DTRecSegment4D::zSegment
const DTSLRecSegment2D * zSegment() const
The Z segment: 0 if not zed projection available.
Definition: DTRecSegment4D.h:99
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
geometryDiff.epsilon
int epsilon
Definition: geometryDiff.py:26
DTGeometry::chamber
const DTChamber * chamber(const DTChamberId &id) const
Return a DTChamber given its id.
Definition: DTGeometry.cc:90
dtsegment4d::Histograms::h4DHit
std::unique_ptr< HRes4DHit > h4DHit
Definition: DTSegment4DQuality.cc:29
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
DTHitQualityUtils::findMuSimSegment
std::pair< const PSimHit *, const PSimHit * > findMuSimSegment(const std::map< DTWireId, const PSimHit * > &mapWireAndMuSimHit)
DTRecSegment2D::recHits
std::vector< const TrackingRecHit * > recHits() const override
Access to component RecHits (if any)
Definition: DTRecSegment2D.cc:86
MakerMacros.h
alignCSCRings.s
s
Definition: alignCSCRings.py:92
dtsegment4d::Histograms::h4DHit_W0
std::unique_ptr< HRes4DHit > h4DHit_W0
Definition: DTSegment4DQuality.cc:30
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
DTSegment4DQuality::local_
bool local_
Definition: DTSegment4DQuality.h:80
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
DTWireId
Definition: DTWireId.h:12
LocalError::xx
float xx() const
Definition: LocalError.h:22
DTSegment4DQuality::simHitToken_
edm::EDGetTokenT< edm::PSimHitContainer > simHitToken_
Definition: DTSegment4DQuality.h:65
rpcPointValidation_cfi.simHit
simHit
Definition: rpcPointValidation_cfi.py:24
DTSegment4DQuality::sigmaResAlpha_
double sigmaResAlpha_
Definition: DTSegment4DQuality.h:76
w
const double w
Definition: UKUtility.cc:23
dtsegment4d::Histograms
Definition: DTSegment4DQuality.cc:28
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
HEff4DHit
A set of histograms for efficiency 4D RecHits (producer)
Definition: Histograms.h:940
Point3DBase< float, LocalTag >
GeomDet::toLocal
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
Definition: GeomDet.h:58
DTGeometry.h
DTHitQualityUtils::mapSimHitsPerWire
std::map< DTWireId, edm::PSimHitContainer > mapSimHitsPerWire(const edm::PSimHitContainer &simhits)
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
dtsegment4d::Histograms::h4DHit_W1
std::unique_ptr< HRes4DHit > h4DHit_W1
Definition: DTSegment4DQuality.cc:31
LocalError
Definition: LocalError.h:12
edm::RangeMap::const_iterator
C::const_iterator const_iterator
constant access iterator type
Definition: RangeMap.h:43
PV3DBase::eta
T eta() const
Definition: PV3DBase.h:73
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
makeMuonMisalignmentScenario.wheel
wheel
Definition: makeMuonMisalignmentScenario.py:319
DTRecSegment2D::localPosition
LocalPoint localPosition() const override
local position in SL frame
Definition: DTRecSegment2D.h:84
DTSegment4DQuality::muonGeomToken_
edm::ESGetToken< DTGeometry, MuonGeometryRecord > muonGeomToken_
Definition: DTSegment4DQuality.h:69
DTChamberRecSegment2D
Definition: DTChamberRecSegment2D.h:31
DTHitQualityUtils::findMuSimSegmentDirAndPos
std::pair< LocalVector, LocalPoint > findMuSimSegmentDirAndPos(const std::pair< const PSimHit *, const PSimHit * > &inAndOutSimHit, const DetId detId, const DTGeometry &muonGeom)
edm::EventSetup
Definition: EventSetup.h:58
histograms
Definition: histograms.py:1
DTSegment4DQuality::segment4DToken_
edm::EDGetTokenT< DTRecSegment4DCollection > segment4DToken_
Definition: DTSegment4DQuality.h:66
dtsegment4d::Histograms::hEff_All
std::unique_ptr< HEff4DHit > hEff_All
Definition: DTSegment4DQuality.cc:35
DTSegment4DQuality::doall_
bool doall_
Definition: DTSegment4DQuality.h:79
DTSegment4DQuality::sigmaResBeta_
double sigmaResBeta_
Definition: DTSegment4DQuality.h:77
edm::RangeMap::range
std::pair< const_iterator, const_iterator > range
iterator range
Definition: RangeMap.h:50
std
Definition: JetResolutionObject.h:76
writedatasetfile.run
run
Definition: writedatasetfile.py:27
dtsegment4d
Definition: DTSegment4DQuality.cc:27
DTWireId.h
Frameworkfwd.h
DTHitQualityUtils.h
DTHitQualityUtils::sigmaAngle
double sigmaAngle(double Angle, double sigma2TanAngle)
DTRecSegment4D::localPositionError
LocalError localPositionError() const override
Local position error in Chamber frame.
Definition: DTRecSegment4D.cc:162
relativeConstraints.chamber
chamber
Definition: relativeConstraints.py:53
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
HRes4DHit
Definition: Histograms.h:421
dqm::implementation::IBooker
Definition: DQMStore.h:43
DTSegment4DQuality::segment4DLabel_
edm::InputTag segment4DLabel_
Definition: DTSegment4DQuality.h:64
DTChamber.h
DTGeometry::superLayer
const DTSuperLayer * superLayer(const DTSuperLayerId &id) const
Return a DTSuperLayer given its id.
Definition: DTGeometry.cc:92
DTSegment4DQuality::sigmaResX_
double sigmaResX_
Definition: DTSegment4DQuality.h:72
DTRecSegment2D::localDirection
LocalVector localDirection() const override
the local direction in SL frame
Definition: DTRecSegment2D.h:90
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
DTChamberId
Definition: DTChamberId.h:14
edm::PSimHitContainer
std::vector< PSimHit > PSimHitContainer
Definition: PSimHitContainer.h:11
DTSegment4DQuality::debug_
bool debug_
Definition: DTSegment4DQuality.h:83
DTSegment4DQuality.h
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
event
Definition: event.py:1
dtsegment4d::Histograms::hEff_W1
std::unique_ptr< HEff4DHit > hEff_W1
Definition: DTSegment4DQuality.cc:37
DeDxTools::esConsumes
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
edm::Event
Definition: Event.h:73
HLT_FULL_cff.distance
distance
Definition: HLT_FULL_cff.py:7746
DTRecSegment4D::phiSegment
const DTChamberRecSegment2D * phiSegment() const
The superPhi segment: 0 if no phi projection available.
Definition: DTRecSegment4D.h:96
LocalError::yy
float yy() const
Definition: LocalError.h:24
DTChamberId::wheel
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:39
edm::InputTag
Definition: InputTag.h:15
PV3DBase::phi
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
DTChamberId::station
int station() const
Return the station number.
Definition: DTChamberId.h:42
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
DTRecSegment4DCollection.h
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
DTSegment4DQuality::dqmAnalyze
void dqmAnalyze(edm::Event const &, edm::EventSetup const &, dtsegment4d::Histograms const &) const override
Perform the real analysis.
Definition: DTSegment4DQuality.cc:108