CMS 3D CMS Logo

HFEMClusterProducer.cc
Go to the documentation of this file.
1 //Package: EgammaHFProdcers
2 // Class : HFEMClusterProducer
3 // Original Author: Kevin Klapoetke (minnesota)
4 //
5 // $Id: HFEMClusterProducer.cc,v 1.2 2007/09/19 Kevin Klapoetke
6 //
7 
8 #include <iostream>
13 using namespace reco;
15  : hfreco_(consumes<HFRecHitCollection>(conf.getParameter<edm::InputTag>("hits"))) {
16  produces<reco::HFEMClusterShapeCollection>();
17  produces<reco::BasicClusterCollection>();
18  produces<reco::SuperClusterCollection>();
19  produces<reco::HFEMClusterShapeAssociationCollection>();
20  algo_.setup(conf.getParameter<double>("minTowerEnergy"),
21  conf.getParameter<double>("seedThresholdET"),
22  conf.getParameter<double>("maximumSL"),
23  conf.getParameter<double>("maximumRenergy"),
24  conf.getParameter<bool>("usePMTFlag"),
25  conf.getParameter<bool>("usePulseFlag"),
26  conf.getParameter<bool>("forcePulseFlagMC"),
27  conf.getParameter<int>("correctionType"));
28 }
29 
32 
33  e.getByToken(hfreco_, hf_hits);
34 
37 
38  // create return data
39  auto retdata1 = std::make_unique<HFEMClusterShapeCollection>();
40  auto retdata2 = std::make_unique<SuperClusterCollection>();
41 
42  algo_.isMC(!e.isRealData());
43 
44  algo_.clusterize(*hf_hits, *geometry, *retdata1, *retdata2);
47 
48  // put the results
49  ShapeHandle = e.put(std::move(retdata1));
50  SupHandle = e.put(std::move(retdata2));
51 
52  auto retdata3 = std::make_unique<HFEMClusterShapeAssociationCollection>(SupHandle, ShapeHandle);
53 
54  for (unsigned int i = 0; i < ShapeHandle->size(); i++) {
55  retdata3->insert(edm::Ref<reco::SuperClusterCollection>(SupHandle, i),
57  }
58 
59  e.put(std::move(retdata3));
60 }
geometry
ESHandle< TrackerGeometry > geometry
Definition: TkLasBeamFitter.cc:200
HFEMClusterProducer::produce
void produce(edm::Event &e, edm::EventSetup const &iSetup) override
Definition: HFEMClusterProducer.cc:30
Handle.h
mps_fire.i
i
Definition: mps_fire.py:355
ESHandle.h
HFClusterAlgo::clusterize
void clusterize(const HFRecHitCollection &hf, const CaloGeometry &geom, reco::HFEMClusterShapeCollection &clusters, reco::SuperClusterCollection &SuperClusters)
Definition: HFClusterAlgo.cc:89
CaloGeometryRecord
Definition: CaloGeometryRecord.h:30
edm
HLT enums.
Definition: AlignableModifier.h:19
geometry
Definition: geometry.py:1
edm::SortedCollection
Definition: SortedCollection.h:49
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
edm::Handle
Definition: AssociativeIterator.h:50
edm::Ref
Definition: AssociativeIterator.h:58
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
edm::ESHandle< CaloGeometry >
HFClusterAlgo::setup
void setup(double minTowerEnergy, double seedThreshold, double maximumSL, double m_maximumRenergy, bool usePMTflag, bool usePulseflag, bool forcePulseFlagMC, int correctionSet)
Definition: HFClusterAlgo.cc:40
CaloGeometryRecord.h
HFEMClusterProducer::hfreco_
edm::EDGetToken hfreco_
Definition: HFEMClusterProducer.h:22
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
edm::ParameterSet
Definition: ParameterSet.h:36
HFEMClusterProducer::algo_
HFClusterAlgo algo_
Definition: HFEMClusterProducer.h:23
HFEMClusterProducer::HFEMClusterProducer
HFEMClusterProducer(edm::ParameterSet const &conf)
Definition: HFEMClusterProducer.cc:14
edm::EventSetup
Definition: EventSetup.h:57
get
#define get
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
eostools.move
def move(src, dest)
Definition: eostools.py:511
edm::OrphanHandle
Definition: EDProductfwd.h:39
HFEMClusterProducer.h
HFClusterAlgo::isMC
void isMC(bool isMC)
Definition: HFClusterAlgo.h:35
edm::Event
Definition: Event.h:73
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37