CMS 3D CMS Logo

TotemTimingRecHitProducer.cc
Go to the documentation of this file.
1 /****************************************************************************
2  *
3  * This is a part of CTPPS offline software.
4  * Authors:
5  * Laurent Forthomme (laurent.forthomme@cern.ch)
6  * Nicola Minafra (nicola.minafra@cern.ch)
7  * Christopher Misan (krzysztof.misan@cern.ch)
8  *
9  ****************************************************************************/
10 
11 #include <memory>
12 
19 
23 
26 
30 
33 
37 
40 public:
42 
44 
45 private:
46  void produce(edm::Event&, const edm::EventSetup&) override;
47 
57 };
58 
60  : digiToken_(consumes<edm::DetSetVector<TotemTimingDigi> >(iConfig.getParameter<edm::InputTag>("digiTag"))),
62  edm::ESInputTag(iConfig.getParameter<std::string>("timingCalibrationTag")))),
64  algo_(iConfig) {
65  produces<edm::DetSetVector<TotemTimingRecHit> >();
66 }
67 
69  std::unique_ptr<edm::DetSetVector<TotemTimingRecHit> > pOut(new edm::DetSetVector<TotemTimingRecHit>);
70 
71  // get the digi collection
72  const auto& digis = iEvent.get(digiToken_);
73 
74  // do not retrieve the calibration parameters if no digis were found
75  if (!digis.empty()) {
76  // check for timing calibration parameters update
77  if (calibWatcher_.check(iSetup))
79 
80  // produce the rechits collection
81  algo_.build(iSetup.getData(geometryToken_), digis, *pOut);
82  }
83 
84  iEvent.put(std::move(pOut));
85 }
86 
89 
90  desc.add<bool>("applyCalibration", false);
91  desc.add<double>("timeSliceNs", 0.);
92  desc.add<edm::InputTag>("digiTag", edm::InputTag("totemTimingRawToDigi", "TotemTiming"))
93  ->setComment("input digis collection to retrieve");
94  desc.add<std::string>("timingCalibrationTag", "GlobalTag:TotemTimingCalibration")
95  ->setComment("input tag for timing calibrations retrieval");
96  desc.add<int>("baselinePoints", 8)->setComment("number of points to be used for the baseline");
97  desc.add<double>("saturationLimit", 0.1)
98  ->setComment(
99  "all signals with max > saturationLimit will be considered as saturated for UFSD, similarly with "
100  "min<saturationLimit for a Diamond");
101  desc.add<double>("cfdFraction", 0.3)->setComment("fraction of the CFD");
102  desc.add<int>("smoothingPoints", 20)
103  ->setComment("number of points to be used for the smoothing using sinc (lowpass)");
104  desc.add<double>("lowPassFrequency", 0.7)
105  ->setComment("Frequency (in GHz) for CFD smoothing, 0 for disabling the filter");
106  desc.add<double>("hysteresis", 5.e-3)->setComment("hysteresis of the discriminator");
107  desc.add<bool>("mergeTimePeaks", true)->setComment("if time peaks schould be merged");
108  desc.add<double>("sampicOffset", 1.0)->setComment("offset of the flipped sampic signal");
109  desc.add<double>("sampicSamplingPeriodNs", 1. / 7.695)->setComment("sapic sampling period in ns");
110  descr.add("totemTimingRecHits", desc);
111 }
112 
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
TotemTimingRecHitProducer(const edm::ParameterSet &)
Event setup record containing the real (actual) geometry information.
EventSetup record for TOTEM/PPS timing calibration information.
edm::ESGetToken< CTPPSGeometry, VeryForwardRealGeometryRecord > geometryToken_
int iEvent
Definition: GenABIO.cc:224
void produce(edm::Event &, const edm::EventSetup &) override
edm::ESGetToken< PPSTimingCalibration, PPSTimingCalibrationRcd > timingCalibrationToken_
EventSetup Tokens.
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
The manager class for TOTEM RP geometry.
Definition: CTPPSGeometry.h:30
void build(const CTPPSGeometry &, const edm::DetSetVector< TotemTimingDigi > &, edm::DetSetVector< TotemTimingRecHit > &) override
TOTEM/PPS timing detectors digi-to-rechits conversion module.
void add(std::string const &label, ParameterSetDescription const &psetDescription)
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:57
edm::ESWatcher< PPSTimingCalibrationRcd > calibWatcher_
Timing calibration parameters watcher.
void setCalibration(const PPSTimingCalibration &)
TotemTimingRecHitProducerAlgorithm algo_
Digi-to-rechits transformation algorithm.
static void fillDescriptions(edm::ConfigurationDescriptions &)
HLT enums.
edm::EDGetTokenT< edm::DetSetVector< TotemTimingDigi > > digiToken_
Input digi collection.
def move(src, dest)
Definition: eostools.py:511