00001 /** 00002 00003 @mainpage C++ Interface to Tauola 00004 @brief Description of Tauola Interface in C++ 00005 00006 @authors Nadia Davidson, Gizo Nanava, Tomasz Przedzinski, Elzbieta Richter-Was, Zbigniew Was 00007 00008 00009 00010 @section download1 New release 00011 00012 The source code and documentation for release 1.1.1a 00013 - <a href="http://annapurna.ifj.edu.pl/~tprzedzinski/resources/TAUOLA.1.1.1a/Tauola_interface_design.1.1.1a.pdf">Tauola_interface_design.1.1.1a.pdf</a> full software documentation includes updates with respect to 00014 the preprint version. 00015 - <a href="http://annapurna.ifj.edu.pl/~tprzedzinski/resources/TAUOLA.1.1.1a/TAUOLA.1.1.1a-LHC.tar.gz">TAUOLA source code for the LHC</a> 00016 (or <a href="http://annapurna.ifj.edu.pl/~tprzedzinski/resources/TAUOLA.1.1.1a/TAUOLA.1.1.1a.tar.gz">TAUOLA source code with full TAUOLA FORTRAN</a>) 00017 tarball and its <a href="http://annapurna.ifj.edu.pl/~tprzedzinski/resources/TAUOLA.1.1.1a/svn_info_tauola.1.1.1a.txt">revision info</a> SVN tag, tarball 00018 creation date/time, etc. For updates with respect to release 1.0 see <a href="http://annapurna.ifj.edu.pl/~tprzedzinski/resources/TAUOLA.1.1.1a/changelog.1.1.1a.txt">changelog.txt</a>. 00019 00020 - \b NOTE: for downloads Nov 20-27 2012 please check note for version 1.1.1. 00021 00022 - Note that LCG/Genser 00023 <a href="http://sftweb.cern.ch/generators/">Generator 00024 Services Subproject </a> distributes compiled, platform adapted 00025 tar balls of our programs, in particular TAUOLA.1.0.2, TAUOLA.1.0.4 and TAUOLA.1.0.7. 00026 00027 @section developement Developement version 00028 00029 The source code and documentation are updated daily from the repository as well. The following files are provided for download of the developement version: 00030 - <a href="http://www.ph.unimelb.edu.au/~ndavidson/tauola/Tauola_interface_design.pdf">Tauola_interface_design.pdf</a> full software documentation. 00031 - <a href="http://www.ph.unimelb.edu.au/~ndavidson/tauola/TAUOLA.daily_temp.tar.gz">TAUOLA source code with full TAUOLA FORTRAN</a> tarball and its <a href="http://www.ph.unimelb.edu.au/~ndavidson/tauola/svn_info_tauola.txt">revision info</a> SVN tag, tarball creation date/time, etc. 00032 For updates with respect to release 1.0 see <a href="http://www.ph.unimelb.edu.au/~ndavidson/tauola/doxygen/changelog.txt">changelog.txt</a>. To remove code spurious for LHC C++ use, 00033 execute the script 'onlyLHC.sh' in the directory 'tauola-fortran'. Changes will be irreversible. 00034 00035 @section download Older releases 00036 00037 The source code and documentation for release 1.0. The following files are provided for download: 00038 - <a href="http://arxiv.org/abs/1002.0543">arXiv:1002.0543</a> full software documentation. 00039 - <a href="http://www.ph.unimelb.edu.au/~ndavidson/tauola/TAUOLA.1.0.tar.gz">TAUOLA source code </a> tarball. 00040 00041 The source code and documentation for release 1.0.2 00042 - <a href="http://www.ph.unimelb.edu.au/~ndavidson/tauola/Tauola_interface_design.1.0.2.pdf">Tauola_interface_design.1.0.2.pdf</a> full software documentation includes updates with respect to 00043 the preprint version. 00044 - <a href="http://annapurna.ifj.edu.pl/~wasm/TAUOLA.1.0.2-LHC.tar.gz">TAUOLA source code for LHC</a> 00045 (or <a href="http://www.ph.unimelb.edu.au/~ndavidson/tauola/TAUOLA.1.0.2.tar.gz">TAUOLA source code with full TAUOLA FORTRAN</a>) 00046 tarball and its <a href="http://www.ph.unimelb.edu.au/~ndavidson/tauola/svn_info_tauola.1.0.2.txt">revision info</a> SVN tag, tarball 00047 creation date/time, etc. For updates with respect to release 1.0 see <a href="http://www.ph.unimelb.edu.au/~ndavidson/tauola/changelog.1.0.2.txt">changelog.txt</a>. 00048 00049 The source code and documentation for release 1.0.4 00050 - <a href="http://www.ph.unimelb.edu.au/~ndavidson/tauola/Tauola_interface_design.1.0.4.pdf">Tauola_interface_design.1.0.4.pdf</a> full software documentation includes updates with respect to 00051 the preprint version. 00052 - <a href="http://www.ph.unimelb.edu.au/~ndavidson/tauola/TAUOLA.1.0.4-LHC.tar.gz">TAUOLA source code for the LHC</a> 00053 (or <a href="http://www.ph.unimelb.edu.au/~ndavidson/tauola/TAUOLA.1.0.4.tar.gz">TAUOLA source code with full TAUOLA FORTRAN</a>) 00054 tarball and its <a href="http://www.ph.unimelb.edu.au/~ndavidson/tauola/svn_info_tauola.1.0.4.txt">revision info</a> SVN tag, tarball 00055 creation date/time, etc. For updates with respect to release 1.0 see <a href="http://www.ph.unimelb.edu.au/~ndavidson/tauola/changelog.1.0.4.txt">changelog.txt</a>. 00056 00057 The source code and documentation for release 1.0.5 00058 - <a href="http://annapurna.ifj.edu.pl/~tprzedzinski/resources/TAUOLA.1.0.5/Tauola_interface_design.1.0.5.pdf">Tauola_interface_design.1.0.5.pdf</a> full software documentation includes updates with respect to 00059 the preprint version. 00060 - <a href="http://annapurna.ifj.edu.pl/~tprzedzinski/resources/TAUOLA.1.0.5/TAUOLA.1.0.5-LHC.tar.gz">TAUOLA source code for the LHC</a> 00061 (or <a href="http://annapurna.ifj.edu.pl/~tprzedzinski/resources/TAUOLA.1.0.5/TAUOLA.1.0.5.tar.gz">TAUOLA source code with full TAUOLA FORTRAN</a>) 00062 tarball and its <a href="http://annapurna.ifj.edu.pl/~tprzedzinski/resources/TAUOLA.1.0.5/svn_info_tauola.1.0.5.txt">revision info</a> SVN tag, tarball 00063 creation date/time, etc. For updates with respect to release 1.0 see <a href="http://annapurna.ifj.edu.pl/~tprzedzinski/resources/TAUOLA.1.0.5/changelog.1.0.5.txt">changelog.txt</a>. 00064 00065 The source code and documentation for release 1.0.6 00066 - <a href="http://annapurna.ifj.edu.pl/~tprzedzinski/resources/TAUOLA.1.0.6/Tauola_interface_design.1.0.6.pdf">Tauola_interface_design.1.0.6.pdf</a> full software documentation includes updates with respect to 00067 the preprint version. 00068 - <a href="http://annapurna.ifj.edu.pl/~tprzedzinski/resources/TAUOLA.1.0.6/TAUOLA.1.0.6-LHC.tar.gz">TAUOLA source code for the LHC</a> 00069 (or <a href="http://annapurna.ifj.edu.pl/~tprzedzinski/resources/TAUOLA.1.0.6/TAUOLA.1.0.6.tar.gz">TAUOLA source code with full TAUOLA FORTRAN</a>) 00070 tarball and its <a href="http://annapurna.ifj.edu.pl/~tprzedzinski/resources/TAUOLA.1.0.6/svn_info_tauola.1.0.6.txt">revision info</a> SVN tag, tarball 00071 creation date/time, etc. For updates with respect to release 1.0 see <a href="http://annapurna.ifj.edu.pl/~tprzedzinski/resources/TAUOLA.1.0.6/changelog.1.0.6.txt">changelog.txt</a>. 00072 00073 The source code and documentation for release 1.0.7 00074 - <a href="http://annapurna.ifj.edu.pl/~tprzedzinski/resources/TAUOLA.1.0.7/Tauola_interface_design.1.0.7.pdf">Tauola_interface_design.1.0.7.pdf</a> full software documentation includes updates with respect to 00075 the preprint version. 00076 - <a href="http://annapurna.ifj.edu.pl/~tprzedzinski/resources/TAUOLA.1.0.7/TAUOLA.1.0.7-LHC.tar.gz">TAUOLA source code for the LHC</a> 00077 (or <a href="http://annapurna.ifj.edu.pl/~tprzedzinski/resources/TAUOLA.1.0.7/TAUOLA.1.0.7.tar.gz">TAUOLA source code with full TAUOLA FORTRAN</a>) 00078 tarball and its <a href="http://annapurna.ifj.edu.pl/~tprzedzinski/resources/TAUOLA.1.0.7/svn_info_tauola.1.0.7.txt">revision info</a> SVN tag, tarball 00079 creation date/time, etc. For updates with respect to release 1.0 see <a href="http://annapurna.ifj.edu.pl/~tprzedzinski/resources/TAUOLA.1.0.7/changelog.1.0.7.txt">changelog.txt</a>. 00080 00081 The source code and documentation for release 1.1.0 00082 - <a href="http://annapurna.ifj.edu.pl/~tprzedzinski/resources/TAUOLA.1.1.0/Tauola_interface_design.1.1.0.pdf">Tauola_interface_design.1.1.0.pdf</a> full software documentation includes updates with respect to 00083 the preprint version. 00084 - <a href="http://annapurna.ifj.edu.pl/~tprzedzinski/resources/TAUOLA.1.1.0/TAUOLA.1.1.0-LHC.tar.gz">TAUOLA source code for the LHC</a> 00085 (or <a href="http://annapurna.ifj.edu.pl/~tprzedzinski/resources/TAUOLA.1.1.0/TAUOLA.1.1.0.tar.gz">TAUOLA source code with full TAUOLA FORTRAN</a>) 00086 tarball and its <a href="http://annapurna.ifj.edu.pl/~tprzedzinski/resources/TAUOLA.1.1.0/svn_info_tauola.1.1.0.txt">revision info</a> SVN tag, tarball 00087 creation date/time, etc. For updates with respect to release 1.0 see <a href="http://annapurna.ifj.edu.pl/~tprzedzinski/resources/TAUOLA.1.1.0/changelog.1.1.0.txt">changelog.txt</a>. Starting from this version <a href="http://hibiscus.if.uj.edu.pl/~przedzinski/tau-reweight/">TauSpinner </a>was merged into TAUOLA source code. 00088 00089 The source code and documentation for release 1.1.1 00090 - <a href="http://annapurna.ifj.edu.pl/~tprzedzinski/resources/TAUOLA.1.1.1/Tauola_interface_design.1.1.1.pdf">Tauola_interface_design.1.1.1.pdf</a> full software documentation includes updates with respect to 00091 the preprint version. 00092 - <a href="http://annapurna.ifj.edu.pl/~tprzedzinski/resources/TAUOLA.1.1.1/TAUOLA.1.1.1-LHC.tar.gz">TAUOLA source code for the LHC</a> 00093 (or <a href="http://annapurna.ifj.edu.pl/~tprzedzinski/resources/TAUOLA.1.1.1/TAUOLA.1.1.1.tar.gz">TAUOLA source code with full TAUOLA FORTRAN</a>) 00094 tarball and its <a href="http://annapurna.ifj.edu.pl/~tprzedzinski/resources/TAUOLA.1.1.1/svn_info_tauola.1.1.1.txt">revision info</a> SVN tag, tarball 00095 creation date/time, etc. For updates with respect to release 1.0 see <a href="http://annapurna.ifj.edu.pl/~tprzedzinski/resources/TAUOLA.1.1.1/changelog.1.1.1.txt">changelog.txt</a>. 00096 00097 - \b NOTE: this version was erroneously made public for three days (Nov 20-22) and lacks numerical protecting code against rounding errors for TauSpinner operation on events with bremsstrahlung in leptonic decays. 00098 Version 1.1.1a should be used instead. 00099 For the period of time Nov 23 - Nov 27 this (1.1.1) version number was attributed to the code of version 1.1.1a but svn label was not updated at that time. 00100 00101 @section intro Introduction/Status 00102 00103 At present (since Feb 2 2010) the C++ interface functionality for TAUOLA is complete. 00104 Longitudinal spin correlation are checked using <a href="http://mc-tester.web.cern.ch/MC-TESTER/"> 00105 MC-TESTER</a> now. Transverse spin correlations and full functionality of TAUOLA Universal Interface 00106 are coded. Genuine electroweak corrections for processes mediated by Z/gamma are implemented as well. 00107 00108 The tar file contains the C++ interface along with the source code for tauola itself (as available from <a href="http://wasm.web.cern.ch/wasm/goodies.html">old web page</a>; version Oct 11 2005). 00109 The developement version contains the latest source code for the interface from our subversion repository. Note that 00110 revision numbers, dates and other info for this development version can be found in the revision information file listed above. 00111 00112 At present, the tar ball includes everything that is needed for installation. The user is advised to use HepMC 2.04+ libraries as described below. 00113 00114 @section setup Requirements 00115 00116 For compilation, and to run the simple example, the interface requires: 00117 - <a href="http://lcgapp.cern.ch/project/simu/HepMC/">HepMC v2.04</a> or later. 00118 00119 For further examples, one need to also install: 00120 - <a href="http://root.cern.ch/drupal/">ROOT v5.18</a> or later 00121 - <a href="http://home.thep.lu.se/~torbjorn/Pythia.html">PYTHIA 8.1</a> or later. PYTHIA must be compiled with HepMC 2 so that the PYTHIA library hepmcinterface exists. 00122 - <a href="http://mc-tester.web.cern.ch/MC-TESTER/">MC-TESTER v1.24</a> or later. Do not forget to compile the additional HepMC library libHepMCEvent as well. 00123 00124 Examples of TAUOLA C++ combined with PHOTOS and its C++ interface are available from: 00125 - <a href="http://www.ph.unimelb.edu.au/~ndavidson/photos/doxygen/index.html"> 00126 PHOTOS C++</a> official webpage. 00127 00128 00129 00130 @section compile Configuration and Compilation 00131 00132 In order to compile the TAUOLA C++ interface: 00133 - Execute './configure' with additional command line options: 00134 - '--with-hepmc=<path> ' provides the path to HepMC installation directory. One can set HEPMCLOCATION variable instead of using this directive. This options is required for interface to compile. To compile without HepMC use '--without-hepmc' 00135 - '--prefix=<path>' provides the installation path. The 'include' and 'lib' directories will be copied there if 'make install' is executed later. If none has been provided, the default directory for installation is '/usr/local'. 00136 - Execute 'make' 00137 - Optionally, execute 'make install' to copy files to the directory provided during configuration. 00138 00139 After compiling the 'tauola-fortran' part, the TAUOLA C++ interface will be compiled and the '/lib' and '/include' directories will contain the appropriate library and include files. 00140 00141 In order to compile the examples, enter the 'examples' directory, and: 00142 - execute './configure' to determine which examples can be compiled. Additional paths can be provided as command line options: 00143 - '--with-pythia8=<path>' provides the path to the Pythia8 installation directory. One can set the PYTHIALOCATION variable instead of using this directive. This path is required for all additional examples and tests. 00144 - '--with-mc-tester=<path>' provides the path to the MC-Tester installation directory (libHepMCEvent must be compiled as well, check MC-Tester documentation for more details). One can set the MCTESTERLOCATION variable instead of using this directive. This path is required for all additional examples and tests. It is assumed that using this option also implies that ROOT has already been installed (since it's required by MC-TESTER). The location of its binaries should be listed in the PATH variable. 00145 - execute 'make' 00146 00147 Note that for examples working with PYTHIA 8.1, the PYTHIA8DATA global variable must be set (refer to instructions provided during configuration). 00148 Similarly, for examples in the examples/testing directory to work, the MCTESTERLOCATION global variable must be set. 00149 If neither PYTHIA nor MC-TESTER are present, only the simple example will be provided. The '/examples' directory will contain the compiled example files. 00150 00151 If you prefer not to use configuration scripts, 00152 you may find <a href="http://www.ph.unimelb.edu.au/~ndavidson/tauola/doxygen/README-NO-CONFIG.txt">README-NO-CONFIG.txt</a> useful. 00153 00154 @section testing Testing 00155 00156 In order to run some more specific tests both PYTHIA and MC-TESTER must be installed. 00157 - Compile TAUOLA C++ interface as well as examples. 00158 - Check that the appropriate system variables are set: normally set by the script 00159 configure.paths.sh [.csh] (the configuration step mentions this script). 00160 - Enter the /examples/testing directory. Modify test.inc if needed. 00161 - Enter the selected directory and execute 'make'. 00162 00163 The appropriate .root files as well as .pdf files generated by MC-TESTER will be created inside the chosen directory. You can execute 'make clobber' to clean the directory. You can also execute 'make' inside the 'TAUOLA/examples/testing' directory to run all available tests one after another. 00164 00165 @section sanc SANC 00166 Electroweak corrections may affect spin correlations between tau+ and tau- in a significant way. This is the case at high energies, 00167 far above WW threshold. At present we use the alpha scheme for electroweak calculations, this choice may not be optimal for the 00168 cross section weight aiming at implementation of electroweak corrections. For this, the end scheme should be consistent with the choice 00169 of the host generator. On the other hand this is not the problem for spin correlations, our prime interest. In addition, if tables are used, transverse spin correlations for processes mediated by Z and gamma are taken into account. 00170 00171 Changes to the tables generated by the SANC module can be implemented by modifying the interface located in the '/SANC' directory. Details regarding the structure and initialization variables of the interface are described in the documentation. In order to generate new tables: 00172 - execute 'make' in the '/SANC' directory to compile the library and tools. 00173 - Adjust the initialization in the SANC tables calculation if needed. 00174 - execute 'make tables' in the '/SANC' directory to generate the tables. 00175 - move tables to the directory from which your main program is executed. 00176 00177 <hr> 00178 @section description Description of the code 00179 00180 @image html tauola_interface_design.png "Design of Interface. Components are described in more detail below." 00181 00182 @subsection outline Algorithm Outline 00183 00184 The simplified version of the main program structure including the tauola decay routines would consist of: 00185 - initialize the Monte Carlo generator and all other generators / analysis tools. 00186 - set the appropriate parameters for the Tauola interface. 00187 - invoke the Tauola::initialize() routine. 00188 - for each event to be generated: 00189 - generate an event using any Monte Carlo generator 00190 - convert a generated event to the HepMC event record 00191 - create a TauolaHepMCEvent from a HepMC event object 00192 - invoke decayTaus() for the TauolaHepMCEvent object. If a tau has already been decayed by a MC generator, use undecayTaus() first. 00193 - the HepMC event is now prepared and can be used in the analysis 00194 - finalize the analysis 00195 - print any summary output if needed and exit 00196 00197 @subsection flow Flow of Control 00198 00199 The following is a more detailed example point by point of how a tau, or set of taus, are decayed using the interface with the HepMC event record implementation. 00200 00201 Starting from the main program: 00202 - At the initialization step, appropriate configuration routines via the 'Tauola' class methods can be executed. 00203 - The Tauola::initialize() method must be invoked, which calls the Initialize() methods in f_Init, which in turn calls the initilization routines of TAUOLA. 00204 00205 In the main event loop, after the HepMC event is filled by a Monte Carlo generator: 00206 - An appropriate implementation of the abstract class TauolaEvent - TauolaHepMCEvent object must be created, taking a HepMC::GenEvent object as its parameter. 00207 - The method decayTaus() for the created TauolaHepMCEvent object must be invoked. If the Monte Carlo generator has already performed the decays of a tau, the undecayTaus() method can be executed just before the decayTaus() method. 00208 00209 After executing decayTaus(), the following procedure takes place: 00210 - The HepMC event record is traversed and a list of stable taus in the event is created. 00211 - the taus from the list are paired with other decay products (e.g. tau neutrino or second tau). If the pair consists of two taus, the second tau is removed from the previous list. 00212 - TauolaParticlePairs are then created from these pairings. 00213 - For each pair, the spin density matrix is calculated using information about the production process. 00214 - The decayTauPairs() method is called for each pair. Within this method: 00215 - For each tau in the pair, decay() is called. 00216 - the decay method in TauolaParticle is responsible for adding itself 00217 (the tau) to the DecayList in the first position. It then calls 00218 decay() in f_Decay which in turn calls the dekay_() routine of TAUOLA. 00219 - dekay_() in TAUOLA generates a set of daughter particles with 00220 momentum as though the tau was decayed in its rest frame. 00221 - The dekay_() also provides a polarimetric vector, which is used in combination with spin density matrix to calculate the spin weight. It is used to determine whether the decay is accepted or not. 00222 - If rejected, the list of decay products is cleared and the pair is decayed anew. This way unweighting of spin effects is performed. 00223 - Once accepted, for each tau in the pair the routine addDecayToEventRecord() is executed, which in turn calls TAUOLA dekay_() with an option set to write to the event record. 00224 - For each daughter TAUOLA calls filhep_() in the file f_FilHep.c. 00225 - filhep_() adds a new TauolaHepMCParticle to DecayList with all necessary information taken from TAUOLA. 00226 - The DecayList data structure translates the parent index given by TAUOLA to a pointer to the TauolaParticle(TauolaHepMCParticle) object. 00227 - The parents are set via the TauolaParticle methods (setMother, etc.) By setting the mothers it is automatically assigned a barcode and added to the HepMC event. 00228 - The particle is boosted by the tau's momentum. 00229 - The position of the vertex of the particle is modified accordingly to the tau lifetime. 00230 - Control is then returned to TauolaHepMCEvent which proceeds onto the next pair. 00231 - When all pairs are decayed, the TauolaHepMCEvent converts the HepMC::GenEvent to the units selected by the user (GeV/MeV mm/cm) and finalizes execution. The loop in the main program proceeds to the next event. 00232 00233 @section event_rec Notes About the Event Record 00234 This section in future will describe examples of events, particularly unusual ones, 00235 which the TAUOLA Interface will nonetheless need to be able to handle, but which were not discussed at the time 00236 of writing the documentation. At present this point is basically empty, except one example. Such type of events is already discussed in 00237 the documentation. 00238 - <a href="http://www.ph.unimelb.edu.au/~ndavidson/tauola/pythia_event.pdf">example of a pythia event</a> with 00239 non-conservation of momentum and tau->tau type vertices. 00240 00241 @section to_do Things to do 00242 00243 See software documentation in pdf form. 00244 00245 00246 <hr> 00247 Last update 19 November 2012. 00248 */