CMS 3D CMS Logo

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

#include <CaloClusterer.h>

Inheritance diagram for l1tpf_calo::CombinedCaloLinker:
l1tpf_calo::SimpleCaloLinkerBase

Public Member Functions

void clear () override
 
 CombinedCaloLinker (const edm::ParameterSet &pset, const SingleCaloClusterer &ecal, const SingleCaloClusterer &hcal)
 
void run () override
 
 ~CombinedCaloLinker () 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_
 
std::vector< double > etaBounds_
 
const Gridgrid_
 
const SingleCaloClustererhcal_
 
float hoeCut_
 
std::vector< unsigned int > maxClustersEtaPhi_
 
float minHadronEt_
 
float minHadronRawEt_
 
float minPhotonEt_
 
bool noEmInHGC_
 
std::vector< double > phiBounds_
 

Detailed Description

Definition at line 319 of file CaloClusterer.h.

Constructor & Destructor Documentation

◆ CombinedCaloLinker()

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

Definition at line 700 of file CaloClusterer.cc.

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

◆ ~CombinedCaloLinker()

l1tpf_calo::CombinedCaloLinker::~CombinedCaloLinker ( )
override

Definition at line 705 of file CaloClusterer.cc.

705 {}

Member Function Documentation

◆ clear()

void l1tpf_calo::CombinedCaloLinker::clear ( void  )
overridevirtual

Reimplemented from l1tpf_calo::SimpleCaloLinkerBase.

Definition at line 707 of file CaloClusterer.cc.

◆ run()

void l1tpf_calo::CombinedCaloLinker::run ( )
overridevirtual

Implements l1tpf_calo::SimpleCaloLinkerBase.

Definition at line 712 of file CaloClusterer.cc.

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

712  {
714 
715  const EtGrid &hraw = hcal_.raw();
716  const EtGrid &eraw = ecal_.raw();
717  const EtaPhiCenterGrid &eeta = ecal_.etaCenter();
718  const EtaPhiCenterGrid &ephi = ecal_.phiCenter();
719  combClusterer_.raw() = eraw;
720  combClusterer_.raw() += hraw;
721 
724  const std::vector<Cluster> &clustersSrc = combClusterer_.clusters();
725  unsigned int nclust = clustersSrc.size();
726  clusters_.resize(nclust);
727  for (unsigned int ic = 0; ic < nclust; ++ic) {
728  const Cluster &src = clustersSrc[ic];
729  CombinedCluster &dst = clusters_[ic];
730  dst.et = src.et;
731  dst.eta = src.eta;
732  dst.phi = src.phi;
733  dst.ecal_et = 0;
734  dst.hcal_et = 0;
735  float pt_max = 0.;
736  float eta_ecal = 0.;
737  float phi_ecal = 0.;
738  for (const auto &pair : src.constituents) {
739  if (eraw[pair.first]) {
740  float ept = pair.second * eraw[pair.first];
741  dst.ecal_et += ept;
742  dst.constituents.emplace_back(-pair.first - 1, pair.second);
743  if (ept > pt_max) {
744  eta_ecal = eeta[pair.first];
745  phi_ecal = ephi[pair.first];
746  pt_max = ept;
747  }
748  }
749  if (hraw[pair.first]) {
750  dst.hcal_et += pair.second * hraw[pair.first];
751  dst.constituents.emplace_back(+pair.first + 1, pair.second);
752  }
753  }
754  dst.ecal_eta = eta_ecal;
755  dst.ecal_phi = phi_ecal;
756  }
757 }
std::vector< CombinedCluster > clusters_
GridData< float > EtGrid
GridData< float > EtaPhiCenterGrid
const EtaPhiCenterGrid & phiCenter() const
const SingleCaloClusterer & hcal_
const IndexGrid & indexGrid() const
SingleCaloClusterer combClusterer_
const SingleCaloClusterer & ecal_
constexpr void M2 & dst
const EtGrid & raw() const
const EtaPhiCenterGrid & etaCenter() const
const std::vector< Cluster > & clusters() const

Member Data Documentation

◆ combClusterer_

SingleCaloClusterer l1tpf_calo::CombinedCaloLinker::combClusterer_
protected

Definition at line 327 of file CaloClusterer.h.