-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
395263c
commit 9a97814
Showing
5 changed files
with
57 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
'''Plot the transverse mass of the Missing ET and a lepton for events with at least | ||
3 leptons and two of the leptons make up a Z (same flavor, opp sign, closest to invar | ||
mass of 91.2 GeV), where the lepton being plotted is the third lepton.''' | ||
# Lucas' Note: There could be four leptons in the event where two satisfy the Z condition | ||
# and then either of the remaining two could be the one used in the transverse mass | ||
# calculation. I do not consider that case (the first that comes up will be picked here). | ||
import time | ||
start = time.time() | ||
#--------------------- | ||
from TIMBER.Analyzer import analyzer | ||
from TIMBER.Tools.Common import CompileCpp | ||
CompileCpp('benchmark/ex.cc') | ||
|
||
a = analyzer('examples/ttbar16_sample.root') | ||
a.MergeCollections("Lepton",["Electron","Muon"]) | ||
a.Cut('nLepton2','nLepton>2') | ||
a.Define('Lepton_vect','analyzer::TLvector(Lepton_pt, Lepton_eta, Lepton_phi, Lepton_mass)') | ||
a.Define('NonZlep_idx','NonZlep(Lepton_vect,Lepton_pdgId,Lepton_charge)') | ||
a.Define('MT','NonZlep_idx == -1 ? -1 : analyzer::transverseMass(MET_pt, Lepton_pt[NonZlep_idx], MET_phi, Lepton_phi[NonZlep_idx])') | ||
a.Cut('MT_cut','MT>=0') | ||
h = a.DataFrame.Histo1D('MT') | ||
h.Draw('hist e') | ||
#--------------------- | ||
print ('%s secs'%(time.time() - start)) |