CMS 3D CMS Logo

PFMultiDepthClusterProducer.cc
Go to the documentation of this file.
2 
3 #ifdef PFLOW_DEBUG
4 #define LOGVERB(x) edm::LogVerbatim(x)
5 #define LOGWARN(x) edm::LogWarning(x)
6 #define LOGERR(x) edm::LogError(x)
7 #define LOGDRESSED(x) edm::LogInfo(x)
8 #else
9 #define LOGVERB(x) LogTrace(x)
10 #define LOGWARN(x) edm::LogWarning(x)
11 #define LOGERR(x) edm::LogError(x)
12 #define LOGDRESSED(x) LogDebug(x)
13 #endif
14 
16  _clustersLabel = consumes<reco::PFClusterCollection>(conf.getParameter<edm::InputTag>("clustersSource"));
17  const edm::ParameterSet& pfcConf = conf.getParameterSet("pfClusterBuilder");
18  if (!pfcConf.empty()) {
19  const std::string& pfcName = pfcConf.getParameter<std::string>("algoName");
20  _pfClusterBuilder = PFClusterBuilderFactory::get()->create(pfcName, pfcConf);
21  }
22  // see if new need to apply corrections, setup if there.
23  const edm::ParameterSet& cConf = conf.getParameterSet("energyCorrector");
24  if (!cConf.empty()) {
25  const std::string& cName = cConf.getParameter<std::string>("algoName");
27  }
28 
29  produces<reco::PFClusterCollection>();
30 }
31 
33  _pfClusterBuilder->update(es);
34 }
35 
37  _pfClusterBuilder->reset();
38 
40  e.getByToken(_clustersLabel, inputClusters);
41 
42  std::vector<bool> seedable;
43 
44  auto pfClusters = std::make_unique<reco::PFClusterCollection>();
45  _pfClusterBuilder->buildClusters(*inputClusters, seedable, *pfClusters);
46  LOGVERB("PFMultiDepthClusterProducer::produce()") << *_pfClusterBuilder;
47 
48  if (_energyCorrector) {
49  _energyCorrector->correctEnergies(*pfClusters);
50  }
51  e.put(std::move(pfClusters));
52 }
PFMultiDepthClusterProducer::beginLuminosityBlock
void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) override
Definition: PFMultiDepthClusterProducer.cc:32
edm::LuminosityBlock
Definition: LuminosityBlock.h:50
PFMultiDepthClusterProducer::PFMultiDepthClusterProducer
PFMultiDepthClusterProducer(const edm::ParameterSet &)
Definition: PFMultiDepthClusterProducer.cc:15
LOGVERB
#define LOGVERB(x)
Definition: PFMultiDepthClusterProducer.cc:9
PFMultiDepthClusterProducer::_energyCorrector
std::unique_ptr< PFClusterEnergyCorrectorBase > _energyCorrector
Definition: PFMultiDepthClusterProducer.h:38
edm::Handle
Definition: AssociativeIterator.h:50
PFMultiDepthClusterProducer::_pfClusterBuilder
std::unique_ptr< PFClusterBuilderBase > _pfClusterBuilder
Definition: PFMultiDepthClusterProducer.h:37
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:47
PFMultiDepthClusterProducer::_clustersLabel
edm::EDGetTokenT< reco::PFClusterCollection > _clustersLabel
Definition: PFMultiDepthClusterProducer.h:34
PFMultiDepthClusterProducer.h
edm::EventSetup
Definition: EventSetup.h:58
get
#define get
eostools.move
def move(src, dest)
Definition: eostools.py:511
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
PFMultiDepthClusterProducer::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: PFMultiDepthClusterProducer.cc:36
edm::Event
Definition: Event.h:73
lumi
Definition: LumiSectionData.h:20
edm::InputTag
Definition: InputTag.h:15
edm::ParameterSet::empty
bool empty() const
Definition: ParameterSet.h:201
edm::ParameterSet::getParameterSet
ParameterSet const & getParameterSet(std::string const &) const
Definition: ParameterSet.cc:2128
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37