Skip to main content
School of Physical and Chemical Sciences

SuperB Analysis FAQ

SuperB Analysis FAQ

Information related to getting started with accounts and FastSim:

Information related to Monte Carlo Generation

Information related to changing configuration parameters and geometries for Monte Carlo generation

Find out more


Information related to getting started with accounts and FastSim




You will need to obtain accounts locally (see Cozmin and Alex), and may also need to obtain accounts at CNAF and to use collaborative tools.  The instructions on how to do this can be found on the SuperB web page at the following URL:  Once you have gone to this page and started to request accounts, please make sure that you ask the group PI (Adrian Bevan) to also fill out the registration form so that your application gets processed.

Once you have the necessary accounts set up you can start working with the code.

The SuperB software is also installed on the High Throughput Cluster,  where it can be used for development and running large production jobs via the Grid.   To obtain an account on the HTC  see Chris or Dan.



Starting with FastSim

The SuperB Fast Simulation programme is installed on the students machine, and also at

CNAF.  This programme is used to generate simulated Monte Carlo samples with which to study
detector design and physics issues for the SuperB project.  First you will need to log into
a computer that has FastSim installed.  Having done that you can check out a release, and
follow the necessary instructions for compiling the programme you need to use (if this is
not already compiled in the release).  The third step is to then run the simulation.
You will find detailed instructions on how to start using FastSim at the following locations:

For the FastSim release V0.3.1 (and above) you need to run the following commands to configure your environment:

   export ROOTVER="5.26"
   export SBROOT=/opt/exp_software/superb
   export SVNROOT=""
   source $SBROOT/bin/

Once this is done you can set up your release with

   sbnewrel -d V0.3.1_test -r FastSim/V0.3.1
   cd V0.3.1_test
   sbsrtpath [return][return]
   gmake installdirs
   gmake workdir.setup
   gmake lib PacMC.bin

If you encounter a problem where SBARCH is not configured then you can resolve this 
issue by setting the following variables by hand:

  export SBARCH="Linux26SL5_i386_gcc412"
  export PATH=$SBROOT/releases/FastSim/V0.3.1/bin/$SBARCH:$PATH

More information can be found on the SuperB wiki

On completion of this step, you should have successfully recompiled the release, and can then follow instructions
below for compiling tau->3mu, B->hh, Generating single particles.



Setting up your environment at QM [not required for CNAF]

In order to start using the FastSim programme, just as in the case of CNAF, one has
to set the environment up in order to specify where your shell will find the
appropraite start up scripts.  The following will do this for you:

       export ROOTVER=5.26
       export SBROOT=/opt/exp_software/superb/
       source $SBROOT/bin/
       export SVNROOT=
       mkdir FastSim
       cd FastSim
       sbnewrel -d V0.2.4_test -r FastSim/V0.2.4
       cd V0.2.4_test
       gmake installdirs
       gmake workdir.setup

Having done that, one should be able to add packages as normal, e.g.

       sbaddpkg PacUser

The binaries will work out of the box, so as long as you don't need to modify code, and are content
to simply modify any tcl configuration files, then this minimal set up should be sufficient for your


Running on the High Throughput Cluster

Both  the  FastSim programme and Full Monte Carlo  are installed on the HTC.  To use these interactively you should log into the frontend machine      

The following enviromental variables need to be set.   (see  ~ajm/.bashrc)

# User specific aliases and functions
           export ROOTVER=5.26
           export G4VER=9.3
           export SBROOT=/opt/exp_software/superb/
           source $SBROOT/bin/
           export SVNROOT=


The instructions above for running the FastSim  should also work on the HTC


Running the Full Monte Carlo (Bruno)

 The software to build and run the Full Monte Carlo  is also installed on the HTC.   The instructions to use this should be basically the same as at CNAF  (see )  


The following will build the Bruno binary:

      svn co Bruno

          cd  Bruno


This should result in the building of a executable  in   bin/Linux-g++/Bruno. 

To run an example job  do for example:    

         ./bin/Linux-g++/Bruno -g SuperB.gdml -o test.gdml -m BrehmStralung.mac




Information related to Monte Carlo Generation



Generating τ→μ events

The PacTauUser package contains a reconstruction sequence for the decay τ→3μ.  In order to use this sequence to generate
events you will need to run the following commands from a FastSim release to compile the PacTauUserApp programme.

       gmake PacTauUser.lib
       gmake PacTauUser.bin

[note that if you have checked out a number of packages and modified their code, you may need to replace
the first line with gmake lib].
If the programme has been compiled correctly you will see the following files:


If these do not appear, please fix the compile problem and re-compile.  From the workdir in your release you
will be able to run the following command and generate τ→3μ signal MC.

       PacTauUserApp ../PacTauUser/example_Tau3Mu.tcl

If this programme has worked correctly, you will see a new file in the workdirectory called pacTau3Mu_10K_INMAPS.root.
The file should be renamed to something appropriate, for example: tau3mu.root.
There is a background MC tcl setup for ue with the SuperB production code.  This is PacTauTo3MuSequence.tcl.





Generating B→hh events

The package PacTwoBodyUser instructions has been
prepared in order to study different types of B→hh final states (h=&pi;<sup>&plusmn;</sup>, K<sup>&plusmn;</sup>, &pi;<sup>0</sup>, K<sup>0</sup>).  In order to compile this
package one must

       gmake PacTwoBodyUser.lib
       gmake PacTwoBodyUser.bin

[note that if you have checked out a number of packages and modified their code, you may need to replace
the first line with gmake lib].
and if this is successful you will find the following files exist:


Having successfully compiled the programme, you can specify the decay file
you want to use in generating events.  To do this you need to edit the
file (for B->pi+pi-) the tcl file ../PacTwoBodyUser/BtoPiPiSequence.tcl
for example to generate pipi signal use:

       UDECAY   set ProdDecayFiles/B0B0bar_pi+pi-_+0.57_-0.82.dec

and to generate e+e- -> uds background, use:

       UDECAY   set ProdDecayFiles/uds.dec

Then you can generate events by running the following command from your workdir

       mkdir results
       PacTwoBodyUserApp ../PacTwoBodyUser/example_PiPi.tcl

for B<sup>0</sup> → &pi;<sup>+</sup> &pi;<sup>-</sup>, or change the example tcl file to generate any of the other modes of

interest (See <a href=>PacTwoBody... instructions</a> for details.  The default location for output files to
be generated is the workdir/results one.  Please make sure you make this before trying
to generate events.




Generating events using a particle gun

The purpose of generating events using a 'particle gun' is to simulate the response
of a detector for a single particle at a time.  This simplified approach enables one
to perform lower level studies that can be of use when designing a sub-system. When
generating particles in this way it is possible to constrain the momentum, and angular
distribution of the generated particles so as to concentate on a specific feature
(for example momentum response of a vertex detector).
Please take a look at the following URL for information on how to:
generate events using a particle gun using FastSim.

It is also possible to generate single particle events using the SuperB Full Simulation.



Selecting a Generator

In general one also needs to consider generating background events.  This involves
specificy a mode or set of modes to generate other than the signal, and simulating
a large number of events to see what of those backgrounds pass cuts that are intended
to isolate signal.  Information on how to select a particular generator
can be found on the FastSim wiki.

Information related to changing configuration parameters and geometries for Monte Carlo generation






Changing tcl parameters


There are a number of useful tcl parameters (or FwkCfgVars [Framework Configuration Variables]) that can be modified in
order to change the number of events generated, filename etc.  These will be found in the
example_XYZ.tcl files. The most useful ones are:

  •   NEVENTS: this is the number of events to generate.  Change this number if you want/more or less events.
  • HistFileName: Use this to specify the output ROOT file name.

The analysis sequence file will contain a number of other useful variables, including the decay file type to
use in the generation.  For example, in the tau-3mu sequence file: PacTauUser/Tau3MuSequence.tcl, the following
may be of interest:

  • emzpol: polarisation of the electron beam (set to 0.8 by default).  This is only interesting for tau decays.

and in changing the generated background type of events, you will find a number of examples at the
following link: here.






Changing the configuration between SuperB baseline and BaBar

In order to change configuration between the SuperB baseline and BaBar configurations for simulation,
there are two steps to take (assuming that you have a working FastSim release having followed steps
in Starting with FastSim:

  •   Change the beam energies:
        Change the line
                FwkCfgVar BeamConfig PacMC/SuperB_Beams.tcl
        in PacMC/PacMC.tcl to read
                FwkCfgVar BeamConfig PacMC/BaBar_Beams.tcl
  • Change the detector configuration:
        Change the line
                FwkCfgVar DetectorConfig PacDetector/pacrat_SuperB.xml
        in PacMC/PacMC.tcl to read
                FwkCfgVar DetectorConfig PacDetector/pacrat_BaBar.xml





Changing the detector configuration

If you want to change between the BaBar and SuperB detectors, please see Changing the configuration between SuperB baseline and BaBar. If however you are interested in changing the sub-detector configuration file used for a sub-system or part thereof, please read on.  The packages PacDetector and PacTRK are relevant for the detector and tracking detector descriptions in FastSim.  You can follow the detector geometry used at any time by reading the tcl file PacDetector/pacrat_SuperB.xml or the corresponding file set to DetectorConfig in your PacMC/PacMC.tcl if you modified that value.  The tracking detectors are described in PacTrk and this is split into two sub-detectors: the Silicon Vertex Tracker (prefix Si_) and the Drift Chamber (prefix Dch_).  If you want to change the type of silicon detector that is used for event generation, please modify the line with:

             include file="PacTrk/Si_SuperB_Geom.xml"

in PacTrk/Si_SuperB.xml so that this refers to the geometry that you would like to use.  For example, the Si_SuperB_Geom_inmap_long_barrel.xml for a
long barrel pixel detector, or Si_SuperB_Geom_inmap_lampshade.xml for a lampshade pixel detector.



Other resources

There are a number of other useful documents available online for SuperB.  The following wiki
pages may be of use to you:

In addition to the above wiki pages, past meetings are documented here,
and documents on the project and physics can be found at the following section of the wiki: Physics Documentation.  There is also a set of mailing lists covering
various aspects of the projects, the appropriate links to those lists are given in the wiki pages.

The most up to date descriptions of the accelerator, detector and physics aspects of this project
can be found in three 'White Papers' which are:

This webpage is maintained by Adrian Bevan.

Back to top