CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
reco::isodeposit::RectangularEtaPhiVeto Class Reference

#include <IsoDepositVetos.h>

Inheritance diagram for reco::isodeposit::RectangularEtaPhiVeto:
reco::isodeposit::AbsVeto

Public Member Functions

void centerOn (double eta, double phi) override
 
 RectangularEtaPhiVeto (const math::XYZVectorD &dir, double etaMin, double etaMax, double phiMin, double phiMax)
 
 RectangularEtaPhiVeto (Direction dir, double etaMin, double etaMax, double phiMin, double phiMax)
 
bool veto (double eta, double phi, float value) const override
 Return "true" if a deposit at specific (eta,phi) with that value must be vetoed in the sum. More...
 
- Public Member Functions inherited from reco::isodeposit::AbsVeto
virtual ~AbsVeto ()
 

Private Attributes

double etaMax_
 
double etaMin_
 
double phiMax_
 
double phiMin_
 
Direction vetoDir_
 

Detailed Description

Definition at line 98 of file IsoDepositVetos.h.

Constructor & Destructor Documentation

◆ RectangularEtaPhiVeto() [1/2]

RectangularEtaPhiVeto::RectangularEtaPhiVeto ( const math::XYZVectorD dir,
double  etaMin,
double  etaMax,
double  phiMin,
double  phiMax 
)

◆ RectangularEtaPhiVeto() [2/2]

RectangularEtaPhiVeto::RectangularEtaPhiVeto ( Direction  dir,
double  etaMin,
double  etaMax,
double  phiMin,
double  phiMax 
)

Member Function Documentation

◆ centerOn()

void RectangularEtaPhiVeto::centerOn ( double  eta,
double  phi 
)
overridevirtual

Relocates this veto so that the new center is at some (eta,phi). Must be implemented on the specific AbsVeto subclass: in this mother class it just throws exception

Reimplemented from reco::isodeposit::AbsVeto.

Definition at line 91 of file IsoDepositVetos.cc.

References PVValHelper::eta, and vetoDir_.

◆ veto()

bool RectangularEtaPhiVeto::veto ( double  eta,
double  phi,
float  value 
) const
overridevirtual

Return "true" if a deposit at specific (eta,phi) with that value must be vetoed in the sum.

Implements reco::isodeposit::AbsVeto.

Definition at line 77 of file IsoDepositVetos.cc.

References HLT_2024v14_cff::dEta, reco::isodeposit::Direction::eta(), PVValHelper::eta, etaMax_, etaMin_, M_PI, reco::isodeposit::Direction::phi(), phiMax_, phiMin_, and vetoDir_.

77  {
78  //vetoDir_.phi() is already [0,2*M_PI], make sure the vetoDir phi is
79  //also assuming that the etaMin_ and etaMax_ are set correctly by user
80  //or possible user only wants a limit in one directions
81  //so should be able to set phi or eta to something extreme (-100,100) e.g.
82  double dPhi = phi - vetoDir_.phi();
83  double dEta = eta - vetoDir_.eta();
84  while (dPhi < -M_PI)
85  dPhi += 2 * M_PI;
86  while (dPhi >= M_PI)
87  dPhi -= 2 * M_PI;
88  return (etaMin_ < dEta) && (dEta < etaMax_) && (phiMin_ < dPhi) && (dPhi < phiMax_);
89 }
#define M_PI

Member Data Documentation

◆ etaMax_

double reco::isodeposit::RectangularEtaPhiVeto::etaMax_
private

Definition at line 107 of file IsoDepositVetos.h.

Referenced by veto().

◆ etaMin_

double reco::isodeposit::RectangularEtaPhiVeto::etaMin_
private

Definition at line 107 of file IsoDepositVetos.h.

Referenced by veto().

◆ phiMax_

double reco::isodeposit::RectangularEtaPhiVeto::phiMax_
private

Definition at line 107 of file IsoDepositVetos.h.

Referenced by veto().

◆ phiMin_

double reco::isodeposit::RectangularEtaPhiVeto::phiMin_
private

Definition at line 107 of file IsoDepositVetos.h.

Referenced by veto().

◆ vetoDir_

Direction reco::isodeposit::RectangularEtaPhiVeto::vetoDir_
private

Definition at line 106 of file IsoDepositVetos.h.

Referenced by centerOn(), and veto().