47 genToken = consumes<GenParticleCollection>(
edm::InputTag(
"genParticles"));
51 stiffMinPt = pset.
getParameter<
double>(
"stiffMinimumPt");
53 nStiffLeptonMin = pset.
getParameter<
int>(
"nStiffLeptonMinimum");
57 nSelFourE = nSelFourM = nSelTwoETwoM = nSelFourL = nSelTau = 0;
58 nFourE = nFourM = nTwoETwoM = nFourL = nTau = 0;
67 std::cout <<
"*** Efficiency for the various subsamples *** " << endl;
71 <<
" kept " << nSelFourL
72 <<
" eff " << ((double)nSelFourL)/((double) nFourL + 0.0001) << std::endl;
75 <<
" kept " << nSelFourM
76 <<
" eff " << ((double)nSelFourM)/((double) nFourM + 0.0001) << std::endl;
79 <<
" kept " << nSelFourE
80 <<
" eff " << ((double)nSelFourE)/((double) nFourE + 0.0001) << std::endl;
82 <<
" pres " << nTwoETwoM
83 <<
" kept " << nSelTwoETwoM
84 <<
" eff " << ((double)nSelTwoETwoM)/((double) nTwoETwoM + 0.0001) << std::endl;
87 <<
" kept " << nSelTau
88 <<
" eff " << ((double)nSelTau)/((double) nTau + 0.0001) << std::endl;
101 bool keepEvent =
false;
108 bool isFourE =
false;
109 bool isFourM =
false;
110 bool isTwoETwoM =
false;
111 bool isFourL =
false;
116 event.getByToken(genToken, genCandidates);
118 for ( CandidateCollection::const_iterator mcIter=genCandidates->begin(); mcIter!=genCandidates->end(); ++mcIter ) {
121 if ( mcIter->pdgId() == 13 || mcIter->pdgId() == -13) {
123 if ( mcIter->mother()->pdgId() == 23 ) {
125 if ( mcIter->eta() > -2.4 && mcIter->eta() < 2.4 ) nMuon++;
129 if ( mcIter->pdgId() == 11 || mcIter->pdgId() == -11) {
131 if ( mcIter->mother()->pdgId() == 23 ) {
133 if ( mcIter->eta() > -2.5 && mcIter->eta() < 2.5 ) nElec++;
137 if ( mcIter->pdgId() == 15 || mcIter->pdgId() == -15) {
139 if ( mcIter->mother()->pdgId() == 23 ) {
141 if ( mcIter->eta() > -2.5 && mcIter->eta() < 2.5 ) nTau++;
155 if (nMuon > 1 && nElec > 1) {
159 if ( isFourE || isFourM || isTwoETwoM ) {
175 int nStiffLeptons = 0;
182 event.getByToken(theGLBMuonToken, muTracks);
185 reco::TrackCollection::const_iterator
muons;
189 for ( muons = muTracks->begin(); muons != muTracks->end(); ++
muons ) {
190 float pt_mu = muons->pt();
191 if ( pt_mu > stiffMinPt ) nStiffLeptons++;
192 if ( pt_mu > softMinPt ) nLeptons++;
201 event.getByToken(theGsfEToken,pTracks);
207 reco::GsfElectronCollection::const_iterator electrons;
211 for ( electrons = eTracks->begin(); electrons != eTracks->end(); ++electrons ) {
212 float pt_e = electrons->pt();
213 if ( pt_e > stiffMinPt ) nStiffLeptons++;
214 if ( pt_e > softMinPt ) nLeptons++;
220 if ( nStiffLeptons >= nStiffLeptonMin && nLeptons >= nLeptonMin) {
227 if (isFourE) nSelFourE++;
228 if (isFourM) nSelFourM++;
229 if (isTwoETwoM) nSelTwoETwoM++;
230 if (isFourL) nSelFourL++;
231 if (isTau) nSelTau++;
T getParameter(std::string const &) const
std::vector< Track > TrackCollection
collection of Tracks
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
HiggsToZZ4LeptonsSkimEff(const edm::ParameterSet &)
~HiggsToZZ4LeptonsSkimEff()
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
T const * product() const
virtual void analyze(const edm::Event &, const edm::EventSetup &)
Get event properties to send to builder to fill seed collection.
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
bool isTau(const Candidate &part)