CMS 3D CMS Logo

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
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Member Functions

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

Private Attributes

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

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

Detailed Description

Definition at line 33 of file CTPPSPixelRecHitProducer.h.

Constructor & Destructor Documentation

◆ CTPPSPixelRecHitProducer()

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

Definition at line 3 of file CTPPSPixelRecHitProducer.cc.

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

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  pixelTopologyToken_ = esConsumes<PPSPixelTopology, PPSPixelTopologyRcd>();
9 }
edm::EDGetTokenT< edm::DetSetVector< CTPPSPixelCluster > > tokenCTPPSPixelCluster_
edm::ESGetToken< PPSPixelTopology, PPSPixelTopologyRcd > pixelTopologyToken_

◆ ~CTPPSPixelRecHitProducer()

CTPPSPixelRecHitProducer::~CTPPSPixelRecHitProducer ( )
override

Definition at line 11 of file CTPPSPixelRecHitProducer.cc.

11 {}

Member Function Documentation

◆ fillDescriptions()

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

Definition at line 13 of file CTPPSPixelRecHitProducer.cc.

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

13  {
15  desc.addUntracked<int>("RPixVerbosity", 0);
16  desc.add<edm::InputTag>("RPixClusterTag", edm::InputTag("ctppsPixelClusters"));
17  descriptions.add("ctppsPixelRecHits", desc);
18 }
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ produce()

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

Definition at line 20 of file CTPPSPixelRecHitProducer.cc.

References edm::EventSetup::getHandle(), iEvent, convertSQLitetoXML_cfg::output, pixelTopologyToken_, run(), and tokenCTPPSPixelCluster_.

20  {
22  iEvent.getByToken(tokenCTPPSPixelCluster_, rpCl);
23 
25 
27 
28  // run reconstruction
29  if (!rpCl->empty())
30  run(*rpCl, output, *thePixelTopology);
31 
32  iEvent.put(std::make_unique<edm::DetSetVector<CTPPSPixelRecHit> >(output));
33 }
int iEvent
Definition: GenABIO.cc:224
edm::EDGetTokenT< edm::DetSetVector< CTPPSPixelCluster > > tokenCTPPSPixelCluster_
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:151
void run(const edm::DetSetVector< CTPPSPixelCluster > &input, edm::DetSetVector< CTPPSPixelRecHit > &output, const PPSPixelTopology &ppt)
edm::ESGetToken< PPSPixelTopology, PPSPixelTopologyRcd > pixelTopologyToken_

◆ run()

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

Definition at line 35 of file CTPPSPixelRecHitProducer.cc.

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

Referenced by produce().

37  {
38  for (const auto &ds_cluster : input) {
39  edm::DetSet<CTPPSPixelRecHit> &ds_rechit = output.find_or_insert(ds_cluster.id);
40 
41  //calculate the cluster parameters and convert it into a rechit
42  cluster2hit_.buildHits(ds_cluster.id, ds_cluster.data, ds_rechit.data, ppt);
43  }
44 }
static std::string const input
Definition: EdmProvDump.cc:47
void buildHits(unsigned int detId, const std::vector< CTPPSPixelCluster > &clusters, std::vector< CTPPSPixelRecHit > &hits, const PPSPixelTopology &ppt)
collection_type data
Definition: DetSet.h:80

Member Data Documentation

◆ cluster2hit_

RPixClusterToHit CTPPSPixelRecHitProducer::cluster2hit_
private

Definition at line 51 of file CTPPSPixelRecHitProducer.h.

Referenced by run().

◆ param_

edm::ParameterSet CTPPSPixelRecHitProducer::param_
private

Definition at line 44 of file CTPPSPixelRecHitProducer.h.

◆ pixelTopologyToken_

edm::ESGetToken<PPSPixelTopology, PPSPixelTopologyRcd> CTPPSPixelRecHitProducer::pixelTopologyToken_
private

Definition at line 49 of file CTPPSPixelRecHitProducer.h.

Referenced by CTPPSPixelRecHitProducer(), and produce().

◆ src_

edm::InputTag CTPPSPixelRecHitProducer::src_
private

Definition at line 47 of file CTPPSPixelRecHitProducer.h.

Referenced by CTPPSPixelRecHitProducer().

◆ tokenCTPPSPixelCluster_

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

Definition at line 48 of file CTPPSPixelRecHitProducer.h.

Referenced by CTPPSPixelRecHitProducer(), and produce().

◆ verbosity_

int CTPPSPixelRecHitProducer::verbosity_
private

Definition at line 45 of file CTPPSPixelRecHitProducer.h.

Referenced by CTPPSPixelRecHitProducer().