G4QString.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 //
00028 // $Id$
00029 
00030 #ifndef G4QString_h
00031 #define G4QString_h 1
00032 
00033 // ------------------------------------------------------------
00034 //      GEANT 4 class header file
00035 //
00036 //      ---------------- G4QString ----------------
00037 //       by Mikhail Kosov, October 2006.
00038 //       class for an excited string used by Parton String Models
00039 //   For comparison mirror member functions are taken from G4 classes:
00040 //   G4FragmentingString
00041 //   G4ExcitedStringDecay
00042 //
00043 // ------------------------------------------------------------
00044 // Short description: If partons from the G4QPartonPair are close in
00045 // rapidity, they create Quasmons, but if they are far in the rapidity
00046 // space, they can not interact directly. Say the bottom parton (quark)
00047 // has rapidity 0, and the top parton (antiquark) has rapidity 8, then
00048 // the top quark splits in two by radiating gluon, and each part has
00049 // rapidity 4, then the gluon splits in quark-antiquark pair (rapidity
00050 // 2 each), and then the quark gadiates anothe gluon and reachs rapidity
00051 // 1. Now it can interact with the bottom antiquark, creating a Quasmon
00052 // or a hadron. The intermediate partons is the string ladder.
00053 // ---------------------------------------------------------------------
00054 
00055 #include "G4ios.hh"
00056 #include "globals.hh"
00057 #include "G4ThreeVector.hh"
00058 #include "G4LorentzVector.hh"
00059 #include "G4LorentzRotation.hh"
00060 #include "G4QHadronVector.hh"
00061 #include "G4QPartonPair.hh"
00062 #include "G4QPartonVector.hh"
00063 #include <algorithm>
00064 
00065 class G4QString 
00066 {
00067  public:
00068 
00069   enum {PROJECTILE  = 1, TARGET  = -1}; // The same as in quark-pair (@@ ? M.K.)
00070 
00071   G4QString(); // formal creation of the string with future excitation
00072   G4QString(G4QParton* Color,G4QParton* Gluon, G4QParton* AntiColor, G4int Dir=PROJECTILE);
00073   G4QString(G4QParton* Col, G4QParton* AntiCol, G4int Dir=PROJECTILE);
00074   G4QString(G4QPartonPair* ColAntiCol);
00075   G4QString(const G4QString &right);
00076   G4QString(const G4QString &old, G4QParton* newdecay, const G4LorentzVector *momentum);
00077   G4QString(const G4QString &old, G4QParton* newdecay);
00078   G4QString(G4QParton* newdecay, const G4LorentzVector* momentum);
00079 
00080   ~G4QString();
00081 
00082   // Selectors
00083   G4int operator==(const G4QString &right) const {return this == &right;}
00084   G4int operator!=(const G4QString &right) const {return this != &right;}
00085   const G4ThreeVector& GetPosition() const       {return thePosition;}
00086   const G4QPartonVector* GetPartonList() const   {return &thePartons;}
00087   G4QParton* GetLeftParton() const               {return *thePartons.begin();}
00088   G4QParton* GetRightParton() const              {return *(thePartons.end()-1);}
00089   G4int      GetDirection() const                {return theDirection;}
00090   G4LorentzVector Get4Momentum() const;
00091   G4QContent GetQC() const {return GetLeftParton()->GetQC()+GetRightParton()->GetQC();}
00092   G4int      GetCharge() const {return GetQC().GetCharge();}
00093   G4int      GetBaryonNumber() const {return GetQC().GetBaryonNumber();}
00094   G4int      GetStrangeness() const {return GetQC().GetStrangeness();}
00095   G4int GetDecayDirection() const;
00096   G4bool DecayIsQuark() const {return theDecayParton->GetType()==1;}
00097   G4bool StableIsQuark() const {return theStableParton->GetType()==1;}
00098   G4ThreeVector DecayPt();  // Get Pt of the decaying quark @@ Called once
00099   G4double Mass2() const { return Pplus*Pminus-(Ptleft+Ptright).mag2();}
00100   G4double Mass() const  // @@ Very dangerous! USE ONLY FORE THE LIGHT CONE ALGORITHM !!
00101   {
00102     G4double  mass2=Mass2();
00103     if(mass2>0) return std::sqrt(Mass2());
00104     else     return 0.; // @@ Make Warning
00105   }
00106   G4bool StopFragmentation()
00107   {
00108     G4LorentzVector mom(Ptleft+Ptright, 0.5*(Pplus+Pminus));
00109     mom.setPz(0.5*(Pplus-Pminus));
00110     return FragmentationMass(1) + MassCut > mom.mag();
00111   }
00112   G4bool IsFragmentable() {return FragmentationMass() + MassCut < Mass();} // @@ Mass() ?
00113   G4ThreeVector SampleQuarkPt(); // @@ Called once
00114   G4QHadron* CreateHadron(G4QParton* black, G4QParton* white);
00115   G4QHadron* CreateLowSpinHadron(G4QParton* black, G4QParton* white);
00116   G4QHadron* CreateHighSpinHadron(G4QParton* black, G4QParton* white);
00117 
00118   // Modifiers
00119   void SetPosition(const G4ThreeVector& aPosition){thePosition= aPosition;}
00120   void SetDirection(G4int dir)       {if(dir==1 || dir==-1) theDirection=dir;}
00121   void SetLeftParton(G4QParton* LP)  {thePartons[0]=LP;} // !! Not deleting the substituty
00122   void SetRightParton(G4QParton* RP) {thePartons.pop_back(); thePartons.push_back(RP);}
00123   void KillString()                  {theDirection=0;} // @@ Can be absolete
00124   void LorentzRotate(const G4LorentzRotation& rotation);
00125   //void InsertParton(G4QParton* aParton, const G4QParton* addafter = NULL);
00126   void Boost(G4ThreeVector& Velocity);
00127   G4LorentzRotation TransformToAlignedCms(); // @@ caled once
00128   //void DiffString(G4QHadron* aHadron, G4bool isProjectile); @@ Mast be used!!
00129   void ExciteString(G4QParton* Col,G4QParton* AntiCol, G4int Dir);
00130   G4QHadronVector* FragmentString(G4bool QL); // Fragment String using QGSM=true/LUND=false
00131   G4QHadronVector* LightFragmentationTest();
00132   G4double FragmentationMass(G4int HighSpin = 0, G4QHadronPair* pdefs = 0);
00133   void SetLeftPartonStable();
00134   void SetRightPartonStable();
00135   G4QHadron* Splitup(G4bool QL);
00136   G4LorentzVector* SplitEandP(G4QHadron* pHadron, G4bool QL); // QGSM:QL=true,Lund:QL=false
00137   G4QPartonPair CreatePartonPair(G4int NeedParticle, G4bool AllowDiquarks=true);
00138   G4QHadron* QuarkSplitup(G4QParton* decay, G4QParton* &created);
00139   G4QHadron* DiQuarkSplitup(G4QParton* decay, G4QParton* &created);
00140   G4int SampleQuarkFlavor() {return (1+G4int(G4UniformRand()/StrangeSuppress));} // ? M.K.
00141 
00142   // Static functions
00143   static void SetParameters(G4double mCut, G4double sigQT, G4double DQSup, G4double DQBU,
00144                             G4double smPar, G4double SSup, G4double SigPt);
00145 
00146  private:
00147   enum Spin {SpinZero=1, SpinHalf=2, SpinOne=3, SpinThreeHalf=4};
00148   // Private functions
00149   G4QHadron* CreateMeson(G4QParton* black, G4QParton* white, Spin spin);
00150   G4QHadron* CreateBaryon(G4QParton* black,G4QParton* white, Spin spin);
00151   G4ThreeVector GaussianPt(G4double widthSquare, G4double maxPtSquare) const;
00152   G4double GetLundLightConeZ(G4double zmin, G4double zmax, G4int PartonEncoding,
00153                              G4QHadron* pHadron, G4double Px, G4double Py);
00154   G4double GetQGSMLightConeZ(G4double zmin, G4double zmax, G4int PartonEncoding,
00155                              G4QHadron* pHadron, G4double Px, G4double Py);
00156 
00157   // Static parameters
00158   // Parameters of Longitudinal String Fragmentation
00159   static G4double MassCut;           // minimum mass cut for the string
00160   static G4double SigmaQT;           // quark transverse momentum distribution parameter 
00161   static G4double DiquarkSuppress;   // is Diquark suppression parameter  
00162   static G4double DiquarkBreakProb;  // is Diquark breaking probability 
00163   static G4double SmoothParam;       // QGS model parameter
00164   static G4double StrangeSuppress;   // Strangeness suppression parameter
00165   static G4double widthOfPtSquare;   // width^2 of pt for string excitation
00166 
00167   // Body
00168   G4int         theDirection;        // must be 1 (PROJECTILE) or -1 (TARGET), 0 - DEAD
00169   G4ThreeVector thePosition;         // Defined by the first quark position
00170   G4QPartonVector thePartons;        // Partons on the ends of the string @@ Use PartonPair
00171   G4ThreeVector Ptleft,Ptright;      // Pt (px,py) for partons (pz ignored!)
00172   G4double Pplus, Pminus;            // p-, p+ of string, Plus is assigned to Left!
00173   G4QParton* theStableParton;        // Parton on the stable side of the string
00174   G4QParton* theDecayParton;         // Parton on the decaying part of the string
00175   enum DecaySide {None, Left, Right};// @@ To have two         @@ Leav   :  1=Left
00176   DecaySide decaying;                // @@   it's too much     @@  only  :  0=Unknown
00177   G4int     SideOfDecay;             // @@     of a good thing @@   one! : -1=Right
00178 };
00179 
00180 #endif

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