Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:58: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 #ifndef G4HadProjectile_hh
0027 #define G4HadProjectile_hh
0028 
0029 #include "globals.hh"
0030 #include "G4Material.hh"
0031 #include "G4ParticleDefinition.hh"
0032 #include "G4LorentzVector.hh"
0033 #include "G4ThreeVector.hh"
0034 #include "G4LorentzRotation.hh"
0035 
0036 class G4Track;
0037 class G4DynamicParticle;
0038 
0039 class G4HadProjectile
0040 {
0041 public:
0042   G4HadProjectile();
0043   G4HadProjectile(const G4Track &aT);
0044   G4HadProjectile(const G4DynamicParticle &aT);
0045   ~G4HadProjectile();
0046 
0047   void Initialise(const G4Track &aT);
0048 
0049   inline const G4Material * GetMaterial() const;
0050   inline const G4ParticleDefinition * GetDefinition() const;
0051   inline const G4LorentzVector & Get4Momentum() const;
0052   inline const G4ThreeVector & GetMomentumDirection() const;
0053   inline G4LorentzRotation & GetTrafoToLab();
0054   inline G4double GetKineticEnergy() const;
0055   inline G4double GetTotalEnergy() const;
0056   inline G4double GetTotalMomentum() const;
0057   inline G4double GetGlobalTime() const;
0058   inline G4double GetBoundEnergy() const;
0059   inline void SetGlobalTime(G4double t);
0060   inline void SetBoundEnergy(G4double e);
0061     
0062 private:
0063 
0064   void InitialiseLocal(const G4DynamicParticle*);
0065   
0066   // hide assignment operator as private 
0067   G4HadProjectile& operator=(const G4HadProjectile &right);
0068   G4HadProjectile(const G4HadProjectile& );
0069 
0070   const G4Material * theMat;
0071   const G4ParticleDefinition * theDef;
0072   G4LorentzVector theMom;
0073   G4LorentzRotation toLabFrame;
0074   G4ThreeVector theDirection;
0075   G4double theMass;
0076   G4double theKinEnergy;
0077   G4double theTime;
0078   G4double theBoundEnergy;
0079 };
0080 
0081 const G4Material * G4HadProjectile::GetMaterial() const 
0082 {
0083   return theMat;
0084 }
0085 
0086 const G4ParticleDefinition * G4HadProjectile::GetDefinition() const 
0087 {
0088   return theDef;
0089 }
0090 
0091 inline const G4LorentzVector& G4HadProjectile::Get4Momentum() const 
0092 {
0093   return theMom;
0094 }
0095 
0096 inline G4LorentzRotation& G4HadProjectile::GetTrafoToLab() 
0097 {
0098   return toLabFrame;
0099 }
0100 
0101 inline const G4ThreeVector& G4HadProjectile::GetMomentumDirection() const
0102 {
0103   return theDirection;
0104 }
0105 
0106 G4double G4HadProjectile::GetTotalEnergy() const
0107 {
0108   return theMom.e();
0109 }
0110 
0111 G4double G4HadProjectile::GetTotalMomentum() const
0112 {
0113   return theMom.pz();
0114 }
0115 
0116 G4double G4HadProjectile::GetKineticEnergy() const 
0117 {
0118   return theKinEnergy;
0119 }
0120 
0121 inline G4double G4HadProjectile::GetGlobalTime() const 
0122 {
0123   return theTime;
0124 }
0125 
0126 inline G4double G4HadProjectile::GetBoundEnergy() const
0127 {
0128   return theBoundEnergy; 
0129 }
0130 
0131 inline void G4HadProjectile::SetGlobalTime(G4double t) 
0132 { 
0133   theTime = t; 
0134 }
0135 
0136 inline void G4HadProjectile::SetBoundEnergy(G4double e) 
0137 { 
0138   theBoundEnergy = e; 
0139 }
0140 
0141 #endif