Back to home page

EIC code displayed by LXR

 
 

    


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

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 G4QGSMSplitableHadron_h
0027 #define G4QGSMSplitableHadron_h 1
0028 
0029 #include "G4VSplitableHadron.hh"
0030 #include "G4PartonVector.hh"
0031 #include "G4MesonSplitter.hh"
0032 #include "G4BaryonSplitter.hh"
0033 #include "Randomize.hh"
0034 #include <deque>
0035 
0036 // based on prototype by Maxim Komogorov
0037 // Splitting into methods, and centralizing of model parameters HPW Feb 1999
0038 // continued clean-up of interfaces and algorithms HPW 1999.
0039 // Redesign of data structures and algorithms HPW Feb 1999
0040 
0041 class G4QGSMSplitableHadron : public G4VSplitableHadron
0042 {
0043   public:
0044     G4QGSMSplitableHadron();
0045     G4QGSMSplitableHadron(const G4ReactionProduct & aPrimary);
0046     G4QGSMSplitableHadron(const G4ReactionProduct & aPrimary, G4bool Direction);
0047     G4QGSMSplitableHadron(const G4Nucleon & aNucleon);
0048     G4QGSMSplitableHadron(const G4Nucleon & aNucleon, G4bool Direction);
0049 
0050     virtual ~G4QGSMSplitableHadron();
0051 
0052   private:
0053     const G4QGSMSplitableHadron & operator=(const G4QGSMSplitableHadron &right);
0054 
0055   public:
0056     virtual void SplitUp();
0057     virtual void SetFirstParton(G4int PDGcode);
0058     virtual void SetSecondParton(G4int PDGcode);
0059     virtual G4Parton * GetNextParton();
0060     virtual G4Parton * GetNextAntiParton();
0061 
0062   private:
0063     void InitParameters();
0064     void DiffractiveSplitUp();
0065     void SoftSplitUp();
0066 
0067     G4ThreeVector GaussianPt(G4double widthSquare, G4double maxPtSquare);
0068     void GetValenceQuarkFlavors(const G4ParticleDefinition * aPart,
0069             G4Parton *& Parton1, G4Parton *& Parton2);
0070     G4Parton * BuildSeaQuark(G4bool isAntiQuark, G4int aPDGCode, G4int nSeaPair);
0071     G4double SampleX(G4double anXmin, G4int nSea, G4int theTotalSea, G4double aBeta);
0072 
0073   private:
0074     // aggregated data
0075     G4bool Direction; // FALSE is target. - candidate for more detailed design.
0076 
0077     std::deque<G4Parton *> Color;
0078     std::deque<G4Parton *> AntiColor;
0079         unsigned int iP;
0080         unsigned int iAP;
0081 
0082   private:
0083     // associated classes
0084     G4MesonSplitter theMesonSplitter;
0085     G4BaryonSplitter theBaryonSplitter;
0086 
0087   private:
0088     // model parameters
0089     G4double alpha;
0090     G4double beta;
0091     G4double theMinPz;
0092     G4double StrangeSuppress;
0093     G4double sigmaPt;
0094     G4double widthOfPtSquare;
0095     G4double minTransverseMass;
0096 };
0097 
0098 inline G4Parton* G4QGSMSplitableHadron::GetNextParton()
0099 {
0100     if(Color.size()==0) return 0;
0101 
0102         G4Parton * result = Color.operator[](iP);
0103         iP++; if(iP == Color.size()) iP=0;
0104     return result;
0105 }
0106 
0107 inline G4Parton* G4QGSMSplitableHadron::GetNextAntiParton()
0108 {
0109     if(AntiColor.size() == 0) return 0;
0110 
0111         G4Parton * result = AntiColor.operator[](iAP);
0112         iAP++; if(iAP == AntiColor.size()) iAP=0;
0113     return result;
0114 }
0115 
0116 inline void G4QGSMSplitableHadron::SetFirstParton(G4int)
0117 {}
0118 inline void G4QGSMSplitableHadron::SetSecondParton(G4int)
0119 {}
0120 #endif
0121