7 #include "TLorentzVector.h" 16 : verbose_(ps.getUntrackedParameter<
bool>(
"verbose",
false)),
21 maxEta_(ps.getUntrackedParameter<double>(
"maxEta", 2.4)),
22 minPt_(ps.getUntrackedParameter<double>(
"minPt", 5)),
23 maxNormChi2_(ps.getUntrackedParameter<double>(
"maxNormChi2", 1000)),
24 maxD0_(ps.getUntrackedParameter<double>(
"maxD0", 0.02)),
25 maxDz_(ps.getUntrackedParameter<double>(
"maxDz", 20.)),
26 minPixelHits_(ps.getUntrackedParameter<uint32_t>(
"minPixelHits", 1)),
27 minStripHits_(ps.getUntrackedParameter<uint32_t>(
"minStripHits", 8)),
28 minChambers_(ps.getUntrackedParameter<uint32_t>(
"minChambers", 2)),
29 minMatches_(ps.getUntrackedParameter<uint32_t>(
"minMatches", 2)),
30 minMatchedStations_(ps.getUntrackedParameter<double>(
"minMatchedStations", 2)),
31 maxIso_(ps.getUntrackedParameter<double>(
"maxIso", 0.3)),
32 minPtHighest_(ps.getUntrackedParameter<double>(
"minPtHighest", 24)),
33 minInvMass_(ps.getUntrackedParameter<double>(
"minInvMass", 60)),
34 maxInvMass_(ps.getUntrackedParameter<double>(
"maxInvMass", 120)) {}
44 std::vector<TLorentzVector> list;
46 for (
auto const&
mu : *muonColl) {
47 if (!
mu.isGlobalMuon())
57 double chi2 = gtk->chi2();
58 double ndof = gtk->ndof();
72 edm::LogError(
"ZtoMMEventSelector") <<
"Error >> Failed to get BeamSpot for label: " <<
bsTag_;
93 double absiso =
pfIso04.sumChargedParticlePt +
99 lv.SetPtEtaPhiE(
mu.pt(),
mu.eta(),
mu.phi(),
mu.energy());
103 edm::LogError(
"ZtoMMEventSelector") <<
"Error >> Failed to get MuonCollection for label: " <<
muonTag_;
111 TLorentzVector
zv = list[0] + list[1];
int numberOfValidPixelHits() const
const edm::InputTag muonTag_
const double maxNormChi2_
Log< level::Error, false > LogError
const int minMatchedStations_
const double minPtHighest_
std::vector< Muon > MuonCollection
collection of Muon objects
int numberOfValidStripHits() const
const edm::EDGetTokenT< reco::MuonCollection > muonToken_
Abs< T >::type abs(const T &t)
#define DEFINE_FWK_MODULE(type)
bool isGoodMuon(const reco::Muon &muon, SelectionType type, reco::Muon::ArbitrationType arbitrationType=reco::Muon::SegmentAndTrackArbitration)
main GoodMuon wrapper call
ZtoMMEventSelector(const edm::ParameterSet &)
const edm::InputTag bsTag_
const edm::EDGetTokenT< reco::BeamSpot > bsToken_
bool filter(edm::Event &, edm::EventSetup const &) override