How to quickly check output D3PDs ?

...more detailed info coming soon...

With CINT :

root -l SUSY.root
root [0]
Attaching file SUSY.root as _file0...
root [1] ROOT::Cintex::Enable()
root [2] gSystem->Load("libATLASWatchManDict")
root [3] SUSYTree
(class TTree*)0x921ab60
root [4] SUSYTree->Draw("@jet4mom.size()")
you get the number of the jets distribution
root [5] SUSYTree->Draw("@jet4mom.size()","\"l\"")
distribution of the number of jets only for those events passing the set of cuts of the analysis/channel "l".
root [6] SUSYTree->Draw("@jet4mom.size()","\"999\"")
As for that example we switched off the skimming, we keep all the events, even those not passing at least one analysis/channel. They are flagged by default as "channels=='999'".

With pyroot :

import ROOT
import ATLASWatchMan.Bindings
f = ROOT.TFile("SUSY.root")
t = f.Get("SUSYTree")
#loop over the events
for ev in range(t.GetEntries()):
    for i,el in enumerate(t.electron4mom):
        print "el.Pt(): ", el.Pt()
        for chan in t.electronChannels[i]:
           print "el chan: ", chan
        if "1lep" in t.electronChannels[i]:
            print "I'm using the right electron for the '1lep' channel: Ok!"
        if "DEFAULT" in t.electronChannels[i]:
            print "I'm using the right electron for the 'DEFAULT' channel: Ok!"

        #Now I want to use jets as well.In the same way you can ask jets belonging only to a particular channel
        for j,jet in enumerate(t.jet4mom):
            if "1lep" in t.electronChannels[i] and "1lep" in t.jetChannels[j]:
                print "I'm using the right electron and the right jet for the '1lep' channel: Ok!"
                print "An example: if for this '1lep' channel I applied overlap removal with dR<0.2," 
                print "when I select '1lep' as here, I can be sure I will not find here any jet and electron closer than dR<0.2."
To see e.g. if an event passed a cut you can also run:
import ROOT
import ATLASWatchMan.Bindings
for ievt in range(nevts):
    print "evt ",ievt 

    for ichan in range( t.channels.size()):

-- Main.RenaudBruneliere - 10 Feb 2009
-- Main.JanetDietrich - 20 Mar 2009
Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r4 - 2009-03-20 - JanetDietrich
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback