8 #include "TLorentzVector.h" 20 maxEta_(ps.getUntrackedParameter<double>(
"maxEta", 2.4)),
21 minPt_(ps.getUntrackedParameter<double>(
"minPt", 5)),
22 maxNormChi2_(ps.getUntrackedParameter<double>(
"maxNormChi2", 1000)),
23 maxD0_(ps.getUntrackedParameter<double>(
"maxD0", 0.02)),
24 maxDz_(ps.getUntrackedParameter<double>(
"maxDz", 20.)),
25 minPixelHits_(ps.getUntrackedParameter<uint32_t>(
"minPixelHits", 1)),
26 minStripHits_(ps.getUntrackedParameter<uint32_t>(
"minStripHits", 8)),
27 minChambers_(ps.getUntrackedParameter<uint32_t>(
"minChambers", 2)),
28 minMatches_(ps.getUntrackedParameter<uint32_t>(
"minMatches", 2)),
29 minMatchedStations_(ps.getUntrackedParameter<double>(
"minMatchedStations", 2)),
30 maxIso_(ps.getUntrackedParameter<double>(
"maxIso", 0.3)),
31 minPtHighest_(ps.getUntrackedParameter<double>(
"minPtHighest", 24)),
32 minInvMass_(ps.getUntrackedParameter<double>(
"minInvMass", 60)),
33 maxInvMass_(ps.getUntrackedParameter<double>(
"maxInvMass", 120)) {
34 produces<reco::TrackCollection>(
"");
50 std::vector<TLorentzVector> list;
52 for (
auto const&
mu : *muonColl) {
53 if (!
mu.isGlobalMuon())
63 double chi2 = gtk->chi2();
64 double ndof = gtk->ndof();
71 double trkd0 = -(tk->dxy(
beamSpot->position()));
72 if (std::fabs(trkd0) >=
maxD0_)
74 double trkdz = tk->dz(
beamSpot->position());
75 if (std::fabs(trkdz) >=
maxDz_)
78 edm::LogError(
"ZtoMMMuonTrackProducer") <<
"Error >> Failed to get BeamSpot for label: " <<
bsTag_;
99 double absiso =
pfIso04.sumChargedHadronPt +
105 lv.SetPtEtaPhiE(
mu.pt(),
mu.eta(),
mu.phi(),
mu.energy());
108 outputTColl->push_back(*tk);
111 edm::LogError(
"ZtoMMMuonTrackProducer") <<
"Error >> Failed to get MuonCollection for label: " <<
muonTag_;
int numberOfValidPixelHits() const
const int minMatchedStations_
const edm::InputTag bsTag_
std::vector< Track > TrackCollection
collection of Tracks
const edm::EDGetTokenT< reco::MuonCollection > muonToken_
Log< level::Error, false > LogError
const edm::EDGetTokenT< reco::BeamSpot > bsToken_
std::vector< Muon > MuonCollection
collection of Muon objects
int numberOfValidStripHits() const
#define DEFINE_FWK_MODULE(type)
void produce(edm::StreamID streamID, edm::Event &iEvent, edm::EventSetup const &iSetup) const override
bool isGoodMuon(const reco::Muon &muon, SelectionType type, reco::Muon::ArbitrationType arbitrationType=reco::Muon::SegmentAndTrackArbitration)
main GoodMuon wrapper call
~ZtoMMMuonTrackProducer() override
ZtoMMMuonTrackProducer(const edm::ParameterSet &)
const edm::InputTag muonTag_
const double maxNormChi2_