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 
)

Definition at line 70 of file IsoDepositVetos.cc.

◆ RectangularEtaPhiVeto() [2/2]

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

Definition at line 74 of file IsoDepositVetos.cc.

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.

91 { vetoDir_ = Direction(eta, phi); }

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.

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 }

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

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().

ALCARECOTkAlBeamHalo_cff.etaMin
etaMin
GeV.
Definition: ALCARECOTkAlBeamHalo_cff.py:32
reco::isodeposit::RectangularEtaPhiVeto::vetoDir_
Direction vetoDir_
Definition: IsoDepositVetos.h:106
reco::isodeposit::RectangularEtaPhiVeto::phiMax_
double phiMax_
Definition: IsoDepositVetos.h:107
reco::isodeposit::Direction::eta
double eta() const
Definition: IsoDepositDirection.h:34
reco::isodeposit::RectangularEtaPhiVeto::phiMin_
double phiMin_
Definition: IsoDepositVetos.h:107
reco::isodeposit::RectangularEtaPhiVeto::etaMax_
double etaMax_
Definition: IsoDepositVetos.h:107
HLT_2018_cff.dEta
dEta
Definition: HLT_2018_cff.py:12289
PVValHelper::eta
Definition: PVValidationHelpers.h:69
AlignmentTrackSelector_cfi.phiMin
phiMin
Definition: AlignmentTrackSelector_cfi.py:18
HLT_2018_cff.dPhi
dPhi
Definition: HLT_2018_cff.py:12290
AlignmentTrackSelector_cfi.phiMax
phiMax
Definition: AlignmentTrackSelector_cfi.py:17
PVValHelper::phi
Definition: PVValidationHelpers.h:68
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:50
reco::isodeposit::RectangularEtaPhiVeto::etaMin_
double etaMin_
Definition: IsoDepositVetos.h:107
reco::isodeposit::Direction
Definition: IsoDepositDirection.h:19
ALCARECOTkAlBeamHalo_cff.etaMax
etaMax
Definition: ALCARECOTkAlBeamHalo_cff.py:33
reco::isodeposit::Direction::phi
double phi() const
Definition: IsoDepositDirection.h:35
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23