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 
32 
36 
39 public:
41 
43 
44 private:
45  void produce(edm::Event&, const edm::EventSetup&) override;
46 
56 };
57 
59  : digiToken_(consumes<edm::DetSetVector<TotemTimingDigi> >(iConfig.getParameter<edm::InputTag>("digiTag"))),
61  edm::ESInputTag(iConfig.getParameter<std::string>("timingCalibrationTag")))),
63  algo_(iConfig) {
64  produces<edm::DetSetVector<TotemTimingRecHit> >();
65 }
66 
68  std::unique_ptr<edm::DetSetVector<TotemTimingRecHit> > pOut(new edm::DetSetVector<TotemTimingRecHit>);
69 
70  // get the digi collection
72  iEvent.getByToken(digiToken_, digis);
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  algo_.setCalibration(*hTimingCalib);
80  }
81 
82  // get the geometry
84 
85  // produce the rechits collection
86  algo_.build(*geometry, *digis, *pOut);
87  }
88 
89  iEvent.put(std::move(pOut));
90 }
91 
94 
95  desc.add<edm::InputTag>("digiTag", edm::InputTag("totemTimingRawToDigi", "TotemTiming"))
96  ->setComment("input digis collection to retrieve");
97  desc.add<std::string>("timingCalibrationTag", "GlobalTag:TotemTimingCalibration")
98  ->setComment("input tag for timing calibrations retrieval");
99  desc.add<int>("baselinePoints", 8)->setComment("number of points to be used for the baseline");
100  desc.add<double>("saturationLimit", 0.1)
101  ->setComment(
102  "all signals with max > saturationLimit will be considered as saturated for UFSD, similarly with "
103  "min<saturationLimit for a Diamond");
104  desc.add<double>("cfdFraction", 0.3)->setComment("fraction of the CFD");
105  desc.add<int>("smoothingPoints", 20)
106  ->setComment("number of points to be used for the smoothing using sinc (lowpass)");
107  desc.add<double>("lowPassFrequency", 0.7)
108  ->setComment("Frequency (in GHz) for CFD smoothing, 0 for disabling the filter");
109  desc.add<double>("hysteresis", 5.e-3)->setComment("hysteresis of the discriminator");
110  desc.add<bool>("mergeTimePeaks", true)->setComment("if time peaks schould be merged");
111  desc.add<double>("sampicOffset", 1.0)->setComment("offset of the flipped sampic signal");
112  desc.add<double>("sampicSamplingPeriodNs", 1. / 7.695)->setComment("sapic sampling period in ns");
113  descr.add("totemTimingRecHits", desc);
114 }
115 
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
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.
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:151
void build(const CTPPSGeometry &, const edm::DetSetVector< TotemTimingDigi > &, edm::DetSetVector< TotemTimingRecHit > &)
The manager class for TOTEM RP geometry.
Definition: CTPPSGeometry.h:30
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