Definition at line 224 of file WMuNuSelector.cc.
References edm::HLTGlobalStatus::accept(), reco::WMuNuCandidate::acop(), acopCut_, beamSpotToken_, reco::LeafCandidate::charge(), DEFINE_FWK_MODULE, PVValHelper::dxy, eJetMin_, reco::MuonIsolation::emEt, reco::WMuNuCandidate::eT(), reco::LeafCandidate::et(), PVValHelper::eta, reco::LeafCandidate::eta(), etaCut_, edm::Event::getByToken(), reco::WMuNuCandidate::getMuon(), reco::WMuNuCandidate::getNeutrino(), muon::GlobalMuonPromptTight, reco::Muon::globalTrack(), h1_, h2_, reco::MuonIsolation::hadEt, mps_fire::i, isCombinedIso_, reco::Muon::isGlobalMuon(), muon::isGoodMuon(), isoCut03_, reco::Muon::isolationR03(), isRelativeIso_, reco::Muon::isTrackerMuon(), metsig::jet, jetToken_, LogTrace, reco::WMuNuCandidate::massT(), RazorAnalyzer::met, metMax_, mtMax_, RPCpg::mu, HiRecoMuon_cff::muonCollection, muonToken_, muonTrig_, nacop, nall, ncharge, nid, niso, nJetMax_, nkin, normalizedChi2Cut_, npresel, nsel, ntrig, plotHistograms_, reco::BeamSpot::position(), EnergyCorrector::pt, reco::LeafCandidate::pt(), ptCut_, ptThrForZ1_, ptThrForZ2_, reco::LeafCandidate::px(), reco::LeafCandidate::py(), selectByCharge_, reco::MuonIsolation::sumPt, trackerHitsCut_, edm::TriggerNames::triggerIndex(), edm::Event::triggerNames(), triggerResults, trigToken_, and WMuNuCollectionToken_.
Referenced by Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::filter(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::find(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::setDataAccessor(), and 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->empty()) {
LogTrace(
"")<<
"No WMuNu Candidates in the Event!";
return false;}
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 false;}
316 if (nmuonsForZ1>=1 && nmuonsForZ2>=2) {
LogTrace(
"")<<
"Z Candidate!!";
return false;}
336 LogTrace(
"") <<
"\t... Muon pt, eta: " << pt <<
" [GeV], " <<
eta;
338 if (pt<
ptCut_)
return false;
340 if (fabs(eta)>
etaCut_)
return false;
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);
401 if (!iso)
return false;
411 h1_[
"hMET_sel"]->Fill(met_et);
412 h1_[
"hTMass_sel"]->Fill(massT);
416 if (massT<=mtMin_ || massT>=
mtMax_)
return false;
417 if (met_et<=metMin_ || met_et>=
metMax_)
return false;
419 LogTrace(
"") <<
">>>> Event ACCEPTED";
const std::string muonTrig_
double eta() const final
momentum pseudorapidity
edm::EDGetTokenT< edm::View< reco::Muon > > muonToken_
float sumPt
sum-pt of tracks
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< edm::TriggerResults > trigToken_
double px() const final
x coordinate of momentum vector
bool accept() const
Has at least one path accepted the event?
double pt() const final
transverse momentum
int charge() const final
electric charge
edm::EDGetTokenT< edm::View< reco::Jet > > jetToken_
bool isTrackerMuon() const override
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
unsigned int triggerIndex(std::string const &name) const
double et() const final
transverse energy
bool isGlobalMuon() const override
static std::string const triggerResults
std::map< std::string, TH1D * > h1_
bool isGoodMuon(const reco::Muon &muon, SelectionType type, reco::Muon::ArbitrationType arbitrationType=reco::Muon::SegmentAndTrackArbitration)
main GoodMuon wrapper call
double py() const final
y coordinate of momentum vector
edm::EDGetTokenT< reco::WMuNuCandidateCollection > WMuNuCollectionToken_
std::map< std::string, TH2D * > h2_
const Point & position() const
position
double normalizedChi2Cut_
const reco::Muon & getMuon() const
const reco::MET & getNeutrino() const
edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const override
const MuonIsolation & isolationR03() const
virtual TrackRef globalTrack() const
reference to Track reconstructed in both tracked and muon detector