Skip to content

Commit

Permalink
Heppy: adding rl_* control variables (only MT2 related)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmasciov committed Oct 9, 2015
1 parent 08bb891 commit 0a6df5e
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions PhysicsTools/Heppy/python/analyzers/eventtopology/MT2Analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,60 @@ def makeMT2(self, event):
self.zll_mt2_Xj = self.getMT2Hemi(event,objectsXjc,event.zll_met,self.cfg_ana.collectionPostFix,"_Xj_zll")


## ===> rl_MT2

setattr(event, "mt2"+self.cfg_ana.collectionPostFix+"_rl", -999)
setattr(event, "pseudoJet1"+self.cfg_ana.collectionPostFix+"_rl", ROOT.reco.Particle.LorentzVector( 0, 0, 0, 0 ))
setattr(event, "pseudoJet2"+self.cfg_ana.collectionPostFix+"_rl", ROOT.reco.Particle.LorentzVector( 0, 0, 0, 0 ))

if hasattr(event, 'rl_met'):

csLeptons = [ l for l in event.selectedLeptons if l.pt() > 10 and abs(l.eta()) < 2.5 ]

if len(csLeptons)==1 and len(objects40jc)>=2:

self.rl_mt2 = self.getMT2Hemi(event,objects40jc,event.rl_met,self.cfg_ana.collectionPostFix,"_rl")

setattr(event, "mt2"+self.cfg_ana.collectionPostFix+"_Xj_rl", -999)
setattr(event, "pseudoJet1"+self.cfg_ana.collectionPostFix+"_Xj_rl", ROOT.reco.Particle.LorentzVector( 0, 0, 0, 0 ))
setattr(event, "pseudoJet2"+self.cfg_ana.collectionPostFix+"_Xj_rl", ROOT.reco.Particle.LorentzVector( 0, 0, 0, 0 ))

if hasattr(event, 'rl_met'):

csLeptons = [ l for l in event.selectedLeptons if l.pt() > 10 and abs(l.eta()) < 2.5 ]

if len(csLeptons)==1 and len(objectsXjc)>=2:

self.rl_mt2_Xj = self.getMT2Hemi(event,objectsXjc,event.rl_met,self.cfg_ana.collectionPostFix,"_Xj_rl")


## ===> zllmt_MT2

setattr(event, "mt2"+self.cfg_ana.collectionPostFix+"_zllmt", -999)
setattr(event, "pseudoJet1"+self.cfg_ana.collectionPostFix+"_zllmt", ROOT.reco.Particle.LorentzVector( 0, 0, 0, 0 ))
setattr(event, "pseudoJet2"+self.cfg_ana.collectionPostFix+"_zllmt", ROOT.reco.Particle.LorentzVector( 0, 0, 0, 0 ))

if hasattr(event, 'zllmt_met'):

csLeptons = [ l for l in event.selectedLeptons if l.pt() > 10 and abs(l.eta()) < 2.5 ]

if len(csLeptons)==2 and len(objects40jc)>=2:

self.zllmt_mt2 = self.getMT2Hemi(event,objects40jc,event.zllmt_met,self.cfg_ana.collectionPostFix,"_zllmt")

setattr(event, "mt2"+self.cfg_ana.collectionPostFix+"_Xj_zllmt", -999)
setattr(event, "pseudoJet1"+self.cfg_ana.collectionPostFix+"_Xj_zllmt", ROOT.reco.Particle.LorentzVector( 0, 0, 0, 0 ))
setattr(event, "pseudoJet2"+self.cfg_ana.collectionPostFix+"_Xj_zllmt", ROOT.reco.Particle.LorentzVector( 0, 0, 0, 0 ))

if hasattr(event, 'zllmt_met'):

csLeptons = [ l for l in event.selectedLeptons if l.pt() > 10 and abs(l.eta()) < 2.5 ]

if len(csLeptons)==2 and len(objectsXjc)>=2:

self.zllmt_mt2_Xj = self.getMT2Hemi(event,objectsXjc,event.zllmt_met,self.cfg_ana.collectionPostFix,"_Xj_zllmt")


#### do the mt2 with one or two b jets (medium CSV)
if len(event.bjetsMedium)>=2:

Expand Down

0 comments on commit 0a6df5e

Please sign in to comment.