CMS 3D CMS Logo

HLTHFRecoEcalCandidateProducer.cc
Go to the documentation of this file.
1 
9 #include <iostream>
10 #include <vector>
11 #include <memory>
12 
13 // Framework
20 //
26 
30 
32  : hfclusters_(conf.getParameter<edm::InputTag>("hfclusters")),
33  HFDBversion_(conf.existsAs<bool>("HFDBversion") ? conf.getParameter<int>("HFDBversion") : 99), //do nothing
34  HFDBvector_(conf.existsAs<bool>("HFDBvector") ? conf.getParameter<std::vector<double> >("HFDBvector")
35  : std::vector<double>{}),
36  Cut2D_(conf.getParameter<double>("intercept2DCut")),
37  defaultSlope2D_(
38  (Cut2D_ <= 0.83)
39  ? (0.475)
40  : ((Cut2D_ > 0.83 && Cut2D_ <= 0.9) ? (0.275) : (0.2))), //fix for hlt unable to add slope variable now
41  hfvars_(HFDBversion_, HFDBvector_),
42  algo_(conf.existsAs<bool>("Correct") ? conf.getParameter<bool>("Correct") : true,
43  conf.getParameter<double>("e9e25Cut"),
44  conf.getParameter<double>("intercept2DCut"),
45  conf.existsAs<bool>("intercept2DSlope") ? conf.getParameter<double>("intercept2DSlope") : defaultSlope2D_,
46  conf.getParameter<std::vector<double> >("e1e9Cut"),
47  conf.getParameter<std::vector<double> >("eCOREe9Cut"),
48  conf.getParameter<std::vector<double> >("eSeLCut"),
49  hfvars_) {
50  produces<reco::RecoEcalCandidateCollection>();
51 }
52 
56 
57  e.getByLabel(hfclusters_, super_clus);
58  e.getByLabel(hfclusters_, hf_assoc);
59 
60  int nvertex = 1;
61 
62  // create return data
63  auto retdata1 = std::make_unique<reco::RecoEcalCandidateCollection>();
64 
65  algo_.produce(super_clus, *hf_assoc, *retdata1, nvertex);
66 
67  e.put(std::move(retdata1));
68 }
edm::StreamID
Definition: StreamID.h:30
Handle.h
electrons_cff.bool
bool
Definition: electrons_cff.py:372
MessageLogger.h
ESHandle.h
HFEMClusterShapeAssociation.h
HFRecoEcalCandidateAlgo::produce
void produce(const edm::Handle< reco::SuperClusterCollection > &SuperClusters, const reco::HFEMClusterShapeAssociationCollection &AssocShapes, reco::RecoEcalCandidateCollection &RecoECand, int nvtx) const
Definition: HFRecoEcalCandidateAlgo.cc:110
edm
HLT enums.
Definition: AlignableModifier.h:19
HLTHFRecoEcalCandidateProducer::produce
void produce(edm::StreamID, edm::Event &, edm::EventSetup const &) const override
Definition: HLTHFRecoEcalCandidateProducer.cc:53
edm::Handle
Definition: AssociativeIterator.h:50
Vertex.h
HLTHFRecoEcalCandidateProducer::HLTHFRecoEcalCandidateProducer
HLTHFRecoEcalCandidateProducer(edm::ParameterSet const &conf)
Definition: HLTHFRecoEcalCandidateProducer.cc:31
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
edm::ParameterSet
Definition: ParameterSet.h:36
Event.h
HLTHFRecoEcalCandidateProducer.h
createfilelist.int
int
Definition: createfilelist.py:10
HLTHFRecoEcalCandidateProducer::algo_
const HFRecoEcalCandidateAlgo algo_
Definition: HLTHFRecoEcalCandidateProducer.h:36
edm::EventSetup
Definition: EventSetup.h:57
VertexFwd.h
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
RecoEcalCandidate.h
SuperCluster.h
HLTHFRecoEcalCandidateProducer::hfclusters_
const edm::InputTag hfclusters_
Definition: HLTHFRecoEcalCandidateProducer.h:30
EventSetup.h
Exception.h
RecoEcalCandidateFwd.h
edm::Event
Definition: Event.h:73
HFEMClusterShape.h
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37