CMS 3D CMS Logo

Public Member Functions | Private Attributes

reco::isodeposit::NumCrystalEtaPhiVeto Class Reference

Inheritance diagram for reco::isodeposit::NumCrystalEtaPhiVeto:
reco::isodeposit::AbsVeto

List of all members.

Public Member Functions

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

Detailed Description

Definition at line 41 of file IsoDepositVetoFactory.cc.


Constructor & Destructor Documentation

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

Definition at line 43 of file IsoDepositVetoFactory.cc.

                                                                               :
                vetoDir_(dir.eta(),dir.phi()), 
                iEta_(iEta), 
                iPhi_(iPhi) {}
reco::isodeposit::NumCrystalEtaPhiVeto::NumCrystalEtaPhiVeto ( Direction  dir,
double  iEta,
double  iPhi 
) [inline]

Definition at line 47 of file IsoDepositVetoFactory.cc.

                                                                          : 
                vetoDir_(dir.eta(),dir.phi()), 
                iEta_(iEta), 
                iPhi_(iPhi) {}

Member Function Documentation

virtual void reco::isodeposit::NumCrystalEtaPhiVeto::centerOn ( double  eta,
double  phi 
) [inline, 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 63 of file IsoDepositVetoFactory.cc.

References vetoDir_.

virtual bool reco::isodeposit::NumCrystalEtaPhiVeto::veto ( double  eta,
double  phi,
float  value 
) const [inline, 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 51 of file IsoDepositVetoFactory.cc.

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

                                                                         {
                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;
                if( fabs(vetoDir_.eta()) < 1.479) {
                    return ( (fabs(dEta) < 0.0174*iEta_) && (fabs(dPhi) < 0.0174*iPhi_) );
                } else {
                    return ( (fabs(dEta) < 0.00864*fabs(sinh(eta))*iEta_) && 
                             (fabs(dPhi) < 0.00864*fabs(sinh(eta))*iPhi_) );
                }
            }

Member Data Documentation

Definition at line 66 of file IsoDepositVetoFactory.cc.

Referenced by veto().

Definition at line 66 of file IsoDepositVetoFactory.cc.

Referenced by veto().

Definition at line 65 of file IsoDepositVetoFactory.cc.

Referenced by centerOn(), and veto().