Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-03-29 07:50:59

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 //
0027 /// \file biasing/ReverseMC01/src/RMC01ActionInitilaization.cc
0028 /// \brief Definition of the RMC01ActionInitialization class
0029 //
0030 //
0031 //////////////////////////////////////////////////////////////
0032 //  Class Name: RMC01ActionInitilaization
0033 //        Author: L. Desorgher
0034 //        Organisation: Radiation Physics Institute, Lausanne University Hospital
0035 //        Customer: ESA/ESTEC
0036 //////////////////////////////////////////////////////////////
0037 //  ChangeHistory:
0038 //        14-10-2025 creation by L. Desorgher
0039 //
0040 //-------------------------------------------------------------
0041 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0042 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0043 
0044 #include "RMC01ActionInitialization.hh"
0045 #include "RMC01ActionInitialization.hh"
0046 #include "RMC01PrimaryGeneratorAction.hh"
0047 #include "RMC01EventAction.hh"
0048 #include "RMC01RunAction.hh"
0049 
0050 #include "RMC01AnalysisManager.hh"
0051 
0052 //Adjoint Simulation
0053 #include "G4AdjointSimManager.hh"
0054 
0055 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0056 
0057 RMC01ActionInitialization::RMC01ActionInitialization()
0058 {
0059 }
0060 
0061 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0062 
0063 RMC01ActionInitialization::~RMC01ActionInitialization()
0064 {
0065 }
0066 
0067 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0068 
0069 void RMC01ActionInitialization::BuildForMaster() const
0070 {
0071 //  RMC01AnalysisManager::GetInstance();
0072 
0073   RMC01RunAction* theRunAction = new RMC01RunAction();
0074   SetUserAction(theRunAction);
0075   //Adjoint Simulation
0076   G4AdjointSimManager* theAdjointSimManager = G4AdjointSimManager::GetInstance();
0077   theAdjointSimManager->SetAdjointRunAction(theRunAction);
0078 }
0079 
0080 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0081 
0082 void RMC01ActionInitialization::Build() const
0083 {
0084   SetUserAction(new RMC01PrimaryGeneratorAction());
0085 
0086   RMC01RunAction* theRunAction = new RMC01RunAction();
0087   SetUserAction(theRunAction);
0088   //SetUserAction(new RMC01RunAction);
0089 
0090   //G4UserEventAction *myUserEventAction = new RMC01EventAction();
0091   RMC01EventAction*  theEventAction = new RMC01EventAction();
0092   SetUserAction(theEventAction);
0093 
0094   //Adjoint Simulation
0095   G4AdjointSimManager *theAdjointSimManager = G4AdjointSimManager::GetInstance();
0096   theAdjointSimManager->SetAdjointRunAction(theRunAction);
0097   theAdjointSimManager->SetAdjointEventAction(theEventAction);
0098 }