diff --git a/distribsForHNLandBG_byEvent.py b/distribsForHNLandBG_byEvent.py index cb8a57a..8e099fe 100755 --- a/distribsForHNLandBG_byEvent.py +++ b/distribsForHNLandBG_byEvent.py @@ -581,10 +581,18 @@ cut = " Sum$(%sIP0 < %s) &&"%(noB, th)+" Sum$(numberOfHitLSSegments == 0) && Sum$(strawVetoAny%s==0) && Sum$(upstreamVetoAny%s==0) && Sum$(RPCany%s==0) "%(opt, opt, opt) string = "Event not vetoed" return cut, string + def daughtersP(self, th, noB=None): + if not noB: + noB = self.noB + cut = " Sum$(%sDaughtersMinP>%s) "%(noB, th) + if th == int(round(th)): + th = int(round(th)) + string = "Daughters $P > %s$ GeV"%th + return cut, string -def countWithDraw(study): +def countWithDraw(study, answers=False): t = studies[study]['data'] geo = studies[study]['geo'] ntot = studies[study]['ntot'] @@ -599,6 +607,27 @@ tc.ecal()[0], tc.muon1(1)[0], tc.muon2(1)[0], tc.doca(30.)[0], tc.ip(250.)[0] ] cutnames = [ tc.recoed()[1], tc.notVetoed(1000.)[1], tc.redChi2(5.)[1], tc.ndf(25)[1], tc.fiducial(zmin, zmax, 250., 500.)[1], tc.goodtracks()[1], tc.ecal()[1], tc.muon1(1)[1], tc.muon2(1)[1], tc.doca(30.)[1], tc.ip(250.)[1] ] + if answers: + # answering to referees questions + cuts = [ tc.recoed()[0], tc.notVetoed(1000.)[0], + tc.fiducial(zmin, zmax, 250., 500.)[0], tc.goodtracks()[0], + tc.daughtersP(1.5)[0], tc.redChi2(5.)[0], tc.ndf(25)[0], tc.doca(1.)[0], tc.ip(10.)[0], + tc.ecal()[0], tc.muon1(1)[0], tc.muon2(1)[0] ] + cutnames = [ tc.recoed()[1], tc.notVetoed(1000.)[1], + tc.fiducial(zmin, zmax, 250., 500.)[1], tc.goodtracks()[1], + tc.daughtersP(1.5)[1], tc.redChi2(5.)[1], tc.ndf(25)[1], tc.doca(1.)[1], tc.ip(10.)[1], + tc.ecal()[1], tc.muon1(1)[1], tc.muon2(1)[1] ] + if answers == 2: + # answering to referees questions (NO VETO) + cuts = [ tc.recoed()[0], + tc.fiducial(zmin, zmax, 250., 500.)[0], tc.goodtracks()[0], + tc.daughtersP(1.5)[0], tc.redChi2(5.)[0], tc.ndf(25)[0], tc.doca(1.)[0], tc.ip(10.)[0], + tc.ecal()[0], tc.muon1(1)[0], tc.muon2(1)[0] ] + cutnames = [ tc.recoed()[1], + tc.fiducial(zmin, zmax, 250., 500.)[1], tc.goodtracks()[1], + tc.daughtersP(1.5)[1], tc.redChi2(5.)[1], tc.ndf(25)[1], tc.doca(1.)[1], tc.ip(10.)[1], + tc.ecal()[1], tc.muon1(1)[1], tc.muon2(1)[1] ] + elif (study == 'nu'): cuts = [ tc.recoed()[0], tc.notVetoed(1000.)[0], tc.redChi2(5.)[0], tc.ndf(25)[0], tc.fiducial(zmin, zmax, 250., 500.)[0], tc.goodtracks()[0], tc.ecal()[0], tc.muon1(1)[0], tc.muon2(1)[0], tc.doca(30.)[0], tc.ip(250.)[0] ] @@ -656,11 +685,11 @@ r.gROOT.SetBatch(r.kFALSE) return entries, weights, cutnames -def tableWithDraw(): +def tableWithDraw(answers=False): results = {} for study in ['nu', 'pimu', 'mumunu', 'tiny']: results[study] = {} - numbers, numbersWithWeights, cuts = countWithDraw(study) + numbers, numbersWithWeights, cuts = countWithDraw(study, answers) results[study]['numbers'] = numbers results[study]['numbersWithWeights'] = numbersWithWeights results[study]['cuts'] = cuts