Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:58:58

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 // G4ProductionCuts
0027 //
0028 // Class description:
0029 //
0030 // A G4ProductionCuts object must be created and initialized with the cut
0031 // value desired for a given geometrical region.
0032 // Production cyts are applicable for gamma, proton, e- and e+.
0033 
0034 // Author: H.Kurashige, 17 September 2002 - First implementation
0035 // --------------------------------------------------------------------
0036 #ifndef G4ProductionCuts_hh
0037 #define G4ProductionCuts_hh 1
0038 
0039 #include <vector>
0040 
0041 #include "globals.hh"
0042 #include "G4ios.hh"
0043 #include "G4ParticleDefinition.hh"
0044 
0045 enum G4ProductionCutsIndex
0046 {
0047   idxG4GammaCut = 0,
0048   idxG4ElectronCut,
0049   idxG4PositronCut,
0050   idxG4ProtonCut,  // for proton
0051 
0052   NumberOfG4CutIndex
0053 };
0054 
0055 class G4ProductionCuts  
0056 {
0057   public:
0058 
0059     G4ProductionCuts();
0060       // Constructor 
0061 
0062     G4ProductionCuts(const G4ProductionCuts& right);
0063       // Copy constructor 
0064 
0065     virtual ~G4ProductionCuts();
0066       // Destructor 
0067 
0068     G4ProductionCuts& operator=(const G4ProductionCuts& right);
0069       // Assignment operator
0070 
0071     G4bool operator==(const G4ProductionCuts& right) const;
0072     G4bool operator!=(const G4ProductionCuts& right) const;
0073       // Equality operators
0074 
0075     void SetProductionCut(G4double cut, G4int index);
0076     void SetProductionCut(G4double cut, G4ParticleDefinition* ptcl);
0077     void SetProductionCut(G4double cut, const G4String& pName);
0078       // Set the production cut in range for a specific particle from
0079       // and index, G4ParticleDefinition* or particle name. If the
0080       // particle is not a photon, e-, e+ or proton, the function has
0081       // no effect.
0082     void SetProductionCut(G4double cut);
0083       // Set the production cut in range for photons, e-, e+ and protons.
0084 
0085     G4double GetProductionCut(G4int index) const;
0086       // Get the production cut in range with an index to particle type
0087 
0088     G4double GetProductionCut(const G4String& name) const;
0089       // Get the production cut in range with a name of particle type
0090   
0091     void SetProductionCuts(std::vector<G4double>&);
0092       // Set the vector of production cuts in range for all particles
0093 
0094     const std::vector<G4double>& GetProductionCuts() const;
0095       // Get the vector of production cuts in range for all particles
0096 
0097     G4bool IsModified() const;
0098       // Return true if any cut value has been modified 
0099       // after last calculation of Physics Table          
0100 
0101     void PhysicsTableUpdated();
0102       // Inform end of calculation of Physics Table to production cut 
0103  
0104     static G4int GetIndex(const G4String& name);
0105     static G4int GetIndex(const G4ParticleDefinition* ptcl);
0106 
0107   protected:
0108 
0109     std::vector<G4double> fRangeCuts;
0110     G4bool isModified = true;
0111 };
0112 
0113 #endif