I don't claim to understand everything in PravdaMC. As a matter of fact, most of it I don't understand yet. Information described here is based on my inspection of the code and my guess of what the code is doing. Some overhauling of the package may be needed in the future. Help is welcome.
The PravdaMC package contains a very fast MC which uses paramterization to simulate the detector response. The primary authors of the package is Natalia Kuznetsova and Anders Ryd. (Both have left BaBar long time ago.) And later modified by Francesco Forti and Gautier Hamel de Monchenault, and maybe others.
PravdaMC uses basic BaBar detector environment, and uses the BaBar event generators to generate events. An event is then created in the module "PmcMakeBtaCandLists", where the basic event information, such as event id, beam energies, beam spot, etc., and a list of "reconstructed" charged BtaCandidates, and a list of "reconstructed" neutral BtaCandidates are created.
The parameters of charged BtaCandidates are smeared by either a "Simple" or a "Trackerr" algorithm (an tcl option). The parameters of neutral BtaCandidates are smeared by "Simple", "PbWO4", "LSO", or "LXe" algorithm (another tcl option). In the recipe below, we use "Simple" for neutrals and "Trackerr" for charged tracks.
Once we have lists of BtaCandidates, we can proceed to do analysis as we normally do in BaBar. The executable PravdaMCApp includes many useful modules/sequences that are sufficient for most BaBar analyses. One can of course expand it if necessary.
The following text in BLUE is the recipe in the README file of PravdaMC package.
####################################################################### # A recipe for running PravdaMC in release 22. # # Chih-hsiang Cheng 2008/01/15 ####################################################################### 1) Build your executable - This recipe is based on release 22.3.2, and should work on release 24 as well. It is tested with Linux24-SL3. newrel -t 22.3.2 22.3.2 cd 22.3.2 srtpath - Packages that need to be checked out: PravdaMC V01-00-08 or up SoftRelTools V00-23-78 - Build gmake lib PravdaMC.bin You will get the executable bin/Linux24SL3_i386_gcc323/PravdaMCApp 2) Set up - adpkg workdir gmake workdir.setup - You need some detector description files in your workdir. Make a few soft links to ../PravdaMC/*.input ln -s ../PravdaMC/DCflat.input ln -s ../PravdaMC/EMC.input ln -s ../PravdaMC/VTXpostTDR.input ln -s ../PravdaMC/Babar2005_current.input The last one is the main driving detector file. - You also need a link to PID tables with the link name pidtables ln -s /afs/slac.stanford.edu/g/babar/physicstools/pid/tables/200x-r12 pidtables The pid table directory "pidtables" can be changed with a tcl file in BtaMicroPidKilling module with the parameter mapPath. 3) To run the example job - An example tcl is available PravdaMC/example_BToPiPi.tcl More information can be found in the comments in PravdaMC/example_BToPiPi.tcl . - To run cond22boot (or cond24boot if you are using R24) bin/Linux24SL3_i386_gcc323/PravdaMCApp ../PravdaMC/example_BToPiPi.tcl This will generate 1000 B0->pi+ pi- events and reconstruct them. A root file myBToPiPi.root will be created. root [1] .ls TFile** myBToPiPi.root Created for you by RooTupleManager TFile* myBToPiPi.root Created for you by RooTupleManager KEY: TH1F h1d1;1 number of tracks KEY: TH1F h1d2;1 momentum spectrum KEY: TTree ntp1;1 TrackerrPravdaChargedControl KEY: TTree ntp2;1 TrackerrPravdaNeutralControl KEY: TTree ntp3;1 myNtuple B0 Mes and DeltaE plots can be drawn with ntp3->Draw("BpostFitMes") ntp3->Draw("BpostFitDeltaE") 4) How to modify the geometry 5) How to change tracking efficiency 6) How to change tracking parameters 7) How to change neutrals parameters 8) How to set up/change PID efficiencies 9) Know problems - The job seg-faulted at the end. It looks like it is in the destructor of some ROOT classes. The resulting root file doens't seem to be affected. - In R24, you will see a bunch of error messages regarding missing pid map. It is not clear whether this has a real effect on our simple example, most likely not.
The "Trackerr" algorithm is implemented in a very long and complicated Fortran code ( > 5500 LOC ). It is very hard to understand and prong to bugs. As a matter of fact, I believe many bugs simply hind behind less stringent compiler options. If we want to continue supporting it, we need Fortran experts to help us understand it and/or convert it to C++.