CMS 3D CMS Logo

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
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Private Member Functions

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

Private Attributes

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

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

Detailed Description

Definition at line 13 of file PFClusterProducerFromL1EGClusters.cc.

Constructor & Destructor Documentation

◆ PFClusterProducerFromL1EGClusters()

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 }

◆ ~PFClusterProducerFromL1EGClusters()

l1tpf::PFClusterProducerFromL1EGClusters::~PFClusterProducerFromL1EGClusters ( )
inlineoverride

Definition at line 16 of file PFClusterProducerFromL1EGClusters.cc.

16 {}

Member Function Documentation

◆ produce()

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

Definition at line 37 of file PFClusterProducerFromL1EGClusters.cc.

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 }

References funct::abs(), bsc_activity_cfg::clusters, iEvent, eostools::move(), MillePedeFileConverter_cfg::out, and l1t::PFCluster::setPtError().

Member Data Documentation

◆ corrector_

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

Definition at line 21 of file PFClusterProducerFromL1EGClusters.cc.

◆ etCut_

double l1tpf::PFClusterProducerFromL1EGClusters::etCut_
private

Definition at line 20 of file PFClusterProducerFromL1EGClusters.cc.

◆ resol_

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

Definition at line 22 of file PFClusterProducerFromL1EGClusters.cc.

◆ src_

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

Definition at line 19 of file PFClusterProducerFromL1EGClusters.cc.

l1tpf::PFClusterProducerFromL1EGClusters::etCut_
double etCut_
Definition: PFClusterProducerFromL1EGClusters.cc:20
l1tpf::corrector::valid
bool valid() const
Definition: corrector.h:35
edm::Handle
Definition: AssociativeIterator.h:50
l1tpf::PFClusterProducerFromL1EGClusters::src_
edm::EDGetTokenT< l1tp2::CaloCrystalClusterCollection > src_
Definition: PFClusterProducerFromL1EGClusters.cc:19
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
bsc_activity_cfg.clusters
clusters
Definition: bsc_activity_cfg.py:36
l1tpf::PFClusterProducerFromL1EGClusters::resol_
l1tpf::ParametricResolution resol_
Definition: PFClusterProducerFromL1EGClusters.cc:22
edm::ParameterSet
Definition: ParameterSet.h:47
iEvent
int iEvent
Definition: GenABIO.cc:224
l1tpf::PFClusterProducerFromL1EGClusters::corrector_
l1tpf::corrector corrector_
Definition: PFClusterProducerFromL1EGClusters.cc:21
edm::Ptr
Definition: AssociationVector.h:31
eostools.move
def move(src, dest)
Definition: eostools.py:511
l1t::PFCluster
Definition: PFCluster.h:10
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
l1tpf::corrector::correctPt
void correctPt(l1t::PFCluster &cluster, float preserveEmEt=true) const
Definition: corrector.cc:154
l1t::PFClusterCollection
std::vector< l1t::PFCluster > PFClusterCollection
Definition: PFCluster.h:73
edm::InputTag
Definition: InputTag.h:15