src
RecoPPS
Local
src
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
9
#include "
RecoPPS/Local/interface/TotemT2RecHitProducerAlgorithm.h
"
10
11
#include "
DataFormats/Common/interface/DetSetNew.h
"
12
#include "
DataFormats/CTPPSDetId/interface/TotemT2DetId.h
"
13
14
void
TotemT2RecHitProducerAlgorithm::build
(
const
TotemGeometry
&
geom
,
15
const
edmNew::DetSetVector<TotemT2Digi>
&
input
,
16
edmNew::DetSetVector<TotemT2RecHit>
&
output
) {
17
for
(
const
auto
& vec :
input
) {
18
const
TotemT2DetId
detid(vec.detId());
19
20
// prepare the output collection filler
21
edmNew::DetSetVector<TotemT2RecHit>::FastFiller
filler
(
output
, detid);
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
}
TotemT2RecHitProducerAlgorithm.h
TotemT2DetId.h
TotemT2DetId
Detector ID class for Totem T2 detectors. Bits [19:31] : Base CTPPSDetId class attributes Bits [16:18...
Definition:
TotemT2DetId.h:25
input
static std::string const input
Definition:
EdmProvDump.cc:50
TotemGeometry
Definition:
TotemGeometry.h:17
DetSetNew.h
TotemT2RecHitProducerAlgorithm::build
void build(const TotemGeometry &, const edmNew::DetSetVector< TotemT2Digi > &, edmNew::DetSetVector< TotemT2RecHit > &) override
Definition:
TotemT2RecHitProducerAlgorithm.cc:14
edmNew::DetSetVector
Definition:
DetSetNew.h:13
relativeConstraints.geom
geom
Definition:
relativeConstraints.py:72
compareTotals.tot
tot
Definition:
compareTotals.py:299
edmNew::DetSetVector::FastFiller
Definition:
DetSetVectorNew.h:198
output
Definition:
output.py:1
trigObjTnPSource_cfi.filler
filler
Definition:
trigObjTnPSource_cfi.py:21
TimingRecHitProducerAlgorithm< TotemGeometry, edmNew::DetSetVector< TotemT2Digi >, edmNew::DetSetVector< TotemT2RecHit > >::ts_to_ns_
double ts_to_ns_
Conversion constant between time slice and absolute time (in ns)
Definition:
TimingRecHitProducerAlgorithm.h:38
Generated for CMSSW Reference Manual by
1.8.14