CMS 3D CMS Logo

Public Member Functions | Private Attributes

reco::isodeposit::RectangularEtaPhiVeto Class Reference

#include <IsoDepositVetos.h>

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

List of all members.

Public Member Functions

virtual void centerOn (double eta, double phi)
 RectangularEtaPhiVeto (Direction dir, double etaMin, double etaMax, double phiMin, double phiMax)
 RectangularEtaPhiVeto (math::XYZVectorD 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.

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 ( math::XYZVectorD  dir,
double  etaMin,
double  etaMax,
double  phiMin,
double  phiMax 
)

Definition at line 84 of file IsoDepositVetos.cc.

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

Definition at line 88 of file IsoDepositVetos.cc.


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_.

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

Member Data Documentation

Definition at line 92 of file IsoDepositVetos.h.

Referenced by veto().

Definition at line 92 of file IsoDepositVetos.h.

Referenced by veto().

Definition at line 92 of file IsoDepositVetos.h.

Referenced by veto().

Definition at line 92 of file IsoDepositVetos.h.

Referenced by veto().

Definition at line 91 of file IsoDepositVetos.h.

Referenced by centerOn(), and veto().