9 #include "TLorentzVector.h"
20 : verbose_(ps.getUntrackedParameter<
bool>(
"verbose",
false)),
25 maxEta_(ps.getUntrackedParameter<double>(
"maxEta", 2.1)),
26 minPt_(ps.getUntrackedParameter<double>(
"minPt", 5)),
27 maxNormChi2_(ps.getUntrackedParameter<double>(
"maxNormChi2", 10)),
28 maxD0_(ps.getUntrackedParameter<double>(
"maxD0", 0.02)),
29 maxDz_(ps.getUntrackedParameter<double>(
"maxDz", 20.)),
30 minPixelHits_(ps.getUntrackedParameter<uint32_t>(
"minPixelHits", 1)),
31 minStripHits_(ps.getUntrackedParameter<uint32_t>(
"minStripHits", 8)),
32 minChambers_(ps.getUntrackedParameter<uint32_t>(
"minChambers", 2)),
33 minMatches_(ps.getUntrackedParameter<uint32_t>(
"minMatches", 2)),
34 minMatchedStations_(ps.getUntrackedParameter<double>(
"minMatchedStations", 2)),
35 maxIso_(ps.getUntrackedParameter<double>(
"maxIso", 0.3)),
36 minPtHighest_(ps.getUntrackedParameter<double>(
"minPtHighest", 24)),
37 minInvMass_(ps.getUntrackedParameter<double>(
"minInvMass", 60)),
38 maxInvMass_(ps.getUntrackedParameter<double>(
"maxInvMass", 120)) {}
48 std::vector<TLorentzVector>
list;
50 for (
auto const&
mu : *muonColl) {
51 if (!
mu.isGlobalMuon())
61 double chi2 = gtk->chi2();
62 double ndof = gtk->ndof();
68 double trkd0 = tk->d0();
69 double trkdz = tk->dz();
71 trkd0 = -(tk->dxy(
beamSpot->position()));
72 if (std::fabs(trkd0) >=
maxD0_)
74 trkdz = tk->dz(
beamSpot->position());
75 if (std::fabs(trkdz) >=
maxDz_)
78 edm::LogError(
"ZtoMMEventSelector") <<
"Error >> Failed to get BeamSpot for label: " <<
bsTag_;
105 lv.SetPtEtaPhiE(
mu.pt(),
mu.eta(),
mu.phi(),
mu.energy());
109 edm::LogError(
"ZtoMMEventSelector") <<
"Error >> Failed to get MuonCollection for label: " <<
muonTag_;
117 TLorentzVector zv =
list[0] +
list[1];
118 double mass = zv.M();