CMS 3D CMS Logo

CTPPSPixelRecHitProducer.cc
Go to the documentation of this file.
2 
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 }
9 
11 
14  desc.addUntracked<int>("RPixVerbosity", 0);
15  desc.add<edm::InputTag>("RPixClusterTag", edm::InputTag("ctppsPixelClusters"));
16  descriptions.add("ctppsPixelRecHits", desc);
17 }
18 
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 }
31 
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 }
41 
CTPPSPixelRecHitProducer::src_
edm::InputTag src_
Definition: CTPPSPixelRecHitProducer.h:46
edm::DetSetVector< CTPPSPixelRecHit >
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
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:32
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
param_
struct @684 param_
edm::Handle
Definition: AssociativeIterator.h:50
CTPPSPixelRecHitProducer.h
CTPPSPixelRecHitProducer::~CTPPSPixelRecHitProducer
~CTPPSPixelRecHitProducer() override
Definition: CTPPSPixelRecHitProducer.cc:10
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
CTPPSPixelRecHitProducer::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: CTPPSPixelRecHitProducer.cc:19
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
edm::ParameterSetDescription::addUntracked
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:100
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
edm::ParameterSet
Definition: ParameterSet.h:36
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
edm::EventSetup
Definition: EventSetup.h:57
CTPPSPixelRecHitProducer::verbosity_
int verbosity_
Definition: CTPPSPixelRecHitProducer.h:44
CTPPSPixelRecHitProducer
Definition: CTPPSPixelRecHitProducer.h:29
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
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
CTPPSPixelRecHitProducer::CTPPSPixelRecHitProducer
CTPPSPixelRecHitProducer(const edm::ParameterSet &param)
Definition: CTPPSPixelRecHitProducer.cc:3
CTPPSPixelRecHitProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: CTPPSPixelRecHitProducer.cc:12
edm::Event
Definition: Event.h:73
edm::InputTag
Definition: InputTag.h:15