Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:59:24

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 //
0027 //
0028 // -----------------------------------------------------------------------------
0029 //      GEANT 4 class implementation file
0030 // -----------------------------------------------------------------------------
0031 #ifndef G4VLongitudinalStringDecay_h
0032 #define G4VLongitudinalStringDecay_h 1
0033 
0034 #include "G4HadronicInteraction.hh"
0035 #include "G4VStringFragmentation.hh"
0036 #include "G4DynamicParticle.hh"
0037 #include "G4KineticTrack.hh"
0038 #include "G4KineticTrackVector.hh"
0039 #include "G4HadronBuilder.hh"
0040 #include <vector>
0041 
0042 //*****************************************************************************
0043 
0044 class G4FragmentingString;
0045 
0046 class G4VLongitudinalStringDecay : public G4HadronicInteraction
0047 {
0048   public:
0049 
0050     G4VLongitudinalStringDecay(const G4String& name = "StringDecay");
0051     virtual ~G4VLongitudinalStringDecay();
0052 
0053     G4HadFinalState *ApplyYourself(const G4HadProjectile&, G4Nucleus&) final;
0054 
0055   private:
0056     // not implemented to protect/forbid use
0057     G4VLongitudinalStringDecay(const G4VLongitudinalStringDecay &right);
0058     const G4VLongitudinalStringDecay & operator=(const G4VLongitudinalStringDecay &right);
0059     G4bool operator==(const G4VLongitudinalStringDecay &right) const;
0060     G4bool operator!=(const G4VLongitudinalStringDecay &right) const;
0061 
0062   public:
0063     virtual G4KineticTrackVector* FragmentString(const G4ExcitedString& theString)=0;
0064 
0065     void AddNewParticles();
0066     void EraseNewParticles();
0067     //struct DeleteString { void operator()(G4ExcitedString* aS){delete aS;} };
0068 
0069     // To set minimal mass of a string. The string with mass above the minimal mass can fragment.
0070     void SetMinMasses();
0071     void SetMinimalStringMass(const G4FragmentingString  * const string);
0072     void SetMinimalStringMass2(const G4double aValue);
0073 
0074   protected: 
0075     // For changing Mass Cut used for selection of very small mass strings
0076     virtual void SetMassCut(G4double aValue);
0077     G4double GetMassCut();
0078 
0079     // For handling a string with very low mass
0080     G4KineticTrackVector * ProduceOneHadron(const G4ExcitedString * const theString);
0081 
0082     // To store created quarks or 2 last hadrons
0083     typedef std::pair<G4ParticleDefinition*, G4ParticleDefinition*> pDefPair;
0084 
0085     // For creation of hadrons from given quark pair 
0086     typedef G4ParticleDefinition * (G4HadronBuilder::*Pcreate)
0087                      (G4ParticleDefinition*, G4ParticleDefinition*);
0088 
0089     // Used by ProduceOneHadron method for estimation of lowest possible mass of
0090     // given quark system -- string.
0091     G4double PossibleHadronMass(const G4FragmentingString * const string,
0092                        Pcreate build=0, pDefPair * pdefs=0);
0093 
0094     G4ParticleDefinition* FindParticle(G4int Encoding); 
0095 
0096     // For decision on continue or stop string fragmentation
0097     virtual G4bool StopFragmenting(const G4FragmentingString  * const string)=0;
0098     virtual G4bool IsItFragmentable(const G4FragmentingString * const string)=0;
0099 
0100     // If a string can not fragment, make last break into 2 hadrons
0101     virtual G4bool SplitLast(G4FragmentingString * string, 
0102                      G4KineticTrackVector * LeftVector,
0103                      G4KineticTrackVector * RightVector)=0;
0104 
0105     virtual void Sample4Momentum(G4LorentzVector* Mom,     G4double Mass, 
0106                                  G4LorentzVector* AntiMom, G4double AntiMass, 
0107                                  G4double InitialMass)=0; 
0108 
0109     // If a string can fragment, do the following:
0110 
0111     // Make a copy of a string
0112     G4ExcitedString *CopyExcited(const G4ExcitedString& string);
0113 
0114     // Produce a hadron at Splitup of the string
0115     virtual G4KineticTrack * Splitup(G4FragmentingString *string,
0116                                      G4FragmentingString *&newString)=0;
0117 
0118     // The hadron can be producet at QuarkSplitup or DiQuarkSplitup
0119     virtual G4ParticleDefinition * QuarkSplitup(G4ParticleDefinition* decay,
0120                                 G4ParticleDefinition *&created);
0121 
0122     virtual G4ParticleDefinition * DiQuarkSplitup(G4ParticleDefinition* decay,
0123                               G4ParticleDefinition *&created)=0;
0124 
0125     // All of them are going through quak-antiquark pair creation                   
0126     pDefPair CreatePartonPair(G4int NeedParticle, G4bool AllowDiquarks=true);
0127 
0128   public:
0129     // For a pair it is needed:
0130     G4int SampleQuarkFlavor(void);
0131     G4ThreeVector SampleQuarkPt(G4double ptMax=-1.); // -1. no limit on maxpt.
0132 
0133   protected:
0134     // For determination of kinematical properties of the created hadron
0135     virtual G4LorentzVector * SplitEandP(G4ParticleDefinition * pHadron,      
0136                                          G4FragmentingString * string,        
0137                                          G4FragmentingString * newString  )=0;
0138 
0139     virtual G4double GetLightConeZ(G4double zmin, G4double zmax, 
0140                                    G4int PartonEncoding,  
0141                                    G4ParticleDefinition* pHadron, 
0142                                    G4double Px, G4double Py       ) = 0;      
0143 
0144     void CalculateHadronTimePosition(G4double theInitialStringMass, 
0145                                      G4KineticTrackVector *);
0146 
0147     // Used for some test purposes 
0148     void ConstructParticle();
0149 
0150     G4ParticleDefinition* CreateHadron(G4int id1, G4int id2, 
0151                                        G4bool theGivenSpin, G4int theSpin); 
0152 
0153   public:
0154     void SetSigmaTransverseMomentum(G4double aQT);
0155     void SetStrangenessSuppression(G4double aValue);
0156     void SetDiquarkSuppression(G4double aValue);
0157     void SetDiquarkBreakProbability(G4double aValue);
0158 
0159     void SetSpinThreeHalfBarionProbability(G4double aValue);
0160    
0161     void SetScalarMesonMixings( std::vector<G4double> aVector);
0162     void SetVectorMesonMixings( std::vector<G4double> aVector);
0163 
0164     void SetStringTensionParameter(G4double aValue);            
0165 
0166     void SetProbCCbar(G4double aValue);
0167     void SetProbEta_c(G4double aValue);
0168     void SetProbBBbar(G4double aValue);
0169     void SetProbEta_b(G4double aValue);
0170 
0171   protected:  
0172     G4double GetDiquarkSuppress()   {return DiquarkSuppress;};
0173     G4double GetDiquarkBreakProb()  {return DiquarkBreakProb;};
0174     G4double GetStrangeSuppress()   {return StrangeSuppress;};
0175     G4int    GetClusterLoopInterrupt()   {return ClusterLoopInterrupt;};
0176 
0177     G4double GetProbCCbar(){return ProbCCbar;};
0178     G4double GetProbEta_c(){return ProbEta_c;};
0179     G4double GetProbBBbar(){return ProbBBbar;};
0180     G4double GetProbEta_b(){return ProbEta_b;};
0181 
0182     G4double GetStringTensionParameter() {return Kappa;};
0183 
0184   protected:  
0185     G4double  MassCut;
0186     G4double  SigmaQT;          // sigma_q_t of quark/hadron transverse momentum distribution parameter 
0187     G4double  DiquarkSuppress;  // Diquark suppression parameter  
0188     G4double  DiquarkBreakProb; // Diquark breaking probability, qq->h+qq'
0189     G4double  StrangeSuppress ;
0190     G4int     StringLoopInterrupt;
0191     G4int     ClusterLoopInterrupt;
0192 
0193     G4HadronBuilder *hadronizer;
0194 
0195     std::vector<G4double> pspin_meson;
0196     G4double pspin_barion;
0197     std::vector<G4double> vectorMesonMix;
0198     std::vector<G4double> scalarMesonMix;
0199    
0200     G4double ProbCCbar;  // Probability of C-Cbar pair creation
0201     G4double ProbEta_c;  // Mixing of Eta_c and J/Psi
0202 
0203     G4double ProbBBbar;  // Probability of B-Bbar pair creation
0204     G4double ProbEta_b;  // Mixing of Eta_b and Ipsilon_b
0205 
0206     G4double ProbCB;     // = ProbCCbar + ProbBBbar
0207 
0208     G4double MaxMass;
0209 
0210     G4bool   PastInitPhase;
0211 
0212     G4double Kappa;      // String tension parameter
0213 
0214     std::vector<G4ParticleDefinition *> NewParticles;
0215 
0216   public:
0217     // ------ For estimation of a minimal string mass ---------------
0218     G4double Mass_of_light_quark;
0219     G4double Mass_of_s_quark;
0220     G4double Mass_of_c_quark;
0221     G4double Mass_of_b_quark;
0222     G4double Mass_of_string_junction;
0223 
0224     G4double minMassQQbarStr[5][5];
0225     G4double minMassQDiQStr[5][5][5];
0226 
0227     // ------ An estimated minimal string mass ----------------------
0228     G4double MinimalStringMass;
0229     G4double MinimalStringMass2;
0230 
0231     G4int Qcharge[5];  // quark charges
0232     G4int          Meson[5][5][7];
0233     G4double MesonWeight[5][5][7];
0234 
0235     G4int          Baryon[5][5][5][4];
0236     G4double BaryonWeight[5][5][5][4];
0237 
0238     G4double Prob_QQbar[5];
0239 
0240     G4int DecayQuark;
0241     G4int NewQuark;
0242     /*
0243     G4double FFq2q[5][5][2];
0244     G4double FFq2qq[5][15][2];
0245     G4double FFqq2q[15][5][2];
0246     G4double FFqq2qq[15][5][2];
0247     */
0248 
0249     // ------ To improve the code structure
0250     G4ParticleDefinition * FS_LeftHadron[350], * FS_RightHadron[350];
0251     G4double FS_Weight[350];
0252     G4int NumberOf_FS;
0253 };
0254 
0255 //******************************************************************************
0256 // Class G4VLongitudinalStringDecay 
0257 
0258 #endif
0259