38 debug =
pset.getParameter<
bool>(
"DebugHiggsToZZ4LeptonsSkim");
41 theGLBMuonToken = consumes<reco::TrackCollection>(
pset.getParameter<
edm::InputTag>(
"GlobalMuonCollectionLabel"));
42 theGsfEToken = consumes<reco::GsfElectronCollection>(
pset.getParameter<
edm::InputTag>(
"ElectronCollectionLabel"));
43 genToken = consumes<GenParticleCollection>(
edm::InputTag(
"genParticles"));
47 stiffMinPt =
pset.getParameter<
double>(
"stiffMinimumPt");
48 softMinPt =
pset.getParameter<
double>(
"softMinimumPt");
49 nStiffLeptonMin =
pset.getParameter<
int>(
"nStiffLeptonMinimum");
50 nLeptonMin =
pset.getParameter<
int>(
"nLeptonMinimum");
53 nSelFourE = nSelFourM = nSelTwoETwoM = nSelFourL = nSelTau = 0;
54 nFourE = nFourM = nTwoETwoM = nFourL = nTau = 0;
60 std::cout <<
"*** Efficiency for the various subsamples *** " << endl;
63 <<
" pres " << nFourL <<
" kept " << nSelFourL <<
" eff "
64 << ((double)nSelFourL) / ((double)nFourL + 0.0001) << std::endl;
66 <<
" pres " << nFourM <<
" kept " << nSelFourM <<
" eff "
67 << ((double)nSelFourM) / ((double)nFourM + 0.0001) << std::endl;
69 <<
" pres " << nFourE <<
" kept " << nSelFourE <<
" eff "
70 << ((double)nSelFourE) / ((double)nFourE + 0.0001) << std::endl;
72 <<
" pres " << nTwoETwoM <<
" kept " << nSelTwoETwoM <<
" eff "
73 << ((double)nSelTwoETwoM) / ((double)nTwoETwoM + 0.0001) << std::endl;
75 <<
" pres " << nTau <<
" kept " << nSelTau <<
" eff " << ((double)nSelTau) / ((double)nTau + 0.0001)
85 bool keepEvent =
false;
94 bool isTwoETwoM =
false;
104 if (mcIter->pdgId() == 13 || mcIter->pdgId() == -13) {
106 if (mcIter->mother()->pdgId() == 23) {
108 if (mcIter->eta() > -2.4 && mcIter->eta() < 2.4)
113 if (mcIter->pdgId() == 11 || mcIter->pdgId() == -11) {
115 if (mcIter->mother()->pdgId() == 23) {
117 if (mcIter->eta() > -2.5 && mcIter->eta() < 2.5)
122 if (mcIter->pdgId() == 15 || mcIter->pdgId() == -15) {
124 if (mcIter->mother()->pdgId() == 23) {
126 if (mcIter->eta() > -2.5 && mcIter->eta() < 2.5)
140 if (nMuon > 1 && nElec > 1) {
144 if (isFourE || isFourM || isTwoETwoM) {
159 int nStiffLeptons = 0;
166 event.getByToken(theGLBMuonToken, muTracks);
169 reco::TrackCollection::const_iterator
muons;
174 float pt_mu =
muons->pt();
175 if (pt_mu > stiffMinPt)
177 if (pt_mu > softMinPt)
186 event.getByToken(theGsfEToken, pTracks);
191 reco::GsfElectronCollection::const_iterator
electrons;
197 if (pt_e > stiffMinPt)
199 if (pt_e > softMinPt)
205 if (nStiffLeptons >= nStiffLeptonMin && nLeptons >= nLeptonMin) {