CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Attributes
l1tpf_calo::FlatCaloLinker Class Reference

#include <CaloClusterer.h>

Inheritance diagram for l1tpf_calo::FlatCaloLinker:
l1tpf_calo::SimpleCaloLinkerBase

Public Member Functions

void clear () override
 
 FlatCaloLinker (const edm::ParameterSet &pset, const SingleCaloClusterer &ecal, const SingleCaloClusterer &hcal)
 
void run () override
 
 ~FlatCaloLinker () override
 
- Public Member Functions inherited from l1tpf_calo::SimpleCaloLinkerBase
void clearBase ()
 
template<typename Corrector >
void correct (const Corrector &corrector)
 
std::unique_ptr< l1t::PFClusterCollectionfetch () const
 
std::unique_ptr< l1t::PFClusterCollectionfetch (const edm::OrphanHandle< l1t::PFClusterCollection > &ecal, const edm::OrphanHandle< l1t::PFClusterCollection > &hcal) const
 
 SimpleCaloLinkerBase (const edm::ParameterSet &pset, const SingleCaloClusterer &ecal, const SingleCaloClusterer &hcal)
 
virtual ~SimpleCaloLinkerBase ()
 

Protected Attributes

SingleCaloClusterer combClusterer_
 
- Protected Attributes inherited from l1tpf_calo::SimpleCaloLinkerBase
IndexGrid clusterIndex_
 
std::vector< CombinedClusterclusters_
 
const SingleCaloClustererecal_
 
const Gridgrid_
 
const SingleCaloClustererhcal_
 
float hoeCut_
 
float minHadronEt_
 
float minHadronRawEt_
 
float minPhotonEt_
 
bool noEmInHGC_
 

Detailed Description

Definition at line 279 of file CaloClusterer.h.

Constructor & Destructor Documentation

◆ FlatCaloLinker()

l1tpf_calo::FlatCaloLinker::FlatCaloLinker ( const edm::ParameterSet pset,
const SingleCaloClusterer ecal,
const SingleCaloClusterer hcal 
)

Definition at line 581 of file CaloClusterer.cc.

SimpleCaloLinkerBase(const edm::ParameterSet &pset, const SingleCaloClusterer &ecal, const SingleCaloClusterer &hcal)
SingleCaloClusterer combClusterer_

◆ ~FlatCaloLinker()

l1tpf_calo::FlatCaloLinker::~FlatCaloLinker ( )
override

Definition at line 586 of file CaloClusterer.cc.

586 {}

Member Function Documentation

◆ clear()

void l1tpf_calo::FlatCaloLinker::clear ( void  )
overridevirtual

Reimplemented from l1tpf_calo::SimpleCaloLinkerBase.

Definition at line 588 of file CaloClusterer.cc.

◆ run()

void l1tpf_calo::FlatCaloLinker::run ( )
overridevirtual

Implements l1tpf_calo::SimpleCaloLinkerBase.

Definition at line 593 of file CaloClusterer.cc.

References math::cholesky::dst, DeadROCCounter::nclust, and TrackRefitter_38T_cff::src.

593  {
595 
596  const EtGrid &hraw = hcal_.raw();
597  const EtGrid &eraw = ecal_.raw();
598  combClusterer_.raw() = eraw;
599  combClusterer_.raw() += hraw;
600 
603  const std::vector<Cluster> &clustersSrc = combClusterer_.clusters();
604  unsigned int nclust = clustersSrc.size();
605  clusters_.resize(nclust);
606  for (unsigned int ic = 0; ic < nclust; ++ic) {
607  const Cluster &src = clustersSrc[ic];
608  CombinedCluster &dst = clusters_[ic];
609  dst.et = src.et;
610  dst.eta = src.eta;
611  dst.phi = src.phi;
612  dst.ecal_et = 0;
613  dst.hcal_et = 0;
614  for (const auto &pair : src.constituents) {
615  if (eraw[pair.first]) {
616  dst.ecal_et += pair.second * eraw[pair.first];
617  dst.constituents.emplace_back(-pair.first - 1, pair.second);
618  }
619  if (hraw[pair.first]) {
620  dst.hcal_et += pair.second * hraw[pair.first];
621  dst.constituents.emplace_back(+pair.first + 1, pair.second);
622  }
623  }
624  }
625 }
std::vector< CombinedCluster > clusters_
GridData< float > EtGrid
const SingleCaloClusterer & hcal_
const IndexGrid & indexGrid() const
const SingleCaloClusterer & ecal_
constexpr void M2 & dst
const EtGrid & raw() const
SingleCaloClusterer combClusterer_
const std::vector< Cluster > & clusters() const

Member Data Documentation

◆ combClusterer_

SingleCaloClusterer l1tpf_calo::FlatCaloLinker::combClusterer_
protected

Definition at line 287 of file CaloClusterer.h.