CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
l1tpf::PFClusterProducerFromL1EGClusters Class Reference
Inheritance diagram for l1tpf::PFClusterProducerFromL1EGClusters:
edm::stream::EDProducer<>

Public Member Functions

 PFClusterProducerFromL1EGClusters (const edm::ParameterSet &)
 
 ~PFClusterProducerFromL1EGClusters () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Private Member Functions

void produce (edm::Event &, const edm::EventSetup &) override
 

Private Attributes

l1tpf::corrector corrector_
 
double etCut_
 
l1tpf::ParametricResolution resol_
 
edm::EDGetTokenT
< l1tp2::CaloCrystalClusterCollection
src_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
using CacheTypes = CacheContexts< T...>
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T...>
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

Detailed Description

Definition at line 13 of file PFClusterProducerFromL1EGClusters.cc.

Constructor & Destructor Documentation

l1tpf::PFClusterProducerFromL1EGClusters::PFClusterProducerFromL1EGClusters ( const edm::ParameterSet iConfig)
explicit

Definition at line 29 of file PFClusterProducerFromL1EGClusters.cc.

30  : src_(consumes<l1tp2::CaloCrystalClusterCollection>(iConfig.getParameter<edm::InputTag>("src"))),
31  etCut_(iConfig.getParameter<double>("etMin")),
32  corrector_(iConfig.getParameter<std::string>("corrector"), -1),
33  resol_(iConfig.getParameter<edm::ParameterSet>("resol")) {
34  produces<l1t::PFClusterCollection>();
35 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::EDGetTokenT< l1tp2::CaloCrystalClusterCollection > src_
l1tpf::PFClusterProducerFromL1EGClusters::~PFClusterProducerFromL1EGClusters ( )
inlineoverride

Definition at line 16 of file PFClusterProducerFromL1EGClusters.cc.

16 {}

Member Function Documentation

void l1tpf::PFClusterProducerFromL1EGClusters::produce ( edm::Event iEvent,
const edm::EventSetup  
)
overrideprivate

Definition at line 37 of file PFClusterProducerFromL1EGClusters.cc.

References funct::abs(), HLT_FULL_cff::clusters, edm::Event::getByToken(), eostools::move(), submitPVResolutionJobs::out, edm::Event::put(), and l1t::PFCluster::setPtError().

37  {
38  std::unique_ptr<l1t::PFClusterCollection> out(new l1t::PFClusterCollection());
40  iEvent.getByToken(src_, clusters);
41 
42  unsigned int index = 0;
43  for (auto it = clusters->begin(), ed = clusters->end(); it != ed; ++it, ++index) {
44  if (it->pt() <= etCut_)
45  continue;
46 
47  l1t::PFCluster cluster(
48  it->pt(), it->eta(), it->phi(), /*hOverE=*/0., /*isEM=*/true); // it->hovere() seems to return random values
49  if (corrector_.valid())
50  corrector_.correctPt(cluster);
51  cluster.setPtError(resol_(cluster.pt(), std::abs(cluster.eta())));
52 
53  out->push_back(cluster);
54  out->back().addConstituent(edm::Ptr<l1t::L1Candidate>(clusters, index));
55  }
56 
57  iEvent.put(std::move(out));
58 }
bool valid() const
Definition: corrector.h:35
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:133
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
def move
Definition: eostools.py:511
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::vector< l1t::PFCluster > PFClusterCollection
Definition: PFCluster.h:73
void correctPt(l1t::PFCluster &cluster, float preserveEmEt=true) const
Definition: corrector.cc:154
edm::EDGetTokenT< l1tp2::CaloCrystalClusterCollection > src_

Member Data Documentation

l1tpf::corrector l1tpf::PFClusterProducerFromL1EGClusters::corrector_
private

Definition at line 21 of file PFClusterProducerFromL1EGClusters.cc.

double l1tpf::PFClusterProducerFromL1EGClusters::etCut_
private

Definition at line 20 of file PFClusterProducerFromL1EGClusters.cc.

l1tpf::ParametricResolution l1tpf::PFClusterProducerFromL1EGClusters::resol_
private

Definition at line 22 of file PFClusterProducerFromL1EGClusters.cc.

edm::EDGetTokenT<l1tp2::CaloCrystalClusterCollection> l1tpf::PFClusterProducerFromL1EGClusters::src_
private

Definition at line 19 of file PFClusterProducerFromL1EGClusters.cc.