Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-01 07:51:22

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 /// \file Par02ActionInitialization.hh
0027 /// \brief Definition of the Par02ActionInitialization class
0028 
0029 #ifndef PAR02_ACTION_INITIALIZATION_H
0030 #define PAR02_ACTION_INITIALIZATION_H
0031 
0032 #include "G4VUserActionInitialization.hh"
0033 #include "globals.hh"
0034 
0035 /// Actions initialization.
0036 ///
0037 /// Initialization of all user defined actions as well as mandatory
0038 /// particle generator.
0039 /// Based on G4 examples/extended/parametrisations/Par01/include/
0040 ///                Par01ActionInitialization.hh .
0041 /// @author Anna Zaborowska
0042 
0043 class Par02ActionInitialization : public G4VUserActionInitialization
0044 {
0045   public:
0046     /// A default constructor: sets the output file name fFileName
0047     /// (passed to Par02RunAction) to DefaultOutput.root as well as
0048     /// flag fSmear (passed to Par02EventAction) to true indicating
0049     /// that smearing will be performed.
0050     Par02ActionInitialization();
0051 
0052     /// A constructor: sets the flag fSmear (passed to Par02EventAction)
0053     ///                to true indicating that smearing will be performed.
0054     /// @param aOutName The output file name passed to Par02RunAction.
0055     Par02ActionInitialization(const G4String aOutName);
0056 
0057     /// A constructor.
0058     /// @param aOutName The output file name passed to Par02RunAction.
0059     /// @param aSmear The flag indicating if smearing should be done,
0060     ///               passed to Par02EventAction.
0061     Par02ActionInitialization(const G4String aOutName, const G4String aSmear);
0062 
0063     virtual ~Par02ActionInitialization();
0064 
0065     virtual void BuildForMaster() const;
0066 
0067     /// A method where all the user actions are created.
0068     /// One of them, Par02PrimaryGeneratorAction is a mandatory class.
0069     virtual void Build() const;
0070 
0071   private:
0072     /// An output file name. Passed in Build() to the Par02RunAction.
0073     G4String fFileName;
0074 
0075     /// A flag indicating if smearing should be performed.
0076     /// Passed in Build() to the Par02EventAction.
0077     G4bool fSmear;
0078 };
0079 
0080 #endif