CMS 3D CMS Logo

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