Implements edm::EDFilter.
Definition at line 224 of file WMuNuSelector.cc.
References reco::WMuNuCandidate::acop(), acopCut_, FitTarget::Cal, reco::LeafCandidate::charge(), eJetMin_, reco::MuonIsolation::emEt, reco::WMuNuCandidate::eT(), reco::LeafCandidate::et(), eta(), reco::LeafCandidate::eta(), etaCut_, edm::Event::getByLabel(), reco::WMuNuCandidate::getMuon(), reco::WMuNuCandidate::getNeutrino(), muon::GlobalMuonPromptTight, reco::Muon::globalTrack(), h1_, h2_, reco::MuonIsolation::hadEt, i, isCombinedIso_, reco::Muon::isGlobalMuon(), muon::isGoodMuon(), ExpressReco_HICollisions_FallBack::iso, isoCut03_, reco::Muon::isolationR03(), isRelativeIso_, reco::Muon::isTrackerMuon(), metsig::jet, jetTag_, LogTrace, reco::WMuNuCandidate::massT(), CaloMET_cfi::met, metMax_, mtMax_, ExpressReco_HICollisions_FallBack::muonCollection, muonTag_, muonTrig_, nacop, nall, ncharge, nid, niso, nJetMax_, nkin, normalizedChi2Cut_, npresel, nsel, ntrig, plotHistograms_, reco::LeafCandidate::pt(), ExpressReco_HICollisions_FallBack::pt, ptCut_, ptThrForZ1_, ptThrForZ2_, reco::LeafCandidate::px(), reco::LeafCandidate::py(), selectByCharge_, reco::MuonIsolation::sumPt, trackerHitsCut_, edm::TriggerNames::triggerIndex(), edm::Event::triggerNames(), trigTag_, and WMuNuCollectionTag_.
Referenced by python.Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::filter(), python.Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::find(), python.Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::setDataAccessor(), and python.Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::switchCenterView().
231 LogError(
"") <<
">>> Muon collection does not exist !!!";
234 unsigned int muonCollectionSize = muonCollection->size();
239 LogError(
"") <<
">>> TRIGGER collection does not exist !!!";
243 bool trigger_fired =
false;
245 if (triggerResults->accept(itrig1)) trigger_fired =
true;
246 LogTrace(
"") <<
">>> Trigger bit: " << trigger_fired <<
" (" <<
muonTrig_ <<
")";
249 unsigned int nmuonsForZ1 = 0;
250 unsigned int nmuonsForZ2 = 0;
251 for (
unsigned int i=0;
i<muonCollectionSize;
i++) {
252 const Muon& mu = muonCollection->at(
i);
264 LogError(
"") <<
">>> JET collection does not exist !!!";
267 unsigned int jetCollectionSize = jetCollection->size();
269 for (
unsigned int i=0;
i<jetCollectionSize;
i++) {
270 const Jet&
jet = jetCollection->at(
i);
273 LogTrace(
"") <<
">>> Total number of jets: " << jetCollectionSize;
274 LogTrace(
"") <<
">>> Number of jets above " <<
eJetMin_ <<
" [GeV]: " << njets;
280 LogTrace(
"") <<
">>> No beam spot found !!!";
290 LogTrace(
"") <<
">>> WMuNu not found !!!";
294 if(WMuNuCollection->size() < 1) {
LogTrace(
"")<<
"No WMuNu Candidates in the Event!";
return 0;}
295 if(WMuNuCollection->size() > 1) {
LogTrace(
"")<<
"This event contains more than one W Candidate";}
299 LogTrace(
"") <<
"> WMuNu Candidate with: ";
307 h1_[
"hNWCand_sel"]->Fill(WMuNuCollection->size());
313 if (!trigger_fired) {
LogTrace(
"")<<
"Event did not fire the Trigger";
return 0;}
316 if (nmuonsForZ1>=1 && nmuonsForZ2>=2) {
LogTrace(
"")<<
"Z Candidate!!";
return 0;}
336 LogTrace(
"") <<
"\t... Muon pt, eta: " << pt <<
" [GeV], " <<
eta;
340 if (fabs(eta)>
etaCut_)
return 0;
346 double dxy = gm->dxy(beamSpotHandle->position());
347 double normalizedChi2 = gm->normalizedChi2();
LogTrace(
"")<<
"Im here"<<endl;
348 double trackerHits = gm->hitPattern().numberOfValidTrackerHits();
349 LogTrace(
"") <<
"\t... Muon dxy, normalizedChi2, trackerHits, isTrackerMuon?: " << dxy <<
" [cm], "<<normalizedChi2 <<
", "<<trackerHits <<
", " << mu.
isTrackerMuon();
363 double acop = WMuNu.
acop();
364 LogTrace(
"") <<
"\t... acoplanarity: " << acop;
370 h1_[
"hPtSum_sel"]->Fill(SumPt);
371 h1_[
"hPtSumN_sel"]->Fill(SumPt/pt);
372 h1_[
"hCal_sel"]->Fill(Cal);
373 h1_[
"hIsoTot_sel"]->Fill( (SumPt+Cal));
374 h1_[
"hIsoTotN_sel"]->Fill( (SumPt+Cal) / pt );
379 LogTrace(
"") <<
"\t... isolation value" << isovar <<
", isolated? " <<
iso ;
381 double met_et = met.
pt();
385 double massT = WMuNu.
massT();
386 double w_et = WMuNu.
eT();
388 LogTrace(
"") <<
"\t... W mass, W_et, W_px, W_py: " << massT <<
", " << w_et <<
", " << WMuNu.
px() <<
", " << WMuNu.
py() <<
" [GeV]";
393 h2_[
"hTMass_PtSum_inclusive"]->Fill(SumPt,massT);
394 h2_[
"hTMass_PtSumNorm_inclusive"]->Fill(SumPt/pt,massT);
395 h2_[
"hTMass_TotIsoNorm_inclusive"]->Fill((SumPt+Cal)/pt,massT);
396 h2_[
"hMET_PtSum_inclusive"]->Fill(SumPt,met_et);
397 h2_[
"hMET_PtSumNorm_inclusive"]->Fill(SumPt/pt,met_et);
398 h2_[
"hMET_TotIsoNorm_inclusive"]->Fill((SumPt+Cal)/pt,met_et);
411 h1_[
"hMET_sel"]->Fill(met_et);
412 h1_[
"hTMass_sel"]->Fill(massT);
416 if (massT<=mtMin_ || massT>=
mtMax_)
return 0;
417 if (met_et<=metMin_ || met_et>=
metMax_)
return 0;
419 LogTrace(
"") <<
">>>> Event ACCEPTED";
const std::string muonTrig_
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
float sumPt
sum-pt of tracks
virtual double et() const
transverse energy
bool isTrackerMuon() const
Base class for all types of Jets.
bool isGlobalMuon() const
virtual double eta() const
momentum pseudorapidity
edm::InputTag WMuNuCollectionTag_
unsigned int triggerIndex(std::string const &name) const
virtual int charge() const
electric charge
std::map< std::string, TH1D * > h1_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
bool isGoodMuon(const reco::Muon &muon, SelectionType type, reco::Muon::ArbitrationType arbitrationType=reco::Muon::SegmentAndTrackArbitration)
main GoodMuon wrapper call
virtual double px() const
x coordinate of momentum vector
virtual double pt() const
transverse momentum
std::map< std::string, TH2D * > h2_
double normalizedChi2Cut_
const reco::Muon & getMuon() const
const reco::MET & getNeutrino() const
virtual double py() const
y coordinate of momentum vector
const MuonIsolation & isolationR03() const
virtual TrackRef globalTrack() const
reference to Track reconstructed in both tracked and muon detector