1 / 10

ARA Tutorial

ARA Tutorial. Analysis Tutorial WIS Sep-Oct 2008. What is ARA. AthenaROOTAccess (ARA) allows accessing Athena POOL data directly from ROOT, without using the Athena framework. There are some things that cannot be done in ARA, e.g., there is no detector description.

margaretf
Télécharger la présentation

ARA Tutorial

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ARA Tutorial Analysis Tutorial WIS Sep-Oct 2008

  2. What is ARA • AthenaROOTAccess (ARA) allows accessing Athena POOL data directly from ROOT, without using the Athena framework. • There are some things that cannot be done in ARA, e.g., there is no detector description. • The code that is written for ARA analysis will look different than what you write for AOD analysis, so if you analyze both forms, then you will have to maintain two pieces of code. • The CINT option.

  3. 3, 2, 1, Go!!! • Load the file: /agrp/raza/athena/testarea/AtlasOffline-14.2.10/run/load.py python -i load.py • Start working tt.Print() tt.GetEntry(0) jets = tt.Cone4H1TopoJets dir(jets) len(jets) jets.size() aJet = jets[0] dir(aJet) for jet in jets: print jet.pt()

  4. Using EventView evc = tt.myEVCont len(evc) ev1 = evc[0] dir(ev1) # inserters results ev1.finalStateSize(‘Jet’) evJets = ev1.finalStateObjects(‘Jet’) len(evJets) # compare with len(tt.Cone4H1TopoJets) for jet in evJets: print jet.pt() # Accessing UserData print ev1.doubleUserData(‘Meff’)

  5. Using Draw tt.Draw(‘Cone4H1TopoJets.pt()’, ‘@Cone4H1TopoJets.size() > 3’) • Without @, the pt function of each jet in the container is called (for each event). • With @, the size function of the container itself is called (for each event). • To draw the i’th element inside the container, e.g. the pt of the first jet: tt.Draw(‘Cone4H1TopoJets[0].pt()’, ‘@Cone4H1TopoJets.size() > 0’)

  6. Exercise 1 • Draw a histogram of the Meff calculated in EventView (for the 2 hardest jets).

  7. Exercise 2 • Draw an ‘on the fly’ calculation of Meff (for the 2 hardest jets) versus the Meff calculated in EventView.

  8. Exercise 3 • Draw a histogram of the Meff calculated in EventView (for the 2 hardest jets), this time by filling your own histogram.

  9. Solutions… tt.Draw('myEVCont[0].doubleUserData("Meff")') • What would be drawn without the “[0]”? tt.Draw('Cone4H1TopoJets[0].pt() + Cone4H1TopoJets[1].pt() + myEVCont[0].doubleUserData("MEF_RefFinal_et") : myEVCont[0].doubleUserData("Meff")') hist = ROOT.TH1F("myhist", "Meff", 100, 0, 2200000) nEntries = tt.GetEntries() for i in range(nEntries): hist.Fill(tt.myEVCont[0].doubleUserData('Meff')) hist.Draw()

  10. PyAthena athena -i tutorial1.py theApp.initialize() theApp.nextEvent() sg = PyAthena.py_svc('StoreGateSvc') sg.dump() evc = sg.retrieve('EventViewContainer', 'myEVCont') ... theApp.exit() • Home work: • Use PyAthena to fill a Meff histogram. • Write an Athena algorithm (similar to the HelloWorld algorithm) to calculate Meff.

More Related