CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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

virtual void centerOn (double eta, double phi)
 
 RectangularEtaPhiVeto (const math::XYZVectorD &dir, double etaMin, double etaMax, double phiMin, double phiMax)
 
 RectangularEtaPhiVeto (Direction dir, double etaMin, double etaMax, double phiMin, double phiMax)
 
virtual bool veto (double eta, double phi, float value) const
 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 84 of file IsoDepositVetos.h.

Constructor & Destructor Documentation

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

Member Function Documentation

void RectangularEtaPhiVeto::centerOn ( double  eta,
double  phi 
)
virtual
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 105 of file IsoDepositVetos.cc.

References vetoDir_.

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

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 92 of file IsoDepositVetos.cc.

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

92  {
93  //vetoDir_.phi() is already [0,2*M_PI], make sure the vetoDir phi is
94  //also assuming that the etaMin_ and etaMax_ are set correctly by user
95  //or possible user only wants a limit in one directions
96  //so should be able to set phi or eta to something extreme (-100,100) e.g.
97  double dPhi = phi - vetoDir_.phi();
98  double dEta = eta - vetoDir_.eta();
99  while( dPhi < -M_PI ) dPhi += 2*M_PI;
100  while( dPhi >= M_PI ) dPhi -= 2*M_PI;
101  return (etaMin_ < dEta) && (dEta < etaMax_) &&
102  (phiMin_ < dPhi) && (dPhi < phiMax_);
103 }
T eta() const
double dPhi(double phi1, double phi2)
Definition: JetUtil.h:30
#define M_PI
Definition: BFit3D.cc:3
Definition: DDAxes.h:10

Member Data Documentation

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

Definition at line 92 of file IsoDepositVetos.h.

Referenced by veto().

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

Definition at line 92 of file IsoDepositVetos.h.

Referenced by veto().

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

Definition at line 92 of file IsoDepositVetos.h.

Referenced by veto().

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

Definition at line 92 of file IsoDepositVetos.h.

Referenced by veto().

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

Definition at line 91 of file IsoDepositVetos.h.

Referenced by centerOn(), and veto().