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