43 genToken = consumes<GenParticleCollection>(
edm::InputTag(
"genParticles"));
47 stiffMinPt = pset.
getParameter<
double>(
"stiffMinimumPt");
49 nStiffLeptonMin = pset.
getParameter<
int>(
"nStiffLeptonMinimum");
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;
100 event.getByToken(genToken, genCandidates);
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;
173 for (muons = muTracks->begin(); muons != muTracks->end(); ++
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;
195 for (electrons = eTracks->begin(); electrons != eTracks->end(); ++
electrons) {
196 float pt_e = electrons->pt();
197 if (pt_e > stiffMinPt)
199 if (pt_e > softMinPt)
205 if (nStiffLeptons >= nStiffLeptonMin && nLeptons >= nLeptonMin) {
T getParameter(std::string const &) const
void analyze(const edm::Event &, const edm::EventSetup &) override
Get event properties to send to builder to fill seed collection.
std::vector< Track > TrackCollection
collection of Tracks
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
HiggsToZZ4LeptonsSkimEff(const edm::ParameterSet &)
T const * product() const
~HiggsToZZ4LeptonsSkimEff() override
bool isTau(const Candidate &part)