CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/PhysicsTools/IsolationAlgos/plugins/CandViewExtractor.cc

Go to the documentation of this file.
00001 #include "CandViewExtractor.h"
00002 
00003 #include "RecoMuon/MuonIsolation/interface/Range.h"
00004 #include "DataFormats/RecoCandidate/interface/IsoDepositDirection.h"
00005 #include "DataFormats/Common/interface/Handle.h"
00006 #include "DataFormats/TrackReco/interface/Track.h"
00007 #include "DataFormats/TrackReco/interface/TrackFwd.h"
00008 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00009 #include "DataFormats/Math/interface/deltaR.h"
00010 
00011 using namespace edm;
00012 using namespace reco;
00013 using namespace muonisolation;
00014 
00015 #include "CandViewExtractor.icc"
00016 
00017 CandViewExtractor::CandViewExtractor( const ParameterSet& par ) :
00018   theCandViewTag(par.getParameter<edm::InputTag>("inputCandView")),
00019   theDepositLabel(par.getUntrackedParameter<std::string>("DepositLabel")),
00020   theDiff_r(par.getParameter<double>("Diff_r")),
00021   theDiff_z(par.getParameter<double>("Diff_z")),
00022   theDR_Max(par.getParameter<double>("DR_Max")),
00023   theDR_Veto(par.getParameter<double>("DR_Veto"))
00024 {
00025 }
00026 /*
00027 reco::IsoDeposit::Vetos CandViewExtractor::vetos(const edm::Event & ev,
00028       const edm::EventSetup & evSetup, const reco::Candidate & cand) const
00029 {
00030   reco::isodeposit::Direction dir(cand.eta(),cand.phi());
00031   return reco::IsoDeposit::Vetos(1,veto(dir));
00032 }
00033 */
00034 
00035 reco::IsoDeposit::Veto CandViewExtractor::veto(const reco::IsoDeposit::Direction & dir) const
00036 {
00037   reco::IsoDeposit::Veto result;
00038   result.vetoDir = dir;
00039   result.dR = theDR_Veto;
00040   return result;
00041 }
00042  
00043 #include "FWCore/PluginManager/interface/ModuleDef.h"
00044 #include "FWCore/Framework/interface/MakerMacros.h"
00045 
00046 
00047 #include "PhysicsTools/IsolationAlgos/interface/IsoDepositExtractor.h"
00048 #include "PhysicsTools/IsolationAlgos/interface/IsoDepositExtractorFactory.h"
00049 #include "CandViewExtractor.h"
00050 DEFINE_EDM_PLUGIN(IsoDepositExtractorFactory, muonisolation::CandViewExtractor, "CandViewExtractor");