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  *
8  ****************************************************************************/
9 
10 #include <memory>
11 
18 
22 
25 
29 
31 
35 
38 public:
40 
42 
43 private:
44  void produce(edm::Event&, const edm::EventSetup&) override;
45 
55 };
56 
58  : digiToken_(consumes<edm::DetSetVector<TotemTimingDigi> >(iConfig.getParameter<edm::InputTag>("digiTag"))),
59  timingCalibrationToken_(esConsumes<PPSTimingCalibration, PPSTimingCalibrationRcd>(
60  edm::ESInputTag(iConfig.getParameter<std::string>("timingCalibrationTag")))),
61  geometryToken_(esConsumes<CTPPSGeometry, VeryForwardRealGeometryRecord>()),
62  algo_(iConfig) {
63  produces<edm::DetSetVector<TotemTimingRecHit> >();
64 }
65 
67  std::unique_ptr<edm::DetSetVector<TotemTimingRecHit> > pOut(new edm::DetSetVector<TotemTimingRecHit>);
68 
69  // get the digi collection
71  iEvent.getByToken(digiToken_, digis);
72 
73  // do not retrieve the calibration parameters if no digis were found
74  if (!digis->empty()) {
75  // check for timing calibration parameters update
76  if (calibWatcher_.check(iSetup)) {
78  algo_.setCalibration(*hTimingCalib);
79  }
80 
81  // get the geometry
83 
84  // produce the rechits collection
85  algo_.build(*geometry, *digis, *pOut);
86  }
87 
88  iEvent.put(std::move(pOut));
89 }
90 
93 
94  desc.add<edm::InputTag>("digiTag", edm::InputTag("totemTimingRawToDigi", "TotemTiming"))
95  ->setComment("input digis collection to retrieve");
96  desc.add<std::string>("timingCalibrationTag", "GlobalTag:TotemTimingCalibration")
97  ->setComment("input tag for timing calibrations retrieval");
98  desc.add<int>("baselinePoints", 8)->setComment("number of points to be used for the baseline");
99  desc.add<double>("saturationLimit", 0.85)
100  ->setComment("all signals with max > saturationLimit will be considered as saturated");
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 
109  descr.add("totemTimingRecHits", desc);
110 }
111 
edm::ESWatcher::check
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:52
VeryForwardRealGeometryRecord
Event setup record containing the real (actual) geometry information.
Definition: VeryForwardRealGeometryRecord.h:22
edm::DetSetVector
Definition: DetSetVector.h:61
CTPPSGeometry
The manager class for TOTEM RP geometry.
Definition: CTPPSGeometry.h:29
TotemTimingRecHitProducerAlgorithm
Definition: TotemTimingRecHitProducerAlgorithm.h:28
edm::ESWatcher< PPSTimingCalibrationRcd >
TotemTimingRecHitProducerAlgorithm::build
void build(const CTPPSGeometry &, const edm::DetSetVector< TotemTimingDigi > &, edm::DetSetVector< TotemTimingRecHit > &)
Definition: TotemTimingRecHitProducerAlgorithm.cc:36
ESHandle.h
ESInputTag
edm::EDGetTokenT
Definition: EDGetToken.h:33
edm
HLT enums.
Definition: AlignableModifier.h:19
geometry
Definition: geometry.py:1
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89353
TotemTimingDigi.h
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
EDProducer.h
TotemTimingRecHitProducer::timingCalibrationToken_
edm::ESGetToken< PPSTimingCalibration, PPSTimingCalibrationRcd > timingCalibrationToken_
EventSetup Tokens.
Definition: TotemTimingRecHitProducer.cc:55
TotemTimingRecHitProducer
TOTEM/PPS timing detectors digi-to-rechits conversion module.
Definition: TotemTimingRecHitProducer.cc:37
TotemTimingRecHitProducer::digiToken_
edm::EDGetTokenT< edm::DetSetVector< TotemTimingDigi > > digiToken_
Input digi collection.
Definition: TotemTimingRecHitProducer.cc:53
TotemTimingRecHit.h
edm::Handle
Definition: AssociativeIterator.h:50
ESGetToken.h
TotemTimingRecHitProducerAlgorithm.h
CTPPSGeometry.h
MakerMacros.h
TotemTimingRecHitProducerAlgorithm::setCalibration
void setCalibration(const PPSTimingCalibration &)
Definition: TotemTimingRecHitProducerAlgorithm.cc:30
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
TotemTimingDigi
Definition: TotemTimingDigi.h:19
TotemTimingDetId.h
edm::ESHandle
Definition: DTSurvey.h:22
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
iEvent
int iEvent
Definition: GenABIO.cc:224
edm::EventSetup::getHandle
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:148
edm::stream::EDProducer
Definition: EDProducer.h:38
PPSTimingCalibrationRcd
EventSetup record for TOTEM/PPS timing calibration information.
Definition: PPSTimingCalibrationRcd.h:14
edm::EventSetup
Definition: EventSetup.h:57
TotemTimingRecHitProducer::TotemTimingRecHitProducer
TotemTimingRecHitProducer(const edm::ParameterSet &)
Definition: TotemTimingRecHitProducer.cc:57
DetSetVector.h
TotemTimingRecHitProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &)
Definition: TotemTimingRecHitProducer.cc:91
VeryForwardRealGeometryRecord.h
edm::ESGetToken< PPSTimingCalibration, PPSTimingCalibrationRcd >
TotemTimingRecHitProducer::geometryToken_
edm::ESGetToken< CTPPSGeometry, VeryForwardRealGeometryRecord > geometryToken_
Definition: TotemTimingRecHitProducer.cc:56
TotemTimingRecHitProducer::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: TotemTimingRecHitProducer.cc:66
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
Frameworkfwd.h
ESWatcher.h
PPSTimingCalibrationRcd.h
DetSet.h
PPSTimingCalibration
Definition: PPSTimingCalibration.h:17
TotemTimingRecHitProducer::calibWatcher_
edm::ESWatcher< PPSTimingCalibrationRcd > calibWatcher_
Timing calibration parameters watcher.
Definition: TotemTimingRecHitProducer.cc:60
ParameterSet.h
TotemTimingRecHitProducer::algo_
TotemTimingRecHitProducerAlgorithm algo_
Digi-to-rechits transformation algorithm.
Definition: TotemTimingRecHitProducer.cc:58
edm::Event
Definition: Event.h:73
StreamID.h
edm::InputTag
Definition: InputTag.h:15