CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_2_9_HLT1_bphpatch4/src/HeavyFlavorAnalysis/Skimming/plugins/Tau3MuSkim.cc

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // Package:    Tau3MuSkim
00004 // Class:      Tau3MuSkim
00005 // 
00013 //
00014 // Original Author: Manuel Giffels <Manuel.Giffels@physik.rwth-aachen.de> 
00015 //         Created:  Mon Jul 23 10:19:11 CEST 2007
00016 // $Id: Tau3MuSkim.cc,v 1.3 2009/12/14 22:23:06 wmtan Exp $
00017 //
00018 //
00019 //
00020 
00021 #include "DataFormats/TrackReco/interface/Track.h"
00022 #include "DataFormats/MuonReco/interface/Muon.h"
00023 #include "DataFormats/MuonReco/interface/MuonFwd.h"
00024 
00025 #include "HeavyFlavorAnalysis/Skimming/interface/Tau3MuReco.h"
00026 #include "HeavyFlavorAnalysis/Skimming/plugins/Tau3MuSkim.h"
00027 
00028 Tau3MuSkim::Tau3MuSkim(const edm::ParameterSet& iConfig)
00029 {
00030     m_Tau3MuReco = new Tau3MuReco(iConfig);
00031 
00032     produces<reco::MuonCollection,edm::InEvent>("tau3MuCandidateMuons");
00033     produces<reco::TrackCollection,edm::InEvent>("tau3MuCandidateTracks");
00034 }
00035 
00036 
00037 Tau3MuSkim::~Tau3MuSkim()
00038 {
00039     delete m_Tau3MuReco;
00040 }
00041 
00042 
00043 //
00044 // member functions
00045 //
00046 
00047 // ------------ method called on each new Event  ------------
00048 bool
00049 Tau3MuSkim::filter(edm::Event& iEvent, const edm::EventSetup& iSetup)
00050 {
00051     std::auto_ptr<reco::MuonCollection> tau3MuCandidateMuons(new reco::MuonCollection);
00052     std::auto_ptr<reco::TrackCollection> tau3MuCandidateTracks(new reco::TrackCollection);
00053     
00054     bool accept = m_Tau3MuReco->doTau3MuReco(iEvent, iSetup, tau3MuCandidateMuons.get(), tau3MuCandidateTracks.get());
00055     
00056     iEvent.put(tau3MuCandidateMuons, "tau3MuCandidateMuons");
00057     iEvent.put(tau3MuCandidateTracks, "tau3MuCandidateTracks");
00058         
00059     return accept;
00060 }
00061 
00062 // ------------ method called once each job just before starting event loop  ------------
00063 void 
00064 Tau3MuSkim::beginJob()
00065 {    
00066 }
00067 
00068 // ------------ method called once each job just after ending the event loop  ------------
00069 void 
00070 Tau3MuSkim::endJob() 
00071 {
00072 }
00073 
00074 //define this as a plug-in
00075 DEFINE_FWK_MODULE(Tau3MuSkim);