Tutorial: performing an Example Partial Wave Analysis

For testing and benchmarking purposes, an example PWA of Monte Carlo toy data is located in the directory Pawian/Examples/benchmark/pbarp . It is an analysis of the antiproton-proton annihilation into π0 π0 η with only the f2(1270) and the a2(1320) as intermediate resonances.

This is a step by step tutorial on running this example.

Relevant Files

The following files should be located in the "benchmark" folder:

File Description
pbarpReactionDefault.cfg The configuration file. The fitted model is defined and all options set here
toyDataModel.dat The "experimental" toy data as an ASCII file containing four-vectors
toyDataMC.dat The phasespace distributed toy Monte Carlo data as an ASCII file containing four-vectors
defaultparams.dat A list of default start parameters for the fit
benchmark*runscript Shell scripts to run the PWA in different modes

Setting the Environment

To run PAWIAN, some environment variables have to be set. An example is given in the file "SetEnv_rub" in the top directory of the PAWIAN installation. On the Βochum site, you only have to "cd" into that directory and type

source SetEnv_rub

Otherwise, you'll have to set the relevant environment variables ROOTSYS, TOP_DIR, LD_LIBRARY_PATH and BOOST_BUILD_PATH yourself. Additionally, ${ROOTSYS}/bin has to appear in your PATH variable.

Generating the default Parameter List

To start any PWA, a list of start parameters has to be given. A default list can be generated by running

$TOP_DIR/bin/singleChannelApp --pbarpFiles pbarpReactionDefault.cfg --mode dumpDefaultParams

Starting the Server and the Clients

This example PWA is performed using the client/server mode with two clients, each one using two threads. The relevant configuration file options are

serverPort = 50001
serverAddress = localhost
noOfClients = 2
noOfThreads = 2

To start the server run

$TOP_DIR/bin/singleChannelApp --pbarpFiles pbarpReactionDefault.cfg --mode server --paramFile defaultparams.dat

However, you may want to pipe the output into a log file, e.g.

$TOP_DIR/bin/singleChannelApp --pbarpFiles pbarpReactionDefault.cfg --mode server --paramFile defaultparams.dat !>& server.log &

Wait some seconds and then start the two clients on the same machine:

$TOP_DIR/bin/singleChannelApp --pbarpFiles pbarpReactionDefault.cfg --mode client --paramFile defaultparams.dat !>& client1.log &

$TOP_DIR/bin/singleChannelApp --pbarpFiles pbarpReactionDefault.cfg --mode client --paramFile defaultparams.dat !>& client2.log &

In the server.log, lines similar to the following should appear:

INFO: ********* Server mode ****************
INFO: Listening on port 50001
INFO: Number of clients for channel 0 : 2
INFO: Waiting for 2 clients ...
INFO: Client pc17 logged in (ID 0).
INFO: Client pc17 logged in (ID 1).
INFO: All clients ready.
INFO: start migrad

During the minimization, the current values of the likelihood are printed

INFO: current LH = -2210.678789216901

while the current parameter values (with default errors) are frequently dumped into a file named currentResult.dat. After the minimization has finished, the logfile should show

**************** Minuit FunctionMinimum information ******************
INFO: Function minimum is valid.
INFO: Covariance matrix is valid.
INFO: Final LH: -7163.214059
INFO: # of function calls: 2868
INFO: minimum edm: 4.96117168e-06

The file finalResult.dat now holds the list of final fit parameters with proper errors. Another file serializedOutput.dat is created in which (currently only) the covariance matrix is stored for later use.

Plotting the Result

Start the QA mode by running

$TOP_DIR/bin/singleChannelApp --pbarpFiles pbarpReactionDefault.cfg --mode qaMode --paramFile finalResult.dat !>& logQA.log &

A ROOT file pawianHists.root is created (this may take some time). This file holds:
  • two ROOT trees _dataFourvecs and _fittedFourvecs where the latter are the Monte Carlo data but with an additional weight representing the fitted intensity for this event
  • Histograms of masses and angles, as chosen in the configuration file. The histograms have prefixes "Data", "MC" and "Fit", so to quickly estimate the goodness of fit, you can plot the "Data" and the corresponding "Fit" histogram on the same canvas.


-- JulianPychy - 07 Jul 2014
Topic attachments
I Attachment Action Size Date Who Comment
invMassPi0Eta.pngpng invMassPi0Eta.png manage 13.3 K 07 Jul 2014 - 15:21 JulianPychy Invariant pi0eta mass
invMassPi0Pi0.pngpng invMassPi0Pi0.png manage 13.6 K 07 Jul 2014 - 15:22 JulianPychy Invariant pi0pi0 mass
Topic revision: r6 - 23 Feb 2016, JulianPychy
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding PANDA Wiki? Send feedback
Imprint (in German)
Privacy Policy (in German)