CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
TotemTimingRecHitProducer Class Reference

TOTEM/PPS timing detectors digi-to-rechits conversion module. More...

Inheritance diagram for TotemTimingRecHitProducer:
edm::stream::EDProducer<>

Public Member Functions

 TotemTimingRecHitProducer (const edm::ParameterSet &)
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &)
 

Private Member Functions

void produce (edm::Event &, const edm::EventSetup &) override
 

Private Attributes

TotemTimingRecHitProducerAlgorithm algo_
 Digi-to-rechits transformation algorithm. More...
 
edm::ESWatcher< PPSTimingCalibrationRcdcalibWatcher_
 Timing calibration parameters watcher. More...
 
edm::EDGetTokenT< edm::DetSetVector< TotemTimingDigi > > digiToken_
 Input digi collection. More...
 
edm::ESInputTag timingCalibrationTag_
 Label to timing calibration tag. More...
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

Detailed Description

TOTEM/PPS timing detectors digi-to-rechits conversion module.

Definition at line 36 of file TotemTimingRecHitProducer.cc.

Constructor & Destructor Documentation

TotemTimingRecHitProducer::TotemTimingRecHitProducer ( const edm::ParameterSet iConfig)
explicit

Definition at line 56 of file TotemTimingRecHitProducer.cc.

56  :
57  digiToken_( consumes<edm::DetSetVector<TotemTimingDigi> >( iConfig.getParameter<edm::InputTag>( "digiTag" ) ) ),
58  timingCalibrationTag_( iConfig.getParameter<std::string>( "timingCalibrationTag" ) ),
59  algo_( iConfig )
60 {
61  produces<edm::DetSetVector<TotemTimingRecHit> >();
62 }
T getParameter(std::string const &) const
edm::ESInputTag timingCalibrationTag_
Label to timing calibration tag.
TotemTimingRecHitProducerAlgorithm algo_
Digi-to-rechits transformation algorithm.
edm::EDGetTokenT< edm::DetSetVector< TotemTimingDigi > > digiToken_
Input digi collection.

Member Function Documentation

void TotemTimingRecHitProducer::fillDescriptions ( edm::ConfigurationDescriptions descr)
static

Definition at line 94 of file TotemTimingRecHitProducer.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), DEFINE_FWK_MODULE, AlCaHLTBitMon_QueryRunRegistry::string, and funct::true.

95 {
97 
98  desc.add<edm::InputTag>( "digiTag", edm::InputTag( "totemTimingRawToDigi", "TotemTiming" ) )
99  ->setComment( "input digis collection to retrieve" );
100  desc.add<std::string>( "timingCalibrationTag", "GlobalTag:TotemTimingCalibration" )
101  ->setComment( "input tag for timing calibrations retrieval" );
102  desc.add<int>( "baselinePoints", 8 )
103  ->setComment( "number of points to be used for the baseline" );
104  desc.add<double>( "saturationLimit", 0.85 )
105  ->setComment( "all signals with max > saturationLimit will be considered as saturated" );
106  desc.add<double>( "cfdFraction", 0.3 )
107  ->setComment( "fraction of the CFD" );
108  desc.add<int>( "smoothingPoints", 20 )
109  ->setComment( "number of points to be used for the smoothing using sinc (lowpass)" );
110  desc.add<double>( "lowPassFrequency", 0.7 )
111  ->setComment( "Frequency (in GHz) for CFD smoothing, 0 for disabling the filter" );
112  desc.add<double>( "hysteresis", 5.e-3 )
113  ->setComment( "hysteresis of the discriminator" );
114  desc.add<bool>( "mergeTimePeaks", true )
115  ->setComment( "if time peaks schould be merged" );
116 
117  descr.add( "totemTimingRecHits", desc );
118 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void TotemTimingRecHitProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 65 of file TotemTimingRecHitProducer.cc.

References algo_, TotemTimingRecHitProducerAlgorithm::build(), calibWatcher_, edm::ESWatcher< T >::check(), digiToken_, geometry, edm::EventSetup::get(), edm::Event::getByToken(), eostools::move(), edm::Event::put(), TotemTimingRecHitProducerAlgorithm::setCalibration(), and timingCalibrationTag_.

66 {
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  iSetup.get<PPSTimingCalibrationRcd>().get( timingCalibrationTag_, hTimingCalib );
79  algo_.setCalibration( *hTimingCalib );
80  }
81 
82  // get the geometry
84  iSetup.get<VeryForwardRealGeometryRecord>().get( geometry );
85 
86  // produce the rechits collection
87  algo_.build( *geometry, *digis, *pOut );
88  }
89 
90  iEvent.put( std::move( pOut ) );
91 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:125
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
edm::ESInputTag timingCalibrationTag_
Label to timing calibration tag.
Event setup record containing the real (actual) geometry information.
EventSetup record for TOTEM/PPS timing calibration information.
void build(const CTPPSGeometry &, const edm::DetSetVector< TotemTimingDigi > &, edm::DetSetVector< TotemTimingRecHit > &)
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:52
edm::ESWatcher< PPSTimingCalibrationRcd > calibWatcher_
Timing calibration parameters watcher.
ESHandle< TrackerGeometry > geometry
void setCalibration(const PPSTimingCalibration &)
TotemTimingRecHitProducerAlgorithm algo_
Digi-to-rechits transformation algorithm.
T get() const
Definition: EventSetup.h:71
edm::EDGetTokenT< edm::DetSetVector< TotemTimingDigi > > digiToken_
Input digi collection.
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

TotemTimingRecHitProducerAlgorithm TotemTimingRecHitProducer::algo_
private

Digi-to-rechits transformation algorithm.

Definition at line 51 of file TotemTimingRecHitProducer.cc.

Referenced by produce().

edm::ESWatcher<PPSTimingCalibrationRcd> TotemTimingRecHitProducer::calibWatcher_
private

Timing calibration parameters watcher.

Definition at line 53 of file TotemTimingRecHitProducer.cc.

Referenced by produce().

edm::EDGetTokenT<edm::DetSetVector<TotemTimingDigi> > TotemTimingRecHitProducer::digiToken_
private

Input digi collection.

Definition at line 47 of file TotemTimingRecHitProducer.cc.

Referenced by produce().

edm::ESInputTag TotemTimingRecHitProducer::timingCalibrationTag_
private

Label to timing calibration tag.

Definition at line 49 of file TotemTimingRecHitProducer.cc.

Referenced by produce().