CMS 3D CMS Logo

MuonPathAssociator.cc
Go to the documentation of this file.
5 
6 using namespace edm;
7 using namespace std;
8 using namespace cmsdt;
9 
10 // ============================================================================
11 // Constructors and destructor
12 // ============================================================================
15  std::shared_ptr<GlobalCoordsObtainer> &globalcoordsobtainer) {
16  // Obtention of parameters
17  debug_ = pset.getUntrackedParameter<bool>("debug");
18  clean_chi2_correlation_ = pset.getUntrackedParameter<bool>("clean_chi2_correlation");
19  useBX_correlation_ = pset.getUntrackedParameter<bool>("useBX_correlation");
20  allow_confirmation_ = pset.getUntrackedParameter<bool>("allow_confirmation");
21  dT0_correlate_TP_ = pset.getUntrackedParameter<double>("dT0_correlate_TP");
22  dBX_correlate_TP_ = pset.getUntrackedParameter<int>("dBX_correlate_TP");
23  dTanPsi_correlate_TP_ = pset.getUntrackedParameter<double>("dTanPsi_correlate_TP");
24  minx_match_2digis_ = pset.getUntrackedParameter<double>("minx_match_2digis");
25  chi2corTh_ = pset.getUntrackedParameter<double>("chi2corTh");
26  geometry_tag_ = pset.getUntrackedParameter<std::string>("geometry_tag");
27 
28  if (debug_)
29  LogDebug("MuonPathAssociator") << "MuonPathAssociator: constructor";
30 
31  //shift
32  int rawId;
33  shift_filename_ = pset.getParameter<edm::FileInPath>("shift_filename");
34  std::ifstream ifin3(shift_filename_.fullPath());
35  double shift;
36  if (ifin3.fail()) {
37  throw cms::Exception("Missing Input File")
38  << "MuonPathAnalyzerPerSL::MuonPathAnalyzerPerSL() - Cannot find " << shift_filename_.fullPath();
39  }
40  while (ifin3.good()) {
41  ifin3 >> rawId >> shift;
42  shiftinfo_[rawId] = shift;
43  }
44 
46  globalcoordsobtainer_ = globalcoordsobtainer;
47 }
48 
50  if (debug_)
51  LogDebug("MuonPathAssociator") << "MuonPathAssociator: destructor";
52 }
53 
54 // ============================================================================
55 // Main methods (initialise, run, finish)
56 // ============================================================================
58  if (debug_)
59  LogDebug("MuonPathAssociator") << "MuonPathAssociator::initialiase";
60 
62  iEventSetup.get<MuonGeometryRecord>().get(geometry_tag_, geom);
63  dtGeo_ = &(*geom);
64 }
65 
67  const edm::EventSetup &iEventSetup,
69  std::vector<metaPrimitive> &inMPaths,
70  std::vector<metaPrimitive> &outMPaths) {
71  if (dT0_correlate_TP_)
72  correlateMPaths(digis, inMPaths, outMPaths);
73  else {
74  outMPaths.insert(outMPaths.end(), inMPaths.begin(), inMPaths.end());
75  }
76 }
77 
79  if (debug_)
80  LogDebug("MuonPathAssociator") << "MuonPathAssociator: finish";
81 };
82 
84  std::vector<metaPrimitive> &inMPaths,
85  std::vector<metaPrimitive> &outMPaths) {
86  if (debug_)
87  LogDebug("MuonPathAssociator") << "starting correlation";
88 
89  for (int wh = -2; wh <= 2; wh++) { //wheel num: -2, -1, 0, +1, +2
90  for (int st = 1; st <= 4; st++) { //station num (MB): 1, 2, 3, 4
91  for (int se = 1; se <= 14; se++) { //sector number: 1-12, special sectors 13, 14 to account for bigger MB4s
92  if (se >= 13 && st != 4)
93  continue;
94 
95  DTChamberId ChId(wh, st, se);
96  DTSuperLayerId sl1Id(wh, st, se, 1);
97  DTSuperLayerId sl3Id(wh, st, se, 3);
98 
99  //filterSL1
100  std::vector<metaPrimitive> SL1metaPrimitives;
101  for (const auto &metaprimitiveIt : inMPaths) {
102  if (metaprimitiveIt.rawId == sl1Id.rawId())
103  SL1metaPrimitives.push_back(metaprimitiveIt);
104  }
105 
106  //filterSL3
107  std::vector<metaPrimitive> SL3metaPrimitives;
108  for (const auto &metaprimitiveIt : inMPaths) {
109  if (metaprimitiveIt.rawId == sl3Id.rawId())
110  SL3metaPrimitives.push_back(metaprimitiveIt);
111  }
112 
113  if (SL1metaPrimitives.empty() and SL3metaPrimitives.empty())
114  continue;
115 
116  if (debug_)
117  LogDebug("MuonPathAssociator") << "correlating " << SL1metaPrimitives.size() << " metaPrim in SL1 and "
118  << SL3metaPrimitives.size() << " in SL3 for " << sl3Id;
119 
120  bool at_least_one_correlation = false;
121  bool at_least_one_SL1_confirmation = false;
122  bool at_least_one_SL3_confirmation = false;
123 
124  bool useFitSL1[SL1metaPrimitives.size()];
125  for (unsigned int i = 0; i < SL1metaPrimitives.size(); i++)
126  useFitSL1[i] = false;
127  bool useFitSL3[SL3metaPrimitives.size()];
128  for (unsigned int i = 0; i < SL3metaPrimitives.size(); i++)
129  useFitSL3[i] = false;
130 
131  //SL1-SL3
132  vector<metaPrimitive> chamberMetaPrimitives;
133  vector<metaPrimitive> confirmedMetaPrimitives;
134  vector<metaPrimitive> normalMetaPrimitives;
135  int sl1 = 0;
136  int sl3 = 0;
137  for (auto SL1metaPrimitive = SL1metaPrimitives.begin(); SL1metaPrimitive != SL1metaPrimitives.end();
138  ++SL1metaPrimitive, sl1++, sl3 = -1) {
139  if (clean_chi2_correlation_)
140  at_least_one_correlation = false;
141  for (auto SL3metaPrimitive = SL3metaPrimitives.begin(); SL3metaPrimitive != SL3metaPrimitives.end();
142  ++SL3metaPrimitive, sl3++) {
143  if (std::abs(SL1metaPrimitive->tanPhi - SL3metaPrimitive->tanPhi) > dTanPsi_correlate_TP_)
144  continue; //TanPsi match, SliceTest only
145  if (useBX_correlation_) {
146  if (abs(round(SL1metaPrimitive->t0 / (float)LHC_CLK_FREQ) -
147  round(SL3metaPrimitive->t0 / (float)LHC_CLK_FREQ)) > dBX_correlate_TP_)
148  continue; //BX match
149  } else {
150  if (std::abs(SL1metaPrimitive->t0 - SL3metaPrimitive->t0) >= dT0_correlate_TP_)
151  continue; //time match
152  }
153  long int PosSL1 = (int)round(INCREASED_RES_POS_POW * 10 * SL1metaPrimitive->x);
154  long int PosSL3 = (int)round(INCREASED_RES_POS_POW * 10 * SL3metaPrimitive->x);
155  double NewSlope = -999.;
156 
157  long int pos = (PosSL3 + PosSL1) / 2;
158  // FW always rounds down (e.g 29.5 -> 29, -29.5 -> -30). For negative numbers, we don't do the same.
159  // Let's fix it (this also happens for the slope)
160  if (((PosSL3 + PosSL1) % 2 != 0) && (pos < 0)) {
161  pos--;
162  }
163 
164  long int difPos_mm_x4 = PosSL3 - PosSL1;
165  long int tanPsi_x4096_x128 = (difPos_mm_x4)*VERT_PHI1_PHI3_INV;
166  long int tanpsi = tanPsi_x4096_x128 / ((long int)pow(2, 5 + INCREASED_RES_POS));
167  if (tanpsi < 0 && tanPsi_x4096_x128 % ((long int)pow(2, 5 + INCREASED_RES_POS)) != 0)
168  tanpsi--;
169  NewSlope = -tanpsi / (double)INCREASED_RES_SLOPE_POW;
170  double MeanT0 = (SL1metaPrimitive->t0 + SL3metaPrimitive->t0) / 2;
171  double MeanPos = (PosSL3 + PosSL1) / (2. * INCREASED_RES_POS_POW * 10);
172 
173  DTSuperLayerId SLId1(SL1metaPrimitive->rawId);
174  DTSuperLayerId SLId3(SL3metaPrimitive->rawId);
175  DTWireId wireId1(SLId1, 2, 1);
176  DTWireId wireId3(SLId3, 2, 1);
177 
178  int shift_sl1 = int(round(shiftinfo_[wireId1.rawId()] * INCREASED_RES_POS_POW * 10));
179  int shift_sl3 = int(round(shiftinfo_[wireId3.rawId()] * INCREASED_RES_POS_POW * 10));
180  if (shift_sl1 < shift_sl3) {
181  pos -= shift_sl1;
182  } else
183  pos -= shift_sl3;
184 
185  int wi[8], tdc[8], lat[8];
186  wi[0] = SL1metaPrimitive->wi1;
187  tdc[0] = SL1metaPrimitive->tdc1;
188  lat[0] = SL1metaPrimitive->lat1;
189  wi[1] = SL1metaPrimitive->wi2;
190  tdc[1] = SL1metaPrimitive->tdc2;
191  lat[1] = SL1metaPrimitive->lat2;
192  wi[2] = SL1metaPrimitive->wi3;
193  tdc[2] = SL1metaPrimitive->tdc3;
194  lat[2] = SL1metaPrimitive->lat3;
195  wi[3] = SL1metaPrimitive->wi4;
196  tdc[3] = SL1metaPrimitive->tdc4;
197  lat[3] = SL1metaPrimitive->lat4;
198  wi[4] = SL3metaPrimitive->wi1;
199  tdc[4] = SL3metaPrimitive->tdc1;
200  lat[4] = SL3metaPrimitive->lat1;
201  wi[5] = SL3metaPrimitive->wi2;
202  tdc[5] = SL3metaPrimitive->tdc2;
203  lat[5] = SL3metaPrimitive->lat2;
204  wi[6] = SL3metaPrimitive->wi3;
205  tdc[6] = SL3metaPrimitive->tdc3;
206  lat[6] = SL3metaPrimitive->lat3;
207  wi[7] = SL3metaPrimitive->wi4;
208  tdc[7] = SL3metaPrimitive->tdc4;
209  lat[7] = SL3metaPrimitive->lat4;
210 
211  long int chi2 = 0;
212 
213  long int Z_FACTOR_CORR[8] = {-6, -2, 2, 6, -6, -2, 2, 6};
214 
215  for (int i = 0; i < 8; i++) {
216  int sign = 2 * (i / 4) - 1;
217  Z_FACTOR_CORR[i] = Z_FACTOR_CORR[i] * CELL_HEIGHT + CH_CENTER_TO_MID_SL_X2 * sign;
218  }
219  long int sum_A, sum_B;
220  for (int i = 0; i < NUM_LAYERS_2SL; i++) {
221  long int shift, slTime;
222  if (i / NUM_LAYERS == 0) { // layers 0 - 3 -> SL1
223  shift = shift_sl1;
224  slTime = SL1metaPrimitive->t0;
225  } else { // layers 4 - 7 -> SL3
226  shift = shift_sl3;
227  slTime = SL3metaPrimitive->t0;
228  }
229  if (wi[i] != -1) {
230  long int drift_dist_um_x4 = DRIFT_SPEED_X4 * (((long int)tdc[i]) - slTime);
231  long int wireHorizPos_x4 =
232  (CELL_LENGTH * wi[i] + ((i + 1) % 2) * CELL_SEMILENGTH) * INCREASED_RES_POS_POW;
233  long int pos_mm_x4;
234 
235  if (lat[i] == 0) {
236  pos_mm_x4 = wireHorizPos_x4 - (drift_dist_um_x4 >> 10);
237  } else {
238  pos_mm_x4 = wireHorizPos_x4 + (drift_dist_um_x4 >> 10);
239  }
240  sum_A = shift + pos_mm_x4 - (long int)round(MeanPos * 10 * INCREASED_RES_POS_POW);
241  sum_A = sum_A << (14 - INCREASED_RES_POS);
242  sum_B = Z_FACTOR_CORR[i] * (long int)round(-NewSlope * INCREASED_RES_SLOPE_POW);
243  chi2 += ((sum_A - sum_B) * (sum_A - sum_B)) >> 2;
244  }
245  }
246 
247  double newChi2 = (double)(chi2 >> INCREASED_RES_POS_POW) / (1024. * 100.);
248 
249  if (newChi2 > chi2corTh_)
250  continue;
251 
252  // Fill the used vectors
253  useFitSL1[sl1] = true;
254  useFitSL3[sl3] = true;
255 
256  int quality = 0;
257  if (SL3metaPrimitive->quality == LOWQ and SL1metaPrimitive->quality == LOWQ)
258  quality = LOWLOWQ;
259 
260  if ((SL3metaPrimitive->quality == HIGHQ && SL1metaPrimitive->quality == LOWQ) or
261  (SL1metaPrimitive->quality == HIGHQ && SL3metaPrimitive->quality == LOWQ))
262  quality = HIGHLOWQ;
263 
264  if (SL3metaPrimitive->quality == HIGHQ && SL1metaPrimitive->quality == HIGHQ)
265  quality = HIGHHIGHQ;
266 
267  double phi = -999.;
268  double phiB = -999.;
269  double phi_cmssw = -999.;
270  double phiB_cmssw = -999.;
271  double z = 0;
272  if (ChId.station() >= 3)
273  z = Z_SHIFT_MB4;
274  GlobalPoint jm_x_cmssw_global = dtGeo_->chamber(ChId)->toGlobal(
275  LocalPoint(MeanPos, 0., z)); //Jm_x is already extrapolated to the middle of the SL
276  int thisec = ChId.sector();
277  if (se == 13)
278  thisec = 4;
279  if (se == 14)
280  thisec = 10;
281  phi_cmssw = jm_x_cmssw_global.phi() - PHI_CONV * (thisec - 1);
282  double psi = atan(NewSlope);
283  phiB_cmssw = hasPosRF(ChId.wheel(), ChId.sector()) ? psi - phi_cmssw : -psi - phi_cmssw;
284 
285  auto global_coords = globalcoordsobtainer_->get_global_coordinates(ChId.rawId(), 0, pos, tanpsi);
286  phi = global_coords[0];
287  phiB = global_coords[1];
288 
289  if (!clean_chi2_correlation_)
290  outMPaths.emplace_back(ChId.rawId(),
291  MeanT0,
292  MeanPos,
293  NewSlope,
294  phi,
295  phiB,
296  phi_cmssw,
297  phiB_cmssw,
298  newChi2,
299  quality,
300  SL1metaPrimitive->wi1,
301  SL1metaPrimitive->tdc1,
302  SL1metaPrimitive->lat1,
303  SL1metaPrimitive->wi2,
304  SL1metaPrimitive->tdc2,
305  SL1metaPrimitive->lat2,
306  SL1metaPrimitive->wi3,
307  SL1metaPrimitive->tdc3,
308  SL1metaPrimitive->lat3,
309  SL1metaPrimitive->wi4,
310  SL1metaPrimitive->tdc4,
311  SL1metaPrimitive->lat4,
312  SL3metaPrimitive->wi1,
313  SL3metaPrimitive->tdc1,
314  SL3metaPrimitive->lat1,
315  SL3metaPrimitive->wi2,
316  SL3metaPrimitive->tdc2,
317  SL3metaPrimitive->lat2,
318  SL3metaPrimitive->wi3,
319  SL3metaPrimitive->tdc3,
320  SL3metaPrimitive->lat3,
321  SL3metaPrimitive->wi4,
322  SL3metaPrimitive->tdc4,
323  SL3metaPrimitive->lat4);
324  else
325  chamberMetaPrimitives.emplace_back(ChId.rawId(),
326  MeanT0,
327  MeanPos,
328  NewSlope,
329  phi,
330  phiB,
331  phi_cmssw,
332  phiB_cmssw,
333  newChi2,
334  quality,
335  SL1metaPrimitive->wi1,
336  SL1metaPrimitive->tdc1,
337  SL1metaPrimitive->lat1,
338  SL1metaPrimitive->wi2,
339  SL1metaPrimitive->tdc2,
340  SL1metaPrimitive->lat2,
341  SL1metaPrimitive->wi3,
342  SL1metaPrimitive->tdc3,
343  SL1metaPrimitive->lat3,
344  SL1metaPrimitive->wi4,
345  SL1metaPrimitive->tdc4,
346  SL1metaPrimitive->lat4,
347  SL3metaPrimitive->wi1,
348  SL3metaPrimitive->tdc1,
349  SL3metaPrimitive->lat1,
350  SL3metaPrimitive->wi2,
351  SL3metaPrimitive->tdc2,
352  SL3metaPrimitive->lat2,
353  SL3metaPrimitive->wi3,
354  SL3metaPrimitive->tdc3,
355  SL3metaPrimitive->lat3,
356  SL3metaPrimitive->wi4,
357  SL3metaPrimitive->tdc4,
358  SL3metaPrimitive->lat4);
359 
360  at_least_one_correlation = true;
361  }
362 
363  if (at_least_one_correlation == false &&
364  allow_confirmation_ == true) { //no correlation was found, trying with pairs of two digis in the other SL
365  int matched_digis = 0;
366  double minx = minx_match_2digis_;
367  double min2x = minx_match_2digis_;
368  int best_tdc = -1;
369  int next_tdc = -1;
370  int best_wire = -1;
371  int next_wire = -1;
372  int best_layer = -1;
373  int next_layer = -1;
374  int best_lat = -1;
375  int next_lat = -1;
376  int lat = -1;
377  for (const auto &dtLayerId_It : *dtdigis) {
378  const DTLayerId dtLId = dtLayerId_It.first;
379  // creating a new DTSuperLayerId object to compare with the required SL id
380  const DTSuperLayerId dtSLId(dtLId.wheel(), dtLId.station(), dtLId.sector(), 3);
381  if (dtSLId.rawId() != sl3Id.rawId())
382  continue;
383  double l_shift = 0;
384  if (dtLId.layer() == 4)
385  l_shift = X_POS_L4;
386  else if (dtLId.layer() == 3)
387  l_shift = X_POS_L3;
388  else if (dtLId.layer() == 2)
389  l_shift = -1 * X_POS_L3;
390  else if (dtLId.layer() == 1)
391  l_shift = -1 * X_POS_L4;
392  double x_inSL3 = SL1metaPrimitive->x - SL1metaPrimitive->tanPhi * (VERT_PHI1_PHI3 + l_shift);
393  for (auto digiIt = (dtLayerId_It.second).first; digiIt != (dtLayerId_It.second).second; ++digiIt) {
394  DTWireId wireId(dtLId, (*digiIt).wire());
395  double x_wire =
396  shiftinfo_[wireId.rawId()] + ((*digiIt).time() - SL1metaPrimitive->t0) * DRIFT_SPEED / 10.;
397  double x_wire_left =
398  shiftinfo_[wireId.rawId()] - ((*digiIt).time() - SL1metaPrimitive->t0) * DRIFT_SPEED / 10.;
399  lat = 1;
400  if (std::abs(x_inSL3 - x_wire) > std::abs(x_inSL3 - x_wire_left)) {
401  x_wire = x_wire_left; //choose the closest laterality
402  lat = 0;
403  }
404  if (std::abs(x_inSL3 - x_wire) < minx) {
405  min2x = minx;
406  minx = std::abs(x_inSL3 - x_wire);
407  next_wire = best_wire;
408  next_tdc = best_tdc;
409  next_layer = best_layer;
410  next_lat = best_lat;
411 
412  best_wire = (*digiIt).wire();
413  best_tdc = (*digiIt).time();
414  best_layer = dtLId.layer();
415  best_lat = lat;
416  matched_digis++;
417  } else if ((std::abs(x_inSL3 - x_wire) >= minx) && (std::abs(x_inSL3 - x_wire) < min2x)) {
418  min2x = std::abs(x_inSL3 - x_wire);
419  next_wire = (*digiIt).wire();
420  next_tdc = (*digiIt).time();
421  next_layer = dtLId.layer();
422  next_lat = lat;
423  matched_digis++;
424  }
425  }
426  }
427  if (matched_digis >= 2 and best_layer != -1 and next_layer != -1) {
428  int new_quality = CHIGHQ;
429  if (SL1metaPrimitive->quality == LOWQ)
430  new_quality = CLOWQ;
431 
432  int wi1 = -1;
433  int tdc1 = -1;
434  int lat1 = -1;
435  int wi2 = -1;
436  int tdc2 = -1;
437  int lat2 = -1;
438  int wi3 = -1;
439  int tdc3 = -1;
440  int lat3 = -1;
441  int wi4 = -1;
442  int tdc4 = -1;
443  int lat4 = -1;
444 
445  if (next_layer == 1) {
446  wi1 = next_wire;
447  tdc1 = next_tdc;
448  lat1 = next_lat;
449  }
450  if (next_layer == 2) {
451  wi2 = next_wire;
452  tdc2 = next_tdc;
453  lat2 = next_lat;
454  }
455  if (next_layer == 3) {
456  wi3 = next_wire;
457  tdc3 = next_tdc;
458  lat3 = next_lat;
459  }
460  if (next_layer == 4) {
461  wi4 = next_wire;
462  tdc4 = next_tdc;
463  lat4 = next_lat;
464  }
465 
466  if (best_layer == 1) {
467  wi1 = best_wire;
468  tdc1 = best_tdc;
469  lat1 = best_lat;
470  }
471  if (best_layer == 2) {
472  wi2 = best_wire;
473  tdc2 = best_tdc;
474  lat2 = best_lat;
475  }
476  if (best_layer == 3) {
477  wi3 = best_wire;
478  tdc3 = best_tdc;
479  lat3 = best_lat;
480  }
481  if (best_layer == 4) {
482  wi4 = best_wire;
483  tdc4 = best_tdc;
484  lat4 = best_lat;
485  }
486 
487  if (!clean_chi2_correlation_)
488  outMPaths.emplace_back(metaPrimitive({ChId.rawId(),
489  SL1metaPrimitive->t0,
490  SL1metaPrimitive->x,
491  SL1metaPrimitive->tanPhi,
492  SL1metaPrimitive->phi,
493  SL1metaPrimitive->phiB,
494  SL1metaPrimitive->phi_cmssw,
495  SL1metaPrimitive->phiB_cmssw,
496  SL1metaPrimitive->chi2,
497  new_quality,
498  SL1metaPrimitive->wi1,
499  SL1metaPrimitive->tdc1,
500  SL1metaPrimitive->lat1,
501  SL1metaPrimitive->wi2,
502  SL1metaPrimitive->tdc2,
503  SL1metaPrimitive->lat2,
504  SL1metaPrimitive->wi3,
505  SL1metaPrimitive->tdc3,
506  SL1metaPrimitive->lat3,
507  SL1metaPrimitive->wi4,
508  SL1metaPrimitive->tdc4,
509  SL1metaPrimitive->lat4,
510  wi1,
511  tdc1,
512  lat1,
513  wi2,
514  tdc2,
515  lat2,
516  wi3,
517  tdc3,
518  lat3,
519  wi4,
520  tdc4,
521  lat4,
522  -1}));
523  else
524  confirmedMetaPrimitives.emplace_back(metaPrimitive({ChId.rawId(),
525  SL1metaPrimitive->t0,
526  SL1metaPrimitive->x,
527  SL1metaPrimitive->tanPhi,
528  SL1metaPrimitive->phi,
529  SL1metaPrimitive->phiB,
530  SL1metaPrimitive->phi_cmssw,
531  SL1metaPrimitive->phiB_cmssw,
532  SL1metaPrimitive->chi2,
533  new_quality,
534  SL1metaPrimitive->wi1,
535  SL1metaPrimitive->tdc1,
536  SL1metaPrimitive->lat1,
537  SL1metaPrimitive->wi2,
538  SL1metaPrimitive->tdc2,
539  SL1metaPrimitive->lat2,
540  SL1metaPrimitive->wi3,
541  SL1metaPrimitive->tdc3,
542  SL1metaPrimitive->lat3,
543  SL1metaPrimitive->wi4,
544  SL1metaPrimitive->tdc4,
545  SL1metaPrimitive->lat4,
546  wi1,
547  tdc1,
548  lat1,
549  wi2,
550  tdc2,
551  lat2,
552  wi3,
553  tdc3,
554  lat3,
555  wi4,
556  tdc4,
557  lat4,
558  -1}));
559  useFitSL1[sl1] = true;
560  at_least_one_SL1_confirmation = true;
561  }
562  }
563  }
564 
565  //finish SL1-SL3
566 
567  //SL3-SL1
568  sl3 = 0;
569  for (auto SL3metaPrimitive = SL3metaPrimitives.begin(); SL3metaPrimitive != SL3metaPrimitives.end();
570  ++SL3metaPrimitive, sl3++) {
571  if (useFitSL3[sl3])
572  continue;
573  if ((at_least_one_correlation == false || clean_chi2_correlation_) &&
574  allow_confirmation_) { //no correlation was found, trying with pairs of two digis in the other SL
575 
576  int matched_digis = 0;
577  double minx = minx_match_2digis_;
578  double min2x = minx_match_2digis_;
579  int best_tdc = -1;
580  int next_tdc = -1;
581  int best_wire = -1;
582  int next_wire = -1;
583  int best_layer = -1;
584  int next_layer = -1;
585  int best_lat = -1;
586  int next_lat = -1;
587  int lat = -1;
588 
589  for (const auto &dtLayerId_It : *dtdigis) {
590  const DTLayerId dtLId = dtLayerId_It.first;
591  // creating a new DTSuperLayerId object to compare with the required SL id
592  const DTSuperLayerId dtSLId(dtLId.wheel(), dtLId.station(), dtLId.sector(), 1);
593  if (dtSLId.rawId() != sl1Id.rawId())
594  continue;
595  double l_shift = 0;
596  if (dtLId.layer() == 4)
597  l_shift = X_POS_L4;
598  if (dtLId.layer() == 3)
599  l_shift = X_POS_L3;
600  if (dtLId.layer() == 2)
601  l_shift = -1 * X_POS_L3;
602  if (dtLId.layer() == 1)
603  l_shift = -1 * X_POS_L4;
604  double x_inSL1 = SL3metaPrimitive->x + SL3metaPrimitive->tanPhi * (VERT_PHI1_PHI3 - l_shift);
605  for (auto digiIt = (dtLayerId_It.second).first; digiIt != (dtLayerId_It.second).second; ++digiIt) {
606  DTWireId wireId(dtLId, (*digiIt).wire());
607  double x_wire =
608  shiftinfo_[wireId.rawId()] + ((*digiIt).time() - SL3metaPrimitive->t0) * DRIFT_SPEED / 10.;
609  double x_wire_left =
610  shiftinfo_[wireId.rawId()] - ((*digiIt).time() - SL3metaPrimitive->t0) * DRIFT_SPEED / 10.;
611  lat = 1;
612  if (std::abs(x_inSL1 - x_wire) > std::abs(x_inSL1 - x_wire_left)) {
613  x_wire = x_wire_left; //choose the closest laterality
614  lat = 0;
615  }
616  if (std::abs(x_inSL1 - x_wire) < minx) {
617  minx = std::abs(x_inSL1 - x_wire);
618  next_wire = best_wire;
619  next_tdc = best_tdc;
620  next_layer = best_layer;
621  next_lat = best_lat;
622 
623  best_wire = (*digiIt).wire();
624  best_tdc = (*digiIt).time();
625  best_layer = dtLId.layer();
626  best_lat = lat;
627  matched_digis++;
628  } else if ((std::abs(x_inSL1 - x_wire) >= minx) && (std::abs(x_inSL1 - x_wire) < min2x)) {
629  minx = std::abs(x_inSL1 - x_wire);
630  next_wire = (*digiIt).wire();
631  next_tdc = (*digiIt).time();
632  next_layer = dtLId.layer();
633  next_lat = lat;
634  matched_digis++;
635  }
636  }
637  }
638  if (matched_digis >= 2 and best_layer != -1 and next_layer != -1) {
639  int new_quality = CHIGHQ;
640  if (SL3metaPrimitive->quality == LOWQ)
641  new_quality = CLOWQ;
642 
643  int wi1 = -1;
644  int tdc1 = -1;
645  int lat1 = -1;
646  int wi2 = -1;
647  int tdc2 = -1;
648  int lat2 = -1;
649  int wi3 = -1;
650  int tdc3 = -1;
651  int lat3 = -1;
652  int wi4 = -1;
653  int tdc4 = -1;
654  int lat4 = -1;
655 
656  if (next_layer == 1) {
657  wi1 = next_wire;
658  tdc1 = next_tdc;
659  lat1 = next_lat;
660  }
661  if (next_layer == 2) {
662  wi2 = next_wire;
663  tdc2 = next_tdc;
664  lat2 = next_lat;
665  }
666  if (next_layer == 3) {
667  wi3 = next_wire;
668  tdc3 = next_tdc;
669  lat3 = next_lat;
670  }
671  if (next_layer == 4) {
672  wi4 = next_wire;
673  tdc4 = next_tdc;
674  lat4 = next_lat;
675  }
676 
677  if (best_layer == 1) {
678  wi1 = best_wire;
679  tdc1 = best_tdc;
680  lat1 = best_lat;
681  }
682  if (best_layer == 2) {
683  wi2 = best_wire;
684  tdc2 = best_tdc;
685  lat2 = best_lat;
686  }
687  if (best_layer == 3) {
688  wi3 = best_wire;
689  tdc3 = best_tdc;
690  lat3 = best_lat;
691  }
692  if (best_layer == 4) {
693  wi4 = best_wire;
694  tdc4 = best_tdc;
695  lat4 = best_lat;
696  }
697 
698  if (!clean_chi2_correlation_)
699  outMPaths.push_back(metaPrimitive({ChId.rawId(),
700  SL3metaPrimitive->t0,
701  SL3metaPrimitive->x,
702  SL3metaPrimitive->tanPhi,
703  SL3metaPrimitive->phi,
704  SL3metaPrimitive->phiB,
705  SL3metaPrimitive->phi_cmssw,
706  SL3metaPrimitive->phiB_cmssw,
707  SL3metaPrimitive->chi2,
708  new_quality,
709  wi1,
710  tdc1,
711  lat1,
712  wi2,
713  tdc2,
714  lat2,
715  wi3,
716  tdc3,
717  lat3,
718  wi4,
719  tdc4,
720  lat4,
721  SL3metaPrimitive->wi1,
722  SL3metaPrimitive->tdc1,
723  SL3metaPrimitive->lat1,
724  SL3metaPrimitive->wi2,
725  SL3metaPrimitive->tdc2,
726  SL3metaPrimitive->lat2,
727  SL3metaPrimitive->wi3,
728  SL3metaPrimitive->tdc3,
729  SL3metaPrimitive->lat3,
730  SL3metaPrimitive->wi4,
731  SL3metaPrimitive->tdc4,
732  SL3metaPrimitive->lat4,
733  -1}));
734  else
735  confirmedMetaPrimitives.push_back(metaPrimitive({ChId.rawId(),
736  SL3metaPrimitive->t0,
737  SL3metaPrimitive->x,
738  SL3metaPrimitive->tanPhi,
739  SL3metaPrimitive->phi,
740  SL3metaPrimitive->phiB,
741  SL3metaPrimitive->phi_cmssw,
742  SL3metaPrimitive->phiB_cmssw,
743  SL3metaPrimitive->chi2,
744  new_quality,
745  wi1,
746  tdc1,
747  lat1,
748  wi2,
749  tdc2,
750  lat2,
751  wi3,
752  tdc3,
753  lat3,
754  wi4,
755  tdc4,
756  lat4,
757  SL3metaPrimitive->wi1,
758  SL3metaPrimitive->tdc1,
759  SL3metaPrimitive->lat1,
760  SL3metaPrimitive->wi2,
761  SL3metaPrimitive->tdc2,
762  SL3metaPrimitive->lat2,
763  SL3metaPrimitive->wi3,
764  SL3metaPrimitive->tdc3,
765  SL3metaPrimitive->lat3,
766  SL3metaPrimitive->wi4,
767  SL3metaPrimitive->tdc4,
768  SL3metaPrimitive->lat4,
769  -1}));
770  useFitSL3[sl3] = true;
771  at_least_one_SL3_confirmation = true;
772  }
773  }
774  }
775  // Start correlation cleaning
776  if (clean_chi2_correlation_) {
777  if (debug_)
778  LogDebug("MuonPathAssociator") << "Pushing back correlated MPs to the MPs collection";
779  removeSharingFits(chamberMetaPrimitives, outMPaths);
780  }
781  if (clean_chi2_correlation_) {
782  if (debug_)
783  LogDebug("MuonPathAssociator") << "Pushing back confirmed MPs to the complete vector";
784  removeSharingHits(confirmedMetaPrimitives, chamberMetaPrimitives, outMPaths);
785  }
786 
787  //finish SL3-SL1
788  if (at_least_one_correlation == false || clean_chi2_correlation_) {
789  if (debug_ && !at_least_one_correlation)
790  LogDebug("MuonPathAssociator")
791  << "correlation we found zero correlations, adding both collections as they are to the outMPaths";
792  if (debug_)
793  LogDebug("MuonPathAssociator")
794  << "correlation sizes:" << SL1metaPrimitives.size() << " " << SL3metaPrimitives.size();
795  if (at_least_one_SL1_confirmation == false || clean_chi2_correlation_) {
796  sl1 = 0;
797  for (auto SL1metaPrimitive = SL1metaPrimitives.begin(); SL1metaPrimitive != SL1metaPrimitives.end();
798  ++SL1metaPrimitive, sl1++) {
799  if (useFitSL1[sl1])
800  continue;
801 
802  DTSuperLayerId SLId(SL1metaPrimitive->rawId);
803  DTChamberId(SLId.wheel(), SLId.station(), SLId.sector());
804  metaPrimitive newSL1metaPrimitive = {ChId.rawId(),
805  SL1metaPrimitive->t0,
806  SL1metaPrimitive->x,
807  SL1metaPrimitive->tanPhi,
808  SL1metaPrimitive->phi,
809  SL1metaPrimitive->phiB,
810  SL1metaPrimitive->phi_cmssw,
811  SL1metaPrimitive->phiB_cmssw,
812  SL1metaPrimitive->chi2,
813  SL1metaPrimitive->quality,
814  SL1metaPrimitive->wi1,
815  SL1metaPrimitive->tdc1,
816  SL1metaPrimitive->lat1,
817  SL1metaPrimitive->wi2,
818  SL1metaPrimitive->tdc2,
819  SL1metaPrimitive->lat2,
820  SL1metaPrimitive->wi3,
821  SL1metaPrimitive->tdc3,
822  SL1metaPrimitive->lat3,
823  SL1metaPrimitive->wi4,
824  SL1metaPrimitive->tdc4,
825  SL1metaPrimitive->lat4,
826  -1,
827  -1,
828  -1,
829  -1,
830  -1,
831  -1,
832  -1,
833  -1,
834  -1,
835  -1,
836  -1,
837  -1,
838  -1};
839 
840  bool ok = true;
841  for (auto &metaPrimitive : chamberMetaPrimitives) {
842  if (!isNotAPrimo(newSL1metaPrimitive, metaPrimitive)) {
843  ok = false;
844  break;
845  }
846  }
847  if (!ok)
848  continue;
849 
850  if (!clean_chi2_correlation_)
851  outMPaths.push_back(newSL1metaPrimitive);
852  else
853  normalMetaPrimitives.push_back(newSL1metaPrimitive);
854  }
855  }
856  if (at_least_one_SL3_confirmation == false || clean_chi2_correlation_) {
857  sl3 = 0;
858  for (auto SL3metaPrimitive = SL3metaPrimitives.begin(); SL3metaPrimitive != SL3metaPrimitives.end();
859  ++SL3metaPrimitive, sl3++) {
860  if (useFitSL3[sl3])
861  continue;
862  DTSuperLayerId SLId(SL3metaPrimitive->rawId);
863  DTChamberId(SLId.wheel(), SLId.station(), SLId.sector());
864  metaPrimitive newSL3metaPrimitive = {ChId.rawId(),
865  SL3metaPrimitive->t0,
866  SL3metaPrimitive->x,
867  SL3metaPrimitive->tanPhi,
868  SL3metaPrimitive->phi,
869  SL3metaPrimitive->phiB,
870  SL3metaPrimitive->phi_cmssw,
871  SL3metaPrimitive->phiB_cmssw,
872  SL3metaPrimitive->chi2,
873  SL3metaPrimitive->quality,
874  -1,
875  -1,
876  -1,
877  -1,
878  -1,
879  -1,
880  -1,
881  -1,
882  -1,
883  -1,
884  -1,
885  -1,
886  SL3metaPrimitive->wi1,
887  SL3metaPrimitive->tdc1,
888  SL3metaPrimitive->lat1,
889  SL3metaPrimitive->wi2,
890  SL3metaPrimitive->tdc2,
891  SL3metaPrimitive->lat2,
892  SL3metaPrimitive->wi3,
893  SL3metaPrimitive->tdc3,
894  SL3metaPrimitive->lat3,
895  SL3metaPrimitive->wi4,
896  SL3metaPrimitive->tdc4,
897  SL3metaPrimitive->lat4,
898  -1};
899 
900  if (!clean_chi2_correlation_)
901  outMPaths.push_back(newSL3metaPrimitive);
902  else
903  normalMetaPrimitives.push_back(newSL3metaPrimitive);
904  }
905  }
906  }
907 
908  SL1metaPrimitives.clear();
909  SL1metaPrimitives.erase(SL1metaPrimitives.begin(), SL1metaPrimitives.end());
910  SL3metaPrimitives.clear();
911  SL3metaPrimitives.erase(SL3metaPrimitives.begin(), SL3metaPrimitives.end());
912 
913  vector<metaPrimitive> auxMetaPrimitives;
914  if (clean_chi2_correlation_) {
915  if (debug_)
916  LogDebug("MuonPathAssociator") << "Pushing back normal MPs to the auxiliar vector";
917  removeSharingHits(normalMetaPrimitives, confirmedMetaPrimitives, auxMetaPrimitives);
918  }
919  if (clean_chi2_correlation_) {
920  if (debug_)
921  LogDebug("MuonPathAssociator") << "Pushing back normal MPs to the MPs collection";
922  removeSharingHits(auxMetaPrimitives, chamberMetaPrimitives, outMPaths);
923  }
924  }
925  }
926  }
927 
928  //eta TP we do not correlate with other superlayer in the same chamber so we forward them all
929  std::vector<metaPrimitive> SL2metaPrimitives;
930 
931  for (int wh = -2; wh <= 2; wh++) {
932  for (int st = 1; st <= 4; st++) {
933  for (int se = 1; se <= 14; se++) {
934  if (se >= 13 && st != 4)
935  continue;
936 
937  DTChamberId ChId(wh, st, se);
938  DTSuperLayerId sl2Id(wh, st, se, 2);
939 
940  //filterSL2 etaTP
941  for (auto metaprimitiveIt = inMPaths.begin(); metaprimitiveIt != inMPaths.end(); ++metaprimitiveIt)
942  if (metaprimitiveIt->rawId == sl2Id.rawId()) {
943  SL2metaPrimitives.push_back(*metaprimitiveIt);
944  //std::cout<<"pushing back eta metaprimitive: ";
945  printmPC(*metaprimitiveIt);
946  outMPaths.push_back(*metaprimitiveIt);
947  }
948  }
949  }
950  }
951 
952  LogDebug("MuonPathAssociator") << "\t etaTP: added " << SL2metaPrimitives.size() << "to outMPaths" << std::endl;
953 
954  SL2metaPrimitives.clear();
955  SL2metaPrimitives.erase(SL2metaPrimitives.begin(), SL2metaPrimitives.end());
956 }
957 
958 void MuonPathAssociator::removeSharingFits(vector<metaPrimitive> &chamberMPaths, vector<metaPrimitive> &allMPaths) {
959  bool useFit[chamberMPaths.size()];
960  for (unsigned int i = 0; i < chamberMPaths.size(); i++) {
961  useFit[i] = true;
962  }
963  for (unsigned int i = 0; i < chamberMPaths.size(); i++) {
964  if (debug_)
965  LogDebug("MuonPathAssociator") << "Looking at prim" << i;
966  if (!useFit[i])
967  continue;
968  for (unsigned int j = i + 1; j < chamberMPaths.size(); j++) {
969  if (debug_)
970  LogDebug("MuonPathAssociator") << "Comparing with prim " << j;
971  if (!useFit[j])
972  continue;
973  metaPrimitive first = chamberMPaths[i];
974  metaPrimitive second = chamberMPaths[j];
975  if (shareFit(first, second)) {
976  if (first.quality > second.quality)
977  useFit[j] = false;
978  else if (first.quality < second.quality)
979  useFit[i] = false;
980  else {
981  if (first.chi2 < second.chi2)
982  useFit[j] = false;
983  else {
984  useFit[i] = false;
985  break;
986  }
987  }
988  }
989  }
990  if (useFit[i]) {
991  if (debug_)
992  printmPC(chamberMPaths[i]);
993  allMPaths.push_back(chamberMPaths[i]);
994  }
995  }
996  if (debug_)
997  LogDebug("MuonPathAssociator") << "---Swapping chamber---";
998 }
999 
1000 void MuonPathAssociator::removeSharingHits(std::vector<metaPrimitive> &firstMPaths,
1001  std::vector<metaPrimitive> &secondMPaths,
1002  std::vector<metaPrimitive> &allMPaths) {
1003  for (auto &firstMP : firstMPaths) {
1004  if (debug_)
1005  LogDebug("MuonPathAssociator") << "----------------------------------";
1006  if (debug_)
1007  LogDebug("MuonPathAssociator") << "Turn for ";
1008  if (debug_)
1009  printmPC(firstMP);
1010  bool ok = true;
1011  for (auto &secondMP : secondMPaths) {
1012  if (debug_)
1013  LogDebug("MuonPathAssociator") << "Comparing with ";
1014  if (debug_)
1015  printmPC(secondMP);
1016  if (!isNotAPrimo(firstMP, secondMP)) {
1017  ok = false;
1018  break;
1019  }
1020  }
1021  if (ok) {
1022  allMPaths.push_back(firstMP);
1023  if (debug_)
1024  printmPC(firstMP);
1025  }
1026  if (debug_)
1027  LogDebug("MuonPathAssociator") << "----------------------------------";
1028  }
1029 }
1030 
1032  bool lay1 = (first.wi1 == second.wi1) && (first.tdc1 = second.tdc1);
1033  bool lay2 = (first.wi2 == second.wi2) && (first.tdc2 = second.tdc2);
1034  bool lay3 = (first.wi3 == second.wi3) && (first.tdc3 = second.tdc3);
1035  bool lay4 = (first.wi4 == second.wi4) && (first.tdc4 = second.tdc4);
1036  bool lay5 = (first.wi5 == second.wi5) && (first.tdc5 = second.tdc5);
1037  bool lay6 = (first.wi6 == second.wi6) && (first.tdc6 = second.tdc6);
1038  bool lay7 = (first.wi7 == second.wi7) && (first.tdc7 = second.tdc7);
1039  bool lay8 = (first.wi8 == second.wi8) && (first.tdc8 = second.tdc8);
1040 
1041  if (lay1 && lay2 && lay3 && lay4) {
1042  if (lay5 || lay6 || lay7 || lay8)
1043  return true;
1044  else
1045  return false;
1046  } else if (lay5 && lay6 && lay7 && lay8) {
1047  if (lay1 || lay2 || lay3 || lay4)
1048  return true;
1049  else
1050  return false;
1051  } else
1052  return false;
1053 }
1054 
1056  int hitsSL1 = (first.wi1 != -1) + (first.wi2 != -1) + (first.wi3 != -1) + (first.wi4 != -1);
1057  int hitsSL3 = (first.wi5 != -1) + (first.wi6 != -1) + (first.wi7 != -1) + (first.wi8 != -1);
1058 
1059  bool lay1 = (first.wi1 == second.wi1) && (first.tdc1 = second.tdc1) && (first.wi1 != -1);
1060  bool lay2 = (first.wi2 == second.wi2) && (first.tdc2 = second.tdc2) && (first.wi2 != -1);
1061  bool lay3 = (first.wi3 == second.wi3) && (first.tdc3 = second.tdc3) && (first.wi3 != -1);
1062  bool lay4 = (first.wi4 == second.wi4) && (first.tdc4 = second.tdc4) && (first.wi4 != -1);
1063  bool lay5 = (first.wi5 == second.wi5) && (first.tdc5 = second.tdc5) && (first.wi5 != -1);
1064  bool lay6 = (first.wi6 == second.wi6) && (first.tdc6 = second.tdc6) && (first.wi6 != -1);
1065  bool lay7 = (first.wi7 == second.wi7) && (first.tdc7 = second.tdc7) && (first.wi7 != -1);
1066  bool lay8 = (first.wi8 == second.wi8) && (first.tdc8 = second.tdc8) && (first.wi8 != -1);
1067 
1068  return (((!lay1 && !lay2 && !lay3 && !lay4) || hitsSL1 < 3) && ((!lay5 && !lay6 && !lay7 && !lay8) || hitsSL3 < 3));
1069 }
1070 
1072  DTChamberId ChId(mP.rawId);
1073  LogDebug("MuonPathAssociator") << ChId << "\t"
1074  << " " << setw(2) << left << mP.wi1 << " " << setw(2) << left << mP.wi2 << " "
1075  << setw(2) << left << mP.wi3 << " " << setw(2) << left << mP.wi4 << " " << setw(2)
1076  << left << mP.wi5 << " " << setw(2) << left << mP.wi6 << " " << setw(2) << left
1077  << mP.wi7 << " " << setw(2) << left << mP.wi8 << " " << setw(5) << left << mP.tdc1
1078  << " " << setw(5) << left << mP.tdc2 << " " << setw(5) << left << mP.tdc3 << " "
1079  << setw(5) << left << mP.tdc4 << " " << setw(5) << left << mP.tdc5 << " " << setw(5)
1080  << left << mP.tdc6 << " " << setw(5) << left << mP.tdc7 << " " << setw(5) << left
1081  << mP.tdc8 << " " << setw(2) << left << mP.lat1 << " " << setw(2) << left << mP.lat2
1082  << " " << setw(2) << left << mP.lat3 << " " << setw(2) << left << mP.lat4 << " "
1083  << setw(2) << left << mP.lat5 << " " << setw(2) << left << mP.lat6 << " " << setw(2)
1084  << left << mP.lat7 << " " << setw(2) << left << mP.lat8 << " " << setw(10) << right
1085  << mP.x << " " << setw(9) << left << mP.tanPhi << " " << setw(5) << left << mP.t0
1086  << " " << setw(13) << left << mP.chi2 << " \n";
1087 }
DTGeometry
Definition: DTGeometry.h:28
cmsdt::metaPrimitive
Definition: constants.h:49
DTSuperLayerId
Definition: DTSuperLayerId.h:12
mps_fire.i
i
Definition: mps_fire.py:428
cmsdt::DRIFT_SPEED_X4
constexpr int DRIFT_SPEED_X4
Definition: constants.h:191
cmsdt::CH_CENTER_TO_MID_SL_X2
constexpr int CH_CENTER_TO_MID_SL_X2
Definition: constants.h:200
MessageLogger.h
cmsdt::metaPrimitive::rawId
uint32_t rawId
Definition: constants.h:123
cmsdt::metaPrimitive::x
double x
Definition: constants.h:125
MuonPathAssociator::run
void run(edm::Event &iEvent, const edm::EventSetup &iEventSetup, edm::Handle< DTDigiCollection > digis, std::vector< cmsdt::metaPrimitive > &inMPaths, std::vector< cmsdt::metaPrimitive > &outMPaths)
Definition: MuonPathAssociator.cc:66
edm
HLT enums.
Definition: AlignableModifier.h:19
cmsdt::metaPrimitive::lat8
int lat8
Definition: constants.h:156
pos
Definition: PixelAliasList.h:18
cmsdt::metaPrimitive::wi1
int wi1
Definition: constants.h:133
cmsdt::metaPrimitive::wi8
int wi8
Definition: constants.h:154
MuonPathAssociator::finish
void finish()
Definition: MuonPathAssociator.cc:78
cmsdt::HIGHQ
Definition: constants.h:42
Validation_hcalonly_cfi.sign
sign
Definition: Validation_hcalonly_cfi.py:32
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:222
cmsdt::INCREASED_RES_SLOPE_POW
constexpr int INCREASED_RES_SLOPE_POW
Definition: constants.h:277
cmsdt::INCREASED_RES_POS
constexpr int INCREASED_RES_POS
Definition: constants.h:272
cmsdt::metaPrimitive::lat4
int lat4
Definition: constants.h:144
align::LocalPoint
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
MuonPathAssociator::shareFit
bool shareFit(cmsdt::metaPrimitive first, cmsdt::metaPrimitive second)
Definition: MuonPathAssociator.cc:1031
hltPixelTracks_cff.chi2
chi2
Definition: hltPixelTracks_cff.py:25
cmsdt::INCREASED_RES_POS_POW
constexpr int INCREASED_RES_POS_POW
Definition: constants.h:276
convertSQLiteXML.ok
bool ok
Definition: convertSQLiteXML.py:98
edm::ConsumesCollector::esConsumes
auto esConsumes()
Definition: ConsumesCollector.h:97
edm::Handle< DTDigiCollection >
cmsdt::metaPrimitive::tdc8
int tdc8
Definition: constants.h:155
MuonPathAssociator::removeSharingFits
void removeSharingFits(std::vector< cmsdt::metaPrimitive > &chamberMPaths, std::vector< cmsdt::metaPrimitive > &allMPaths)
Definition: MuonPathAssociator.cc:958
MuonPathAssociator::removeSharingHits
void removeSharingHits(std::vector< cmsdt::metaPrimitive > &firstMPaths, std::vector< cmsdt::metaPrimitive > &secondMPaths, std::vector< cmsdt::metaPrimitive > &allMPaths)
Definition: MuonPathAssociator.cc:1000
cmsdt::CHIGHQ
Definition: constants.h:42
quality
const uint32_t *__restrict__ Quality * quality
Definition: CAHitNtupletGeneratorKernelsImpl.h:122
MuonPathAssociator::MuonPathAssociator
MuonPathAssociator(const edm::ParameterSet &pset, edm::ConsumesCollector &iC, std::shared_ptr< GlobalCoordsObtainer > &globalcoordsobtainer)
Definition: MuonPathAssociator.cc:13
cmsdt::metaPrimitive::tdc1
int tdc1
Definition: constants.h:134
edm::first
T first(std::pair< T, U > const &p)
Definition: ParameterSet.cc:217
MuonPathAssociator::initialise
void initialise(const edm::EventSetup &iEventSetup)
Definition: MuonPathAssociator.cc:57
TrackerOfflineValidationSummary_cfi.useFit
useFit
Definition: TrackerOfflineValidationSummary_cfi.py:5
edm::FileInPath
Definition: FileInPath.h:61
cmsdt
Definition: constants.h:39
constants.h
cmsdt::VERT_PHI1_PHI3
constexpr float VERT_PHI1_PHI3
Definition: constants.h:194
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
cmsdt::CELL_SEMILENGTH
constexpr int CELL_SEMILENGTH
Definition: constants.h:187
cmsdt::metaPrimitive::lat5
int lat5
Definition: constants.h:147
DTWireId
Definition: DTWireId.h:12
cmsdt::metaPrimitive::lat6
int lat6
Definition: constants.h:150
cmsdt::metaPrimitive::wi2
int wi2
Definition: constants.h:136
cmsdt::metaPrimitive::tdc7
int tdc7
Definition: constants.h:152
cmsdt::metaPrimitive::lat1
int lat1
Definition: constants.h:135
edm::ESHandle< DTGeometry >
cmsdt::metaPrimitive::wi7
int wi7
Definition: constants.h:151
cmsdt::metaPrimitive::wi6
int wi6
Definition: constants.h:148
relativeConstraints.geom
geom
Definition: relativeConstraints.py:72
cmsdt::metaPrimitive::tdc3
int tdc3
Definition: constants.h:140
MuonPathAssociator::~MuonPathAssociator
~MuonPathAssociator()
Definition: MuonPathAssociator.cc:49
cmsdt::metaPrimitive::lat7
int lat7
Definition: constants.h:153
Point3DBase< float, GlobalTag >
cmsdt::VERT_PHI1_PHI3_INV
constexpr int VERT_PHI1_PHI3_INV
Definition: constants.h:197
DTLayerId
Definition: DTLayerId.h:12
cmsdt::PHI_CONV
constexpr double PHI_CONV
Definition: constants.h:255
cmsdt::metaPrimitive::wi5
int wi5
Definition: constants.h:145
cmsdt::LHC_CLK_FREQ
constexpr int LHC_CLK_FREQ
Definition: constants.h:176
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
edm::ParameterSet
Definition: ParameterSet.h:47
cmsdt::CLOWQ
Definition: constants.h:42
cmsdt::metaPrimitive::lat2
int lat2
Definition: constants.h:138
IntegrityClient_cfi.ChId
ChId
Definition: IntegrityClient_cfi.py:18
cmsdt::metaPrimitive::wi4
int wi4
Definition: constants.h:142
MuonPathAssociator::correlateMPaths
void correlateMPaths(edm::Handle< DTDigiCollection > digis, std::vector< cmsdt::metaPrimitive > &inMPaths, std::vector< cmsdt::metaPrimitive > &outMPaths)
Definition: MuonPathAssociator.cc:83
edm::get
T const & get(Event const &event, InputTag const &tag) noexcept(false)
Definition: Event.h:679
cmsdt::metaPrimitive::tdc5
int tdc5
Definition: constants.h:146
createfilelist.int
int
Definition: createfilelist.py:10
iEvent
int iEvent
Definition: GenABIO.cc:224
cmsdt::metaPrimitive::tdc6
int tdc6
Definition: constants.h:149
MuonPathAssociator::printmPC
void printmPC(cmsdt::metaPrimitive mP)
Definition: MuonPathAssociator.cc:1071
NUM_LAYERS
Definition: CSCALCTDigi.cc:14
edm::EventSetup
Definition: EventSetup.h:58
cmsdt::HIGHHIGHQ
Definition: constants.h:42
cmsdt::metaPrimitive::tanPhi
double tanPhi
Definition: constants.h:126
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
cmsdt::CELL_HEIGHT
constexpr int CELL_HEIGHT
Definition: constants.h:184
cmsdt::Z_SHIFT_MB4
constexpr float Z_SHIFT_MB4
Definition: constants.h:258
cmsdt::metaPrimitive::tdc4
int tdc4
Definition: constants.h:143
cmsdt::HIGHLOWQ
Definition: constants.h:42
cmsdt::DRIFT_SPEED
constexpr float DRIFT_SPEED
Definition: constants.h:189
cmsdt::metaPrimitive::chi2
double chi2
Definition: constants.h:131
psi
std::map< std::string, int, std::less< std::string > > psi
Definition: CountProcessesAction.h:15
cmsdt::CELL_LENGTH
constexpr int CELL_LENGTH
Definition: constants.h:186
DTChamberId::sector
int sector() const
Definition: DTChamberId.h:49
cmsdt::NUM_LAYERS_2SL
constexpr int NUM_LAYERS_2SL
Definition: constants.h:254
cmsdt::LOWQ
Definition: constants.h:42
std
Definition: JetResolutionObject.h:76
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
edm::shift
static unsigned const int shift
Definition: LuminosityBlockID.cc:7
cmsdt::X_POS_L3
constexpr double X_POS_L3
Definition: constants.h:260
edm::Transition::BeginRun
Exception
Definition: hltDiff.cc:245
cmsdt::metaPrimitive::tdc2
int tdc2
Definition: constants.h:137
or
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
DTChamberId
Definition: DTChamberId.h:14
cmsdt::LOWLOWQ
Definition: constants.h:42
MuonPathAnalyticAnalyzer.h
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
edm::Event
Definition: Event.h:73
cmsdt::metaPrimitive::lat3
int lat3
Definition: constants.h:141
DTLayerId::layer
int layer() const
Return the layer number.
Definition: DTLayerId.h:42
MuonPathAssociator::isNotAPrimo
bool isNotAPrimo(cmsdt::metaPrimitive first, cmsdt::metaPrimitive second)
Definition: MuonPathAssociator.cc:1055
MuonGeometryRecord
Definition: MuonGeometryRecord.h:34
DTChamberId::wheel
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:39
cmsdt::X_POS_L4
constexpr double X_POS_L4
Definition: constants.h:261
MuonPathAssociator.h
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
PV3DBase::phi
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
cmsdt::metaPrimitive::wi3
int wi3
Definition: constants.h:139
DTChamberId::station
int station() const
Return the station number.
Definition: DTChamberId.h:42
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
cmsdt::metaPrimitive::t0
double t0
Definition: constants.h:124