CMS 3D CMS Logo

Tau3MuSkim.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: Tau3MuSkim
4 // Class: Tau3MuSkim
5 //
13 //
14 // Original Author: Manuel Giffels <Manuel.Giffels@physik.rwth-aachen.de>
15 // Created: Mon Jul 23 10:19:11 CEST 2007
16 //
17 //
18 //
19 
23 
26 
28 {
29  m_Tau3MuReco = new Tau3MuReco(iConfig, consumesCollector());
30 
31  produces<reco::MuonCollection,edm::InEvent>("tau3MuCandidateMuons");
32  produces<reco::TrackCollection,edm::InEvent>("tau3MuCandidateTracks");
33 }
34 
35 
37 {
38  delete m_Tau3MuReco;
39 }
40 
41 
42 //
43 // member functions
44 //
45 
46 // ------------ method called on each new Event ------------
47 bool
49 {
50  std::unique_ptr<reco::MuonCollection> tau3MuCandidateMuons(new reco::MuonCollection);
51  std::unique_ptr<reco::TrackCollection> tau3MuCandidateTracks(new reco::TrackCollection);
52 
53  bool accept = m_Tau3MuReco->doTau3MuReco(iEvent, iSetup, tau3MuCandidateMuons.get(), tau3MuCandidateTracks.get());
54 
55  iEvent.put(std::move(tau3MuCandidateMuons), "tau3MuCandidateMuons");
56  iEvent.put(std::move(tau3MuCandidateTracks), "tau3MuCandidateTracks");
57 
58  return accept;
59 }
60 
61 // ------------ method called once each job just before starting event loop ------------
62 void
64 {
65 }
66 
67 // ------------ method called once each job just after ending the event loop ------------
68 void
70 {
71 }
72 
73 //define this as a plug-in
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:137
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
~Tau3MuSkim() override
Definition: Tau3MuSkim.cc:36
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:15
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:30
std::vector< Muon > MuonCollection
collection of Muon objects
Definition: MuonFwd.h:9
void endJob() override
Definition: Tau3MuSkim.cc:69
int iEvent
Definition: GenABIO.cc:230
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
Tau3MuReco * m_Tau3MuReco
Definition: Tau3MuSkim.h:33
bool filter(edm::Event &, const edm::EventSetup &) override
Definition: Tau3MuSkim.cc:48
void beginJob() override
Definition: Tau3MuSkim.cc:63
bool doTau3MuReco(const edm::Event &iEvent, const edm::EventSetup &iSetup, reco::MuonCollection *muonCollection, reco::TrackCollection *trackCollection)
Definition: Tau3MuReco.cc:24
Tau3MuSkim(const edm::ParameterSet &)
Definition: Tau3MuSkim.cc:27
T get() const
Definition: EventSetup.h:63
def move(src, dest)
Definition: eostools.py:510