CMS 3D CMS Logo

TotemT2RecHitProducerAlgorithm.cc
Go to the documentation of this file.
1 /****************************************************************************
2 *
3 * This is a part of PPS offline software.
4 * Authors:
5 * Laurent Forthomme (laurent.forthomme@cern.ch)
6 *
7 ****************************************************************************/
8 
10 
13 
17  for (const auto& vec : input) {
18  const TotemT2DetId detid(vec.detId());
19 
20  // prepare the output collection filler
22 
23  for (const auto& digi : vec) {
24  const int t_lead = digi.leadingEdge(), t_trail = digi.trailingEdge();
25  // don't skip no-edge digis
26  double tot = 0.;
27  if (digi.hasLE() && digi.hasTE()) {
28  tot = (t_trail - t_lead) * ts_to_ns_; // in ns
29  }
30  double ch_t_precis = ts_to_ns_ / 2.0; //without a calibration, assume LE/TE precision is +-0.5
31 
32  // retrieve the geometry element associated to this DetID
33  const auto& tile = geom.tile(detid);
34 
35  // store to the output collection
36  filler.emplace_back(tile.centre(), t_lead * ts_to_ns_, ch_t_precis, tot);
37  }
38  }
39 }
Detector ID class for Totem T2 detectors. Bits [19:31] : Base CTPPSDetId class attributes Bits [16:18...
Definition: TotemT2DetId.h:25
static std::string const input
Definition: EdmProvDump.cc:50
void build(const TotemGeometry &, const edmNew::DetSetVector< TotemT2Digi > &, edmNew::DetSetVector< TotemT2RecHit > &) override
Definition: output.py:1