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 // G4ProcessAttribute
0027 //
0028 // Class description:
0029 //
0030 // This class is used exclusively by G4ProcessManager for booking.
0031 
0032 // Author: H.Kurashige, 2 December 1997
0033 // --------------------------------------------------------------------
0034 #ifndef G4ProcessAttribute_hh
0035 #define G4ProcessAttribute_hh 1
0036 
0037 #include "globals.hh"
0038 #include "G4ios.hh"
0039 
0040 #include "G4ProcessManager.hh"
0041 
0042 class G4VProcess;
0043 
0044 class G4ProcessAttribute
0045 {
0046   friend class G4ProcessManager;
0047 
0048   public:
0049 
0050     G4ProcessAttribute();
0051     G4ProcessAttribute(const G4VProcess* aProcess);
0052     G4ProcessAttribute(const G4ProcessAttribute& right);
0053       // Constructors
0054 
0055     ~G4ProcessAttribute();
0056       // Destructor
0057 
0058     G4ProcessAttribute& operator=(const G4ProcessAttribute& right);
0059       // Assignment operator
0060 
0061     inline G4bool operator==(const G4ProcessAttribute &right) const;
0062     inline G4bool operator!=(const G4ProcessAttribute &right) const;
0063       // Equality operators
0064 
0065   protected:
0066 
0067     G4VProcess* pProcess = nullptr;
0068       // Pointer to G4VProcess
0069 
0070     G4bool isActive = true;
0071       // Flag for activation/inactivation
0072 
0073     G4int idxProcessList = -1;
0074       // Index to a ProcessVector for theProcessList
0075 
0076     G4int idxProcVector[G4ProcessManager::SizeOfProcVectorArray];
0077       // Index to ProcessVectors for Doit() and GetPhysicalInteractionLength()
0078       // methods. A value of -1 means "not applicable"
0079 
0080     G4int ordProcVector[G4ProcessManager::SizeOfProcVectorArray];
0081       // Ordering parameter 
0082 };
0083 
0084 // ------------------------
0085 // Inline methods
0086 // ------------------------
0087 
0088 inline 
0089 G4bool G4ProcessAttribute::operator==(const G4ProcessAttribute& right) const
0090 {
0091   return this->pProcess == right.pProcess;
0092 }
0093 
0094 inline 
0095 G4bool G4ProcessAttribute::operator!=(const G4ProcessAttribute& right) const
0096 {
0097   return this->pProcess != right.pProcess;
0098 }
0099 
0100 #endif