Skip to content

Commit

Permalink
Merge pull request cms-sw#545 from MT2Analysis/heppy_Mario_7412
Browse files Browse the repository at this point in the history
Heppy: adding rl_* control variables (only MT2 related)
  • Loading branch information
gpetruc committed Nov 27, 2015
2 parents ab3694d + 0a6df5e commit 5ad43c7
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions PhysicsTools/Heppy/python/analyzers/eventtopology/MT2Analyzer.py
Expand Up @@ -344,6 +344,60 @@ def makeMT2(self, event):
self.zllmt_mt2_Xj = self.getMT2Hemi(event,objectsXjc,event.zllmt_met,self.cfg_ana.collectionPostFix,"_Xj_zllmt")


## ===> 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 5ad43c7

Please sign in to comment.