CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/PhysicsTools/IsolationAlgos/interface/EventDependentAbsVetos.h

Go to the documentation of this file.
00001 #ifndef PhysicsTools_IsolationAlgos_EventDependentAbsVetos_h
00002 #define PhysicsTools_IsolationAlgos_EventDependentAbsVetos_h
00003 
00004 #include "PhysicsTools/IsolationAlgos/interface/EventDependentAbsVeto.h"
00005 #include "FWCore/Utilities/interface/InputTag.h"
00006 
00007 namespace reco {
00008  namespace isodeposit {
00009     class OtherCandidatesDeltaRVeto : public EventDependentAbsVeto {
00010       public:
00012           OtherCandidatesDeltaRVeto(const edm::InputTag candidates, double deltaR) :
00013             src_(candidates), deltaR2_(deltaR*deltaR) { }
00014    
00015           // Virtual destructor (should always be there) 
00016           virtual ~OtherCandidatesDeltaRVeto() {} 
00017 
00020           virtual bool veto(double eta, double phi, float value) const ;
00021 
00023           virtual void centerOn(double eta, double phi) { }
00024 
00026           virtual void setEvent(const edm::Event &iEvent, const edm::EventSetup &iSetup) ;
00027 
00028       private:
00029           edm::InputTag src_;
00030           float         deltaR2_;
00031           std::vector<Direction> items_;
00032     };
00033 
00034     class OtherCandVeto : public EventDependentAbsVeto {
00035       public:
00037           OtherCandVeto(const edm::InputTag candidates, AbsVeto *veto) :
00038             src_(candidates), veto_(veto) { }
00039    
00040           // Virtual destructor (should always be there) 
00041           virtual ~OtherCandVeto() {} 
00042 
00045           virtual bool veto(double eta, double phi, float value) const ;
00046 
00048           virtual void centerOn(double eta, double phi) { }
00049 
00051           virtual void setEvent(const edm::Event &iEvent, const edm::EventSetup &iSetup) ;
00052 
00053       private:
00054           edm::InputTag src_;
00055           std::vector<Direction> items_;
00056           std::auto_ptr<AbsVeto> veto_;
00057     };
00058 
00059     class OtherJetConstituentsDeltaRVeto : public EventDependentAbsVeto {
00060       public:
00062           OtherJetConstituentsDeltaRVeto(Direction dir, const edm::InputTag& jets, double dRjet, const edm::InputTag& pfCandAssocMap, double dRconstituent) 
00063             : evt_(0),
00064               vetoDir_(dir), 
00065               srcJets_(jets), 
00066               dR2jet_(dRjet*dRjet), 
00067               srcPFCandAssocMap_(pfCandAssocMap), 
00068               dR2constituent_(dRconstituent*dRconstituent) 
00069           { 
00070             //std::cout << "<OtherJetConstituentsDeltaRVeto::OtherJetConstituentsDeltaRVeto>:" << std::endl;
00071             //std::cout << " vetoDir: eta = " << vetoDir_.eta() << ", phi = " << vetoDir_.phi() << std::endl;
00072             //std::cout << " srcJets = " << srcJets_.label() << ":" << srcJets_.instance() << std::endl;
00073             //std::cout << " dRjet = " << sqrt(dR2jet_) << std::endl;
00074             //std::cout << " srcPFCandAssocMap = " << srcPFCandAssocMap_.label() << ":" << srcPFCandAssocMap_.instance() << std::endl;
00075             //std::cout << " dRconstituent = " << sqrt(dR2constituent_) << std::endl;
00076           }
00077    
00078           // Virtual destructor (should always be there) 
00079           virtual ~OtherJetConstituentsDeltaRVeto() {} 
00080 
00083           virtual bool veto(double eta, double phi, float value) const;
00084 
00086           virtual void centerOn(double eta, double phi);
00087 
00089           virtual void setEvent(const edm::Event& evt, const edm::EventSetup& es);
00090 
00091       private:
00092           void initialize();
00093 
00094           const edm::Event* evt_;
00095 
00096           Direction vetoDir_; 
00097           edm::InputTag srcJets_;
00098           double dR2jet_;
00099           edm::InputTag srcPFCandAssocMap_;
00100           double dR2constituent_;
00101           std::vector<Direction> items_;
00102     };     
00103  }
00104 }
00105 #endif