Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-23 09:22:43

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 runAndEvent/RE02/include/RE02RunAction.hh
0027 /// \brief Definition of the RE02RunAction class
0028 //
0029 //
0030 //
0031 //
0032 //
0033 
0034 #ifndef RE02RunAction_h
0035 #define RE02RunAction_h 1
0036 
0037 #include "G4UserRunAction.hh"
0038 #include "globals.hh"
0039 
0040 #include <vector>
0041 
0042 class G4Run;
0043 
0044 //=======================================================================
0045 // RE02RunAction
0046 //
0047 //  Generate Run object and Dumping Run summary.
0048 //
0049 //  T.Aso Created. 2007.Nov.
0050 //
0051 //=======================================================================
0052 //
0053 /// User run action class
0054 ///
0055 /// - G4Run* GenerateRun()
0056 ///     instanciates a run of RE02Run with a sensitive detector name
0057 ///
0058 /// - void BeginOfRunAction(const G4Run*)
0059 ///     shows the run number
0060 ///
0061 /// - void EndOfRunAction(const G4Run*)
0062 ///     shows accumulated information of primitive scorers and
0063 ///     outputs total energy deposit into "totED.txt" file
0064 ///
0065 /// - G4int CopyNo(G4int ix, G4int iy, G4int iz)
0066 ///     returns a copy number of the segment number of the water phantom
0067 ///     indicated by three dimentional indexes
0068 //
0069 class RE02RunAction : public G4UserRunAction
0070 {
0071   public:
0072     // constructor and destructor
0073     RE02RunAction();
0074     virtual ~RE02RunAction();
0075 
0076   public:
0077     // virtual method from G4UserRunAction.
0078     virtual G4Run* GenerateRun();
0079     virtual void BeginOfRunAction(const G4Run*);
0080     virtual void EndOfRunAction(const G4Run*);
0081 
0082   public:
0083     // Utility method for converting segment number of
0084     // water phantom to copyNo of HitsMap.
0085     G4int CopyNo(G4int ix, G4int iy, G4int iz) { return (iy * (fNx * fNz) + ix * fNz + iz); }
0086 
0087   private:
0088     // Data member
0089     // - vector of MultiFunctionalDetecor names.
0090     std::vector<G4String> fSDName;
0091 
0092     // for conversion of sengment number to copyNo.
0093     G4int fNx, fNy, fNz;
0094 };
0095 
0096 //
0097 
0098 #endif