CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
CTPPSDiamondRecHitProducer Class Reference
Inheritance diagram for CTPPSDiamondRecHitProducer:
edm::stream::EDProducer<>

Public Member Functions

 CTPPSDiamondRecHitProducer (const edm::ParameterSet &)
 
 ~CTPPSDiamondRecHitProducer () override
 
- 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

CTPPSDiamondRecHitProducerAlgorithm algo_
 A watcher to detect geometry changes. More...
 
edm::EDGetTokenT< edm::DetSetVector< CTPPSDiamondDigi > > digiToken_
 

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

Definition at line 33 of file CTPPSDiamondRecHitProducer.cc.

Constructor & Destructor Documentation

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

Definition at line 52 of file CTPPSDiamondRecHitProducer.cc.

52  :
53  digiToken_( consumes<edm::DetSetVector<CTPPSDiamondDigi> >( iConfig.getParameter<edm::InputTag>( "digiTag" ) ) ),
54  algo_( iConfig )
55 {
56  produces<edm::DetSetVector<CTPPSDiamondRecHit> >();
57 }
T getParameter(std::string const &) const
edm::EDGetTokenT< edm::DetSetVector< CTPPSDiamondDigi > > digiToken_
CTPPSDiamondRecHitProducerAlgorithm algo_
A watcher to detect geometry changes.
CTPPSDiamondRecHitProducer::~CTPPSDiamondRecHitProducer ( )
override

Definition at line 59 of file CTPPSDiamondRecHitProducer.cc.

60 {}

Member Function Documentation

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

Definition at line 82 of file CTPPSDiamondRecHitProducer.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), and DEFINE_FWK_MODULE.

83 {
85 
86  desc.add<edm::InputTag>( "digiTag", edm::InputTag( "ctppsDiamondRawToDigi", "TimingDiamond" ) )
87  ->setComment( "input digis collection to retrieve" );
88  desc.add<double>( "timeSliceNs", 25.0/1024.0 )
89  ->setComment( "conversion constant between HPTDC timing bin size and nanoseconds" );
90  desc.add<int>( "timeShift", 0 ) // to be determined at calibration level, will be replaced by a map channel id -> time shift
91  ->setComment( "overall time offset to apply on all hits in all channels" );
92 
93  descr.add( "ctppsDiamondRecHits", desc );
94 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void CTPPSDiamondRecHitProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 63 of file CTPPSDiamondRecHitProducer.cc.

References algo_, CTPPSDiamondRecHitProducerAlgorithm::build(), digiToken_, geometry, edm::EventSetup::get(), edm::Event::getByToken(), eostools::move(), edm::ESHandle< T >::product(), and edm::Event::put().

64 {
65  std::unique_ptr<edm::DetSetVector<CTPPSDiamondRecHit> > pOut( new edm::DetSetVector<CTPPSDiamondRecHit> );
66 
67  // get the digi collection
69  iEvent.getByToken( digiToken_, digis );
70 
71  // get the geometry
73  iSetup.get<VeryForwardRealGeometryRecord>().get( geometry );
74 
75  // produce the rechits collection
76  algo_.build( geometry.product(), *( digis ), *( pOut ) );
77 
78  iEvent.put( std::move( pOut ) );
79 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:137
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:579
edm::EDGetTokenT< edm::DetSetVector< CTPPSDiamondDigi > > digiToken_
Event setup record containing the real (actual) geometry information.
void build(const CTPPSGeometry *, const edm::DetSetVector< CTPPSDiamondDigi > &, edm::DetSetVector< CTPPSDiamondRecHit > &)
ESHandle< TrackerGeometry > geometry
T get() const
Definition: EventSetup.h:63
CTPPSDiamondRecHitProducerAlgorithm algo_
A watcher to detect geometry changes.
T const * product() const
Definition: ESHandle.h:86
def move(src, dest)
Definition: eostools.py:510

Member Data Documentation

CTPPSDiamondRecHitProducerAlgorithm CTPPSDiamondRecHitProducer::algo_
private

A watcher to detect geometry changes.

Definition at line 49 of file CTPPSDiamondRecHitProducer.cc.

Referenced by produce().

edm::EDGetTokenT<edm::DetSetVector<CTPPSDiamondDigi> > CTPPSDiamondRecHitProducer::digiToken_
private

Definition at line 44 of file CTPPSDiamondRecHitProducer.cc.

Referenced by produce().