CMS 3D CMS Logo

SiStripClusters2ApproxClusters.cc
Go to the documentation of this file.
1 
2 
14 
15 #include <vector>
16 #include <memory>
17 
19 public:
21  void produce(edm::Event&, const edm::EventSetup&) override;
22 
23  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
24 
25 private:
28 
29  unsigned int maxNSat;
30 };
31 
33  inputClusters = conf.getParameter<edm::InputTag>("inputClusters");
34  maxNSat = conf.getParameter<unsigned int>("maxSaturatedStrips");
35 
36  clusterToken = consumes<edmNew::DetSetVector<SiStripCluster> >(inputClusters);
37  produces<edmNew::DetSetVector<SiStripApproximateCluster> >();
38 }
39 
41  auto result = std::make_unique<edmNew::DetSetVector<SiStripApproximateCluster> >();
42  const auto& clusterCollection = event.get(clusterToken);
43 
44  for (const auto& detClusters : clusterCollection) {
46 
47  for (const auto& cluster : detClusters)
48  ff.push_back(SiStripApproximateCluster(cluster, maxNSat));
49  }
50 
51  event.put(std::move(result));
52 }
53 
56  desc.add<edm::InputTag>("inputClusters", edm::InputTag("siStripClusters"));
57  desc.add<unsigned int>("maxSaturatedStrips", 3);
58  descriptions.add("SiStripClusters2ApproxClusters", desc);
59 }
60 
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
SiStripClusters2ApproxClusters(const edm::ParameterSet &conf)
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
void produce(edm::Event &, const edm::EventSetup &) override
void add(std::string const &label, ParameterSetDescription const &psetDescription)
edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > clusterToken
def move(src, dest)
Definition: eostools.py:511
Definition: event.py:1