RecoLocalTracker
SiStripClusterizer
plugins
SiStripClusters2ApproxClusters.cc
Go to the documentation of this file.
1
2
3
#include "
FWCore/Framework/interface/MakerMacros.h
"
4
#include "
FWCore/Framework/interface/Frameworkfwd.h
"
5
#include "
FWCore/Framework/interface/stream/EDProducer.h
"
6
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
7
#include "
FWCore/Utilities/interface/InputTag.h
"
8
#include "
FWCore/ParameterSet/interface/ConfigurationDescriptions.h
"
9
#include "
FWCore/ParameterSet/interface/ParameterSetDescription.h
"
10
#include "
DataFormats/SiStripCluster/interface/SiStripApproximateCluster.h
"
11
#include "
DataFormats/SiStripCluster/interface/SiStripCluster.h
"
12
#include "
DataFormats/Common/interface/DetSetVectorNew.h
"
13
#include "
DataFormats/Common/interface/DetSetVector.h
"
14
15
#include <vector>
16
#include <memory>
17
18
class
SiStripClusters2ApproxClusters
:
public
edm::stream::EDProducer
<> {
19
public
:
20
explicit
SiStripClusters2ApproxClusters
(
const
edm::ParameterSet
& conf);
21
void
produce
(
edm::Event
&,
const
edm::EventSetup
&)
override
;
22
23
static
void
fillDescriptions
(
edm::ConfigurationDescriptions
& descriptions);
24
25
private
:
26
edm::InputTag
inputClusters
;
27
edm::EDGetTokenT<edmNew::DetSetVector<SiStripCluster>
>
clusterToken
;
28
};
29
30
SiStripClusters2ApproxClusters::SiStripClusters2ApproxClusters
(
const
edm::ParameterSet
& conf) {
31
inputClusters
= conf.
getParameter
<
edm::InputTag
>(
"inputClusters"
);
32
33
clusterToken
= consumes<edmNew::DetSetVector<SiStripCluster> >(
inputClusters
);
34
produces<edmNew::DetSetVector<SiStripApproximateCluster> >();
35
}
36
37
void
SiStripClusters2ApproxClusters::produce
(
edm::Event
&
event
,
edm::EventSetup
const
&) {
38
auto
result
= std::make_unique<edmNew::DetSetVector<SiStripApproximateCluster> >();
39
const
auto
& clusterCollection =
event
.get(
clusterToken
);
40
41
for
(
const
auto
& detClusters : clusterCollection) {
42
edmNew::DetSetVector<SiStripApproximateCluster>::FastFiller
ff
{*
result
, detClusters.id()};
43
44
for
(
const
auto
& cluster : detClusters)
45
ff
.push_back(
SiStripApproximateCluster
(cluster));
46
}
47
48
event
.put(
std::move
(
result
));
49
}
50
51
void
SiStripClusters2ApproxClusters::fillDescriptions
(
edm::ConfigurationDescriptions
& descriptions) {
52
edm::ParameterSetDescription
desc
;
53
desc
.add<
edm::InputTag
>(
"inputClusters"
,
edm::InputTag
(
"siStripClusters"
));
54
descriptions.
add
(
"SiStripClusters2ApproxClusters"
,
desc
);
55
}
56
57
DEFINE_FWK_MODULE
(
SiStripClusters2ApproxClusters
);
ConfigurationDescriptions.h
SiStripClusters2ApproxClusters::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition:
SiStripClusters2ApproxClusters.cc:37
SiStripClusters2ApproxClusters::inputClusters
edm::InputTag inputClusters
Definition:
SiStripClusters2ApproxClusters.cc:26
SiStripClusters2ApproxClusters::clusterToken
edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > clusterToken
Definition:
SiStripClusters2ApproxClusters.cc:27
edm::EDGetTokenT
Definition:
EDGetToken.h:33
SiStripApproximateCluster.h
HLT_FULL_cff.InputTag
InputTag
Definition:
HLT_FULL_cff.py:89301
edm::ParameterSetDescription
Definition:
ParameterSetDescription.h:52
EDProducer.h
SiStripClusters2ApproxClusters::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition:
SiStripClusters2ApproxClusters.cc:51
MakerMacros.h
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
alignCSCRings.ff
ff
Definition:
alignCSCRings.py:148
SiStripClusters2ApproxClusters
Definition:
SiStripClusters2ApproxClusters.cc:18
ParameterSetDescription.h
edm::ConfigurationDescriptions
Definition:
ConfigurationDescriptions.h:28
edm::ParameterSet
Definition:
ParameterSet.h:47
SiStripCluster.h
SiStripApproximateCluster
Definition:
SiStripApproximateCluster.h:11
edm::stream::EDProducer
Definition:
EDProducer.h:36
edm::EventSetup
Definition:
EventSetup.h:58
DetSetVector.h
SiStripClusters2ApproxClusters::SiStripClusters2ApproxClusters
SiStripClusters2ApproxClusters(const edm::ParameterSet &conf)
Definition:
SiStripClusters2ApproxClusters.cc:30
InputTag.h
submitPVResolutionJobs.desc
string desc
Definition:
submitPVResolutionJobs.py:251
eostools.move
def move(src, dest)
Definition:
eostools.py:511
Frameworkfwd.h
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition:
ParameterSet.h:303
edmNew::DetSetVector::FastFiller
Definition:
DetSetVectorNew.h:202
mps_fire.result
result
Definition:
mps_fire.py:311
ParameterSet.h
event
Definition:
event.py:1
edm::Event
Definition:
Event.h:73
DetSetVectorNew.h
edm::InputTag
Definition:
InputTag.h:15
Generated for CMSSW Reference Manual by
1.8.16