CMS 3D CMS Logo

MuonPathSLFitter.cc
Go to the documentation of this file.
2 #include <cmath>
3 #include <memory>
4 
5 using namespace edm;
6 using namespace std;
7 using namespace cmsdt;
8 // ============================================================================
9 // Constructors and destructor
10 // ============================================================================
13  std::shared_ptr<GlobalCoordsObtainer> &globalcoordsobtainer)
14  : MuonPathFitter(pset, iC, globalcoordsobtainer) {
15  if (debug_)
16  LogDebug("MuonPathSLFitter") << "MuonPathSLFitter: constructor";
17 
18  //shift theta
19  int rawId;
20  double shift;
21  shift_theta_filename_ = pset.getParameter<edm::FileInPath>("shift_theta_filename");
22  std::ifstream ifin4(shift_theta_filename_.fullPath());
23  if (ifin4.fail()) {
24  throw cms::Exception("Missing Input File")
25  << "MuonPathSLFitter::MuonPathSLFitter() - Cannot find " << shift_theta_filename_.fullPath();
26  }
27 
28  while (ifin4.good()) {
29  ifin4 >> rawId >> shift;
31  }
32 
33  // LUTs
34  sl1_filename_ = pset.getParameter<edm::FileInPath>("lut_sl1");
35  sl2_filename_ = pset.getParameter<edm::FileInPath>("lut_sl2");
36  sl3_filename_ = pset.getParameter<edm::FileInPath>("lut_sl3");
37 
38  fillLuts();
39 
40  setChi2Th(pset.getParameter<double>("chi2Th"));
41  setTanPhiTh(pset.getParameter<double>("tanPhiTh"));
42 }
43 
45  if (debug_)
46  LogDebug("MuonPathSLFitter") << "MuonPathSLFitter: destructor";
47 }
48 
49 // ============================================================================
50 // Main methods (initialise, run, finish)
51 // ============================================================================
53  if (debug_)
54  LogDebug("MuonPathSLFitter") << "MuonPathSLFitter::initialiase";
55 
56  auto geom = iEventSetup.getHandle(dtGeomH);
57  dtGeo_ = &(*geom);
58 }
59 
61  const edm::EventSetup &iEventSetup,
62  MuonPathPtrs &muonpaths,
63  std::vector<lat_vector> &lateralities,
64  std::vector<metaPrimitive> &metaPrimitives) {
65  if (debug_)
66  LogDebug("MuonPathSLFitter") << "MuonPathSLFitter: run";
67 
68  // fit per SL (need to allow for multiple outputs for a single mpath)
69  // for (auto &muonpath : muonpaths) {
70  if (!muonpaths.empty()) {
71  auto muonpath = muonpaths[0];
72  int rawId = muonpath->primitive(0)->cameraId();
73  if (muonpath->primitive(0)->cameraId() == -1) {
74  rawId = muonpath->primitive(1)->cameraId();
75  }
76  const DTLayerId dtLId(rawId);
77  max_drift_tdc = maxdriftinfo_[dtLId.wheel() + 2][dtLId.station() - 1][dtLId.sector() - 1];
78  }
79 
80  for (size_t i = 0; i < muonpaths.size(); i++) {
81  auto muonpath = muonpaths[i];
82  auto lats = lateralities[i];
83  analyze(muonpath, lats, metaPrimitives);
84  }
85 }
86 
88  if (debug_)
89  LogDebug("MuonPathSLFitter") << "MuonPathSLFitter: finish";
90 };
91 
92 //------------------------------------------------------------------
93 //--- Metodos privados
94 //------------------------------------------------------------------
95 
97  lat_vector lat_combs,
98  std::vector<cmsdt::metaPrimitive> &metaPrimitives) {
99  auto sl = inMPath->primitive(0)->superLayerId(); // 0, 1, 2
100 
101  int selected_lay = 1;
102  if (inMPath->primitive(0)->cameraId() > 0)
103  selected_lay = 0;
104 
105  int dumLayId = inMPath->primitive(selected_lay)->cameraId();
106  auto dtDumlayerId = DTLayerId(dumLayId);
107  DTSuperLayerId MuonPathSLId(dtDumlayerId.wheel(), dtDumlayerId.station(), dtDumlayerId.sector(), sl + 1);
108 
109  DTChamberId ChId(MuonPathSLId.wheel(), MuonPathSLId.station(), MuonPathSLId.sector());
110 
111  DTSuperLayerId MuonPathSL1Id(dtDumlayerId.wheel(), dtDumlayerId.station(), dtDumlayerId.sector(), 1);
112  DTSuperLayerId MuonPathSL2Id(dtDumlayerId.wheel(), dtDumlayerId.station(), dtDumlayerId.sector(), 2);
113  DTSuperLayerId MuonPathSL3Id(dtDumlayerId.wheel(), dtDumlayerId.station(), dtDumlayerId.sector(), 3);
114  DTWireId wireIdSL1(MuonPathSL1Id, 2, 1);
115  DTWireId wireIdSL2(MuonPathSL2Id, 2, 1);
116  DTWireId wireIdSL3(MuonPathSL3Id, 2, 1);
117  auto sl_shift_cm = shiftinfo_[wireIdSL1.rawId()] - shiftinfo_[wireIdSL3.rawId()];
118 
119  fit_common_in_t fit_common_in;
120 
121  // 8-element vectors, for the 8 layers. As here we are fitting one SL only, we leave the other SL values as dummy ones
122  fit_common_in.hits = {};
123  fit_common_in.hits_valid = {};
124 
125  int quality = 3;
126  if (inMPath->missingLayer() != -1)
127  quality = 1;
128 
129  int minISL = 1;
130  int maxISL = 3;
131  if (sl < 1) {
132  minISL = 0;
133  maxISL = 2;
134  }
135 
136  for (int isl = minISL; isl < maxISL; isl++) {
137  for (int i = 0; i < NUM_LAYERS; i++) {
138  if (isl == sl && inMPath->missingLayer() != i) {
139  // Include both valid and non-valid hits. Non-valid values can be whatever, leaving all as -1 to make debugging easier.
140  auto ti = inMPath->primitive(i)->tdcTimeStamp();
141  if (ti != -1)
142  ti = (int)round(((float)TIME_TO_TDC_COUNTS / (float)LHC_CLK_FREQ) * ti);
143  auto wi = inMPath->primitive(i)->channelId();
144  auto ly = inMPath->primitive(i)->layerId();
145  // int layId = inMPath->primitive(i)->cameraId();
146  // auto dtlayerId = DTLayerId(layId);
147  // auto wireId = DTWireId(dtlayerId, wi + 1); // wire start from 1, mixer groups them starting from 0
148  // int rawId = wireId.rawId();
149  // wp in tdc counts (still in floating point)
150  int wp_semicells = (wi - SL1_CELLS_OFFSET) * 2 + 1;
151  if (ly % 2 == 1)
152  wp_semicells -= 1;
153  if (isl == 2)
154  wp_semicells -= (int)round((sl_shift_cm * 10) / CELL_SEMILENGTH);
155 
156  float wp_tdc = wp_semicells * max_drift_tdc;
157  int wp = (int)((long int)(round(wp_tdc * std::pow(2, WIREPOS_WIDTH))) / (int)std::pow(2, WIREPOS_WIDTH));
158  fit_common_in.hits.push_back({ti, wi, ly, wp});
159  // fill valids as well
160  if (inMPath->missingLayer() == i)
161  fit_common_in.hits_valid.push_back(0);
162  else
163  fit_common_in.hits_valid.push_back(1);
164  } else {
165  fit_common_in.hits.push_back({-1, -1, -1, -1});
166  fit_common_in.hits_valid.push_back(0);
167  }
168  }
169  }
170 
171  int smallest_time = 999999, tmp_coarse_wirepos_1 = -1, tmp_coarse_wirepos_3 = -1;
172  // coarse_bctr is the 12 MSB of the smallest tdc
173  for (int isl = 0; isl < 3; isl++) {
174  if (isl != sl)
175  continue;
176  int myisl = isl < 2 ? 0 : 1;
177  for (size_t i = 0; i < NUM_LAYERS; i++) {
178  if (fit_common_in.hits_valid[NUM_LAYERS * myisl + i] == 0)
179  continue;
180  else if (fit_common_in.hits[NUM_LAYERS * myisl + i].ti < smallest_time)
181  smallest_time = fit_common_in.hits[NUM_LAYERS * myisl + i].ti;
182  }
183  if (fit_common_in.hits_valid[NUM_LAYERS * myisl + 0] == 1)
184  tmp_coarse_wirepos_1 = fit_common_in.hits[NUM_LAYERS * myisl + 0].wp;
185  else
186  tmp_coarse_wirepos_1 = fit_common_in.hits[NUM_LAYERS * myisl + 1].wp;
187  if (fit_common_in.hits_valid[NUM_LAYERS * myisl + 3] == 1)
188  tmp_coarse_wirepos_3 = fit_common_in.hits[NUM_LAYERS * myisl + 3].wp;
189  else
190  tmp_coarse_wirepos_3 = fit_common_in.hits[NUM_LAYERS * myisl + 2].wp;
191 
192  tmp_coarse_wirepos_1 = tmp_coarse_wirepos_1 >> WIREPOS_NORM_LSB_IGNORED;
193  tmp_coarse_wirepos_3 = tmp_coarse_wirepos_3 >> WIREPOS_NORM_LSB_IGNORED;
194  }
195  fit_common_in.coarse_bctr = smallest_time >> (WIDTH_FULL_TIME - WIDTH_COARSED_TIME);
196  fit_common_in.coarse_wirepos = (tmp_coarse_wirepos_1 + tmp_coarse_wirepos_3) >> 1;
197 
198  for (auto &lat_comb : lat_combs) {
199  if (lat_comb[0] == 0 && lat_comb[1] == 0 && lat_comb[2] == 0 && lat_comb[3] == 0)
200  continue;
201  fit_common_in.lateralities.clear();
202 
203  auto rom_addr = get_rom_addr(inMPath, lat_comb);
204  coeffs_t coeffs;
205  if (sl == 0) {
206  coeffs =
208  } else if (sl == 1) {
209  coeffs =
211  } else {
212  coeffs =
214  }
215  // Filling lateralities
216  int minISL = 1;
217  int maxISL = 3;
218  if (sl < 1) {
219  minISL = 0;
220  maxISL = 2;
221  }
222 
223  for (int isl = minISL; isl < maxISL; isl++) {
224  for (size_t i = 0; i < NUM_LAYERS; i++) {
225  if (isl == sl) {
226  fit_common_in.lateralities.push_back(lat_comb[i]);
227  } else
228  fit_common_in.lateralities.push_back(-1);
229  }
230  }
231  fit_common_in.coeffs = coeffs;
232 
233  auto fit_common_out = fit(fit_common_in,
234  XI_SL_WIDTH,
245  sl + 1);
246 
247  if (fit_common_out.valid_fit == 1) {
248  float t0_f = ((float)fit_common_out.t0) * (float)LHC_CLK_FREQ / (float)TIME_TO_TDC_COUNTS;
249 
250  float slope_f = -fit_common_out.slope * ((float)CELL_SEMILENGTH / max_drift_tdc) * (1) / (CELL_SEMIHEIGHT * 16.);
251  if (sl != 1 && std::abs(slope_f) > tanPhiTh_)
252  continue;
253 
254  DTWireId wireId(MuonPathSLId, 2, 1);
255  float pos_ch_f = (float)(fit_common_out.position) * ((float)CELL_SEMILENGTH / (float)max_drift_tdc) / 10;
256  pos_ch_f += (SL1_CELLS_OFFSET * CELL_LENGTH) / 10.;
257  if (sl != 1)
258  pos_ch_f += shiftinfo_[wireIdSL1.rawId()];
259  else if (sl == 1)
260  pos_ch_f += shiftthetainfo_[wireIdSL2.rawId()];
261 
262  float pos_sl_f = pos_ch_f - (sl - 1) * slope_f * VERT_PHI1_PHI3 / 2;
263  float chi2_f = fit_common_out.chi2 * std::pow(((float)CELL_SEMILENGTH / (float)max_drift_tdc), 2) / 100;
264 
265  // obtention of global coordinates using luts
266  int pos = (int)(10 * (pos_sl_f - shiftinfo_[wireId.rawId()]) * INCREASED_RES_POS_POW);
267  int slope = (int)(-slope_f * INCREASED_RES_SLOPE_POW);
268 
269  auto global_coords = globalcoordsobtainer_->get_global_coordinates(ChId.rawId(), sl + 1, pos, slope);
270  float phi = global_coords[0];
271  float phiB = global_coords[1];
272 
273  // obtention of global coordinates using cmssw geometry
274  double z = 0;
275  if (ChId.station() == 3 or ChId.station() == 4) {
276  z = Z_SHIFT_MB4;
277  }
278  GlobalPoint jm_x_cmssw_global = dtGeo_->chamber(ChId)->toGlobal(LocalPoint(pos_sl_f, 0., z));
279  int thisec = ChId.sector();
280  if (thisec == 13)
281  thisec = 4;
282  if (thisec == 14)
283  thisec = 10;
284  float phi_cmssw = jm_x_cmssw_global.phi() - PHI_CONV * (thisec - 1);
285  float psi = atan(slope_f);
286  float phiB_cmssw = hasPosRF(ChId.wheel(), ChId.sector()) ? psi - phi_cmssw : -psi - phi_cmssw;
287  if (sl == 0)
288  metaPrimitives.emplace_back(metaPrimitive({MuonPathSLId.rawId(),
289  t0_f,
290  (double)(fit_common_out.position),
291  (double)fit_common_out.slope,
292  phi,
293  phiB,
294  phi_cmssw,
295  phiB_cmssw,
296  chi2_f,
297  quality,
298  inMPath->primitive(0)->channelId(),
299  inMPath->primitive(0)->tdcTimeStamp(),
300  lat_comb[0],
301  inMPath->primitive(1)->channelId(),
302  inMPath->primitive(1)->tdcTimeStamp(),
303  lat_comb[1],
304  inMPath->primitive(2)->channelId(),
305  inMPath->primitive(2)->tdcTimeStamp(),
306  lat_comb[2],
307  inMPath->primitive(3)->channelId(),
308  inMPath->primitive(3)->tdcTimeStamp(),
309  lat_comb[3],
310  -1,
311  -1,
312  -1,
313  -1,
314  -1,
315  -1,
316  -1,
317  -1,
318  -1,
319  -1,
320  -1,
321  -1,
322  -1}));
323  else if (sl == 2)
324  metaPrimitives.emplace_back(metaPrimitive({MuonPathSLId.rawId(),
325  t0_f,
326  (double)(fit_common_out.position),
327  (double)fit_common_out.slope,
328  phi,
329  phiB,
330  phi_cmssw,
331  phiB_cmssw,
332  chi2_f,
333  quality,
334  -1,
335  -1,
336  -1,
337  -1,
338  -1,
339  -1,
340  -1,
341  -1,
342  -1,
343  -1,
344  -1,
345  -1,
346  inMPath->primitive(0)->channelId(),
347  inMPath->primitive(0)->tdcTimeStamp(),
348  lat_comb[0],
349  inMPath->primitive(1)->channelId(),
350  inMPath->primitive(1)->tdcTimeStamp(),
351  lat_comb[1],
352  inMPath->primitive(2)->channelId(),
353  inMPath->primitive(2)->tdcTimeStamp(),
354  lat_comb[2],
355  inMPath->primitive(3)->channelId(),
356  inMPath->primitive(3)->tdcTimeStamp(),
357  lat_comb[3],
358  -1}));
359  else if (sl == 1) {
360  // fw-like calculation
361  DTLayerId SL2_layer2Id(MuonPathSLId, 2);
362  double z_shift = shiftthetainfo_[SL2_layer2Id.rawId()];
363  double pos_cm =
364  pos / 10 / INCREASED_RES_POS_POW; // fixed to have z_shift and the position in the same units (MC)
365  double jm_y = hasPosRF(MuonPathSLId.wheel(), MuonPathSLId.sector()) ? z_shift - pos_cm : z_shift + pos_cm;
366 
367  phi = jm_y;
368 
369  // Fixed sign of k (MC)
370  double k_fromfw = hasPosRF(MuonPathSLId.wheel(), MuonPathSLId.sector()) ? slope_f : -slope_f;
371  phiB = k_fromfw;
372 
373  // cmssw-like calculation
374  LocalPoint wire1_in_layer(dtGeo_->layer(SL2_layer2Id)->specificTopology().wirePosition(1), 0, -0.65);
375  GlobalPoint wire1_in_global = dtGeo_->layer(SL2_layer2Id)->toGlobal(wire1_in_layer);
376  LocalPoint wire1_in_sl = dtGeo_->superLayer(MuonPathSLId)->toLocal(wire1_in_global);
377  double x_shift = wire1_in_sl.x();
378  jm_y = (dtGeo_->superLayer(MuonPathSLId)
379  ->toGlobal(LocalPoint(double(pos) / (10 * pow(2, INCREASED_RES_POS)) + x_shift, 0., 0)))
380  .z();
381  phi_cmssw = jm_y;
382 
383  double x_cmssw = (dtGeo_->superLayer(MuonPathSLId)
384  ->toGlobal(LocalPoint(double(pos) / (10 * pow(2, INCREASED_RES_POS)) + x_shift, 0., 0)))
385  .x();
386  double y_cmssw = (dtGeo_->superLayer(MuonPathSLId)
387  ->toGlobal(LocalPoint(double(pos) / (10 * pow(2, INCREASED_RES_POS)) + x_shift, 0., 0)))
388  .y();
389  double r_cmssw = sqrt(x_cmssw * x_cmssw + y_cmssw * y_cmssw);
390  double k_cmssw = jm_y / r_cmssw;
391  phiB_cmssw = k_cmssw;
392 
393  metaPrimitives.emplace_back(metaPrimitive({MuonPathSLId.rawId(),
394  t0_f,
395  (double)(fit_common_out.position),
396  (double)fit_common_out.slope,
397  phi,
398  phiB,
399  phi_cmssw,
400  phiB_cmssw,
401  chi2_f,
402  quality,
403  inMPath->primitive(0)->channelId(),
404  inMPath->primitive(0)->tdcTimeStamp(),
405  lat_comb[0],
406  inMPath->primitive(1)->channelId(),
407  inMPath->primitive(1)->tdcTimeStamp(),
408  lat_comb[1],
409  inMPath->primitive(2)->channelId(),
410  inMPath->primitive(2)->tdcTimeStamp(),
411  lat_comb[2],
412  inMPath->primitive(3)->channelId(),
413  inMPath->primitive(3)->tdcTimeStamp(),
414  lat_comb[3],
415  -1,
416  -1,
417  -1,
418  -1,
419  -1,
420  -1,
421  -1,
422  -1,
423  -1,
424  -1,
425  -1,
426  -1,
427  -1}));
428  }
429  } // (fit_common_out.valid_fit == 1)
430  } // loop in lat_combs
431  return;
432 }
433 
435  std::ifstream ifinsl1(sl1_filename_.fullPath());
437  while (ifinsl1.good()) {
438  ifinsl1 >> line;
439 
440  std::vector<int> myNumbers;
441  for (size_t i = 0; i < line.size(); i++) {
442  // This converts the char into an int and pushes it into vec
443  myNumbers.push_back(line[i] - '0'); // The digits will be in the same order as before
444  }
445  std::reverse(myNumbers.begin(), myNumbers.end());
446  lut_sl1.push_back(myNumbers);
447  }
448 
449  std::ifstream ifinsl2(sl2_filename_.fullPath());
450  while (ifinsl2.good()) {
451  ifinsl2 >> line;
452 
453  std::vector<int> myNumbers;
454  for (size_t i = 0; i < line.size(); i++) {
455  // This converts the char into an int and pushes it into vec
456  myNumbers.push_back(line[i] - '0'); // The digits will be in the same order as before
457  }
458  std::reverse(myNumbers.begin(), myNumbers.end());
459  lut_sl2.push_back(myNumbers);
460  }
461 
462  std::ifstream ifinsl3(sl3_filename_.fullPath());
463  while (ifinsl3.good()) {
464  ifinsl3 >> line;
465 
466  std::vector<int> myNumbers;
467  for (size_t i = 0; i < line.size(); i++) {
468  // This converts the char into an int and pushes it into vec
469  myNumbers.push_back(line[i] - '0'); // The digits will be in the same order as before
470  }
471  std::reverse(myNumbers.begin(), myNumbers.end());
472  lut_sl3.push_back(myNumbers);
473  }
474 
475  return;
476 }
477 
479  std::vector<int> rom_addr;
480  auto missing_layer = inMPath->missingLayer();
481  if (missing_layer == -1) {
482  rom_addr.push_back(1);
483  rom_addr.push_back(0);
484  } else {
485  if (missing_layer == 0) {
486  rom_addr.push_back(0);
487  rom_addr.push_back(0);
488  } else if (missing_layer == 1) {
489  rom_addr.push_back(0);
490  rom_addr.push_back(1);
491  } else if (missing_layer == 2) {
492  rom_addr.push_back(1);
493  rom_addr.push_back(0);
494  } else { // missing_layer == 3
495  rom_addr.push_back(1);
496  rom_addr.push_back(1);
497  }
498  }
499  for (size_t ilat = 0; ilat < lats.size(); ilat++) {
500  if ((int)ilat == missing_layer) // only applies to 3-hit, as in 4-hit missL=-1
501  continue;
502  auto lat = lats[ilat];
503  if (lat == -1)
504  lat = 0;
505  rom_addr.push_back(lat);
506  }
507  std::reverse(rom_addr.begin(), rom_addr.end());
508  return vhdl_unsigned_to_int(rom_addr);
509 }
constexpr int COEFF_WIDTH_SL_POSITION
Definition: constants.h:264
void setChi2Th(double chi2Th)
int station() const
Return the station number.
Definition: DTChamberId.h:45
int maxdriftinfo_[5][4][14]
std::vector< int > lateralities
std::vector< SLhitP > hits
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
edm::FileInPath shift_theta_filename_
constexpr int PROD_RESIZE_SL2_POSITION
Definition: constants.h:274
edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtGeomH
constexpr int PROD_RESIZE_SL_SLOPE
Definition: constants.h:275
std::string fullPath() const
Definition: FileInPath.cc:161
constexpr int PRECISSION_SL_POSITION
Definition: constants.h:269
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
Definition: GeomDet.h:58
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
static const double slope[3]
std::vector< MuonPathPtr > MuonPathPtrs
Definition: MuonPath.h:132
int get_rom_addr(MuonPathPtr &inMPath, latcomb lats)
constexpr int WIDTH_COARSED_TIME
Definition: constants.h:252
constexpr int PROD_RESIZE_SL_POSITION
Definition: constants.h:273
constexpr int WIREPOS_WIDTH
Definition: constants.h:257
std::map< std::string, int, std::less< std::string > > psi
std::map< int, float > shiftinfo_
constexpr int CELL_LENGTH
Definition: constants.h:313
std::vector< short > latcomb
constexpr int CELL_SEMILENGTH
Definition: constants.h:314
int vhdl_unsigned_to_int(std::vector< int > v)
~MuonPathSLFitter() override
string quality
T x() const
Definition: PV3DBase.h:59
int iEvent
Definition: GenABIO.cc:224
void run(edm::Event &iEvent, const edm::EventSetup &iEventSetup, MuonPathPtrs &inMpath, std::vector< cmsdt::metaPrimitive > &metaPrimitives) override
const DTSuperLayer * superLayer(const DTSuperLayerId &id) const
Return a DTSuperLayer given its id.
Definition: DTGeometry.cc:92
constexpr int INCREASED_RES_SLOPE_POW
Definition: constants.h:416
constexpr int COEFF_WIDTH_SL_T0
Definition: constants.h:263
bool hasPosRF(int wh, int sec)
void initialise(const edm::EventSetup &iEventSetup) override
T sqrt(T t)
Definition: SSEVec.h:23
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
constexpr int SL1_CELLS_OFFSET
Definition: constants.h:247
constexpr int COEFF_WIDTH_SL_SLOPE
Definition: constants.h:266
constexpr float Z_SHIFT_MB4
Definition: constants.h:397
std::vector< std::vector< int > > lut_sl1
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
constexpr int WIDTH_FULL_TIME
Definition: constants.h:251
std::vector< std::vector< int > > lut_sl3
void setTanPhiTh(double tanPhiTh)
const DTTopology & specificTopology() const
Definition: DTLayer.cc:37
std::map< int, float > shiftthetainfo_
MuonPathSLFitter(const edm::ParameterSet &pset, edm::ConsumesCollector &iC, std::shared_ptr< GlobalCoordsObtainer > &globalcoordsobtainer)
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:130
std::shared_ptr< GlobalCoordsObtainer > globalcoordsobtainer_
coeffs_t RomDataConvert(std::vector< int > slv, short COEFF_WIDTH_T0, short COEFF_WIDTH_POSITION, short COEFF_WIDTH_SLOPE, short LOLY, short HILY)
constexpr float CELL_SEMIHEIGHT
Definition: constants.h:312
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:49
std::vector< latcomb > lat_vector
constexpr double PHI_CONV
Definition: constants.h:394
constexpr int COEFF_WIDTH_SL2_POSITION
Definition: constants.h:265
constexpr int TIME_TO_TDC_COUNTS
Definition: constants.h:235
constexpr int PROD_RESIZE_SL_T0
Definition: constants.h:272
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
constexpr float VERT_PHI1_PHI3
Definition: constants.h:324
constexpr int LHC_CLK_FREQ
Definition: constants.h:222
edm::FileInPath sl3_filename_
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:42
HLT enums.
int sector() const
Definition: DTChamberId.h:52
edm::FileInPath sl1_filename_
void finish() override
void analyze(MuonPathPtr &inMPath, lat_vector lat_combs, std::vector< cmsdt::metaPrimitive > &metaPrimitives)
std::shared_ptr< MuonPath > MuonPathPtr
Definition: MuonPath.h:131
constexpr int PRECISSION_SL_T0
Definition: constants.h:268
constexpr int PRECISSION_SL_SLOPE
Definition: constants.h:270
constexpr int XI_SL_WIDTH
Definition: constants.h:261
static unsigned int const shift
constexpr int INCREASED_RES_POS_POW
Definition: constants.h:415
DTGeometry const * dtGeo_
constexpr int WIREPOS_NORM_LSB_IGNORED
Definition: constants.h:258
const bool debug_
fit_common_out_t fit(fit_common_in_t fit_common_in, int XI_WIDTH, int COEFF_WIDTH_T0, int COEFF_WIDTH_POSITION, int COEFF_WIDTH_SLOPE, int PRECISSION_T0, int PRECISSION_POSITION, int PRECISSION_SLOPE, int PROD_RESIZE_T0, int PROD_RESIZE_POSITION, int PROD_RESIZE_SLOPE, int MAX_DRIFT_TDC, int sl)
const DTChamber * chamber(const DTChamberId &id) const
Return a DTChamber given its id.
Definition: DTGeometry.cc:90
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
edm::FileInPath sl2_filename_
std::vector< int > hits_valid
std::vector< std::vector< int > > lut_sl2
float wirePosition(int wireNumber) const
Returns the x position in the layer of a given wire number.
Definition: DTTopology.cc:63
#define LogDebug(id)
constexpr int INCREASED_RES_POS
Definition: constants.h:411
const DTLayer * layer(const DTLayerId &id) const
Return a layer given its id.
Definition: DTGeometry.cc:96