18 #include "TLorentzVector.h" 54 desc.addUntracked<
bool>(
"verbose",
false);
57 desc.addUntracked<
double>(
"maxEta", 2.4);
58 desc.addUntracked<
double>(
"minPt", 5);
59 desc.addUntracked<
double>(
"maxNormChi2", 1000);
60 desc.addUntracked<
double>(
"maxD0", 0.02);
61 desc.addUntracked<
double>(
"maxDz", 20.);
62 desc.addUntracked<uint32_t>(
"minPixelHits", 1);
63 desc.addUntracked<uint32_t>(
"minStripHits", 8);
64 desc.addUntracked<uint32_t>(
"minChambers", 2);
65 desc.addUntracked<uint32_t>(
"minMatches", 2);
66 desc.addUntracked<
double>(
"minMatchedStations", 2);
67 desc.addUntracked<
double>(
"maxIso", 0.3);
68 desc.addUntracked<
double>(
"minPtHighest", 24);
69 desc.addUntracked<
double>(
"minInvMass", 75);
70 desc.addUntracked<
double>(
"maxInvMass", 105);
75 : verbose_(ps.getUntrackedParameter<
bool>(
"verbose",
false)),
80 maxEta_(ps.getUntrackedParameter<double>(
"maxEta", 2.4)),
81 minPt_(ps.getUntrackedParameter<double>(
"minPt", 5)),
82 maxNormChi2_(ps.getUntrackedParameter<double>(
"maxNormChi2", 1000)),
83 maxD0_(ps.getUntrackedParameter<double>(
"maxD0", 0.02)),
84 maxDz_(ps.getUntrackedParameter<double>(
"maxDz", 20.)),
85 minPixelHits_(ps.getUntrackedParameter<uint32_t>(
"minPixelHits", 1)),
86 minStripHits_(ps.getUntrackedParameter<uint32_t>(
"minStripHits", 8)),
87 minChambers_(ps.getUntrackedParameter<uint32_t>(
"minChambers", 2)),
88 minMatches_(ps.getUntrackedParameter<uint32_t>(
"minMatches", 2)),
89 minMatchedStations_(ps.getUntrackedParameter<double>(
"minMatchedStations", 2)),
90 maxIso_(ps.getUntrackedParameter<double>(
"maxIso", 0.3)),
91 minPtHighest_(ps.getUntrackedParameter<double>(
"minPtHighest", 24)),
92 minInvMass_(ps.getUntrackedParameter<double>(
"minInvMass", 75)),
93 maxInvMass_(ps.getUntrackedParameter<double>(
"maxInvMass", 105)) {}
104 std::vector<TLorentzVector> list;
106 for (
auto const&
mu : *muonColl) {
107 if (!
mu.isGlobalMuon())
117 double chi2 = gtk->chi2();
118 double ndof = gtk->ndof();
132 edm::LogError(
"ZtoMMEventSelector") <<
"Error >> Failed to get BeamSpot for label: " <<
bsTag_;
153 double absiso =
pfIso04.sumChargedParticlePt +
159 lv.SetPtEtaPhiE(
mu.pt(),
mu.eta(),
mu.phi(),
mu.energy());
163 edm::LogError(
"ZtoMMEventSelector") <<
"Error >> Failed to get MuonCollection for label: " <<
muonTag_;
171 TLorentzVector
zv = list[0] + list[1];
int numberOfValidPixelHits() const
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
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
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
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