From aa44f9c18711f77f08191a47d777a684ebe70078 Mon Sep 17 00:00:00 2001
From: Kristian Zarebski <kristian.alexander.zarebski@cern.ch>
Date: Fri, 16 Mar 2018 16:14:49 +0100
Subject: [PATCH] Modified TestEm6 for Gamma2DiMuon Conversion

---
 .../CMakeLists.txt                            |  33 ++
 .../G4GammaToDiLeptonConversionTest.cc        | 144 +++++++++
 .../GNUmakefile                               |  27 ++
 .../G4GammaToDiLeptonConversionTest/History   | 193 ++++++++++++
 .../include/DetectorConstruction.hh           | 101 +++++++
 .../include/DetectorMessenger.hh              |  73 +++++
 .../include/PhysicsList.hh                    |  88 ++++++
 .../include/PhysicsListMessenger.hh           |  72 +++++
 .../include/PrimaryGeneratorAction.hh         |  68 +++++
 .../include/PrimaryGeneratorMessenger.hh      |  63 ++++
 .../include/ProcessesCount.hh                 |  62 ++++
 .../include/RunAction.hh                      |  80 +++++
 .../include/StackingAction.hh                 |  55 ++++
 .../include/StepMax.hh                        |  80 +++++
 .../include/StepMaxMessenger.hh               |  61 ++++
 .../include/SteppingAction.hh                 |  60 ++++
 .../include/SteppingVerbose.hh                |  55 ++++
 .../G4GammaToDiLeptonConversionTest.py        | 130 ++++++++
 .../src/DetectorConstruction.cc               | 222 ++++++++++++++
 .../src/DetectorMessenger.cc                  | 126 ++++++++
 .../src/PhysicsList.cc                        | 286 ++++++++++++++++++
 .../src/PhysicsListMessenger.cc               | 126 ++++++++
 .../src/PrimaryGeneratorAction.cc             |  97 ++++++
 .../src/PrimaryGeneratorMessenger.cc          |  77 +++++
 .../src/RunAction.cc                          | 165 ++++++++++
 .../src/StackingAction.cc                     |  62 ++++
 .../src/StepMax.cc                            |  98 ++++++
 .../src/StepMaxMessenger.cc                   |  68 +++++
 .../src/SteppingAction.cc                     | 185 +++++++++++
 .../src/SteppingVerbose.cc                    | 158 ++++++++++
 30 files changed, 3115 insertions(+)
 create mode 100644 LHCbG4Tests/G4GammaToDiLeptonConversionTest/CMakeLists.txt
 create mode 100644 LHCbG4Tests/G4GammaToDiLeptonConversionTest/G4GammaToDiLeptonConversionTest.cc
 create mode 100644 LHCbG4Tests/G4GammaToDiLeptonConversionTest/GNUmakefile
 create mode 100644 LHCbG4Tests/G4GammaToDiLeptonConversionTest/History
 create mode 100644 LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/DetectorConstruction.hh
 create mode 100644 LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/DetectorMessenger.hh
 create mode 100644 LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/PhysicsList.hh
 create mode 100644 LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/PhysicsListMessenger.hh
 create mode 100644 LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/PrimaryGeneratorAction.hh
 create mode 100644 LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/PrimaryGeneratorMessenger.hh
 create mode 100644 LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/ProcessesCount.hh
 create mode 100644 LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/RunAction.hh
 create mode 100644 LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/StackingAction.hh
 create mode 100644 LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/StepMax.hh
 create mode 100644 LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/StepMaxMessenger.hh
 create mode 100644 LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/SteppingAction.hh
 create mode 100644 LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/SteppingVerbose.hh
 create mode 100644 LHCbG4Tests/G4GammaToDiLeptonConversionTest/scripts/G4GammaToDiLeptonConversionTest.py
 create mode 100644 LHCbG4Tests/G4GammaToDiLeptonConversionTest/src/DetectorConstruction.cc
 create mode 100644 LHCbG4Tests/G4GammaToDiLeptonConversionTest/src/DetectorMessenger.cc
 create mode 100644 LHCbG4Tests/G4GammaToDiLeptonConversionTest/src/PhysicsList.cc
 create mode 100644 LHCbG4Tests/G4GammaToDiLeptonConversionTest/src/PhysicsListMessenger.cc
 create mode 100644 LHCbG4Tests/G4GammaToDiLeptonConversionTest/src/PrimaryGeneratorAction.cc
 create mode 100644 LHCbG4Tests/G4GammaToDiLeptonConversionTest/src/PrimaryGeneratorMessenger.cc
 create mode 100644 LHCbG4Tests/G4GammaToDiLeptonConversionTest/src/RunAction.cc
 create mode 100644 LHCbG4Tests/G4GammaToDiLeptonConversionTest/src/StackingAction.cc
 create mode 100644 LHCbG4Tests/G4GammaToDiLeptonConversionTest/src/StepMax.cc
 create mode 100644 LHCbG4Tests/G4GammaToDiLeptonConversionTest/src/StepMaxMessenger.cc
 create mode 100644 LHCbG4Tests/G4GammaToDiLeptonConversionTest/src/SteppingAction.cc
 create mode 100644 LHCbG4Tests/G4GammaToDiLeptonConversionTest/src/SteppingVerbose.cc

diff --git a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/CMakeLists.txt b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/CMakeLists.txt
new file mode 100644
index 0000000..7d1167e
--- /dev/null
+++ b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/CMakeLists.txt
@@ -0,0 +1,33 @@
+gaudi_subdir(G4GammaToDiLeptonConversionTest v1r0)
+
+gaudi_depends_on_subdirs(Geant4/G4config)
+gaudi_depends_on_subdirs(LHCbG4PhysLists)
+
+find_package(CLHEP REQUIRED)
+
+include_directories(SYSTEM ${CMAKE_INSTALL_PREFIX}/include ${CLHEP_INCLUDE_DIRS})
+link_directories(${CMAKE_INSTALL_PREFIX}/lib)
+
+set(Geant4_LIBRARIES
+    -lG4analysis
+    -lG4physicslists
+    -lG4intercoms
+    -lG4global
+    -lG4run
+    -lG4tracking   
+    -lG4track
+    -lG4event
+    -lG4processes
+    -lG4particles
+    -lG4geometry
+    -lG4materials
+    -lG4graphics_reps)
+
+gaudi_add_executable(G4GammaToDiLeptonConversionTest
+                     G4GammaToDiLeptonConversionTest.cc src/*.cc
+                     INCLUDE_DIRS include CLHEP
+                     LINK_LIBRARIES ${Geant4_LIBRARIES} CLHEP)
+
+add_dependencies(G4GammaToDiLeptonConversionTest Geant4)
+
+gaudi_install_scripts()
diff --git a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/G4GammaToDiLeptonConversionTest.cc b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/G4GammaToDiLeptonConversionTest.cc
new file mode 100644
index 0000000..f098c28
--- /dev/null
+++ b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/G4GammaToDiLeptonConversionTest.cc
@@ -0,0 +1,144 @@
+// BASED ON TESTEM6 BY THE GEANT4 COLLABORATION
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+/// \file electromagnetic/TestEm6/TestEm6.cc
+/// \brief Main program of the electromagnetic/TestEm6 example
+//
+// $Id: TestEm6.cc 83428 2014-08-21 15:46:01Z gcosmo $
+// 
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+#include "Geant4/G4RunManager.hh"
+#include "Geant4/G4UImanager.hh"
+#include "Geant4/Randomize.hh"
+#include "Geant4/G4GammaConversionToMuons.hh"
+#include "Geant4/G4ProcessTable.hh"
+
+#include "DetectorConstruction.hh"
+#include "PrimaryGeneratorAction.hh"
+#include "SteppingVerbose.hh"
+
+#include "PhysicsList.hh"
+
+#include "RunAction.hh"
+#include "SteppingAction.hh"
+#include "StackingAction.hh"
+
+#ifdef G4VIS_USE
+ #include "G4VisExecutive.hh"
+#endif
+
+#ifdef G4UI_USE
+#include "G4UIExecutive.hh"
+#endif
+
+G4double energy = 1000; //in GeV
+
+G4int nEvts = 100;
+
+G4double thickness = 0.3; //in mm
+
+G4String physList = "FTFP_BERT";
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+ 
+int main(int argc,char** argv) {
+
+
+  for(int i{0}; i<argc; ++i)
+  {
+       if(G4String(argv[i]) == "--nevts")
+       {
+          ++i;
+          nEvts = G4int(atoi(argv[i]));
+          ++i;
+       }
+       if(G4String(argv[i]) == "--energy")
+       {
+          ++i;
+          energy = G4double(atof(argv[i]));
+          ++i;
+       }
+
+       if(G4String(argv[i]) == "--thickness")
+       {
+          ++i;
+          thickness = G4double(atof(argv[i]));
+          ++i;
+       }
+
+  }
+ 
+
+  //choose the Random engine
+  CLHEP::HepRandom::setTheEngine(new CLHEP::RanecuEngine);
+  
+  //my Verbose output class
+  G4VSteppingVerbose::SetInstance(new SteppingVerbose);
+    
+  //Construct the default run manager
+  G4RunManager * runManager = new G4RunManager;
+
+  //Set Physics List
+  runManager->SetUserInitialization(new PhysicsList);     
+
+  //set mandatory initialization classes
+  DetectorConstruction* det;
+  runManager->SetUserInitialization(det = new DetectorConstruction(thickness));
+  runManager->SetUserAction(new PrimaryGeneratorAction(det, energy, nEvts));
+    
+  //set user action classes
+  RunAction* RunAct;
+  
+  runManager->SetUserAction(RunAct = new RunAction(det, energy, thickness, nEvts)); 
+  runManager->SetUserAction(new SteppingAction(RunAct));
+  runManager->SetUserAction(new StackingAction);
+
+  //get the pointer to the User Interface manager 
+  G4UImanager* UI = G4UImanager::GetUIpointer();  
+
+  
+  // Initialize Run Manager
+
+  UI->ApplyCommand("/run/initialize");
+ 
+
+  // Increase Gamma2MuMu XSec to 1000x
+  
+  UI->ApplyCommand("/testem/phys/SetGammaToMuPairFac  1000");  
+
+  //Start Simulation
+  UI->ApplyCommand("/run/beamOn");
+ 
+  //job termination
+  delete runManager;
+
+  return 0;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
diff --git a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/GNUmakefile b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/GNUmakefile
new file mode 100644
index 0000000..d1454ad
--- /dev/null
+++ b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/GNUmakefile
@@ -0,0 +1,27 @@
+# $Id: GNUmakefile 66241 2012-12-13 18:34:42Z gunter $
+# --------------------------------------------------------------
+# GNUmakefile for examples module.  Gabriele Cosmo, 06/04/98.
+# --------------------------------------------------------------
+
+name := TestEm6
+G4TARGET := $(name)
+G4EXLIB := true
+
+ifndef G4INSTALL
+  G4INSTALL = ../../../..
+endif
+
+.PHONY: all
+all: lib bin
+
+include $(G4INSTALL)/config/architecture.gmk
+
+include $(G4INSTALL)/config/binmake.gmk
+
+histclean:
+	rm -f $(G4WORKDIR)/tmp/$(G4SYSTEM)/$(G4TARGET)/RunAction.o
+	rm -f $(G4WORKDIR)/tmp/$(G4SYSTEM)/$(G4TARGET)/SteppingAction.o
+
+visclean:
+	rm -f g4*.prim g4*.eps g4*.wrl
+	rm -f .DAWN_*
diff --git a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/History b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/History
new file mode 100644
index 0000000..d3e72dd
--- /dev/null
+++ b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/History
@@ -0,0 +1,193 @@
+$Id: History 100285 2016-10-17 08:42:54Z gcosmo $
+-------------------------------------------------------------------
+
+     =========================================================
+     Geant4 - an Object-Oriented Toolkit for Simulation in HEP
+     =========================================================
+
+                    TestEm6 History file
+                    --------------------
+This file should be used by the G4 example coordinator to briefly
+summarize all major modifications introduced in the code and keep
+track of all tags.
+
+     ----------------------------------------------------------
+     * Reverse chronological order (last date on top), please *
+     ----------------------------------------------------------
+
+14-10-16 G.Folger (testem6-V10-02-02)
+- remove direct use of theParticleIterator, use GetParticleTableIterator().
+    fix required by clang39 on Linux and MAC
+
+04-07-16 I. Hrivnacova  (testem6-V10-02-01)
+- Fixes for Doxygen documentation
+
+10-12-15 V.Ivant (testem6-V10-02-00)
+- H.Burkhardt fixed root macro allowing to work both with root5 and 6
+    
+28-10-15 D.Sawkey (testem6-V10-01-00)
+- update physics description in READMEs
+- add more standard EM physics builders
+
+30-07-14 V.Ivant (testem6-V10-00-02)
+- Naruhiro Chikuma have updated PhysicsList, DetectorConstruction,
+    and RunAction; bug fix  
+	 
+03-07-14 mma (testem6-V10-00-01)
+- replace /testem/event/printModulo by /run/printProgress
+	 
+08-06-14 mma (testem6-V10-00-00)
+- suppress EventAction and its messenger
+
+18-09-13 V.Ivant (testem6-V09-06-04)
+- fixed tag format
+
+17-09-13 V.Ivant (testem6-V09-05-04)
+- TestEm6.in - added cross section factor to gamma->mu+mu- process
+     
+05-09-13 mma (testem6-V09-06-03)
+- PhysicsList: restore G4GammaConversionToMuons
+     
+19-06-13 mma (testem6-V09-06-02)
+- SteppingVerbose: use G4Step::GetSecondaryInCurrentStep()
+     
+07-06-13 mma (testem6-V09-06-01)
+- Cosmetic in SteppingAction.
+
+13-02-13 I.Hrivnacova (testem6-V09-06-00) 
+- Applied coding guidelines (virtual keyword, data members initialization)
+
+12-10-12 V.Ivant (testem6-V09-05-03)
+- Migration to the updated analysis tool and inplicit units
+     
+11-10-12 mma (testem6-V09-05-02)
+- coding conventions: virtual
+     
+06-04-12 mma (testem6-V09-05-01)
+- all classes : apply G4 coding conventions
+     
+11-03-12 mma (testem6-V09-05-00)
+- RunAction.hh and .cc : migrate to new g4tools histogramming system
+  Do not need aida anymore, nor G4ANALYSIS_USE 
+       
+08-11-11 mma (testem6-V09-04-00)
+- modify SteppingVerbose for OutOfWorld
+      
+09-11-10 I.Hrivnacova (testem6-V09-03-05)
+- Fixed compilation error on gcc-4.5.1.
+
+09-11-10 M.Asai (testem6-V09-03-04)
+- Fix AIDA file option.
+    
+06-06-10 J.Perl (testem6-V09-03-03)
+- Remove unused variable in EventAction
+
+03-06-10 J.Perl (testem6-V09-03-02)
+- Updated vis usage 
+
+21-05-10 mma (testem6-V09-03-01)
+- TestEm6.cc : introduction of G4UIExecutive
+
+31-03-10 V.Ivant (testem6-V09-03-00)
+- Remove obsolete MSC from comments line
+
+27-11-09 V.Ivant (testem6-V09-02-01)
+- H.Burkhardt add StackingAction allowing remove secondary particles;
+              cleanup PhysicsList for 9.3.
+
+13-05-09 V.Ivant (testem6-V09-02-00)
+- Increased upper limit of energy in the tables to 1000 TeV
+     
+18-09-08 mma (testem6-V09-01-02)
+- RunAction : change default histogram format (root)
+
+12-06-08 mma (testem6-V09-01-01)
+- Remove AIDA from GNUmakefile 
+     
+06-05-08 mma (testem6-V09-01-00)
+- README : update Aida informations
+     
+20-10-06 mma (testem6-V08-01-00) 
+- GNUmakefile : LOADLIBS
+      
+24-05-06 mma (testem6-V08-00-01)
+- register G4StepLimiter in PhysicsList
+     
+16-02-06 mma (testem6-V08-00-00)
+- add command /testem/phys/SetAnnihiToHadronFac
+
+06-12-05 Gabriele Cosmo
+- Trivial changes for support of CLHEP-2.0.X series.
+
+29-11-05 V.Ivant (testem6-V07-01-02)
+- Add GenericIon to the PhysicsList
+
+23-11-05 V.Ivant (testem6-V07-01-01)
+- extend test to mu+mu- and pi+pi- pair creation processes and G4hhIonisation
+  in order to test all processes of the subdirectory
+
+22-11-05 mma (testem6-V07-01-00)
+- update README for OpenScientist
+
+01-06-05 mma (testem6-V07-00-01)
+- RunAction : option "noErrors" for hbook files;
+     
+3rd May 2005  John Allison  (examples-V07-00-03)
+- Replaced vis manager with G4VisExecutive.
+
+02-03-05 mma (testem6-V07-00-00)
+- RunAction : put a protection for the creation of analysis factory;
+
+02 Dec 04: V.Ivant (testem6-V06-02-01)
+- Migration to cmath
+     
+27-09-04 mma (testem6-V06-02-00)
+- define correctly all UI subdirectories.
+- modifs in RunAction for hbook,root,XML (Jaida)
+     
+31-03-04 mma (testem6-V06-01-00)
+- remove direct interface with root
+     
+15-03-04 mma (testem6-V06-00-00)
+- example of histograms with ROOT: USE_ROOT
+
+25-11-03 V.Ivanchenko (testem6-V05-02-02)
+- Fix geometry (G.Cosmo)
+
+13-11-03 John Allison
+- Removed OPACS from Vis Manager.
+
+24-10-03 mma (testem6-V05-02-01)
+- PhysListEmStandard: AddProcess(Bremsstrahlung,-1,3,3) ..etc..
+     
+10-10-03 mma (testem6-V05-02-00)
+ - NOHIST replaced by ANALYSIS_USE
+ - cosmetic in material definitions
+ - SetMaterial() in constructor. all macros updated for /run/initialize
+     
+10-06-03 mma (testem6-V05-01-00)
+ - proper deletion of old geometry in case of update
+ - fixe compilation warning
+ 
+01-04-03 mma (testem6-V05-00-02)
+ - PVPlacement in logical mother even for the world
+ 
+20-02-03 V.Ivant (testem6-V05-00-01)
+ - Migration to cut per region
+
+12-02-03 mma (testem6-V05-00-00)
+ - DetectorConstruction: change volume name
+
+30-01-03 hbu
+ - PhysicsList: implementation of (e+,e-) annihilation to (mu+,mu-)
+ - macros run11.mac and run12.mac
+     
+12-12-02 mma (testem6-V04-01-00)
+ - migration to aida 3.0
+ - UI directory /testem/
+     
+05-06-02 mma (testem6-V04-00-01)
+ - old histograming package clhep/hist replaced by AIDA 2.2/anaphe
+
+23-05-02 mma (testem6-V04-00-00)
+ - creation
diff --git a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/DetectorConstruction.hh b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/DetectorConstruction.hh
new file mode 100644
index 0000000..6343cc7
--- /dev/null
+++ b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/DetectorConstruction.hh
@@ -0,0 +1,101 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+/// \file electromagnetic/TestEm6/include/DetectorConstruction.hh
+/// \brief Definition of the DetectorConstruction class
+//
+// $Id: DetectorConstruction.hh 83428 2014-08-21 15:46:01Z gcosmo $
+//
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+#ifndef DetectorConstruction_h
+#define DetectorConstruction_h 1
+
+#include "Geant4/G4VUserDetectorConstruction.hh"
+#include "Geant4/globals.hh"
+
+class G4LogicalVolume;
+class G4Material;
+class G4UniformMagField;
+class G4UserLimits;
+class DetectorMessenger;
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+class DetectorConstruction : public G4VUserDetectorConstruction
+{
+  public:
+  
+    DetectorConstruction(G4float);
+   ~DetectorConstruction();
+
+  public:
+  
+     virtual G4VPhysicalVolume* Construct();
+     
+     void SetBoxDepth        (G4double);
+     void SetSizeXY       (G4double);       
+     void SetMaterial    (const G4String&);            
+     void SetMagField    (G4double);
+     void SetMaxStepSize (G4double);     
+
+     void UpdateGeometry();
+     
+  public:
+  
+     const
+     G4VPhysicalVolume* GetWorld()      {return fP_Box;};           
+                    
+     G4double           GetXYSize()       {return fBoxXY;};      
+     G4double           GetBoxDepth()       {return fBoxDepth;};      
+     G4Material*        GetMaterial()   {return fMaterial;};
+     
+     void               PrintParameters();
+                       
+  private:
+  
+     G4VPhysicalVolume*    fP_Box;
+     G4LogicalVolume*      fL_Box;
+     
+     G4double              fBoxDepth;
+     G4double              fBoxXY;
+     G4Material*           fMaterial;     
+     G4UniformMagField*    fMagField;
+     G4UserLimits*         fUserLimits;
+     
+     DetectorMessenger* fDetectorMessenger;
+
+  private:
+    
+     void               DefineMaterials();
+     G4VPhysicalVolume* ConstructVolumes();     
+};
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+
+#endif
+
diff --git a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/DetectorMessenger.hh b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/DetectorMessenger.hh
new file mode 100644
index 0000000..9086864
--- /dev/null
+++ b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/DetectorMessenger.hh
@@ -0,0 +1,73 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+/// \file electromagnetic/TestEm6/include/DetectorMessenger.hh
+/// \brief Definition of the DetectorMessenger class
+//
+// $Id: DetectorMessenger.hh 66241 2012-12-13 18:34:42Z gunter $
+//
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+#ifndef DetectorMessenger_h
+#define DetectorMessenger_h 1
+
+#include "Geant4/globals.hh"
+#include "Geant4/G4UImessenger.hh"
+
+class DetectorConstruction;
+class G4UIdirectory;
+class G4UIcmdWithAString;
+class G4UIcmdWithADoubleAndUnit;
+class G4UIcmdWithoutParameter;
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+class DetectorMessenger: public G4UImessenger
+{
+  public:
+  
+    DetectorMessenger(DetectorConstruction* );
+   ~DetectorMessenger();
+    
+    virtual void SetNewValue(G4UIcommand*, G4String);
+    
+  private:
+  
+    DetectorConstruction*      fDetector;
+    
+    G4UIdirectory*             fTestemDir;
+    G4UIdirectory*             fDetDir;    
+    G4UIcmdWithAString*        fMaterCmd;
+    G4UIcmdWithADoubleAndUnit* fSizeCmd;
+    G4UIcmdWithADoubleAndUnit* fMagFieldCmd;
+    G4UIcmdWithADoubleAndUnit* fMaxStepCmd;    
+    G4UIcmdWithoutParameter*   fUpdateCmd;
+};
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+#endif
+
diff --git a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/PhysicsList.hh b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/PhysicsList.hh
new file mode 100644
index 0000000..ff0c0ec
--- /dev/null
+++ b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/PhysicsList.hh
@@ -0,0 +1,88 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+/// \file electromagnetic/TestEm6/include/PhysicsList.hh
+/// \brief Definition of the PhysicsList class
+//
+// $Id: PhysicsList.hh 83428 2014-08-21 15:46:01Z gcosmo $
+//
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+#ifndef PhysicsList_h
+#define PhysicsList_h 1
+
+#include "Geant4/G4VModularPhysicsList.hh"
+#include "Geant4/globals.hh"
+#include "Geant4/G4EmConfigurator.hh"
+
+
+class G4VPhysicsConstructor;
+class StepMax;
+class PhysicsListMessenger;
+class G4GammaConversionToMuons;
+class G4GammaConversion;
+class G4AnnihiToMuPair;
+class G4eeToHadrons;
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+class PhysicsList: public G4VModularPhysicsList
+{
+  public:
+    PhysicsList();
+    virtual ~PhysicsList();
+
+    // Construct particles
+    virtual void ConstructParticle();
+    virtual void ConstructProcess();
+
+    void AddPhysicsList(const G4String& name);
+    void ConstructHighEnergy();
+
+    void AddStepMax();
+
+    // Construct processes and register them
+
+    void SetGammaToMuPairFac(G4double);
+    void SetAnnihiToMuPairFac(G4double);
+    void SetAnnihiToHadronFac(G4double);
+
+  private:
+ 
+    G4VPhysicsConstructor* fEmPhysicsList;
+    G4VPhysicsConstructor* fDecayPhysicsList;
+    G4String fEmName;
+
+    StepMax* fStepMaxProcess;
+
+    PhysicsListMessenger*  fMes;
+
+};
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+#endif
+
diff --git a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/PhysicsListMessenger.hh b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/PhysicsListMessenger.hh
new file mode 100644
index 0000000..8b866cb
--- /dev/null
+++ b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/PhysicsListMessenger.hh
@@ -0,0 +1,72 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+/// \file electromagnetic/TestEm6/include/PhysicsListMessenger.hh
+/// \brief Definition of the PhysicsListMessenger class
+//
+// $Id: PhysicsListMessenger.hh 83428 2014-08-21 15:46:01Z gcosmo $
+//
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+#ifndef PhysicsListMessenger_h
+#define PhysicsListMessenger_h 1
+
+#include "Geant4/globals.hh"
+#include "Geant4/G4UImessenger.hh"
+
+class PhysicsList;
+class G4UIdirectory;
+class G4UIcmdWithADouble;
+class G4UIcmdWithAString;
+
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+class PhysicsListMessenger: public G4UImessenger
+{
+  public:
+  
+    PhysicsListMessenger(PhysicsList*);
+   ~PhysicsListMessenger();
+    
+    virtual void SetNewValue(G4UIcommand*, G4String);
+    
+  private:
+  
+    PhysicsList*        fPhysList;
+    
+    G4UIdirectory*      fPhysDir;    
+    G4UIcmdWithADouble* fGammaToMuPairFacCmd;
+    G4UIcmdWithADouble* fGammaToEPairFacCmd;
+    G4UIcmdWithADouble* fAnnihiToMuPairFacCmd;
+    G4UIcmdWithADouble* fAnnihiToHadronFacCmd;    
+    G4UIcmdWithAString* fListCmd;
+
+};
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+#endif
diff --git a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/PrimaryGeneratorAction.hh b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/PrimaryGeneratorAction.hh
new file mode 100644
index 0000000..3177e91
--- /dev/null
+++ b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/PrimaryGeneratorAction.hh
@@ -0,0 +1,68 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+/// \file electromagnetic/TestEm6/include/PrimaryGeneratorAction.hh
+/// \brief Definition of the PrimaryGeneratorAction class
+//
+// $Id: PrimaryGeneratorAction.hh 66241 2012-12-13 18:34:42Z gunter $
+//
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+#ifndef PrimaryGeneratorAction_h
+#define PrimaryGeneratorAction_h 1
+
+#include "Geant4/G4VUserPrimaryGeneratorAction.hh"
+#include "Geant4/globals.hh"
+
+class G4ParticleGun;
+class G4Event;
+class DetectorConstruction;
+class PrimaryGeneratorMessenger;
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+class PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
+{
+  public:
+    PrimaryGeneratorAction(DetectorConstruction*, G4double, G4int);    
+   ~PrimaryGeneratorAction();
+
+  public:
+    void SetRndmBeam(G4double val)  {fRndmBeam = val;}   
+    virtual void GeneratePrimaries(G4Event*);
+
+  private:
+    G4ParticleGun*             fParticleGun;
+    DetectorConstruction*      fDetector;
+    G4double                   fRndmBeam;       
+    PrimaryGeneratorMessenger* fGunMessenger;     
+};
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+#endif
+
+
diff --git a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/PrimaryGeneratorMessenger.hh b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/PrimaryGeneratorMessenger.hh
new file mode 100644
index 0000000..453752a
--- /dev/null
+++ b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/PrimaryGeneratorMessenger.hh
@@ -0,0 +1,63 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+/// \file electromagnetic/TestEm6/include/PrimaryGeneratorMessenger.hh
+/// \brief Definition of the PrimaryGeneratorMessenger class
+//
+// $Id: PrimaryGeneratorMessenger.hh 66241 2012-12-13 18:34:42Z gunter $
+//
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+#ifndef PrimaryGeneratorMessenger_h
+#define PrimaryGeneratorMessenger_h 1
+
+#include "Geant4/G4UImessenger.hh"
+#include "Geant4/globals.hh"
+
+class PrimaryGeneratorAction;
+class G4UIdirectory;
+class G4UIcmdWithADouble;
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+class PrimaryGeneratorMessenger: public G4UImessenger
+{
+  public:
+    PrimaryGeneratorMessenger(PrimaryGeneratorAction*);
+   ~PrimaryGeneratorMessenger();
+    
+    virtual void SetNewValue(G4UIcommand*, G4String);
+    
+  private:
+    PrimaryGeneratorAction*    fAction;
+    G4UIdirectory*             fGunDir;     
+    G4UIcmdWithADouble*        fRndmCmd;
+};
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+#endif
+
diff --git a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/ProcessesCount.hh b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/ProcessesCount.hh
new file mode 100644
index 0000000..c9c5841
--- /dev/null
+++ b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/ProcessesCount.hh
@@ -0,0 +1,62 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+/// \file electromagnetic/TestEm6/include/ProcessesCount.hh
+/// \brief Definition of the ProcessesCount class
+//
+// $Id: ProcessesCount.hh 66241 2012-12-13 18:34:42Z gunter $
+//
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+#ifndef ProcessesCount_HH
+#define ProcessesCount_HH
+
+#include "Geant4/globals.hh"
+#include <vector>
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+class OneProcessCount
+{
+public:
+    OneProcessCount(G4String name) {fName=name; fCounter=0;};
+   ~OneProcessCount() {};
+   
+public:
+    G4String  GetName()       {return fName;};
+    G4int     GetCounter()    {return fCounter;};        
+    void      Count()         {fCounter++;};
+    
+private:
+    G4String fName;            // process name
+    G4int    fCounter;         // process counter
+};
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+typedef std::vector<OneProcessCount*> ProcessesCount;
+
+#endif
diff --git a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/RunAction.hh b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/RunAction.hh
new file mode 100644
index 0000000..95d3ffc
--- /dev/null
+++ b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/RunAction.hh
@@ -0,0 +1,80 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+/// \file electromagnetic/TestEm6/include/RunAction.hh
+/// \brief Definition of the RunAction class
+//
+// $Id: RunAction.hh 83428 2014-08-21 15:46:01Z gcosmo $
+//
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+#ifndef RunAction_h
+#define RunAction_h 1
+
+#include "Geant4/G4UserRunAction.hh"
+#include "ProcessesCount.hh"
+#include "Geant4/globals.hh"
+#include "Geant4/G4ParticleDefinition.hh"
+#include "DetectorConstruction.hh"
+
+#include "Geant4/g4root.hh"
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+class G4Run;
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+class RunAction : public G4UserRunAction
+{
+  public:
+    RunAction(DetectorConstruction*, G4double, G4double, G4int);
+   ~RunAction();
+
+  public:
+    virtual void BeginOfRunAction(const G4Run*);
+    virtual void   EndOfRunAction(const G4Run*);
+    void     CountProcesses(G4String);
+    
+  private:
+    DetectorConstruction* fDetector;
+    ProcessesCount*       fProcCounter;
+    G4AnalysisManager*    fAnalysis;
+    G4Material*           fMat;
+
+    G4double fMinE;
+    G4double fMaxE;
+    G4int    fnBin;
+
+    G4String fileName;
+
+    G4int fNtColId[3];
+};
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+#endif
+
diff --git a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/StackingAction.hh b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/StackingAction.hh
new file mode 100644
index 0000000..81a3f7a
--- /dev/null
+++ b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/StackingAction.hh
@@ -0,0 +1,55 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+/// \file electromagnetic/TestEm6/include/StackingAction.hh
+/// \brief Definition of the StackingAction class
+//
+// $Id: StackingAction.hh 66241 2012-12-13 18:34:42Z gunter $
+// 
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+#ifndef StackingAction_h
+#define StackingAction_h 1
+
+#include "Geant4/G4UserStackingAction.hh"
+#include "Geant4/globals.hh"
+
+class G4Track;
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+class StackingAction : public G4UserStackingAction
+{
+  public:
+
+    StackingAction();
+   ~StackingAction();
+
+    virtual G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track* );
+    
+};
+
+#endif
diff --git a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/StepMax.hh b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/StepMax.hh
new file mode 100644
index 0000000..d3fe816
--- /dev/null
+++ b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/StepMax.hh
@@ -0,0 +1,80 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+/// \file electromagnetic/TestEm6/include/StepMax.hh
+/// \brief Definition of the StepMax class
+//
+// $Id: StepMax.hh 66241 2012-12-13 18:34:42Z gunter $
+//
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+#ifndef StepMax_h
+#define StepMax_h 1
+
+#include "Geant4/globals.hh"
+#include "Geant4/G4VDiscreteProcess.hh"
+#include "Geant4/G4ParticleDefinition.hh"
+#include "Geant4/G4Step.hh"
+
+class StepMaxMessenger;
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+class StepMax : public G4VDiscreteProcess
+{
+public:
+
+  StepMax(const G4String& processName = "UserMaxStep");
+  ~StepMax();
+
+  void SetMaxStep(G4double);
+
+  inline G4double GetMaxStep() { return fMaxChargedStep; };
+
+  virtual G4bool IsApplicable(const G4ParticleDefinition&);
+
+  virtual G4double 
+  PostStepGetPhysicalInteractionLength(const G4Track& track,
+                                       G4double previousStepSize,
+                                       G4ForceCondition* condition);
+
+  virtual G4VParticleChange* PostStepDoIt(const G4Track&, const G4Step&);
+
+  virtual G4double 
+  GetMeanFreePath(const G4Track&, G4double, G4ForceCondition*);
+
+private:
+
+  G4double fMaxChargedStep;
+  G4double fProposedStep;
+
+  StepMaxMessenger* fMessenger;
+};
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+#endif
+
diff --git a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/StepMaxMessenger.hh b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/StepMaxMessenger.hh
new file mode 100644
index 0000000..4b392de
--- /dev/null
+++ b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/StepMaxMessenger.hh
@@ -0,0 +1,61 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+/// \file electromagnetic/TestEm6/include/StepMaxMessenger.hh
+/// \brief Definition of the StepMaxMessenger class
+//
+// $Id: StepMaxMessenger.hh 67268 2013-02-13 11:38:40Z ihrivnac $
+//
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+#ifndef StepMaxMessenger_h
+#define StepMaxMessenger_h 1
+
+#include "Geant4/globals.hh"
+#include "Geant4/G4UImessenger.hh"
+
+class StepMax;
+class G4UIcmdWithADoubleAndUnit;
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+class StepMaxMessenger: public G4UImessenger
+{
+public:
+
+  StepMaxMessenger(StepMax*);
+  ~StepMaxMessenger();
+    
+  virtual void SetNewValue(G4UIcommand*, G4String);
+    
+private:
+  StepMax* fStepMax;
+  G4UIcmdWithADoubleAndUnit* fStepMaxCmd;
+};
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+#endif
diff --git a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/SteppingAction.hh b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/SteppingAction.hh
new file mode 100644
index 0000000..0f0c8f1
--- /dev/null
+++ b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/SteppingAction.hh
@@ -0,0 +1,60 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+/// \file electromagnetic/TestEm6/include/SteppingAction.hh
+/// \brief Definition of the SteppingAction class
+//
+// $Id: SteppingAction.hh 66241 2012-12-13 18:34:42Z gunter $
+//
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+#ifndef SteppingAction_h
+#define SteppingAction_h 1
+
+#include "Geant4/G4UserSteppingAction.hh"
+#include "Geant4/globals.hh"
+
+class RunAction;
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+class SteppingAction : public G4UserSteppingAction
+{
+public:
+  SteppingAction(RunAction*);
+ ~SteppingAction();
+
+  virtual void UserSteppingAction(const G4Step*);
+    
+private:
+  RunAction* fRunAction;
+  G4double   fMuonMass;
+  G4double   fEMass;
+};
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+#endif
diff --git a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/SteppingVerbose.hh b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/SteppingVerbose.hh
new file mode 100644
index 0000000..07ef0a9
--- /dev/null
+++ b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/SteppingVerbose.hh
@@ -0,0 +1,55 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+/// \file electromagnetic/TestEm6/include/SteppingVerbose.hh
+/// \brief Definition of the SteppingVerbose class
+//
+//
+// $Id: SteppingVerbose.hh 98272 2016-07-04 17:56:04Z gcosmo $
+// 
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+#ifndef SteppingVerbose_h
+#define SteppingVerbose_h 1
+
+#include "Geant4/G4SteppingVerbose.hh"
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+class SteppingVerbose : public G4SteppingVerbose {
+
+public:   
+
+  SteppingVerbose();
+ ~SteppingVerbose();
+ 
+  virtual void TrackingStarted();
+  virtual void StepInfo();
+};
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+#endif
diff --git a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/scripts/G4GammaToDiLeptonConversionTest.py b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/scripts/G4GammaToDiLeptonConversionTest.py
new file mode 100644
index 0000000..617f8fa
--- /dev/null
+++ b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/scripts/G4GammaToDiLeptonConversionTest.py
@@ -0,0 +1,130 @@
+import subprocess
+import argparse
+
+from math import log10
+
+import logging
+
+logging.basicConfig()
+_logger = logging.getLogger("GAMMA2DILEPTONPROD")
+_logger.setLevel("INFO")
+
+parser = argparse.ArgumentParser("DILEPTONPROD")
+
+parser.add_argument("--nevts", default=10000, help="Number of Events")
+parser.add_argument("--energies", default="[1000]", help="Energies List")
+parser.add_argument("--thickness", default="[0.3]", help="List of thicknesses")
+parser.add_argument("--debug", default=False, action="store_true", help="Debug Mode")
+
+args = parser.parse_args()
+
+if args.debug:
+    _logger.setLevel("DEBUG")
+
+def get_list(argument):
+    import re
+    elements = re.findall(r'[\d|\.]+', argument)
+    return elements 
+
+energies = get_list(args.energies)
+thickness = get_list(args.thickness)
+
+try:
+    assert int(args.nevts) > 0
+except AssertionError:
+    _logger.error("Number of Events Must be a Positive Integer")
+    exit(0)
+except TypeError:
+    _logger.error("Invalid Input for Number of Events")
+    exit(0)
+
+
+for energy in energies:
+    for t in thickness:
+        _logger.info("%s\n\nRunning Gamma->l+ l- with options:\n\n\tNEvents   :\t%s\n\tEnergy    :\t%s GeV\n\tThickness :\t%s mm\n", 
+         '='*40, args.nevts, energy, t)
+        _logger.info('='*40)
+        subprocess.check_call("G4GammaToDiLeptonConversionTest.exe --nevts {} --energy {} --thickness {}".format(args.nevts, energy, t), shell=True)
+
+
+_logger.info("Creating Single Combined Plots ROOT File...")
+
+import ROOT
+
+_output = ROOT.TFile.Open("G4GammaToDiLeptonConversionTest.root", "NEW")
+
+_histo_dim_dict = {'DiElectron' : {'Hist' : {'InvMass'    : (100, 0, 100),
+                                             'ThetaPlus'  : (100, 0, 0.02), 
+                                             'ThetaMinus' : (100, 0, 0.02),
+                                             'EFrac' : (100,0,1)},
+                                   'Symbol' : 'e'},
+                   'DiMuon'     : {'Hist' : {'InvMass'    : (150, 250, 550),
+                                             'ThetaPlus'  : (100, 0, 0.07), 
+                                             'ThetaMinus' : (100, 0, 0.07),
+                                             'EFrac' : (100,0,1)},
+                                   'Symbol' : '#mu' } }
+
+for energy in energies:
+    for t in thickness:
+        _logger.debug("Opening file '%s'", "TestEM6_Al_{}mm_{}GeV_{}.root".format(t, energy, args.nevts))
+        _tmp = ROOT.TFile.Open("TestEM6_Al_{}mm_{}GeV_{}.root".format(t, energy, args.nevts))
+  
+        for particle in _histo_dim_dict.keys():
+             _logger.debug("Attempting to retrieve TTree '%s'", particle)
+             _tree = _tmp.Get(particle)
+             assert _tree.GetEntries() > 0, "No Entries Found!"
+        
+             hist_mm = ROOT.TH1F("{}_InvMass_{}GeV_{}mm_Al".format(particle, energy, t),
+                                 "{} Invariant Mass from {}GeV Photons in {}mm of Aluminium".format(particle, energy, t),
+                                 *_histo_dim_dict[particle]['Hist']['InvMass'])
+             hist_mm.GetXaxis().SetTitle("M_{%s}/MeV" % '{s}{s}'.format(s=_histo_dim_dict[particle]['Symbol']))
+             
+
+             hist_tp = ROOT.TH1F("{}_AnglePlus_{}GeV_{}mm_Al".format(particle, energy, t),
+                                 "#gamma-{} Angle for {}GeV Photons in {}mm of Aluminium".format(_histo_dim_dict[particle]['Symbol']+'^{+}', energy, t),
+                                 *_histo_dim_dict[particle]['Hist']['ThetaPlus'])
+             hist_tp.GetXaxis().SetTitle("#theta(p_{%s}, p_{%s})" % ('#gamma', _histo_dim_dict[particle]['Symbol']+'^{+}'))
+
+
+             hist_tm = ROOT.TH1F("{}_AngleMinus_{}GeV_{}mm_Al".format(particle, energy, t),
+                                 "#gamma-{} Angle for {}GeV Photons in {}mm of Aluminium".format(_histo_dim_dict[particle]['Symbol']+'^{+}', energy, t),
+                                 *_histo_dim_dict[particle]['Hist']['ThetaMinus'])
+             hist_tm.GetXaxis().SetTitle("#theta(p_{%s}, p_{%s})" % ('#gamma', _histo_dim_dict[particle]['Symbol']+'^{-}'))
+
+             hist_efp = ROOT.TH1F("{}_EnergyFrac_Plus_{}GeV_{}mm_Al".format(particle, energy, t),
+                                  "Energy Fraction of {} for {}GeV Photons in {}mm of Aluminium".format(_histo_dim_dict[particle]['Symbol']+'^{+}', energy, t),
+                                  *_histo_dim_dict[particle]['Hist']['EFrac'])
+             hist_efp.GetXaxis().SetTitle("E_{%s}/E_{%s}" % (_histo_dim_dict[particle]['Symbol']+'^{+}', "#gamma"))
+             
+             hist_efm = ROOT.TH1F("{}_EnergyFrac_Minus_{}GeV_{}mm_Al".format(particle, energy, t),
+                                  "Energy Fraction of {} for {}GeV Photons in {}mm of Aluminium".format(_histo_dim_dict[particle]['Symbol']+'^{-}', energy, t),
+                                  *_histo_dim_dict[particle]['Hist']['EFrac'])
+             hist_efm.GetXaxis().SetTitle("E_{%s}/E_{%s}" % (_histo_dim_dict[particle]['Symbol']+'^{-}', "#gamma"))
+
+             for event in _tree: # ROOT broke when using Draw(hist >> hist_tmp(i,j,k)) method
+                 hist_mm.Fill(getattr(event, '{}_InvMass'.format(particle)))
+                 hist_tp.Fill(getattr(event, '{}_ThetaPlus'.format(particle)))
+                 hist_tm.Fill(getattr(event, '{}_ThetaMinus'.format(particle)))
+                 hist_efp.Fill(getattr(event, '{}_EnergyFracPlus'.format(particle)))
+                 hist_efm.Fill(getattr(event, '{}_EnergyFracMinus'.format(particle)))
+
+
+             _output.cd()
+ 
+             hist_mm.Write()
+             hist_tp.Write()
+             hist_tm.Write()
+             hist_efp.Write()
+             hist_efm.Write()
+             
+             hist_mm.Delete()
+             hist_tp.Delete()
+             hist_tm.Delete()
+             hist_efp.Delete()
+             hist_efm.Delete()
+          
+        _tmp.Close()
+
+_output.Write()
+_output.Close()
+
diff --git a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/src/DetectorConstruction.cc b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/src/DetectorConstruction.cc
new file mode 100644
index 0000000..c4632d6
--- /dev/null
+++ b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/src/DetectorConstruction.cc
@@ -0,0 +1,222 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+/// \file electromagnetic/TestEm6/src/DetectorConstruction.cc
+/// \brief Implementation of the DetectorConstruction class
+//
+// $Id: DetectorConstruction.cc 83428 2014-08-21 15:46:01Z gcosmo $
+//
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+#include "DetectorConstruction.hh"
+#include "DetectorMessenger.hh"
+#include "Geant4/G4NistManager.hh" 
+#include "Geant4/G4RunManager.hh" 
+
+#include "Geant4/G4Material.hh"
+#include "Geant4/G4Box.hh"
+#include "Geant4/G4LogicalVolume.hh"
+#include "Geant4/G4PVPlacement.hh"
+#include "Geant4/G4UniformMagField.hh"
+#include "Geant4/G4UserLimits.hh"
+
+#include "Geant4/G4GeometryManager.hh"
+#include "Geant4/G4PhysicalVolumeStore.hh"
+#include "Geant4/G4LogicalVolumeStore.hh"
+#include "Geant4/G4SolidStore.hh"
+
+#include "Geant4/G4UnitsTable.hh"
+#include "Geant4/G4SystemOfUnits.hh"
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+DetectorConstruction::DetectorConstruction(G4float thickness)
+:G4VUserDetectorConstruction(),
+ fP_Box(0), fL_Box(0), fBoxXY(10*m), fBoxDepth(thickness*mm), fMaterial(0), fMagField(0),
+ fUserLimits(0), fDetectorMessenger(0)
+{
+  DefineMaterials();
+  SetMaterial("Aluminium");
+  
+  // create UserLimits
+  fUserLimits = new G4UserLimits();
+
+  // create commands for interactive definition of the detector  
+  fDetectorMessenger = new DetectorMessenger(this);
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+DetectorConstruction::~DetectorConstruction()
+{ delete fDetectorMessenger;}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+G4VPhysicalVolume* DetectorConstruction::Construct()
+{
+  return ConstructVolumes();
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+void DetectorConstruction::DefineMaterials()
+{  
+ G4double a, z, density; 
+
+ new G4Material("Aluminium", z= 13., a= 26.98*g/mole, density= 2.700*g/cm3);
+
+ G4cout << *(G4Material::GetMaterialTable()) << G4endl;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+  
+G4VPhysicalVolume* DetectorConstruction::ConstructVolumes()
+{
+  G4GeometryManager::GetInstance()->OpenGeometry();
+  G4PhysicalVolumeStore::GetInstance()->Clean();
+  G4LogicalVolumeStore::GetInstance()->Clean();
+  G4SolidStore::GetInstance()->Clean();
+  
+  G4Box*
+  sBox = new G4Box("Container",                                //its name
+                   fBoxXY/2.,fBoxXY*2.,fBoxDepth/2.);        //its dimensions
+                                                                 
+  fL_Box = new G4LogicalVolume(sBox,                        //its shape
+                             fMaterial,                        //its material
+                             fMaterial->GetName());        //its name
+                             
+  fL_Box->SetUserLimits(fUserLimits);                             
+                                   
+  fP_Box = new G4PVPlacement(0,                                //no rotation
+                             G4ThreeVector(),                //at (0,0,0)
+                           fL_Box,                        //its logical volume
+                           fMaterial->GetName(),        //its name
+                           0,                           //its mother  volume
+                           false,                        //no boolean operation
+                           0);                                //copy number
+                           
+  PrintParameters();
+    
+  //
+  //always return the root volume
+  //
+  return fP_Box;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+void DetectorConstruction::PrintParameters()
+{
+  G4cout << "\n The Box is " << G4BestUnit(fBoxDepth,"Length")
+         << " of " << fMaterial->GetName() << G4endl;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+void DetectorConstruction::SetMaterial(const G4String& name)
+{
+  G4cout << "###SetMaterial"  << G4endl;
+
+  // get the pointer to the existing material
+  G4Material* mat = G4Material::GetMaterial(name, false);
+  
+  // create the material by its name
+  if(!mat) { mat = G4NistManager::Instance()->FindOrBuildMaterial(name); }
+  
+  if (mat && mat != fMaterial) {
+    G4cout << "### New target material: " << mat->GetName() << G4endl;
+    fMaterial = mat;
+    if(fL_Box) {
+      fL_Box->SetMaterial(mat);
+      G4RunManager::GetRunManager()->PhysicsHasBeenModified();
+    } 
+  }
+}
+  
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+void DetectorConstruction::SetSizeXY(G4double value)
+{
+  fBoxXY = value;
+}  
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+void DetectorConstruction::SetBoxDepth(G4double value)
+{
+  fBoxDepth = value;
+}  
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+#include "Geant4/G4FieldManager.hh"
+#include "Geant4/G4TransportationManager.hh"
+
+void DetectorConstruction::SetMagField(G4double fieldValue)
+{
+  //apply a global uniform magnetic field along Z axis
+  G4FieldManager* fieldMgr 
+   = G4TransportationManager::GetTransportationManager()->GetFieldManager();
+    
+  if (fMagField) delete fMagField;        //delete the existing magn field
+  
+  if (fieldValue!=0.)                        // create a new one if non nul
+    {
+      fMagField = new G4UniformMagField(G4ThreeVector(0.,0.,fieldValue)); 
+      fieldMgr->SetDetectorField(fMagField);
+      fieldMgr->CreateChordFinder(fMagField);
+    }
+   else
+    {
+      fMagField = 0;
+      fieldMgr->SetDetectorField(fMagField);
+    }
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+void DetectorConstruction::SetMaxStepSize(G4double val)
+{
+  // set the maximum allowed step size
+  //
+  if (val <= DBL_MIN)
+    { G4cout << "\n --->warning from SetMaxStepSize: maxStep " 
+             << val  << " out of range. Command refused" << G4endl;
+      return;
+    }       
+  fUserLimits->SetMaxAllowedStep(val);
+}  
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+#include "Geant4/G4RunManager.hh" 
+ 
+void DetectorConstruction::UpdateGeometry()
+{
+  G4RunManager::GetRunManager()->DefineWorldVolume(ConstructVolumes());
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
diff --git a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/src/DetectorMessenger.cc b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/src/DetectorMessenger.cc
new file mode 100644
index 0000000..82121a0
--- /dev/null
+++ b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/src/DetectorMessenger.cc
@@ -0,0 +1,126 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+/// \file electromagnetic/TestEm6/src/DetectorMessenger.cc
+/// \brief Implementation of the DetectorMessenger class
+//
+// $Id: DetectorMessenger.cc 67268 2013-02-13 11:38:40Z ihrivnac $
+//
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+#include "DetectorMessenger.hh"
+
+#include "DetectorConstruction.hh"
+#include "Geant4/G4UIdirectory.hh"
+#include "Geant4/G4UIcmdWithAString.hh"
+#include "Geant4/G4UIcmdWithADoubleAndUnit.hh"
+#include "Geant4/G4UIcmdWithoutParameter.hh"
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+DetectorMessenger::DetectorMessenger(DetectorConstruction * Det)
+:G4UImessenger(),fDetector(Det),
+ fTestemDir(0),
+ fDetDir(0),    
+ fMaterCmd(0),
+ fSizeCmd(0),
+ fMagFieldCmd(0),
+ fMaxStepCmd(0),    
+ fUpdateCmd(0)
+{ 
+  fTestemDir = new G4UIdirectory("/testem/");
+  fTestemDir->SetGuidance(" detector control.");
+  
+  fDetDir = new G4UIdirectory("/testem/det/");
+  fDetDir->SetGuidance("detector construction commands");
+       
+  fMaterCmd = new G4UIcmdWithAString("/testem/det/setMat",this);
+  fMaterCmd->SetGuidance("Select material of the box.");
+  fMaterCmd->SetParameterName("choice",false);
+  fMaterCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
+  
+  fSizeCmd = new G4UIcmdWithADoubleAndUnit("/testem/det/setSize",this);
+  fSizeCmd->SetGuidance("Set size of the box");
+  fSizeCmd->SetParameterName("Size",false);
+  fSizeCmd->SetRange("Size>0.");
+  fSizeCmd->SetUnitCategory("Length");
+  fSizeCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
+      
+  fMagFieldCmd = new G4UIcmdWithADoubleAndUnit("/testem/det/setField",this);  
+  fMagFieldCmd->SetGuidance("Define magnetic field.");
+  fMagFieldCmd->SetGuidance("Magnetic field will be in Z direction.");
+  fMagFieldCmd->SetParameterName("Bz",false);
+  fMagFieldCmd->SetUnitCategory("Magnetic flux density");
+  fMagFieldCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
+    
+  fUpdateCmd = new G4UIcmdWithoutParameter("/testem/det/update",this);
+  fUpdateCmd->SetGuidance("Update calorimeter geometry.");
+  fUpdateCmd->SetGuidance("This command MUST be applied before \"beamOn\" ");
+  fUpdateCmd->SetGuidance("if you changed geometrical value(s).");
+  fUpdateCmd->AvailableForStates(G4State_Idle);
+      
+  fMaxStepCmd = new G4UIcmdWithADoubleAndUnit("/testem/tracking/stepMax",this);
+  fMaxStepCmd->SetGuidance("Set max allowed step size");
+  fMaxStepCmd->SetParameterName("Size",false);
+  fMaxStepCmd->SetRange("Size>0.");
+  fMaxStepCmd->SetUnitCategory("Length");
+  fMaxStepCmd->AvailableForStates(G4State_Idle);   
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+DetectorMessenger::~DetectorMessenger()
+{
+  delete fMaterCmd;
+  delete fSizeCmd; 
+  delete fMagFieldCmd;
+  delete fUpdateCmd;
+  delete fMaxStepCmd;
+  delete fDetDir;  
+  delete fTestemDir;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+void DetectorMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
+{ 
+  if( command == fMaterCmd )
+   { fDetector->SetMaterial(newValue);}
+   
+  if( command == fSizeCmd )
+   { fDetector->SetBoxDepth(fSizeCmd->GetNewDoubleValue(newValue));}
+   
+  if( command == fMagFieldCmd )
+   { fDetector->SetMagField(fMagFieldCmd->GetNewDoubleValue(newValue));}
+     
+  if( command == fUpdateCmd )
+   { fDetector->UpdateGeometry(); }
+   
+  if( command == fMaxStepCmd )
+   { fDetector->SetMaxStepSize(fMaxStepCmd->GetNewDoubleValue(newValue));}   
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
diff --git a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/src/PhysicsList.cc b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/src/PhysicsList.cc
new file mode 100644
index 0000000..22aa8c6
--- /dev/null
+++ b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/src/PhysicsList.cc
@@ -0,0 +1,286 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+/// \file electromagnetic/TestEm6/src/PhysicsList.cc
+/// \brief Implementation of the PhysicsList class
+//
+// $Id: PhysicsList.cc 100285 2016-10-17 08:42:54Z gcosmo $
+//
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+#include "PhysicsList.hh"
+#include "PhysicsListMessenger.hh"
+
+#include "Geant4/G4EmStandardPhysics.hh"
+#include "Geant4/G4EmStandardPhysics_option1.hh"
+#include "Geant4/G4EmStandardPhysics_option2.hh"
+#include "Geant4/G4EmStandardPhysics_option3.hh"
+#include "Geant4/G4EmStandardPhysics_option4.hh"
+#include "Geant4/G4EmStandardPhysicsGS.hh"
+#include "Geant4/G4EmStandardPhysicsWVI.hh"
+#include "Geant4/G4EmStandardPhysicsSS.hh"
+#include "Geant4/G4EmLivermorePhysics.hh"
+#include "Geant4/G4EmPenelopePhysics.hh"
+#include "Geant4/G4EmLowEPPhysics.hh"
+
+#include "Geant4/G4DecayPhysics.hh"
+
+#include "Geant4/G4ParticleDefinition.hh"
+#include "Geant4/G4ProcessManager.hh"
+#include "Geant4/G4ParticleTable.hh"
+#include "Geant4/G4ProcessTable.hh"
+
+#include "Geant4/G4Gamma.hh"
+#include "Geant4/G4Electron.hh"
+#include "Geant4/G4Positron.hh"
+
+#include "Geant4/G4GammaConversionToMuons.hh"
+#include "Geant4/G4GammaConversion.hh"
+
+#include "Geant4/G4AnnihiToMuPair.hh"
+#include "Geant4/G4eeToHadrons.hh"
+
+#include "Geant4/G4SystemOfUnits.hh"
+#include "Geant4/G4UnitsTable.hh"
+#include "Geant4/G4LossTableManager.hh"
+
+#include "StepMax.hh"
+
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+PhysicsList::PhysicsList() : G4VModularPhysicsList(),
+ fEmPhysicsList(0),
+ fDecayPhysicsList(0),
+ fStepMaxProcess(0),
+ fMes(0)
+{
+  G4LossTableManager::Instance()->SetVerbose(1);
+
+  defaultCutValue = 1.*km;
+  fMes = new PhysicsListMessenger(this);
+
+  fStepMaxProcess = new StepMax();
+
+  fDecayPhysicsList = new G4DecayPhysics();
+
+  SetVerboseLevel(2);
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+PhysicsList::~PhysicsList()
+{
+  delete fMes;
+  delete fDecayPhysicsList;
+  delete fEmPhysicsList;
+  delete fStepMaxProcess;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+void PhysicsList::ConstructParticle()
+{
+  fDecayPhysicsList->ConstructParticle();
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+void PhysicsList::ConstructProcess()
+{
+  AddTransportation();
+
+  if(fEmPhysicsList) fEmPhysicsList->ConstructProcess();
+  fDecayPhysicsList->ConstructProcess();
+
+  AddStepMax();
+
+  ConstructHighEnergy();
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+void PhysicsList::ConstructHighEnergy()
+{
+  const G4ParticleDefinition* particle = G4Gamma::Gamma();
+  G4ProcessManager* pmanager = particle->GetProcessManager();
+
+  pmanager->AddDiscreteProcess(new G4GammaConversionToMuons);
+  pmanager->AddDiscreteProcess(new G4GammaConversion);
+
+  particle = G4Positron::Positron();
+  pmanager = particle->GetProcessManager();
+
+  pmanager->AddDiscreteProcess(new G4AnnihiToMuPair);
+  pmanager->AddDiscreteProcess(new G4eeToHadrons);
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+void PhysicsList::SetGammaToMuPairFac(G4double fac)
+{
+  G4ProcessTable* theProcessTable = G4ProcessTable::GetProcessTable();
+  G4GammaConversionToMuons* gammaToMuPairProcess = (G4GammaConversionToMuons*)
+                       theProcessTable->FindProcess("GammaToMuPair","gamma");
+  if(gammaToMuPairProcess) gammaToMuPairProcess->SetCrossSecFactor(fac);
+  else G4cout 
+   << "Warning. No process GammaToMuPair found, SetGammaToMuPairFac was ignored"
+   << G4endl;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+void PhysicsList::SetAnnihiToMuPairFac(G4double fac)
+{
+  G4ProcessTable* theProcessTable = G4ProcessTable::GetProcessTable();
+  G4AnnihiToMuPair* annihiToMuPairProcess = (G4AnnihiToMuPair*)
+                         theProcessTable->FindProcess("AnnihiToMuPair","e+");
+  if(annihiToMuPairProcess) annihiToMuPairProcess->SetCrossSecFactor(fac);
+  else G4cout 
+   << "Warning. No process AnnihiToMuPair found, SetAnnihiToMuPairFac ignored"
+   << G4endl;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+void PhysicsList::SetAnnihiToHadronFac(G4double fac)
+{
+  G4ProcessTable* theProcessTable = G4ProcessTable::GetProcessTable();
+  G4eeToHadrons* eehadProcess = (G4eeToHadrons*)
+                              theProcessTable->FindProcess("ee2hadr","e+");
+  if(eehadProcess) eehadProcess->SetCrossSecFactor(fac);
+  else G4cout
+    << "Warning. No process ee2hadr found, SetAnnihiToHadronFac was ignored"
+    << G4endl;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+void PhysicsList::AddPhysicsList(const G4String& name)
+{
+  if (verboseLevel>1) {
+    G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
+  }
+
+  if (name == fEmName) {
+    return;
+
+  } else if (name == "emstandard_opt0") {
+
+    fEmName = name;
+    delete fEmPhysicsList;
+    fEmPhysicsList = new G4EmStandardPhysics();
+
+  } else if (name == "emstandard_opt1") {
+
+    fEmName = name;
+    delete fEmPhysicsList;
+    fEmPhysicsList = new G4EmStandardPhysics_option1();
+
+  } else if (name == "emstandard_opt2") {
+
+    fEmName = name;
+    delete fEmPhysicsList;
+    fEmPhysicsList = new G4EmStandardPhysics_option2();
+
+  } else if (name == "emstandard_opt3") {
+
+    fEmName = name;
+    delete fEmPhysicsList;
+    fEmPhysicsList = new G4EmStandardPhysics_option3();
+
+  } else if (name == "emstandard_opt4") {
+
+    fEmName = name;
+    delete fEmPhysicsList;
+    fEmPhysicsList = new G4EmStandardPhysics_option4();
+
+  } else if (name == "emlivermore") {
+
+    fEmName = name;
+    delete fEmPhysicsList;
+    fEmPhysicsList = new G4EmLivermorePhysics();
+
+  } else if (name == "empenelope") {
+
+    fEmName = name;
+    delete fEmPhysicsList;
+    fEmPhysicsList = new G4EmPenelopePhysics();
+
+  } else if (name == "emlowenergy") {
+
+    fEmName = name;
+    delete fEmPhysicsList;
+    fEmPhysicsList = new G4EmLowEPPhysics();
+
+  } else if (name == "emstandardGS") {
+
+    fEmName = name;
+    delete fEmPhysicsList;
+    fEmPhysicsList = new G4EmStandardPhysicsGS();
+
+  } else if (name == "emstandardSS") {
+
+    fEmName = name;
+    delete fEmPhysicsList;
+    fEmPhysicsList = new G4EmStandardPhysicsSS();
+  
+  } else if (name == "emstandardWVI") {
+
+    fEmName = name;
+    delete fEmPhysicsList;
+    fEmPhysicsList = new G4EmStandardPhysicsWVI();
+  
+  } else {
+
+    G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
+           << " is not defined"
+           << G4endl;
+  }
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+void PhysicsList::AddStepMax()
+{
+  //Step limitation seen as a process
+
+  auto particleIterator=GetParticleIterator();
+  particleIterator->reset();
+  while ((*particleIterator)())
+  {
+    G4ParticleDefinition* particle = particleIterator->value();
+    G4ProcessManager* pmanager = particle->GetProcessManager();
+
+    if (fStepMaxProcess->IsApplicable(*particle))
+    {
+      pmanager ->AddDiscreteProcess(fStepMaxProcess);
+    }
+  }
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
diff --git a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/src/PhysicsListMessenger.cc b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/src/PhysicsListMessenger.cc
new file mode 100644
index 0000000..427d493
--- /dev/null
+++ b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/src/PhysicsListMessenger.cc
@@ -0,0 +1,126 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+/// \file electromagnetic/TestEm6/src/PhysicsListMessenger.cc
+/// \brief Implementation of the PhysicsListMessenger class
+//
+// $Id: PhysicsListMessenger.cc 83428 2014-08-21 15:46:01Z gcosmo $
+//
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+#include "PhysicsListMessenger.hh"
+
+#include "PhysicsList.hh"
+#include "Geant4/G4UIdirectory.hh"
+#include "Geant4/G4UIcmdWithADouble.hh"
+#include "Geant4/G4UIcmdWithAString.hh"
+
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+PhysicsListMessenger::PhysicsListMessenger(PhysicsList* physL)
+:G4UImessenger(),fPhysList(physL),
+ fPhysDir(0),    
+ fGammaToMuPairFacCmd(0),
+ fAnnihiToMuPairFacCmd(0),
+ fAnnihiToHadronFacCmd(0),
+ fListCmd(0)
+{
+  fPhysDir = new G4UIdirectory("/testem/phys/");
+  fPhysDir->SetGuidance("physics list commands");
+ 
+  fGammaToMuPairFacCmd=new G4UIcmdWithADouble
+                                      ("/testem/phys/SetGammaToMuPairFac",this);
+  fGammaToMuPairFacCmd->SetGuidance(
+         "Set factor to artificially increase the GammaToMuPair cross section");
+  fGammaToMuPairFacCmd->SetParameterName("GammaToMuPairFac",false);
+  fGammaToMuPairFacCmd->SetRange("GammaToMuPairFac>0.0");
+  fGammaToMuPairFacCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
+
+  fGammaToEPairFacCmd=new G4UIcmdWithADouble
+                                      ("/testem/phys/SetGammaToEPairFac",this);
+  fGammaToEPairFacCmd->SetGuidance(
+         "Set factor to artificially increase the GammaToEPair cross section");
+  fGammaToEPairFacCmd->SetParameterName("GammaToEPairFac",false);
+  fGammaToEPairFacCmd->SetRange("GammaToMuPairFac>0.0");
+  fGammaToEPairFacCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
+
+  fAnnihiToMuPairFacCmd=new G4UIcmdWithADouble
+                                     ("/testem/phys/SetAnnihiToMuPairFac",this);
+  fAnnihiToMuPairFacCmd->SetGuidance(
+        "Set factor to artificially increase the AnnihiToMuPair cross section");
+  fAnnihiToMuPairFacCmd->SetParameterName("AnnihiToMuPairFac",false);
+  fAnnihiToMuPairFacCmd->SetRange("AnnihiToMuPairFac>0.0");
+  fAnnihiToMuPairFacCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
+  
+  fAnnihiToHadronFacCmd=
+    new G4UIcmdWithADouble("/testem/phys/SetAnnihiToHadronFac",this);
+  fAnnihiToHadronFacCmd->SetGuidance(
+       "Set factor to artificially increase the AnnihiToHadrons cross section");
+  fAnnihiToHadronFacCmd->SetParameterName("AnnihiToHadFac",false);
+  fAnnihiToHadronFacCmd->SetRange("AnnihiToHadFac>0.0");
+  fAnnihiToHadronFacCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
+
+  fListCmd = new G4UIcmdWithAString("/testem/phys/addPhysics",this);
+  fListCmd->SetGuidance("Add modula physics list.");
+  fListCmd->SetParameterName("PList",false);
+  fListCmd->AvailableForStates(G4State_PreInit);
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+PhysicsListMessenger::~PhysicsListMessenger()
+{
+  delete fGammaToMuPairFacCmd;
+  delete fAnnihiToMuPairFacCmd;
+  delete fAnnihiToHadronFacCmd;  
+  delete fPhysDir;  
+  delete fListCmd;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+void PhysicsListMessenger::SetNewValue(G4UIcommand* command,
+                                          G4String newValue)
+{ 
+  if(command == fGammaToMuPairFacCmd)
+   { fPhysList->SetGammaToMuPairFac(
+          fGammaToMuPairFacCmd->GetNewDoubleValue(newValue));}   
+
+  if( command == fAnnihiToMuPairFacCmd)
+   { fPhysList->SetAnnihiToMuPairFac(
+                          fAnnihiToMuPairFacCmd->GetNewDoubleValue(newValue));}
+                          
+  if( command == fAnnihiToHadronFacCmd)
+   { fPhysList->SetAnnihiToHadronFac(
+                          fAnnihiToHadronFacCmd->GetNewDoubleValue(newValue));}
+
+  if( command == fListCmd )
+   { fPhysList->AddPhysicsList(newValue); }
+
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
diff --git a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/src/PrimaryGeneratorAction.cc b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/src/PrimaryGeneratorAction.cc
new file mode 100644
index 0000000..47af5be
--- /dev/null
+++ b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/src/PrimaryGeneratorAction.cc
@@ -0,0 +1,97 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+/// \file electromagnetic/TestEm6/src/PrimaryGeneratorAction.cc
+/// \brief Implementation of the PrimaryGeneratorAction class
+//
+// $Id: PrimaryGeneratorAction.cc 67268 2013-02-13 11:38:40Z ihrivnac $
+//
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+#include "PrimaryGeneratorAction.hh"
+
+#include "DetectorConstruction.hh"
+#include "PrimaryGeneratorMessenger.hh"
+
+#include "Geant4/G4Event.hh"
+#include "Geant4/G4ParticleGun.hh"
+#include "Geant4/G4ParticleTable.hh"
+#include "Geant4/G4ParticleDefinition.hh"
+#include "Geant4/G4SystemOfUnits.hh"
+#include "Geant4/Randomize.hh"
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+PrimaryGeneratorAction::PrimaryGeneratorAction(
+                                               DetectorConstruction* DC, G4double energy, G4int nevts)
+:G4VUserPrimaryGeneratorAction(),                                              
+ fParticleGun(0),
+ fDetector(DC),
+ fRndmBeam(0),       
+ fGunMessenger(0)
+{
+  fParticleGun  = new G4ParticleGun(nevts);
+  G4ParticleDefinition* particle
+           = G4ParticleTable::GetParticleTable()->FindParticle("gamma");
+  fParticleGun->SetParticleDefinition(particle);
+  fParticleGun->SetParticleEnergy(energy*GeV);  
+  fParticleGun->SetParticleMomentumDirection(G4ThreeVector(1.,0.,0.));
+    
+  //create a messenger for this class
+  fGunMessenger = new PrimaryGeneratorMessenger(this);  
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+PrimaryGeneratorAction::~PrimaryGeneratorAction()
+{
+  delete fParticleGun;
+  delete fGunMessenger;  
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+void PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
+{
+  //this function is called at the begining of event
+  //
+  G4double x0 = -0.5*(fDetector->GetBoxDepth());
+  G4double y0 = 0.*cm, z0 = 0.*cm;
+    
+  //randomize the beam, if requested.
+  //
+  if (fRndmBeam > 0.) 
+    {
+      G4double rbeam = 0.5*(fDetector->GetBoxDepth())*fRndmBeam;
+      y0 = (2*G4UniformRand()-1.)*rbeam;
+      z0 = (2*G4UniformRand()-1.)*rbeam;
+    }
+  fParticleGun->SetParticlePosition(G4ThreeVector(x0,y0,z0));  
+  fParticleGun->GeneratePrimaryVertex(anEvent); 
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
diff --git a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/src/PrimaryGeneratorMessenger.cc b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/src/PrimaryGeneratorMessenger.cc
new file mode 100644
index 0000000..1ef2718
--- /dev/null
+++ b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/src/PrimaryGeneratorMessenger.cc
@@ -0,0 +1,77 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+/// \file electromagnetic/TestEm6/src/PrimaryGeneratorMessenger.cc
+/// \brief Implementation of the PrimaryGeneratorMessenger class
+//
+// $Id: PrimaryGeneratorMessenger.cc 67268 2013-02-13 11:38:40Z ihrivnac $
+//
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+#include "PrimaryGeneratorMessenger.hh"
+
+#include "PrimaryGeneratorAction.hh"
+#include "Geant4/G4UIdirectory.hh"
+#include "Geant4/G4UIcmdWithADouble.hh"
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+PrimaryGeneratorMessenger::PrimaryGeneratorMessenger(
+                                             PrimaryGeneratorAction* Gun)
+:G4UImessenger(),fAction(Gun),
+ fGunDir(0),     
+ fRndmCmd(0)
+{ 
+  fGunDir = new G4UIdirectory("/testem/gun/");
+  fGunDir->SetGuidance("gun control");
+
+  fRndmCmd = new G4UIcmdWithADouble("/testem/gun/rndm",this);
+  fRndmCmd->SetGuidance("random lateral extension on the beam");
+  fRndmCmd->SetGuidance("in fraction of 0.5*sizeYZ");
+  fRndmCmd->SetParameterName("rBeam",false);
+  fRndmCmd->SetRange("rBeam>=0.&&rBeam<=1.");
+  fRndmCmd->AvailableForStates(G4State_Idle);  
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+PrimaryGeneratorMessenger::~PrimaryGeneratorMessenger()
+{
+  delete fRndmCmd;
+  delete fGunDir;  
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+void PrimaryGeneratorMessenger::SetNewValue(G4UIcommand* command,
+                                               G4String newValue)
+{ 
+  if (command == fRndmCmd)
+   {fAction->SetRndmBeam(fRndmCmd->GetNewDoubleValue(newValue));}   
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
diff --git a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/src/RunAction.cc b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/src/RunAction.cc
new file mode 100644
index 0000000..532af81
--- /dev/null
+++ b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/src/RunAction.cc
@@ -0,0 +1,165 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+/// \file electromagnetic/TestEm6/src/RunAction.cc
+/// \brief Implementation of the RunAction class
+//
+// $Id: RunAction.cc 83428 2014-08-21 15:46:01Z gcosmo $
+// 
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+#include "Geant4/G4SystemOfUnits.hh"  
+#include "Geant4/G4PhysicalConstants.hh"  
+#include "Geant4/G4EmCalculator.hh" 
+#include "Geant4/G4ParticleTable.hh" 
+#include "Geant4/G4ParticleDefinition.hh" 
+#include "Geant4/G4Positron.hh" 
+#include "Geant4/G4AnnihiToMuPair.hh"  
+#include "Geant4/G4eeToHadrons.hh"  
+#include "Geant4/G4eeToHadronsModel.hh"  
+#include "Geant4/G4eBremsstrahlung.hh"  
+
+#include "RunAction.hh"
+#include "Geant4/G4Run.hh"
+#include "Geant4/G4RunManager.hh"
+#include "Geant4/G4MuonMinus.hh"
+
+#include "Geant4/Randomize.hh"
+
+#include <sstream>
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+RunAction::RunAction(DetectorConstruction* det, G4double e, G4double t, G4int n)
+ : G4UserRunAction(),fDetector(det),fProcCounter(0),fAnalysis(0),fMat(0)
+{
+  std::stringstream file_name;
+  file_name << "TestEM6_Al_";
+  file_name << t;
+  file_name << "mm_";
+  file_name << e;
+  file_name << "GeV_";
+  file_name << n;
+  file_name << ".root";
+
+  fileName = file_name.str();
+
+  fMinE = 40*GeV;
+  fMaxE = 10000*GeV;
+  fnBin = 10000;
+  fNtColId[0] = fNtColId[1] = fNtColId[2] = 0;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+RunAction::~RunAction()
+{}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+void RunAction::BeginOfRunAction(const G4Run* aRun)
+{  
+  G4cout << "### Run " << aRun->GetRunID() << " start." << G4endl;
+
+  //get material
+  //
+  fMat = fDetector->GetMaterial();
+  G4cout << "###RunAction::BeginOfRunAction  Material:" 
+         << fMat->GetName() << G4endl;
+ 
+  fProcCounter = new ProcessesCount;
+
+  fAnalysis = G4AnalysisManager::Instance();
+  
+  // Open an output file
+  //
+  fAnalysis->OpenFile(fileName);    
+  fAnalysis->SetVerboseLevel(2);
+
+  //===========================================================
+  
+  fAnalysis->CreateNtuple("DiMuon", "DiMuon Production");
+  fAnalysis->CreateNtupleDColumn("DiMuon_EnergyFracPlus");
+  fAnalysis->CreateNtupleDColumn("DiMuon_EnergyFracMinus");
+  fAnalysis->CreateNtupleDColumn("DiMuon_ThetaPlus");
+  fAnalysis->CreateNtupleDColumn("DiMuon_ThetaMinus");
+  fAnalysis->CreateNtupleDColumn("DiMuon_InvMass");
+  fAnalysis->FinishNtuple();
+ 
+  fAnalysis->CreateNtuple("DiElectron", "DiElectron Production");
+  fAnalysis->CreateNtupleDColumn("DiElectron_EnergyFracPlus");
+  fAnalysis->CreateNtupleDColumn("DiElectron_EnergyFracMinus");
+  fAnalysis->CreateNtupleDColumn("DiElectron_ThetaPlus");
+  fAnalysis->CreateNtupleDColumn("DiElectron_ThetaMinus");
+  fAnalysis->CreateNtupleDColumn("DiElectron_InvMass");
+  fAnalysis->FinishNtuple();
+
+  G4cout << "\n----> NTuple file is opened in " << fileName << G4endl;   
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+void RunAction::CountProcesses(G4String procName)
+{
+  //does the process  already encounted ?
+  //
+  size_t nbProc = fProcCounter->size();
+  size_t i = 0;
+  while ((i<nbProc)&&((*fProcCounter)[i]->GetName()!=procName)) i++;
+  if (i == nbProc) fProcCounter->push_back( new OneProcessCount(procName));
+  
+  (*fProcCounter)[i]->Count();
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+void RunAction::EndOfRunAction(const G4Run*)
+{
+  // show Rndm status : not needed
+  //
+  //CLHEP::HepRandom::showEngineStatus();
+
+  //total number of process calls
+  //
+  G4double countTot = 0.;
+  G4cout << "\n Number of process calls --->";
+  for (size_t i=0; i< fProcCounter->size();i++) {
+        G4String procName = (*fProcCounter)[i]->GetName();
+        if (procName != "Transportation") {
+          G4int count    = (*fProcCounter)[i]->GetCounter(); 
+          G4cout << "\t" << procName << " : " << count;
+          countTot += count;
+        }
+  }
+ 
+  fAnalysis->Write();
+  fAnalysis->CloseFile();
+
+  delete fAnalysis;
+  G4cout << G4endl;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
diff --git a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/src/StackingAction.cc b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/src/StackingAction.cc
new file mode 100644
index 0000000..f960b07
--- /dev/null
+++ b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/src/StackingAction.cc
@@ -0,0 +1,62 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+/// \file electromagnetic/TestEm6/src/StackingAction.cc
+/// \brief Implementation of the StackingAction class
+//
+// $Id: StackingAction.cc 67268 2013-02-13 11:38:40Z ihrivnac $
+// 
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+#include "StackingAction.hh"
+#include "Geant4/G4Track.hh"
+#include "Geant4/G4TrackStatus.hh"
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+StackingAction::StackingAction()
+ : G4UserStackingAction()
+{}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+StackingAction::~StackingAction()
+{}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+G4ClassificationOfNewTrack 
+StackingAction::ClassifyNewTrack(const G4Track* aTrack)
+{
+  G4ClassificationOfNewTrack     classification = fUrgent;
+  
+  // kill all secondaries
+  if(aTrack->GetParentID() != 0) classification = fKill;
+  
+  return classification;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
diff --git a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/src/StepMax.cc b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/src/StepMax.cc
new file mode 100644
index 0000000..2790d7d
--- /dev/null
+++ b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/src/StepMax.cc
@@ -0,0 +1,98 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+/// \file electromagnetic/TestEm6/src/StepMax.cc
+/// \brief Implementation of the StepMax class
+//
+// $Id: StepMax.cc 67268 2013-02-13 11:38:40Z ihrivnac $
+//
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+#include "StepMax.hh"
+#include "StepMaxMessenger.hh"
+#include "Geant4/G4VPhysicalVolume.hh"
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+StepMax::StepMax(const G4String& processName)
+  : G4VDiscreteProcess(processName),
+    fMaxChargedStep(DBL_MAX),
+    fMessenger(0)
+{
+  fMessenger = new StepMaxMessenger(this);
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+StepMax::~StepMax() 
+{ 
+  delete fMessenger; 
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+G4bool StepMax::IsApplicable(const G4ParticleDefinition& particle)
+{
+  return (particle.GetPDGCharge() != 0.);
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+void StepMax::SetMaxStep(G4double step) 
+{
+  fMaxChargedStep = step;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+G4double 
+StepMax::PostStepGetPhysicalInteractionLength(const G4Track&,
+                                              G4double,
+                                              G4ForceCondition* condition)
+{
+  // condition is set to "Not Forced"
+  *condition = NotForced;
+  fProposedStep = fMaxChargedStep;
+
+  return fProposedStep;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+G4VParticleChange* StepMax::PostStepDoIt(const G4Track& aTrack, const G4Step&)
+{
+  aParticleChange.Initialize(aTrack);
+  return &aParticleChange;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+G4double StepMax::GetMeanFreePath(const G4Track&, G4double, G4ForceCondition*)
+{
+  return 0.;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
diff --git a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/src/StepMaxMessenger.cc b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/src/StepMaxMessenger.cc
new file mode 100644
index 0000000..d99fcda
--- /dev/null
+++ b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/src/StepMaxMessenger.cc
@@ -0,0 +1,68 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+/// \file electromagnetic/TestEm6/src/StepMaxMessenger.cc
+/// \brief Implementation of the StepMaxMessenger class
+//
+// $Id: StepMaxMessenger.cc 67268 2013-02-13 11:38:40Z ihrivnac $
+//
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+#include "StepMaxMessenger.hh"
+
+#include "StepMax.hh"
+#include "Geant4/G4UIcmdWithADoubleAndUnit.hh"
+#include "Geant4/globals.hh"
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+StepMaxMessenger::StepMaxMessenger(StepMax* stepM)
+  :G4UImessenger(),fStepMax(stepM),fStepMaxCmd(0)
+{ 
+  fStepMaxCmd = new G4UIcmdWithADoubleAndUnit("/testem/stepmax",this);
+  fStepMaxCmd->SetGuidance("Set max allowed step length");
+  fStepMaxCmd->SetParameterName("mxStep",false);
+  fStepMaxCmd->SetRange("mxStep>0.");
+  fStepMaxCmd->SetUnitCategory("Length");
+  fStepMaxCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+StepMaxMessenger::~StepMaxMessenger()
+{
+  delete fStepMaxCmd;
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+void StepMaxMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
+{ 
+  if (command == fStepMaxCmd)
+    { fStepMax->SetMaxStep(fStepMaxCmd->GetNewDoubleValue(newValue));}
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
diff --git a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/src/SteppingAction.cc b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/src/SteppingAction.cc
new file mode 100644
index 0000000..df2417a
--- /dev/null
+++ b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/src/SteppingAction.cc
@@ -0,0 +1,185 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+/// \file electromagnetic/TestEm6/src/SteppingAction.cc
+/// \brief Implementation of the SteppingAction class
+//
+// $Id: SteppingAction.cc 83428 2014-08-21 15:46:01Z gcosmo $
+//
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+#include "SteppingAction.hh"
+#include "RunAction.hh"
+#include "Geant4/G4SteppingManager.hh"
+#include "Geant4/G4VProcess.hh"
+#include "Geant4/G4ParticleTypes.hh"
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+SteppingAction::SteppingAction(RunAction* RuAct)
+:G4UserSteppingAction(),fRunAction(RuAct)
+{ 
+ fMuonMass = G4MuonPlus::MuonPlus()->GetPDGMass();
+ fEMass = G4Positron::Positron()->GetPDGMass();
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+SteppingAction::~SteppingAction()
+{ }
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+void SteppingAction::UserSteppingAction(const G4Step* aStep)
+{
+ const G4VProcess* process = aStep->GetPostStepPoint()->GetProcessDefinedStep();
+ if (process == 0) return;  
+ G4String processName = process->GetProcessName();
+ fRunAction->CountProcesses(processName); //count processes
+  
+ if (processName != "GammaToMuPair" && processName != "conv") return;
+ 
+ G4StepPoint* PrePoint = aStep->GetPreStepPoint();  
+ G4double      EGamma  = PrePoint->GetTotalEnergy();
+ G4ThreeVector PGamma  = PrePoint->GetMomentum();
+    
+ G4double      Eplus(0), Eminus(0), ETot(0);
+ G4ThreeVector Pplus   , Pminus,    PTot;
+ const G4TrackVector* secondary = fpSteppingManager->GetSecondary();
+ if(processName == "GammaToMuPair")
+ {
+     for (size_t lp=0; lp<(*secondary).size(); lp++) {
+       
+       if ((*secondary)[lp]->GetDefinition()==G4MuonPlus::MuonPlusDefinition()) {
+         Eplus  = (*secondary)[lp]->GetTotalEnergy();
+         Pplus  = (*secondary)[lp]->GetMomentum();
+       } else {
+         Eminus = (*secondary)[lp]->GetTotalEnergy();
+         Pminus = (*secondary)[lp]->GetMomentum();                 
+       }
+
+       ETot += (*secondary)[lp]->GetTotalEnergy();
+       PTot += (*secondary)[lp]->GetMomentum();
+       
+     }
+                   
+     G4double xPlus = Eplus/EGamma, xMinus = Eminus/EGamma;
+     G4double thetaPlus = PGamma.angle(Pplus), thetaMinus = PGamma.angle(Pminus);
+     G4double GammaPlus = Eplus/fMuonMass;
+     G4double GammaMinus= Eminus/fMuonMass;
+     
+     G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
+
+     if(0.0 == thetaPlus || 0.0 == thetaMinus) {
+       G4cout << "SteppingAction for GammaToMuPair: "
+              << "thetaPlus= " << thetaPlus << " thetaMinus= " << thetaMinus
+              << " gamPlus= " << GammaPlus << " gamMinus= " <<  GammaMinus
+              << "  " << thetaPlus *GammaPlus - thetaMinus*GammaMinus << G4endl;
+       return;
+     }
+     analysisManager->FillNtupleDColumn(0, 0, xPlus);
+     analysisManager->FillNtupleDColumn(0, 1, xMinus);
+     analysisManager->FillNtupleDColumn(0, 2, thetaPlus);
+     analysisManager->FillNtupleDColumn(0, 3, thetaMinus);
+     analysisManager->FillNtupleDColumn(0, 4, sqrt(pow(ETot,2)-pow(PTot.getR(),2)));
+     analysisManager->AddNtupleRow(0);
+
+     /*analysisManager->FillH1(1,1./(1.+std::pow(thetaPlus*GammaPlus,2)));
+     analysisManager->FillH1(2,std::log10(thetaPlus*GammaPlus));
+
+     analysisManager->FillH1(3,std::log10(thetaMinus*GammaMinus));
+     analysisManager->FillH1(4,std::log10(std::fabs(thetaPlus *GammaPlus
+                                                  -thetaMinus*GammaMinus)));
+     
+     analysisManager->FillH1(5,xPlus);
+     analysisManager->FillH1(6,xMinus);
+
+     analysisManager->FillH1(18, sqrt(pow(ETot,2)-pow(PTot.getR(),2)));
+     analysisManager->FillH1(19, thetaPlus);
+     analysisManager->FillH1(20, thetaMinus);*/
+ }
+ else if(processName == "conv")
+ {
+     for (size_t lp=0; lp<(*secondary).size(); lp++) {
+       
+       if ((*secondary)[lp]->GetDefinition()==G4Positron::PositronDefinition()) {
+         Eplus  = (*secondary)[lp]->GetTotalEnergy();
+         Pplus  = (*secondary)[lp]->GetMomentum();
+       } else {
+         Eminus = (*secondary)[lp]->GetTotalEnergy();
+         Pminus = (*secondary)[lp]->GetMomentum();                 
+       }
+
+       ETot += (*secondary)[lp]->GetTotalEnergy();
+       PTot += (*secondary)[lp]->GetMomentum();
+       
+     }
+                   
+     G4double xPlus = Eplus/EGamma, xMinus = Eminus/EGamma;
+     G4double thetaPlus = PGamma.angle(Pplus), thetaMinus = PGamma.angle(Pminus);
+     G4double GammaPlus = Eplus/fEMass;
+     G4double GammaMinus= Eminus/fEMass;
+     
+     G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
+
+     if(0.0 == thetaPlus || 0.0 == thetaMinus) {
+       G4cout << "SteppingAction for GammaToEPair: "
+              << "thetaPlus= " << thetaPlus << " thetaMinus= " << thetaMinus
+              << " gamPlus= " << GammaPlus << " gamMinus= " <<  GammaMinus
+              << "  " << thetaPlus *GammaPlus - thetaMinus*GammaMinus << G4endl;
+       return;
+     }
+     analysisManager->FillNtupleDColumn(1, 0, xPlus);
+     analysisManager->FillNtupleDColumn(1, 1, xMinus);
+     analysisManager->FillNtupleDColumn(1, 2, thetaPlus);
+     analysisManager->FillNtupleDColumn(1, 3, thetaMinus);
+     analysisManager->FillNtupleDColumn(1, 4, sqrt(pow(ETot,2)-pow(PTot.getR(),2)));
+     analysisManager->AddNtupleRow(1);
+
+     /*analysisManager->FillH1(21,1./(1.+std::pow(thetaPlus*GammaPlus,2)));
+     analysisManager->FillH1(22,std::log10(thetaPlus*GammaPlus));
+
+     analysisManager->FillH1(23,std::log10(thetaMinus*GammaMinus));
+     analysisManager->FillH1(24,std::log10(std::fabs(thetaPlus *GammaPlus
+                                                  -thetaMinus*GammaMinus)));
+     
+     analysisManager->FillH1(25,xPlus);
+     analysisManager->FillH1(26,xMinus);
+
+     analysisManager->FillH1(27, sqrt(pow(ETot,2)-pow(PTot.getR(),2)));
+     analysisManager->FillH1(28, thetaPlus);
+     analysisManager->FillH1(29, thetaMinus);*/
+ }
+ else
+ {
+      G4cout << "Unrecognised Process!" << G4endl; //Should not get to here!
+
+ }
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+
diff --git a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/src/SteppingVerbose.cc b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/src/SteppingVerbose.cc
new file mode 100644
index 0000000..6a5103c
--- /dev/null
+++ b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/src/SteppingVerbose.cc
@@ -0,0 +1,158 @@
+//
+// ********************************************************************
+// * License and Disclaimer                                           *
+// *                                                                  *
+// * The  Geant4 software  is  copyright of the Copyright Holders  of *
+// * the Geant4 Collaboration.  It is provided  under  the terms  and *
+// * conditions of the Geant4 Software License,  included in the file *
+// * LICENSE and available at  http://cern.ch/geant4/license .  These *
+// * include a list of copyright holders.                             *
+// *                                                                  *
+// * Neither the authors of this software system, nor their employing *
+// * institutes,nor the agencies providing financial support for this *
+// * work  make  any representation or  warranty, express or implied, *
+// * regarding  this  software system or assume any liability for its *
+// * use.  Please see the license in the file  LICENSE  and URL above *
+// * for the full disclaimer and the limitation of liability.         *
+// *                                                                  *
+// * This  code  implementation is the result of  the  scientific and *
+// * technical work of the GEANT4 collaboration.                      *
+// * By using,  copying,  modifying or  distributing the software (or *
+// * any work based  on the software)  you  agree  to acknowledge its *
+// * use  in  resulting  scientific  publications,  and indicate your *
+// * acceptance of all terms of the Geant4 Software license.          *
+// ********************************************************************
+//
+/// \file electromagnetic/TestEm6/src/SteppingVerbose.cc
+/// \brief Implementation of the SteppingVerbose class
+//
+//
+// $Id: SteppingVerbose.cc 98272 2016-07-04 17:56:04Z gcosmo $
+// 
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+#include "SteppingVerbose.hh"
+
+#include "Geant4/G4SteppingManager.hh"
+#include "Geant4/G4ParticleTypes.hh"
+#include "Geant4/G4UnitsTable.hh"
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+SteppingVerbose::SteppingVerbose()
+ : G4SteppingVerbose()
+{ }
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+SteppingVerbose::~SteppingVerbose()
+{} 
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+void SteppingVerbose::TrackingStarted()
+{  
+  CopyState();
+  
+  G4int prec = G4cout.precision(3);
+  
+  //Step zero
+  //  
+  if( verboseLevel > 0 ){
+    G4cout << std::setw( 5) << "Step#"      << " "
+           << std::setw( 6) << "X"          << "    "
+           << std::setw( 6) << "Y"          << "    "  
+           << std::setw( 6) << "Z"          << "    "
+           << std::setw( 9) << "KineE"      << " "
+           << std::setw( 9) << "dEStep"     << " "  
+           << std::setw(10) << "StepLeng"  
+           << std::setw(10) << "TrakLeng"
+           << std::setw(10) << "Volume"     << "  "
+           << std::setw(10) << "Process"    << G4endl;             
+
+    G4cout << std::setw(5) << fTrack->GetCurrentStepNumber() << " "
+        << std::setw(6) << G4BestUnit(fTrack->GetPosition().x(),"Length")
+        << std::setw(6) << G4BestUnit(fTrack->GetPosition().y(),"Length")
+        << std::setw(6) << G4BestUnit(fTrack->GetPosition().z(),"Length")
+        << std::setw(6) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy")
+        << std::setw(6) << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy")
+        << std::setw(6) << G4BestUnit(fStep->GetStepLength(),"Length")
+        << std::setw(6) << G4BestUnit(fTrack->GetTrackLength(),"Length")
+        << std::setw(10) << fTrack->GetVolume()->GetName()
+        << "   initStep" << G4endl;        
+  }
+  G4cout.precision(prec);
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
+
+void SteppingVerbose::StepInfo()
+{  
+  CopyState();
+    
+  G4int prec = G4cout.precision(3);
+
+  if( verboseLevel >= 1 ){
+    if( verboseLevel >= 4 ) VerboseTrack();
+    if( verboseLevel >= 3 ){
+      G4cout << G4endl;    
+      G4cout << std::setw( 5) << "#Step#"     << " "
+             << std::setw( 6) << "X"          << "    "
+             << std::setw( 6) << "Y"          << "    "  
+             << std::setw( 6) << "Z"          << "    "
+             << std::setw( 9) << "KineE"      << " "
+             << std::setw( 9) << "dEStep"     << " "  
+             << std::setw(10) << "StepLeng"     
+             << std::setw(10) << "TrakLeng" 
+             << std::setw(10) << "Volume"    << "  "
+             << std::setw(10) << "Process"   << G4endl;                  
+    }
+
+    G4cout << std::setw( 5) << fTrack->GetCurrentStepNumber() << " "
+        << std::setw(6) << G4BestUnit(fTrack->GetPosition().x(),"Length")
+        << std::setw(6) << G4BestUnit(fTrack->GetPosition().y(),"Length")
+        << std::setw(6) << G4BestUnit(fTrack->GetPosition().z(),"Length")
+        << std::setw(6) << G4BestUnit(fTrack->GetKineticEnergy(),"Energy")
+        << std::setw(6) << G4BestUnit(fStep->GetTotalEnergyDeposit(),"Energy")
+        << std::setw(6) << G4BestUnit(fStep->GetStepLength(),"Length")
+        << std::setw(6) << G4BestUnit(fTrack->GetTrackLength(),"Length")
+        << std::setw(10) << fTrack->GetVolume()->GetName();
+
+    const G4VProcess* process 
+                      = fStep->GetPostStepPoint()->GetProcessDefinedStep();
+    G4String procName = " UserLimit";
+    if (process) procName = process->GetProcessName();
+    if (fStepStatus == fWorldBoundary) procName = "OutOfWorld";
+    G4cout << "   " << std::setw(10) << procName;
+    G4cout << G4endl;
+
+    if (verboseLevel == 2) {
+      const std::vector<const G4Track*>* secondary 
+                                    = fStep->GetSecondaryInCurrentStep();
+      size_t nbtrk = (*secondary).size();
+      if (nbtrk) {
+        G4cout << "\n    :----- List of secondaries ----------------" << G4endl;
+        G4cout.precision(4);
+        for (size_t lp=0; lp<(*secondary).size(); lp++) {
+          G4cout << "   "
+                 << std::setw(13)                 
+                 << (*secondary)[lp]->GetDefinition()->GetParticleName()
+                 << ":  energy ="
+                 << std::setw(6)
+                 << G4BestUnit((*secondary)[lp]->GetKineticEnergy(),"Energy")
+                 << "  time ="
+                 << std::setw(6)
+                 << G4BestUnit((*secondary)[lp]->GetGlobalTime(),"Time");
+          G4cout << G4endl;
+        }
+              
+        G4cout << "    :------------------------------------------\n" << G4endl;
+      }
+    }
+    
+  }
+  G4cout.precision(prec);
+}
+
+//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
-- 
GitLab