CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
CTPPSPixelRecHitProducer Class Reference

#include <CTPPSPixelRecHitProducer.h>

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

Public Member Functions

 CTPPSPixelRecHitProducer (const edm::ParameterSet &param)
 
void produce (edm::Event &, const edm::EventSetup &) override
 
 ~CTPPSPixelRecHitProducer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Member Functions

void run (const edm::DetSetVector< CTPPSPixelCluster > &input, edm::DetSetVector< CTPPSPixelRecHit > &output)
 

Private Attributes

RPixClusterToHit cluster2hit_
 
edm::ParameterSet param_
 
edm::InputTag src_
 
edm::EDGetTokenT< edm::DetSetVector< CTPPSPixelCluster > > tokenCTPPSPixelCluster_
 
int verbosity_
 

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 29 of file CTPPSPixelRecHitProducer.h.

Constructor & Destructor Documentation

◆ CTPPSPixelRecHitProducer()

CTPPSPixelRecHitProducer::CTPPSPixelRecHitProducer ( const edm::ParameterSet param)
explicit

Definition at line 3 of file CTPPSPixelRecHitProducer.cc.

3  : param_(conf), cluster2hit_(conf) {
4  src_ = conf.getParameter<edm::InputTag>("RPixClusterTag");
5  verbosity_ = conf.getUntrackedParameter<int>("RPixVerbosity");
6  tokenCTPPSPixelCluster_ = consumes<edm::DetSetVector<CTPPSPixelCluster> >(src_);
7  produces<edm::DetSetVector<CTPPSPixelRecHit> >();
8 }

References edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), src_, tokenCTPPSPixelCluster_, and verbosity_.

◆ ~CTPPSPixelRecHitProducer()

CTPPSPixelRecHitProducer::~CTPPSPixelRecHitProducer ( )
override

Definition at line 10 of file CTPPSPixelRecHitProducer.cc.

10 {}

Member Function Documentation

◆ fillDescriptions()

void CTPPSPixelRecHitProducer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 12 of file CTPPSPixelRecHitProducer.cc.

12  {
14  desc.addUntracked<int>("RPixVerbosity", 0);
15  desc.add<edm::InputTag>("RPixClusterTag", edm::InputTag("ctppsPixelClusters"));
16  descriptions.add("ctppsPixelRecHits", desc);
17 }

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, and HLT_FULL_cff::InputTag.

◆ produce()

void CTPPSPixelRecHitProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
override

Definition at line 19 of file CTPPSPixelRecHitProducer.cc.

19  {
21  iEvent.getByToken(tokenCTPPSPixelCluster_, rpCl);
22 
24 
25  // run reconstruction
26  if (!rpCl->empty())
27  run(*rpCl, output);
28 
29  iEvent.put(std::make_unique<edm::DetSetVector<CTPPSPixelRecHit> >(output));
30 }

References iEvent, convertSQLitetoXML_cfg::output, run(), and tokenCTPPSPixelCluster_.

◆ run()

void CTPPSPixelRecHitProducer::run ( const edm::DetSetVector< CTPPSPixelCluster > &  input,
edm::DetSetVector< CTPPSPixelRecHit > &  output 
)
private

Definition at line 32 of file CTPPSPixelRecHitProducer.cc.

33  {
34  for (const auto &ds_cluster : input) {
35  edm::DetSet<CTPPSPixelRecHit> &ds_rechit = output.find_or_insert(ds_cluster.id);
36 
37  //calculate the cluster parameters and convert it into a rechit
38  cluster2hit_.buildHits(ds_cluster.id, ds_cluster.data, ds_rechit.data);
39  }
40 }

References RPixClusterToHit::buildHits(), cluster2hit_, edm::DetSet< T >::data, input, and convertSQLitetoXML_cfg::output.

Referenced by produce().

Member Data Documentation

◆ cluster2hit_

RPixClusterToHit CTPPSPixelRecHitProducer::cluster2hit_
private

Definition at line 49 of file CTPPSPixelRecHitProducer.h.

Referenced by run().

◆ param_

edm::ParameterSet CTPPSPixelRecHitProducer::param_
private

Definition at line 43 of file CTPPSPixelRecHitProducer.h.

◆ src_

edm::InputTag CTPPSPixelRecHitProducer::src_
private

Definition at line 46 of file CTPPSPixelRecHitProducer.h.

Referenced by CTPPSPixelRecHitProducer().

◆ tokenCTPPSPixelCluster_

edm::EDGetTokenT<edm::DetSetVector<CTPPSPixelCluster> > CTPPSPixelRecHitProducer::tokenCTPPSPixelCluster_
private

Definition at line 47 of file CTPPSPixelRecHitProducer.h.

Referenced by CTPPSPixelRecHitProducer(), and produce().

◆ verbosity_

int CTPPSPixelRecHitProducer::verbosity_
private

Definition at line 44 of file CTPPSPixelRecHitProducer.h.

Referenced by CTPPSPixelRecHitProducer().

CTPPSPixelRecHitProducer::src_
edm::InputTag src_
Definition: CTPPSPixelRecHitProducer.h:46
edm::DetSetVector< CTPPSPixelRecHit >
input
static const std::string input
Definition: EdmProvDump.cc:48
CTPPSPixelRecHitProducer::tokenCTPPSPixelCluster_
edm::EDGetTokenT< edm::DetSetVector< CTPPSPixelCluster > > tokenCTPPSPixelCluster_
Definition: CTPPSPixelRecHitProducer.h:47
edm::DetSet
Definition: DetSet.h:23
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:72
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89287
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
edm::Handle
Definition: AssociativeIterator.h:50
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
CTPPSPixelRecHitProducer::param_
edm::ParameterSet param_
Definition: CTPPSPixelRecHitProducer.h:43
CTPPSPixelRecHitProducer::cluster2hit_
RPixClusterToHit cluster2hit_
Definition: CTPPSPixelRecHitProducer.h:49
RPixClusterToHit::buildHits
void buildHits(unsigned int detId, const std::vector< CTPPSPixelCluster > &clusters, std::vector< CTPPSPixelRecHit > &hits)
Definition: RPixClusterToHit.cc:9
iEvent
int iEvent
Definition: GenABIO.cc:224
CTPPSPixelRecHitProducer::verbosity_
int verbosity_
Definition: CTPPSPixelRecHitProducer.h:44
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
CTPPSPixelRecHitProducer::run
void run(const edm::DetSetVector< CTPPSPixelCluster > &input, edm::DetSetVector< CTPPSPixelRecHit > &output)
Definition: CTPPSPixelRecHitProducer.cc:32
edm::DetSet::data
collection_type data
Definition: DetSet.h:80
edm::InputTag
Definition: InputTag.h:15