5 #include <TLorentzVector.h> 25 for (reco::MuonCollection::const_iterator
it =
muons->begin();
it !=
muons->end() && recoMuon_.nMuons <
maxMuon;
27 recoMuon_.e.push_back(
it->energy());
28 recoMuon_.pt.push_back(
it->pt());
29 recoMuon_.et.push_back(
it->et());
30 recoMuon_.eta.push_back(
it->eta());
31 recoMuon_.phi.push_back(
it->phi());
32 recoMuon_.charge.push_back(
it->charge());
36 recoMuon_.isLooseMuon.push_back(flagLoose);
40 recoMuon_.isMediumMuon.push_back(flagMedium);
43 bool flagTight =
false;
46 recoMuon_.isTightMuon.push_back(flagTight);
48 double iso = (
it->pfIsolationR04().sumChargedHadronPt +
50 it->pfIsolationR04().sumNeutralHadronEt +
it->pfIsolationR04().sumPhotonEt -
51 0.5 *
it->pfIsolationR04().sumPUPt)) /
53 recoMuon_.iso.push_back(
iso);
55 double MET_local = TMath::Sqrt(METx * METx + METy * METy);
56 recoMuon_.met.push_back(MET_local);
59 METP4.SetPxPyPzE(METx, METy, 0, MET_local);
62 Muon.SetPtEtaPhiE(
it->pt(),
it->eta(),
it->phi(),
it->energy());
64 double scalSum = MET_local +
Muon.Pt();
65 TLorentzVector vecSum(
Muon);
67 double vecSumPt = vecSum.Pt();
69 recoMuon_.mt.push_back(TMath::Sqrt(scalSum * scalSum - vecSumPt * vecSumPt));
79 recoMuon_.etaSt1.push_back(-9999);
80 recoMuon_.phiSt1.push_back(-9999);
88 recoMuon_.etaSt2.push_back(-9999);
89 recoMuon_.phiSt2.push_back(-9999);
95 muPropagator1st_ = muPropagatorSetup1st_.init(
eventSetup);
96 muPropagator2nd_ = muPropagatorSetup2nd_.init(
eventSetup);
Geom::Phi< T > phi() const
bool isLooseMuonCustom(const reco::Muon &recoMu)
muons
the two sets of parameters below are mutually exclusive, depending if RECO or ALCARECO is used the us...
GlobalPoint globalPosition() const
bool isTightMuonCustom(const reco::Muon &recoMu, const reco::Vertex recoVtx)
bool isMediumMuonCustom(const reco::Muon &recoMu)
L1AnalysisRecoMuon2(const edm::ParameterSet &pset, edm::ConsumesCollector)
void init(const edm::EventSetup &eventSetup)
void SetMuon(const edm::Event &event, const edm::EventSetup &setup, const edm::Handle< reco::MuonCollection > muons, const edm::Handle< reco::VertexCollection > vertices, double METx, double METy, unsigned maxMuon)