G4Fancy3DNucleus.hh

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 #ifndef G4Fancy3DNucleus_h
00027 #define G4Fancy3DNucleus_h 1
00028 
00029 // ------------------------------------------------------------
00030 //      GEANT 4 class header file
00031 //
00032 //      ---------------- G4Fancy3DNucleus ----------------
00033 //             by Gunter Folger, May 1998.
00034 //       class for a 3D nucleus, arranging nucleons in space and momentum.
00035 // ------------------------------------------------------------
00036 // 20110805  M. Kelsey -- Remove C-style array (pointer) of G4Nucleons,
00037 //              make vector a container of objects.  Move testSums,
00038 //              places, momentum and fermiM to class data members for
00039 //              reuse.  Remove args from ReduceSum(), use data members.
00040 
00041 #include "globals.hh"
00042 #include "G4DynamicParticle.hh"
00043 #include "G4Nucleon.hh"         /* FIXME: This should be forward decl! */
00044 #include "G4V3DNucleus.hh"
00045 #include "G4VNuclearDensity.hh"
00046 #include "G4FermiMomentum.hh"
00047 #include <vector>
00048 
00049 class G4Fancy3DNucleusHelper;
00050 
00051 // to test if we can drop old interface for (A,Z), comment next line..
00052 //#define NON_INTEGER_A_Z 1
00053 
00054 class G4Fancy3DNucleus : public G4V3DNucleus
00055 {
00056 
00057   public:
00058       G4Fancy3DNucleus();
00059       ~G4Fancy3DNucleus();
00060 
00061   private:
00062       G4Fancy3DNucleus(const G4Fancy3DNucleus &right);
00063       const G4Fancy3DNucleus & operator=(const G4Fancy3DNucleus &right);
00064       int operator==(const G4Fancy3DNucleus &right) const;
00065       int operator!=(const G4Fancy3DNucleus &right) const;
00066       
00067 
00068 //  Implementation 
00069       void ChooseNucleons();
00070       void ChoosePositions();
00071       void ChooseFermiMomenta();
00072       G4double BindingEnergy();
00073       G4bool ReduceSum();
00074 
00075   public:
00076 #if defined(NON_INTEGER_A_Z)
00077       void Init(G4double theA, G4double theZ);
00078 #endif
00079       void Init(G4int theA, G4int theZ);
00080       G4bool StartLoop();
00081       G4Nucleon * GetNextNucleon();
00082       const std::vector<G4Nucleon> & GetNucleons();
00083       G4int GetMassNumber();
00084       G4double GetMass();
00085       G4int GetCharge();
00086       G4double GetNuclearRadius();
00087       G4double GetNuclearRadius(const G4double maxRelativeDensity);
00088       G4double GetOuterRadius();
00089       G4double CoulombBarrier();
00090       void DoLorentzBoost(const G4LorentzVector & theBoost);
00091       void DoLorentzBoost(const G4ThreeVector & theBeta);
00092       void DoLorentzContraction(const G4LorentzVector & theBoost);
00093       void DoLorentzContraction(const G4ThreeVector & theBeta);
00094       void CenterNucleons();
00095       void DoTranslation(const G4ThreeVector & theShift);
00096       const G4VNuclearDensity * GetNuclearDensity() const;
00097       void SortNucleonsIncZ();            // on increased Z-coordinates Uzhi 29.08.08
00098       void SortNucleonsDecZ();            // on decreased Z-coordinates Uzhi 29.08.08
00099       
00100   private:
00101   
00102   G4int myA;
00103   G4int myZ;
00104   std::vector<G4Nucleon> theNucleons;
00105 
00106   G4int currentNucleon;
00107   G4VNuclearDensity * theDensity;
00108   G4FermiMomentum theFermi;  
00109   const G4double nucleondistance;
00110   
00111   std::vector<G4ThreeVector> places;            // For selecting locations
00112   std::vector<G4ThreeVector> momentum;          // For selecting nucleon motion
00113   std::vector<G4double> fermiM;
00114   std::vector<G4Fancy3DNucleusHelper> testSums; // For sorting nucleon configs
00115 };
00116 
00117 
00118 inline G4int G4Fancy3DNucleus::GetCharge()
00119 {
00120         return myZ;
00121 }
00122 
00123 inline G4int G4Fancy3DNucleus::GetMassNumber()
00124 {
00125         return myA;
00126 }
00127 
00128 #endif

Generated on Mon May 27 17:48:15 2013 for Geant4 by  doxygen 1.4.7