G4QHadron.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 //
00027 // $Id$
00028 //
00029 //      ---------------- G4QHadron ----------------
00030 //             by Mikhail Kossov, Sept 1999.
00031 //  class header for Hadrons generated by the CHIPS Model
00032 // ------------------------------------------------------
00033 // Short description: In CHIPS all particles are G4QHadrons, while they
00034 // can be leptons, gammas or nuclei. The G4QPDGCode makes the difference.
00035 // In addition the 4-momentum is a basic value, so the mass can be
00036 // different from the GS mass (e.g. for the virtual gamma).
00037 // -------------------------------------------------------------------
00038 
00039 #ifndef G4QHadron_h
00040 #define G4QHadron_h 1
00041 
00042 #include "globals.hh"
00043 #include "G4ThreeVector.hh"
00044 #include "G4LorentzVector.hh"
00045 #include "Randomize.hh"
00046 #include "G4QParticle.hh"
00047 #include "G4QPartonVector.hh"
00048 #include "G4QPartonPair.hh"
00049 #include "G4LorentzRotation.hh"
00050 #include <list>
00051 
00052 class G4QHadron
00053 {
00054 public:
00055   // Constructors
00056   G4QHadron();                                      // Default Constructor
00057   G4QHadron(G4LorentzVector p);                     // Kinematical Constructor
00058   G4QHadron(G4int PDGcode, G4LorentzVector p=G4LorentzVector(0.,0.,0.,0.));//CHIPS-W Hadron
00059   G4QHadron(G4QPDGCode QPDG, G4LorentzVector p=G4LorentzVector(0.,0.,0.,0.));//CHIPS-W Had.
00060   G4QHadron(G4QContent QC, G4LorentzVector p=G4LorentzVector(0.,0.,0.,0.));//QC C-W Hadron
00061   G4QHadron(G4int PDG, G4double m, G4QContent QC); // Constructor for Chipolino or Quasmon
00062   G4QHadron(G4QPDGCode QPDG, G4double m, G4QContent QC);// Constr. for Chipolino or Quasmon
00063   G4QHadron(G4int PDG, G4LorentzVector p, G4QContent QC);// Constr for Chipolino or Quasmon
00064   G4QHadron(G4QPDGCode QPDG, G4LorentzVector p, G4QContent QC);// Con. for Chipo or Quasmon
00065   G4QHadron(G4QParticle* pPart, G4double maxM);     // Constructor for Res with RANDOM mass
00066   G4QHadron(const G4QHadron& right);                // Copy constructor by object
00067   G4QHadron(const G4QHadron* right);                // Copy constructor by pointer
00068   G4QHadron(const G4QHadron* right, G4int ColC, G4ThreeVector Pos, G4LorentzVector Mom);
00069   virtual ~G4QHadron();                             // Destructor
00070   // Operators
00071   const G4QHadron& operator=(const G4QHadron& right);
00072   G4bool           operator==(const G4QHadron& right) const;
00073   G4bool           operator!=(const G4QHadron& right) const;
00074   // Selectors
00075   G4int                 GetPDGCode()      const;    // Get PDG code of the Hadron
00076   G4int                 GetQCode()        const;    // Get Q code of the Hadron
00077   G4QPDGCode            GetQPDG()         const;    // Get QPDG of the Hadron
00078   G4double              GetSpin()         const{return .5*(GetPDGCode()%10-1);}
00079   G4LorentzVector       Get4Momentum()    const{return theMomentum;} // Get 4-mom of Hadron
00080   G4ThreeVector         Get3Momentum()    const{return theMomentum.vect();}// Get 3-mom ofH
00081   G4double              GetEnergy()       const{return theMomentum.e();} // Get E of Hadron
00082   G4QContent            GetQC()           const;    // Get private quark content
00083   G4double              GetMass()         const;    // Get a mass of the Hadron
00084   G4double              GetMass2()        const;    // Get an m^2 value for the Hadron
00085   G4double              GetWidth()        const;    // Get Width of Hadron 
00086   G4int                 GetNFragments()   const;    // Get a#of Fragments of this Hadron
00087   G4int                 GetCharge()       const;    // Get Charge of the Hadron
00088   G4int                 GetStrangeness()  const;    // Get Strangeness of the Hadron
00089   G4int                 GetBaryonNumber() const;    // Get Baryon Number of the Hadron
00090   const G4ThreeVector&  GetPosition()     const;    // Get hadron coordinates
00091   G4double              GetBindingEnergy() {return bindE;}// Returns binding E in NucMatter
00092   G4double              GetFormationTime() {return formTime;} // Returns formation time
00093   std::list<G4QParton*> GetColor() {return Color;}  // pointer to quarks/anti-diquarks
00094   std::list<G4QParton*> GetAntiColor() {return AntiColor;}//pointer to anti-quarks/diquarks
00095   // Modifiers
00096   void SetQPDG(const G4QPDGCode& QPDG);             // Set QPDG of the Hadron
00097   void SetPDGCode(const G4QPDGCode& PDG){SetQPDG(G4QPDGCode(PDG));}// Set PDGCode of Hadron
00098   void Set4Momentum(const G4LorentzVector& aMom);   // Set 4-mom of the Hadron
00099   void SetQC(const G4QContent& newQC);              // Set new private quark content
00100   void SetNFragments(const G4int& nf);              // Set a#of Fragments of this Hadron
00101   void NegPDGCode();                                // Change a sign of the PDG code
00102   void MakeAntiHadron();                            // Make AntiHadron of this Hadron
00103   void SetPosition(const G4ThreeVector& aPosition); // Set coordinates of hadron position
00104   void IncrementCollisionCount(G4int aCount) {theCollisionCount+=aCount;}// IncrTheCCounter
00105   void SplitUp();                                   // Make QGSM String Splitting of Hadron
00106   G4QPartonPair* SplitInTwoPartons();               // RandomSplit ofTheHadron in 2 partons
00107   G4QParton* GetNextParton();                       // Next Parton in a string
00108   G4QParton* GetNextAntiParton();                   // Next Anti-Parton in a string
00109   void SetBindingEnergy(G4double aBindE){bindE=aBindE;}// Set Binding E in Nuclear Matter
00110   void Boost(const G4LorentzVector& theBoost);      // Boosts hadron's 4-Momentum using 4M
00111   void Boost(const G4ThreeVector& B){theMomentum.boost(B);} // Boosts 4-Momentum using v/c
00112   void LorentzRotate(const G4LorentzRotation& rotation){theMomentum=rotation*theMomentum;}
00113   void SetFormationTime(G4double fT){formTime=fT;}  // Defines formationTime for the Hadron
00114 
00115   // General
00116   G4double RandomizeMass(G4QParticle* pPart, G4double maxM); // Randomize a mass value
00117   G4bool TestRealNeutral();
00118   G4bool DecayIn2(G4LorentzVector& f4Mom, G4LorentzVector& s4Mom);
00119   G4bool CorMDecayIn2(G4double corM, G4LorentzVector& fr4Mom);// This(newMass corM)+fr4Mom
00120   G4bool CorEDecayIn2(G4double corE, G4LorentzVector& fr4Mom);// This(E+=cE,P)+f(fE-=cE,fP)
00121   G4bool RelDecayIn2(G4LorentzVector& f4Mom, G4LorentzVector& s4Mom, G4LorentzVector& dir,
00122                      G4double maxCost = 1., G4double minCost = -1.);
00123   G4bool CopDecayIn2(G4LorentzVector& f4Mom, G4LorentzVector& s4Mom, G4LorentzVector& dir,
00124                      G4double cop);
00125   G4bool DecayIn3(G4LorentzVector& f4Mom, G4LorentzVector& s4Mom, G4LorentzVector& t4Mom);
00126   G4bool RelDecayIn3(G4LorentzVector& fh4M, G4LorentzVector& sh4M, G4LorentzVector& th4Mom,
00127                      G4LorentzVector& dir, G4double maxCost = 1., G4double minCost = -1.);
00128   G4bool CopDecayIn3(G4LorentzVector& fh4M, G4LorentzVector& sh4M, G4LorentzVector& th4Mom,
00129                      G4LorentzVector& dir, G4double cosp);
00130   void   Init3D();                         // Initializes 3D nucleus with (Pos,4M)nucleons
00131 private:
00132   // Private methods
00133   void DefineQC(G4int PDGCode);
00134   G4QParton* BuildSeaQuark(G4bool isAntiQuark, G4int aPDGCode);
00135   G4double SampleCHIPSX(G4double anXtot, G4int nSea);
00136   G4double* RandomX(G4int nPart);
00137   void GetValenceQuarkFlavors(G4QParton* &Part1,G4QParton* &Part2);
00138   G4ThreeVector GaussianPt(G4double widthSquare, G4double maxPtSquare);
00139   G4bool SplitMeson(G4int PDGcode, G4int* aEnd, G4int* bEnd);
00140   G4bool SplitBaryon(G4int PDGcode, G4int* aEnd, G4int* bEnd);
00141 
00142 protected:
00143   G4LorentzVector        theMomentum;       // The 4-mom of Hadron
00144 
00145 private:
00146   // Static Parameters of QGSM Splitting
00147   static G4double StrangeSuppress;  // ? M.K.
00148   static G4double sigmaPt;          // Can be 0 ?
00149   static G4double widthOfPtSquare;  // ? M.K.
00150   // Body 
00151   G4QPDGCode             theQPDG;           // Instance of QPDG for the Hadron
00152   G4QContent             valQ;              // QC (@@ for Quasmon and Chipolino?)
00153   G4int                  nFragm;            // 0 - stable, N - decayed in N part's
00154   // Body of Splitable Hadron and Nuclear Nucleon
00155   G4ThreeVector          thePosition;       // Coordinates of Hadron position
00156   G4int                  theCollisionCount; // ?
00157   G4bool                 isSplit;           // Flag, that splitting was done
00158   G4bool                 Direction;         // FALSE=target, TRUE=projectile
00159   std::list<G4QParton*>  Color;             // container for quarks & anti-diquarks
00160   std::list<G4QParton*>  AntiColor;         // container for anti-quarks & diquarks
00161   G4double               bindE;             // Binding energy in nuclear matter
00162   G4double               formTime;          // Formation time for the hadron
00163 };
00164 
00165 typedef std::pair<G4QHadron*, G4QHadron*> G4QHadronPair;
00166 
00167 inline G4bool G4QHadron::operator==(const G4QHadron &rhs) const {return this==&rhs;}
00168 inline G4bool G4QHadron::operator!=(const G4QHadron &rhs) const {return this!=&rhs;}
00169  
00170 inline G4int           G4QHadron::GetPDGCode()      const  {return theQPDG.GetPDGCode();}
00171 inline G4int           G4QHadron::GetQCode()        const  {return theQPDG.GetQCode();}
00172 inline G4QPDGCode      G4QHadron::GetQPDG()         const  {return theQPDG;}
00173 inline G4QContent      G4QHadron::GetQC()           const  {return valQ;}
00174 inline G4int           G4QHadron::GetNFragments()   const  {return nFragm;}
00175 //@@ This is an example how to make other inline selectors for the 4-Momentum of the Hadron
00176 inline G4double        G4QHadron::GetMass()         const  {return theMomentum.m();}
00177 inline G4double        G4QHadron::GetMass2()        const  {return theMomentum.m2();}
00178 //@@ This is an example how to make other inline selectors for the Hadron
00179 inline G4int           G4QHadron::GetCharge()       const  {return valQ.GetCharge();}
00180 inline G4int           G4QHadron::GetStrangeness()  const  {return valQ.GetStrangeness();}
00181 inline G4int           G4QHadron::GetBaryonNumber() const  {return valQ.GetBaryonNumber();}
00182 inline const G4ThreeVector& G4QHadron::GetPosition() const {return thePosition;}
00183 //inline G4int           G4QHadron::GetSoftCollisionCount()  {return theCollisionCount;}
00184 
00185 inline void            G4QHadron::MakeAntiHadron()    {if(TestRealNeutral()) NegPDGCode();}
00186 inline void   G4QHadron::SetQC(const G4QContent& newQC)             {valQ=newQC;}
00187 inline void   G4QHadron::Set4Momentum(const G4LorentzVector& aMom)  {theMomentum=aMom;}
00188 inline void   G4QHadron::SetNFragments(const G4int& nf)             {nFragm=nf;}
00189 inline void   G4QHadron::SetPosition(const G4ThreeVector& position) {thePosition=position;}
00190 
00191 inline void   G4QHadron::NegPDGCode()                  {theQPDG.NegPDGCode(); valQ.Anti();}
00192 inline G4bool G4QHadron::TestRealNeutral()             { return theQPDG.TestRealNeutral();}
00193 
00194 #endif

Generated on Mon May 27 17:49:34 2013 for Geant4 by  doxygen 1.4.7