44 virtual void endJob()
override;
93 produces< WMuNuCandidateCollection >();
100 LogTrace(
"")<<
"WMuNuCandidateCollection Stored in the Event";
118 LogError(
"") <<
">>> Muon collection does not exist !!!";
121 int muonCollectionSize = muonCollection->size();
126 LogError(
"") <<
">>> MET collection does not exist !!!";
133 if (muonCollectionSize<1)
return;
140 for (
int indx=0; indx<muonCollectionSize; indx++){
142 if (!muon->isGlobalMuon())
continue;
143 if (muon->globalTrack().
isNull())
continue;
144 if (muon->innerTrack().
isNull())
continue;
147 LogTrace(
"")<<
"Building WMuNu Candidate!";
149 LogTrace(
"") <<
"\t... W mass, W_et: "<<WCand->
massT()<<
", "<<WCand->
eT()<<
"[GeV]";
150 LogTrace(
"") <<
"\t... W_px, W_py: "<<WCand->
px()<<
", "<< WCand->
py() <<
"[GeV]";
154 WMuNuCandidates->push_back(*WCand);
157 std::sort(WMuNuCandidates->begin(),WMuNuCandidates->end(),
ptComparator);
159 ev.
put(WMuNuCandidates);
common ppss p3p6s2 common epss epspn46 common const1 w2
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< edm::View< reco::MET > > metToken_
edm::EDGetTokenT< edm::View< reco::Muon > > muonToken_
#define DEFINE_FWK_MODULE(type)
virtual void beginJob() override
virtual void produce(edm::Event &, const edm::EventSetup &) override
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
bool isNull() const
Checks for null.
virtual double py() const final
y coordinate of momentum vector
virtual double pz() const final
z coordinate of momentum vector
std::vector< reco::WMuNuCandidate > WMuNuCandidateCollection
bool operator()(reco::WMuNuCandidate w1, reco::WMuNuCandidate w2) const
WMuNuProducer(const edm::ParameterSet &)
virtual double px() const final
x coordinate of momentum vector
const reco::Muon & getMuon() const
const reco::MET & getNeutrino() const
virtual void endJob() override
virtual double pt() const final
transverse momentum