CMS 3D CMS Logo

Classes | Namespaces | Functions
L1EGammaEEProducer.cc File Reference
#include "FWCore/Framework/interface/stream/EDProducer.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/MakerMacros.h"
#include "DataFormats/L1THGCal/interface/HGCalMulticluster.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "DataFormats/L1Trigger/interface/EGamma.h"
#include "L1Trigger/L1CaloTrigger/interface/L1EGammaEECalibrator.h"
#include "DataFormats/Math/interface/deltaPhi.h"

Go to the source code of this file.

Classes

class  L1EGammaEEProducer
 

Namespaces

 l1tp2
 

Functions

bool l1tp2::compare_cluster_pt (const l1t::HGCalMulticluster *cl1, const l1t::HGCalMulticluster *cl2)
 
int etaBin (const l1t::HGCalMulticluster *cl)
 
pair< int, int > get_eta_phi_bin (const l1t::HGCalMulticluster *cl)
 
int get_phi_bin (const l1t::HGCalMulticluster *cl)
 
static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker< edm::ParameterSetDescriptionFiller< L1EGammaEEProducer > > s_filler__LINE__ ("L1EGammaEEProducer")
 
static const edm::MakerPluginFactory ::PMaker< edm::WorkerMaker< L1EGammaEEProducer > > s_maker__LINE__ ("L1EGammaEEProducer")
 

Function Documentation

◆ etaBin()

int etaBin ( const l1t::HGCalMulticluster cl)

Definition at line 18 of file L1EGammaEEProducer.cc.

References funct::abs(), haddnano::cl, egammaIdentification::eta_max, egammaIdentification::eta_min, and n_eta_bins.

Referenced by L1TPUM::analyze(), ElectronStudy::analyze(), EtlLocalRecoValidation::analyze(), BtlLocalRecoValidation::analyze(), CosmicMuonRecoAnalyzer::bookHistograms(), SegmentTrackAnalyzer::bookHistograms(), MuonRecoAnalyzer::bookHistograms(), MuonKinVsEtaAnalyzer::bookHistograms(), DiMuonHistograms::bookHistograms(), ElectronConversionRejectionValidator::bookHistograms(), MuonRecoOneHLT::bookHistograms(), PhotonValidatorMiniAOD::bookHistograms(), TkConvValidator::bookHistograms(), PhotonValidator::bookHistograms(), StudyCaloGen::bookHistograms(), IsolatedGenParticles::bookHistograms(), HGCalCLUEAlgoT< TILE >::calculateLocalDensity(), l1t::Stage2Layer2JetAlgorithmFirmwareImp1::calibrate(), ConversionPostprocessing::ConversionPostprocessing(), CosmicMuonRecoAnalyzer::CosmicMuonRecoAnalyzer(), DiMuonHistograms::DiMuonHistograms(), EfficiencyPlotter::dqmEndJob(), MuonRecoTest::dqmEndRun(), EfficiencyPlotter::EfficiencyPlotter(), get_eta_phi_bin(), HGCalLayerTilesT< T >::getEtaBin(), PtAssignmentEngineAux2016::getEtaFromBin(), HGCalLayerTilesT< T >::getGlobalBinByBinEtaPhi(), EcalIndexingTools::getProgressiveIndex(), FWEveViewManager::highlightAdded(), L1TCaloLayer1FetchLUTs(), FWHistSliceSelector::matchCell(), CovarianceParameterization::meanValue(), MuonKinVsEtaAnalyzer::MuonKinVsEtaAnalyzer(), MuonRecoAnalyzer::MuonRecoAnalyzer(), MuonRecoOneHLT::MuonRecoOneHLT(), MuonRecoTest::MuonRecoTest(), l1tp2::ParametricCalibration::operator()(), MvaMEtUtilities::passesMVA(), PhotonOfflineClient::PhotonOfflineClient(), PhotonPostprocessing::PhotonPostprocessing(), Phase1L1TJetCalibrator::produce(), PhotonOfflineClient::runClient(), PhotonPostprocessing::runPostprocessing(), and SegmentTrackAnalyzer::SegmentTrackAnalyzer().

18  {
19  static float constexpr eta_min = 1.;
20  static float constexpr eta_max = 4.;
21  static unsigned constexpr n_eta_bins = 150;
22  int eta_bin = floor((std::abs(cl->eta()) - eta_min) / ((eta_max - eta_min) / n_eta_bins));
23  if (cl->eta() < 0)
24  return -1 * eta_bin; // bin 0 doesn't exist
25  return eta_bin;
26 }
static constexpr int n_eta_bins
Abs< T >::type abs(const T &t)
Definition: Abs.h:22

◆ get_eta_phi_bin()

pair<int, int> get_eta_phi_bin ( const l1t::HGCalMulticluster cl)

Definition at line 35 of file L1EGammaEEProducer.cc.

References haddnano::cl, etaBin(), and get_phi_bin().

Referenced by L1EGammaEEProducer::produce().

35 { return std::make_pair(etaBin(cl), get_phi_bin(cl)); }
int get_phi_bin(const l1t::HGCalMulticluster *cl)
int etaBin(const l1t::HGCalMulticluster *cl)

◆ get_phi_bin()

int get_phi_bin ( const l1t::HGCalMulticluster cl)

Definition at line 28 of file L1EGammaEEProducer.cc.

References funct::abs(), haddnano::cl, reco::deltaPhi(), and M_PI.

Referenced by get_eta_phi_bin().

28  {
29  static constexpr float phi_min = -M_PI;
30  static constexpr float phi_max = M_PI;
31  static constexpr unsigned n_phi_bins = 63;
32  return floor(std::abs(reco::deltaPhi(cl->phi(), phi_min)) / ((phi_max - phi_min) / n_phi_bins));
33 }
constexpr double deltaPhi(double phi1, double phi2)
Definition: deltaPhi.h:26
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
#define M_PI

◆ s_filler__LINE__()

static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker<edm::ParameterSetDescriptionFiller< L1EGammaEEProducer > > s_filler__LINE__ ( "L1EGammaEEProducer"  )
static

◆ s_maker__LINE__()

static const edm::MakerPluginFactory ::PMaker< edm::WorkerMaker< L1EGammaEEProducer > > s_maker__LINE__ ( "L1EGammaEEProducer"  )
static