An Interactive session - PowerPoint PPT Presentation

1 / 5
About This Presentation
Title:

An Interactive session

Description:

(do not try the Fitter yet: it has some problem I will inform you when it is fixed) ... athena fitResult = fitter.fit(Mee,gaussian) athena if fitResult == None: ... – PowerPoint PPT presentation

Number of Views:60
Avg rating:3.0/5.0
Slides: 6
Provided by: keteviaa
Category:

less

Transcript and Presenter's Notes

Title: An Interactive session


1
An Interactive session
  • lxplusgt athena.py i AnalysisSkeleton_jobOptions.p
    y l FATAL
  • athenagt include ("PyAnalysisCore/InitPyAnalysisCor
    e.py")
  • athenagt theApp.initialize()
    initialization
  • athenagt theApp.algorithms()
    list all algorithms
  • athenagt AnalysisSkeleton.properties()
    list alg properties
  • athenagt AnalysisSkeleton.ElectronEtCut 15000.0
    reset cut
  • athenagt AnalysisSkeleton.properties()
  • athenagt theApp.run(20)
    run 20 events
  • athenagt histSvc theApp.histSvc()
    get histo service
  • athenagt histSvc.dump()
    list all histograms
  • athenagt Mee histSvc.retrieve(/stat/Electron/Me
    e)
  • athenagt Mee.mean()
  • athenagt Mee.rms()

2
An Interactive session-continue
  • athenagt from AidaProxy import
  • athenagt from rootPlotter2 import
  • athenagt plotter RootPlotter()
  • athenagt plotter.plot (Mee)
  • athenagt plot(ParticleJetContainerParticleJetCont
    ainer","x.pt()",nEvent5)
  • athenagt ntupleSvc theApp.ntupleSvc()
  • Athenagt
  • (do not try the Fitter yet it has some problem
    I will inform you when it is fixed)
  • athenagt fitter Fitter("Chi2","lcg_minuit")
  • athenagt fitParams std.vector(double)()
  • athenagt fitParams.push_back(150.0)
  • athenagt fitParams.push_back(80000.0)
  • athenagt fitParams.push_back(5000.0)

3
An Interactive Session-continue
  • athenagt gaussian Function(G)
  • athenagt gaussian.setParameters(fitParams)
  • athenagt fitResult fitter.fit(Mee,gaussian)
  • athenagt if fitResult None
  • athenagt raise Single gaussian chi2 fit
    failed
  • athenagt parameterNames fitResult.fittedParameter
    Names()
  • athenagt parameters fitResult.fittedParameters()
  • athenagt errors fitResult.errors()
  • athenagt for i in range(0,len(par))
  • athenagt print parameterNamesi "
    " str(parametersi) " /- "
    str(errorsi)
  • athenagt plotter.plot(gaussion, S)
  • Athenagt
  • athenagt theApp.exit()
  • lxplusgt

4
An Interactive Session - continue
  • You can put your interactive commands in a file
    and execute it on the Athena prompt
  • The file MyAnalysis.py contains
  • from AidaProxy import
  • from rootPlotter2 import
  • Import ROOT
  • theApp.initialize()
  • Then, on the interactive ATHENA prompt
  • athenagt execfile (MyAnalysis.py)

5
An Interactive Session - continue
  • It is recommended that you start your analysis an
    ATHENA algorithm such as the AnalysisSkeleton,
    where you implement some pre-defined histograms
    and NTuples
  • In an interactive session, you can access those
    histograms and NTuples. Further, you can also
    defined and fill new histograms on the fly
  • It is also possible to call C class from the
    ATHENA prompt
  • In an interactive session, you still have access
    to the full ROOT machinery through PyROOT.
Write a Comment
User Comments (0)
About PowerShow.com