CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DTRecHitQuality.cc
Go to the documentation of this file.
1 /*
2  * See header file for a description of this class.
3  *
4  * $Date: 2007/10/25 11:58:37 $
5  * $Revision: 1.1 $
6  * \author G. Cerminara - INFN Torino
7  */
8 
9 #include "DTRecHitQuality.h"
11 
15 
20 
21 #include "Histograms.h"
22 
23 #include "TFile.h"
24 
25 #include <iostream>
26 #include <map>
27 
28 using namespace std;
29 using namespace edm;
30 
31 
32 
33 
34 
35 // Constructor
37  // Get the debug parameter for verbose output
38  debug = pset.getUntrackedParameter<bool>("debug");
39  rootFileName = pset.getUntrackedParameter<string>("rootFileName");
40  // the name of the simhit collection
41  simHitLabel = pset.getUntrackedParameter<string>("simHitLabel", "SimG4Object");
42  // the name of the 1D rec hit collection
43  recHitLabel = pset.getUntrackedParameter<string>("recHitLabel", "DTRecHit1DProducer");
44  // the name of the 2D rec hit collection
45  segment2DLabel = pset.getUntrackedParameter<string>("segment2DLabel");
46  // the name of the 4D rec hit collection
47  segment4DLabel = pset.getUntrackedParameter<string>("segment4DLabel");
48 
49  // Switches for analysis at various steps
50  doStep1 = pset.getUntrackedParameter<bool>("doStep1", false);
51  doStep2 = pset.getUntrackedParameter<bool>("doStep2", false);
52  doStep3 = pset.getUntrackedParameter<bool>("doStep3", false);
53 
54  // Create the root file
55  theFile = new TFile(rootFileName.c_str(), "RECREATE");
56  theFile->cd();
57 
58 
59  hRes_S1RPhi= new HRes1DHit("S1RPhi"); // RecHits, 1. step, RPhi
60  hRes_S2RPhi= new HRes1DHit("S2RPhi"); // RecHits, 2. step, RPhi
61  hRes_S3RPhi= new HRes1DHit("S3RPhi"); // RecHits, 3. step, RPhi
62 
63  hRes_S1RZ= new HRes1DHit("S1RZ"); // RecHits, 1. step, RZ
64  hRes_S2RZ= new HRes1DHit("S2RZ"); // RecHits, 2. step, RZ
65  hRes_S3RZ= new HRes1DHit("S3RZ"); // RecHits, 3. step, RZ
66 
67  hRes_S1RZ_W0= new HRes1DHit("S1RZ_W0"); // RecHits, 1. step, RZ, wheel 0
68  hRes_S2RZ_W0= new HRes1DHit("S2RZ_W0"); // RecHits, 2. step, RZ, wheel 0
69  hRes_S3RZ_W0= new HRes1DHit("S3RZ_W0"); // RecHits, 3. step, RZ, wheel 0
70 
71  hRes_S1RZ_W1= new HRes1DHit("S1RZ_W1"); // RecHits, 1. step, RZ, wheel +-1
72  hRes_S2RZ_W1= new HRes1DHit("S2RZ_W1"); // RecHits, 2. step, RZ, wheel +-1
73  hRes_S3RZ_W1= new HRes1DHit("S3RZ_W1"); // RecHits, 3. step, RZ, wheel +-1
74 
75  hRes_S1RZ_W2= new HRes1DHit("S1RZ_W2"); // RecHits, 1. step, RZ, wheel +-2
76  hRes_S2RZ_W2= new HRes1DHit("S2RZ_W2"); // RecHits, 2. step, RZ, wheel +-2
77  hRes_S3RZ_W2= new HRes1DHit("S3RZ_W2"); // RecHits, 3. step, RZ, wheel +-2
78 
79  hEff_S1RPhi= new HEff1DHit("S1RPhi"); // RecHits, 1. step, RPhi
80  hEff_S2RPhi= new HEff1DHit("S2RPhi"); // RecHits, 2. step, RPhi
81  hEff_S3RPhi= new HEff1DHit("S3RPhi"); // RecHits, 3. step, RPhi
82 
83  hEff_S1RZ= new HEff1DHit("S1RZ"); // RecHits, 1. step, RZ
84  hEff_S2RZ= new HEff1DHit("S2RZ"); // RecHits, 2. step, RZ
85  hEff_S3RZ= new HEff1DHit("S3RZ"); // RecHits, 3. step, RZ
86 
87  hEff_S1RZ_W0= new HEff1DHit("S1RZ_W0"); // RecHits, 1. step, RZ, wheel 0
88  hEff_S2RZ_W0= new HEff1DHit("S2RZ_W0"); // RecHits, 2. step, RZ, wheel 0
89  hEff_S3RZ_W0= new HEff1DHit("S3RZ_W0"); // RecHits, 3. step, RZ, wheel 0
90 
91  hEff_S1RZ_W1= new HEff1DHit("S1RZ_W1"); // RecHits, 1. step, RZ, wheel +-1
92  hEff_S2RZ_W1= new HEff1DHit("S2RZ_W1"); // RecHits, 2. step, RZ, wheel +-1
93  hEff_S3RZ_W1= new HEff1DHit("S3RZ_W1"); // RecHits, 3. step, RZ, wheel +-1
94 
95  hEff_S1RZ_W2= new HEff1DHit("S1RZ_W2"); // RecHits, 1. step, RZ, wheel +-2
96  hEff_S2RZ_W2= new HEff1DHit("S2RZ_W2"); // RecHits, 2. step, RZ, wheel +-2
97  hEff_S3RZ_W2= new HEff1DHit("S3RZ_W2"); // RecHits, 3. step, RZ, wheel +-2
98 }
99 
100 
101 
102 // Destructor
104  }
105 
106 
107 
109  // Write the histos to file
110  theFile->cd();
111 
112  hEff_S1RPhi->ComputeEfficiency();
113  hEff_S2RPhi->ComputeEfficiency();
114  hEff_S3RPhi->ComputeEfficiency();
115 
116  hEff_S1RZ->ComputeEfficiency();
117  hEff_S2RZ->ComputeEfficiency();
118  hEff_S3RZ->ComputeEfficiency();
119 
120  hEff_S1RZ_W0->ComputeEfficiency();
121  hEff_S2RZ_W0->ComputeEfficiency();
122  hEff_S3RZ_W0->ComputeEfficiency();
123 
124  hEff_S1RZ_W1->ComputeEfficiency();
125  hEff_S2RZ_W1->ComputeEfficiency();
126  hEff_S3RZ_W1->ComputeEfficiency();
127 
128  hEff_S1RZ_W2->ComputeEfficiency();
129  hEff_S2RZ_W2->ComputeEfficiency();
130  hEff_S3RZ_W2->ComputeEfficiency();
131 
132  // Write histos to file
133  hRes_S1RPhi->Write();
134  hRes_S2RPhi->Write();
135  hRes_S3RPhi->Write();
136 
137  hRes_S1RZ->Write();
138  hRes_S2RZ->Write();
139  hRes_S3RZ->Write();
140 
141  hRes_S1RZ_W0->Write();
142  hRes_S2RZ_W0->Write();
143  hRes_S3RZ_W0->Write();
144 
145  hRes_S1RZ_W1->Write();
146  hRes_S2RZ_W1->Write();
147  hRes_S3RZ_W1->Write();
148 
149  hRes_S1RZ_W2->Write();
150  hRes_S2RZ_W2->Write();
151  hRes_S3RZ_W2->Write();
152 
153 
154  hEff_S1RPhi->Write();
155  hEff_S2RPhi->Write();
156  hEff_S3RPhi->Write();
157 
158  hEff_S1RZ->Write();
159  hEff_S2RZ->Write();
160  hEff_S3RZ->Write();
161 
162  hEff_S1RZ_W0->Write();
163  hEff_S2RZ_W0->Write();
164  hEff_S3RZ_W0->Write();
165 
166  hEff_S1RZ_W1->Write();
167  hEff_S2RZ_W1->Write();
168  hEff_S3RZ_W1->Write();
169 
170  hEff_S1RZ_W2->Write();
171  hEff_S2RZ_W2->Write();
172  hEff_S3RZ_W2->Write();
173 
174  theFile->Close();
175 }
176 
177 // The real analysis
178  void DTRecHitQuality::analyze(const Event & event, const EventSetup& eventSetup){
179  if(debug)
180  cout << "--- [DTRecHitQuality] Analysing Event: #Run: " << event.id().run()
181  << " #Event: " << event.id().event() << endl;
182  theFile->cd();
183  // Get the DT Geometry
184  ESHandle<DTGeometry> dtGeom;
185  eventSetup.get<MuonGeometryRecord>().get(dtGeom);
186 
187 
188  // Get the SimHit collection from the event
190  event.getByLabel(simHitLabel, "MuonDTHits", simHits);
191 
192  // Map simhits per wire
193  map<DTWireId, PSimHitContainer > simHitsPerWire =
195 
196 
197 
198 
199  //=======================================================================================
200  // RecHit analysis at Step 1
201  if(doStep1) {
202  if(debug)
203  cout << " -- DTRecHit S1: begin analysis:" << endl;
204  // Get the rechit collection from the event
205  Handle<DTRecHitCollection> dtRecHits;
206  event.getByLabel(recHitLabel, dtRecHits);
207 
208  // Map rechits per wire
209  map<DTWireId,vector<DTRecHit1DPair> > recHitsPerWire =
210  map1DRecHitsPerWire(dtRecHits.product());
211 
212  compute(dtGeom.product(), simHitsPerWire, recHitsPerWire, 1);
213  }
214 
215 
216 
217  //=======================================================================================
218  // RecHit analysis at Step 2
219  if(doStep2) {
220  if(debug)
221  cout << " -- DTRecHit S2: begin analysis:" << endl;
222 
223  // Get the 2D rechits from the event
225  event.getByLabel(segment2DLabel, segment2Ds);
226 
227  // Map rechits per wire
228  map<DTWireId,vector<DTRecHit1D> > recHitsPerWire =
229  map1DRecHitsPerWire(segment2Ds.product());
230 
231  compute(dtGeom.product(), simHitsPerWire, recHitsPerWire, 2);
232  }
233 
234 
235  //=======================================================================================
236  // RecHit analysis at Step 3
237  if(doStep3) {
238  if(debug)
239  cout << " -- DTRecHit S3: begin analysis:" << endl;
240 
241  // Get the 4D rechits from the event
243  event.getByLabel(segment4DLabel, segment4Ds);
244 
245  // Map rechits per wire
246  map<DTWireId,vector<DTRecHit1D> > recHitsPerWire =
247  map1DRecHitsPerWire(segment4Ds.product());
248 
249  compute(dtGeom.product(), simHitsPerWire, recHitsPerWire, 3);
250  }
251 
252  }
253 
254 
255 
256 // Return a map between DTRecHit1DPair and wireId
257 map<DTWireId, vector<DTRecHit1DPair> >
259  map<DTWireId, vector<DTRecHit1DPair> > ret;
260 
261  for(DTRecHitCollection::const_iterator rechit = dt1DRecHitPairs->begin();
262  rechit != dt1DRecHitPairs->end(); rechit++) {
263  ret[(*rechit).wireId()].push_back(*rechit);
264  }
265 
266  return ret;
267 }
268 
269 
270 // Return a map between DTRecHit1D at S2 and wireId
271 map<DTWireId, vector<DTRecHit1D> >
273  map<DTWireId, vector<DTRecHit1D> > ret;
274 
275  // Loop over all 2D segments
276  for(DTRecSegment2DCollection::const_iterator segment = segment2Ds->begin();
277  segment != segment2Ds->end();
278  segment++) {
279  vector<DTRecHit1D> component1DHits= (*segment).specificRecHits();
280  // Loop over all component 1D hits
281  for(vector<DTRecHit1D>::const_iterator hit = component1DHits.begin();
282  hit != component1DHits.end();
283  hit++) {
284  ret[(*hit).wireId()].push_back(*hit);
285  }
286  }
287  return ret;
288 }
289 
290 
291 
292 // Return a map between DTRecHit1D at S3 and wireId
293 map<DTWireId, std::vector<DTRecHit1D> >
295  map<DTWireId, vector<DTRecHit1D> > ret;
296  // Loop over all 4D segments
297  for(DTRecSegment4DCollection::const_iterator segment = segment4Ds->begin();
298  segment != segment4Ds->end();
299  segment++) {
300  // Get component 2D segments
301  vector<const TrackingRecHit*> segment2Ds = (*segment).recHits();
302  // Loop over 2D segments:
303  for(vector<const TrackingRecHit*>::const_iterator segment2D = segment2Ds.begin();
304  segment2D != segment2Ds.end();
305  segment2D++) {
306  // Get 1D component rechits
307  vector<const TrackingRecHit*> hits = (*segment2D)->recHits();
308  // Loop over them
309  for(vector<const TrackingRecHit*>::const_iterator hit = hits.begin();
310  hit != hits.end(); hit++) {
311  const DTRecHit1D* hit1D = dynamic_cast<const DTRecHit1D*>(*hit);
312  ret[hit1D->wireId()].push_back(*hit1D);
313  }
314  }
315  }
316 
317  return ret;
318 }
319 
320 // Compute SimHit distance from wire (cm)
322  DTWireId wireId,
323  const PSimHit& hit) {
324  float xwire = layer->specificTopology().wirePosition(wireId.wire());
325  LocalPoint entryP = hit.entryPoint();
326  LocalPoint exitP = hit.exitPoint();
327  float xEntry = entryP.x()-xwire;
328  float xExit = exitP.x()-xwire;
329 
330  return fabs(xEntry - (entryP.z()*(xExit-xEntry))/(exitP.z()-entryP.z()));//FIXME: check...
331 }
332 
333 // Compute SimHit impact angle (in direction perp to wire)
335  DTWireId wireId,
336  const PSimHit& hit) {
337  LocalPoint entryP = hit.entryPoint();
338  LocalPoint exitP = hit.exitPoint();
339  float theta=(exitP.x()-entryP.x())/(exitP.z()-entryP.z());
340  return atan(theta);
341 }
342 
343 // Compute SimHit distance from FrontEnd
345  DTWireId wireId,
346  const PSimHit& hit) {
347  LocalPoint entryP = hit.entryPoint();
348  LocalPoint exitP = hit.exitPoint();
349  float wireLenght=layer->specificTopology().cellLenght();
350  return (entryP.y()+exitP.y())/2.+wireLenght;
351 }
352 
353 
354 // Find the RecHit closest to the muon SimHit
355 template <typename type>
356 const type*
358  DTWireId wireId,
359  const vector<type>& recHits,
360  const float simHitDist) {
361  float res = 99999;
362  const type* theBestRecHit = 0;
363  // Loop over RecHits within the cell
364  for(typename vector<type>::const_iterator recHit = recHits.begin();
365  recHit != recHits.end();
366  recHit++) {
367  float distTmp = recHitDistFromWire(*recHit, layer);
368  if(fabs(distTmp-simHitDist) < res) {
369  res = fabs(distTmp-simHitDist);
370  theBestRecHit = &(*recHit);
371  }
372  } // End of loop over RecHits within the cell
373 
374  return theBestRecHit;
375 }
376 
377 
378 // Compute the distance from wire (cm) of a hits in a DTRecHit1DPair
379 float
381  // Compute the rechit distance from wire
382  return fabs(hitPair.localPosition(DTEnums::Left).x() -
383  hitPair.localPosition(DTEnums::Right).x())/2.;
384 }
385 
386 
387 
388 // Compute the distance from wire (cm) of a hits in a DTRecHit1D
389 float
391  return fabs(recHit.localPosition().x() - layer->specificTopology().wirePosition(recHit.wireId().wire()));
392 }
393 
394 
395 template <typename type>
397  std::map<DTWireId, std::vector<PSimHit> > simHitsPerWire,
398  std::map<DTWireId, std::vector<type> > recHitsPerWire,
399  int step) {
400  // Loop over cells with a muon SimHit
401  for(map<DTWireId, vector<PSimHit> >::const_iterator wireAndSHits = simHitsPerWire.begin();
402  wireAndSHits != simHitsPerWire.end();
403  wireAndSHits++) {
404  DTWireId wireId = (*wireAndSHits).first;
405  vector<PSimHit> simHitsInCell = (*wireAndSHits).second;
406 
407  // Get the layer
408  const DTLayer* layer = dtGeom->layer(wireId);
409 
410  // Look for a mu hit in the cell
411  const PSimHit* muSimHit = DTHitQualityUtils::findMuSimHit(simHitsInCell);
412  if (muSimHit==0) {
413  if (debug)
414  cout << " No mu SimHit in channel: " << wireId << ", skipping! " << endl;
415  continue; // Skip this cell
416  }
417 
418  // Find the distance of the simhit from the wire
419  float simHitWireDist = simHitDistFromWire(layer, wireId, *muSimHit);
420  // Skip simhits out of the cell
421  if(simHitWireDist>2.1) {
422  if(debug)
423  cout << " [DTRecHitQuality]###Warning: The mu SimHit in out of the cell, skipping!" << endl;
424  continue; // Skip this cell
425  }
426  GlobalPoint simHitGlobalPos = layer->toGlobal(muSimHit->localPosition());
427 
428  // find SH impact angle
429  float simHitTheta = simHitImpactAngle(layer, wireId, *muSimHit);
430 
431  // find SH distance from FE
432  float simHitFEDist = simHitDistFromFE(layer, wireId, *muSimHit);
433 
434  bool recHitReconstructed = false;
435 
436  // Look for RecHits in the same cell
437  if(recHitsPerWire.find(wireId) == recHitsPerWire.end()) {
438  // No RecHit found in this cell
439  if(debug)
440  cout << " No RecHit found at Step: " << step << " in cell: " << wireId << endl;
441  } else {
442  recHitReconstructed = true;
443  // vector<type> recHits = (*wireAndRecHits).second;
444  vector<type> recHits = recHitsPerWire[wireId];
445  if(debug)
446  cout << " " << recHits.size() << " RecHits, Step " << step << " in channel: " << wireId << endl;
447 
448  // Find the best RecHit
449  const type* theBestRecHit = findBestRecHit(layer, wireId, recHits, simHitWireDist);
450 
451 
452  float recHitWireDist = recHitDistFromWire(*theBestRecHit, layer);
453  if(debug)
454  cout << " SimHit distance from wire: " << simHitWireDist << endl
455  << " SimHit distance from FE: " << simHitFEDist << endl
456  << " SimHit distance angle " << simHitTheta << endl
457  << " RecHit distance from wire: " << recHitWireDist << endl;
458  float recHitErr = recHitPositionError(*theBestRecHit);
459 
460  HRes1DHit *hRes = 0;
461  HRes1DHit *hResTot = 0;
462 
463  // Fill residuals and pulls
464  // Select the histo to be filled
465  if(step == 1) {
466  // Step 1
467  if(wireId.superLayer() != 2) {
468  hRes = hRes_S1RPhi;
469  } else {
470  hResTot = hRes_S1RZ;
471  if(wireId.wheel() == 0)
472  hRes = hRes_S1RZ_W0;
473  if(abs(wireId.wheel()) == 1)
474  hRes = hRes_S1RZ_W1;
475  if(abs(wireId.wheel()) == 2)
476  hRes = hRes_S1RZ_W2;
477  }
478 
479  } else if(step == 2) {
480  // Step 2
481  if(wireId.superlayer() != 2) {
482  hRes = hRes_S2RPhi;
483  } else {
484  hResTot = hRes_S2RZ;
485  if(wireId.wheel() == 0)
486  hRes = hRes_S2RZ_W0;
487  if(abs(wireId.wheel()) == 1)
488  hRes = hRes_S2RZ_W1;
489  if(abs(wireId.wheel()) == 2)
490  hRes = hRes_S2RZ_W2;
491  }
492 
493  } else if(step == 3) {
494  // Step 3
495  if(wireId.superlayer() != 2) {
496  hRes = hRes_S3RPhi;
497  } else {
498  hResTot = hRes_S3RZ;
499  if(wireId.wheel() == 0)
500  hRes = hRes_S3RZ_W0;
501  if(abs(wireId.wheel()) == 1)
502  hRes = hRes_S3RZ_W1;
503  if(abs(wireId.wheel()) == 2)
504  hRes = hRes_S3RZ_W2;
505  }
506 
507  }
508  // Fill
509  hRes->Fill(simHitWireDist, simHitTheta, simHitFEDist, recHitWireDist, simHitGlobalPos.eta(),
510  simHitGlobalPos.phi(),recHitErr);
511  if(hResTot != 0)
512  hResTot->Fill(simHitWireDist, simHitTheta, simHitFEDist, recHitWireDist, simHitGlobalPos.eta(),
513  simHitGlobalPos.phi(),recHitErr);
514 
515  }
516 
517  // Fill Efficiencies
518  HEff1DHit *hEff = 0;
519  HEff1DHit *hEffTot = 0;
520 
521  if(step == 1) {
522  // Step 1
523  if(wireId.superlayer() != 2) {
524  hEff = hEff_S1RPhi;
525  } else {
526  hEffTot = hEff_S1RZ;
527  if(wireId.wheel() == 0)
528  hEff = hEff_S1RZ_W0;
529  if(abs(wireId.wheel()) == 1)
530  hEff = hEff_S1RZ_W1;
531  if(abs(wireId.wheel()) == 2)
532  hEff = hEff_S1RZ_W2;
533  }
534 
535  } else if(step == 2) {
536  // Step 2
537  if(wireId.superlayer() != 2) {
538  hEff = hEff_S2RPhi;
539  } else {
540  hEffTot = hEff_S2RZ;
541  if(wireId.wheel() == 0)
542  hEff = hEff_S2RZ_W0;
543  if(abs(wireId.wheel()) == 1)
544  hEff = hEff_S2RZ_W1;
545  if(abs(wireId.wheel()) == 2)
546  hEff = hEff_S2RZ_W2;
547  }
548 
549  } else if(step == 3) {
550  // Step 3
551  if(wireId.superlayer() != 2) {
552  hEff = hEff_S3RPhi;
553  } else {
554  hEffTot = hEff_S3RZ;
555  if(wireId.wheel() == 0)
556  hEff = hEff_S3RZ_W0;
557  if(abs(wireId.wheel()) == 1)
558  hEff = hEff_S3RZ_W1;
559  if(abs(wireId.wheel()) == 2)
560  hEff = hEff_S3RZ_W2;
561  }
562 
563  }
564  // Fill
565  hEff->Fill(simHitWireDist, simHitGlobalPos.eta(), simHitGlobalPos.phi(), recHitReconstructed);
566  if(hEffTot != 0)
567  hEffTot->Fill(simHitWireDist, simHitGlobalPos.eta(), simHitGlobalPos.phi(), recHitReconstructed);
568  }
569 }
570 
571 // Return the error on the measured (cm) coordinate
573  return sqrt(recHit.localPositionError(DTEnums::Left).xx());
574 }
575 
576 // Return the error on the measured (cm) coordinate
578  return sqrt(recHit.localPositionError().xx());
579 }
type
Definition: HCALResponse.h:22
T getUntrackedParameter(std::string const &, T const &) const
float wirePosition(int wireNumber) const
Returns the x position in the layer of a given wire number.
Definition: DTTopology.cc:73
void Fill(float distSimHit, float etaSimHit, float phiSimHit, bool fillRecHit)
Definition: Histograms.h:202
float xx() const
Definition: LocalError.h:19
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:49
A set of histograms for efficiency 1D DT RecHits.
Definition: Histograms.h:139
Geom::Phi< T > phi() const
Definition: PV3DBase.h:63
T y() const
Definition: PV3DBase.h:57
static const PSimHit * findMuSimHit(const edm::PSimHitContainer &hits)
Select the SimHit from a muon in a vector of SimHits.
#define abs(x)
Definition: mlp_lapack.h:159
const type * findBestRecHit(const DTLayer *layer, DTWireId wireId, const std::vector< type > &recHits, const float simHitDist)
Geom::Theta< T > theta() const
void analyze(const edm::Event &event, const edm::EventSetup &eventSetup)
Perform the real analysis.
void Fill(float distSimHit, float thetaSimHit, float distFESimHit, float distRecHit, float etaSimHit, float phiSimHit, float errRecHit)
Definition: Histograms.h:77
virtual ~DTRecHitQuality()
Destructor.
dictionary map
Definition: Association.py:160
float recHitPositionError(const DTRecHit1DPair &recHit)
virtual LocalError localPositionError() const
const DTLayer * layer(DTLayerId id) const
Return a layer given its id.
Definition: DTGeometry.cc:115
C::const_iterator const_iterator
constant access iterator type
Definition: RangeMap.h:45
const DTTopology & specificTopology() const
Definition: DTLayer.cc:44
Local3DPoint exitPoint() const
Exit point in the local Det frame.
Definition: PSimHit.h:38
float simHitDistFromWire(const DTLayer *layer, DTWireId wireId, const PSimHit &hit)
DTRecHitQuality(const edm::ParameterSet &pset)
Constructor.
Local3DPoint localPosition() const
Definition: PSimHit.h:44
T sqrt(T t)
Definition: SSEVec.h:28
T z() const
Definition: PV3DBase.h:58
float recHitDistFromWire(const DTRecHit1DPair &hitPair, const DTLayer *layer)
int superLayer() const
Return the superlayer number.
tuple pset
Definition: CrabTask.py:85
std::map< DTWireId, std::vector< DTRecHit1DPair > > map1DRecHitsPerWire(const DTRecHitCollection *dt1DRecHitPairs)
A set of histograms of residuals and pulls for 1D RecHits.
Definition: Histograms.h:25
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
void compute(const DTGeometry *dtGeom, std::map< DTWireId, std::vector< PSimHit > > simHitsPerWire, std::map< DTWireId, std::vector< type > > recHitsPerWire, int step)
virtual LocalError localPositionError() const
Return the 3-dimensional error on the local position.
Definition: DTRecHit1D.h:68
float simHitImpactAngle(const DTLayer *layer, DTWireId wireId, const PSimHit &hit)
virtual LocalPoint localPosition() const
Return the 3-dimensional local position.
Definition: DTRecHit1D.h:62
int wire() const
Return the wire number.
Definition: DTWireId.h:58
int superlayer() const
Return the superlayer number (deprecated method name)
float simHitDistFromFE(const DTLayer *layer, DTWireId wireId, const PSimHit &hit)
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
tuple simHits
Definition: trackerHits.py:16
T const * product() const
Definition: Handle.h:74
T eta() const
Definition: PV3DBase.h:70
tuple cout
Definition: gather_cfg.py:41
static std::map< DTWireId, edm::PSimHitContainer > mapSimHitsPerWire(const edm::PSimHitContainer &simhits)
#define debug
Definition: MEtoEDMFormat.h:34
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:47
T x() const
Definition: PV3DBase.h:56
const float cellLenght() const
Definition: DTTopology.h:75
Local3DPoint entryPoint() const
Entry point in the local Det frame.
Definition: PSimHit.h:35
virtual LocalPoint localPosition() const
DTWireId wireId() const
Return the wireId.
Definition: DTRecHit1D.h:109