CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
reco::isodeposit::NumCrystalEtaPhiVeto Class Reference
Inheritance diagram for reco::isodeposit::NumCrystalEtaPhiVeto:
reco::isodeposit::AbsVeto

Public Member Functions

void centerOn (double eta, double phi) override
 
 NumCrystalEtaPhiVeto (const math::XYZVectorD &dir, double iEta, double iPhi)
 
 NumCrystalEtaPhiVeto (Direction dir, double iEta, double iPhi)
 
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 iEta_
 
double iPhi_
 
Direction vetoDir_
 

Detailed Description

Definition at line 42 of file IsoDepositVetoFactory.cc.

Constructor & Destructor Documentation

◆ NumCrystalEtaPhiVeto() [1/2]

reco::isodeposit::NumCrystalEtaPhiVeto::NumCrystalEtaPhiVeto ( const math::XYZVectorD dir,
double  iEta,
double  iPhi 
)
inline

◆ NumCrystalEtaPhiVeto() [2/2]

reco::isodeposit::NumCrystalEtaPhiVeto::NumCrystalEtaPhiVeto ( Direction  dir,
double  iEta,
double  iPhi 
)
inline

Member Function Documentation

◆ centerOn()

void reco::isodeposit::NumCrystalEtaPhiVeto::centerOn ( double  eta,
double  phi 
)
inlineoverridevirtual

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 61 of file IsoDepositVetoFactory.cc.

References PVValHelper::eta, and vetoDir_.

◆ veto()

bool reco::isodeposit::NumCrystalEtaPhiVeto::veto ( double  eta,
double  phi,
float  value 
) const
inlineoverridevirtual

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 48 of file IsoDepositVetoFactory.cc.

References HLT_2024v12_cff::dEta, reco::isodeposit::Direction::eta(), PVValHelper::eta, iEta_, iPhi_, M_PI, reco::isodeposit::Direction::phi(), and vetoDir_.

48  {
49  double dPhi = phi - vetoDir_.phi();
50  double dEta = eta - vetoDir_.eta();
51  while (dPhi < -M_PI)
52  dPhi += 2 * M_PI;
53  while (dPhi >= M_PI)
54  dPhi -= 2 * M_PI;
55  if (fabs(vetoDir_.eta()) < 1.479) {
56  return ((fabs(dEta) < 0.0174 * iEta_) && (fabs(dPhi) < 0.0174 * iPhi_));
57  } else {
58  return ((fabs(dEta) < 0.00864 * fabs(sinh(eta)) * iEta_) && (fabs(dPhi) < 0.00864 * fabs(sinh(eta)) * iPhi_));
59  }
60  }
#define M_PI

Member Data Documentation

◆ iEta_

double reco::isodeposit::NumCrystalEtaPhiVeto::iEta_
private

Definition at line 65 of file IsoDepositVetoFactory.cc.

Referenced by veto().

◆ iPhi_

double reco::isodeposit::NumCrystalEtaPhiVeto::iPhi_
private

Definition at line 65 of file IsoDepositVetoFactory.cc.

Referenced by veto().

◆ vetoDir_

Direction reco::isodeposit::NumCrystalEtaPhiVeto::vetoDir_
private

Definition at line 64 of file IsoDepositVetoFactory.cc.

Referenced by centerOn(), and veto().