Changeset 962 for trunk/source/processes/hadronic/models/parton_string
- Timestamp:
- Apr 6, 2009, 12:30:29 PM (15 years ago)
- Location:
- trunk/source/processes/hadronic/models/parton_string
- Files:
-
- 46 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/hadronic/models/parton_string/History
r819 r962 14 14 * Please list in reverse chronological order (last date on top) 15 15 --------------------------------------------------------------- 16 23 June 2008 V. Uzhinsky (hadr-prtn-V09-01-02) 17 G4QGSMFragmentation.cc and G4LundStringFragmentation.cc were 18 decoupled at calculation of formation time due to adding methods 19 and member in G4VLongitudinalStringDecay class for manipulation 20 with string tension. 21 22 Memory leak was erased in G4QGSMFragmentation.cc and 23 G4VLongitudinalStringDecay.cc thank to Gunter. 24 25 18 June 2008 V. Uzhinsky (hadr-prtn-V09-01-01) 26 Changes in G4ExcitedString class were tagged. They are needed for 27 operation of FTF. 28 29 13 June 2008 V. Uzhinsky (hadr-prtn-V09-01-00) 30 ----------------------------------------------- 31 1. String fragmentation was revised, and parameters were tuned. 32 2. FTF parameters were tuned for proton-proton interaction 33 3. FTF parameters for pion-nucleon interactions were determined very rouhgly 34 4. Quiasi-elastic hadron-nucleus scattering was implemented in FTF 35 5. Formation time was implemented in FTF, and string tension was tuned 36 16 37 17 38 25 May 2007 G.Folger (hadr-prtn-V08-02-02) … … 53 74 54 75 - D. Wright created History file for parton_string directory 76 77 31 March 2008 V. Uzhinsky (hadr-string-diff-V09-01-00) 78 -------------------------------------------------------- 79 80 - Elastic hadron intra-nuclear nucleon scattering was inserted in 81 FTF model. This allows to simulate quasi-elastic and multi-particles 82 production together. 83 - Small re-orangement of FTF model was done. G4FTFCrossSection modules 84 were re-named into G4FTFParameters and moved to /diffraction -
trunk/source/processes/hadronic/models/parton_string/diffraction/History
r819 r962 1 $Id: History,v 1. 1 2007/04/24 10:32:59 gunterExp $1 $Id: History,v 1.5 2008/12/09 10:43:47 vuzhinsk Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 15 15 * Please list in reverse chronological order (last date on top) 16 16 --------------------------------------------------------------- 17 9 December 08, V. Uzhinsky (hadr-string-diff-V09-01-04) 18 - Improvement of delete operators in FTF 19 20 5 December 08, V. Uzhinsky (hadr-string-diff-V09-01-03) 21 - Some objects did not erase in FTFModel desructor. These lead to memory 22 leak. 17 23 18 24 25 2 June 08, G.Folger (hadr-string-diff-V09-01-02) 26 - on branch geant4-09-01-patches_branch, fix compilation warning for unused 27 variables in G4FTFModel.cc 28 29 30 31 ?????????????????????????????? (hadr-string-diff-V09-01-01) 32 33 31 March 2008 V. Uzhinsky Tag : hadr-string-diff-V09-01-00 34 - G4FTFParameters.cc and G4FTFParameters.hh were copied from G4FTFCrossSection 35 corresponding files. 36 - New files - G4ElasticHNScattering have been added. They implement elastic 37 scattering of hadron in intra-nuclear collisions in FTF model. 38 - The corresponding changes have been done in G4FTFModel.cc and 39 G4FTFParticipants.cc 40 41 19 42 24 Apr 2007 Gunter Folger (hadr-string-diff-V08-02-00) 20 43 - merge in change done by ftf development. 21 44 - Created History file. 45 -
trunk/source/processes/hadronic/models/parton_string/diffraction/include/G4DiffractiveExcitation.hh
r819 r962 25 25 // 26 26 // 27 // $Id: G4DiffractiveExcitation.hh,v 1. 1 2007/05/25 06:56:53 vuzhinsk Exp $27 // $Id: G4DiffractiveExcitation.hh,v 1.2 2008/04/25 14:20:13 vuzhinsk Exp $ 28 28 29 29 #ifndef G4DiffractiveExcitation_h … … 42 42 class G4VSplitableHadron; 43 43 class G4ExcitedString; 44 #include "G4FTFParameters.hh" // Uzhi 19.04.08 44 45 #include "G4ThreeVector.hh" 45 46 … … 52 53 virtual ~G4DiffractiveExcitation(); 53 54 54 virtual G4bool ExciteParticipants (G4VSplitableHadron *aPartner, G4VSplitableHadron * bPartner) const; 55 virtual G4bool ExciteParticipants (G4VSplitableHadron *aPartner, 56 G4VSplitableHadron * bPartner, 57 G4FTFParameters *theParameters) const; 58 55 59 virtual G4ExcitedString * String(G4VSplitableHadron * aHadron, G4bool isProjectile) const; 56 57 // void SetPtWidth(G4double aValue) { widthOfPtSquare = aValue*aValue; }58 // void SetExtraMass(G4double aValue) { minExtraMass = aValue; }59 // void SetMinimumMass(G4double aValue) { minmass = aValue; }60 61 60 62 61 private: … … 64 63 G4DiffractiveExcitation(const G4DiffractiveExcitation &right); 65 64 66 // G4double ChooseX(G4double Xmin, G4double Xmax) const;// Uzhi65 G4ThreeVector GaussianPt(G4double AveragePt2, G4double maxPtSquare) const; // Uzhi 67 66 G4double ChooseP(G4double Pmin, G4double Pmax) const; // Uzhi 68 69 // G4ThreeVector GaussianPt(G4double widthSquare, G4double maxPtSquare) const;70 G4ThreeVector GaussianPt(G4double AveragePt2, G4double maxPtSquare) const; // Uzhi71 67 72 68 const G4DiffractiveExcitation & operator=(const G4DiffractiveExcitation &right); … … 74 70 int operator!=(const G4DiffractiveExcitation &right) const; 75 71 76 private:77 // Model Parameters:78 /* // Uzhi79 const G4double widthOfPtSquare; // width^2 of pt for string excitation80 const G4double minExtraMass; // minimum excitation mass81 const G4double minmass; // mean pion transverse mass; used for Xmin82 */ // Uzhi83 72 }; 84 73 -
trunk/source/processes/hadronic/models/parton_string/diffraction/include/G4DiffractiveHHScatterer.hh
r819 r962 25 25 // 26 26 // 27 // $Id: G4DiffractiveHHScatterer.hh,v 1. 3 2006/06/29 20:54:25 gunterExp $27 // $Id: G4DiffractiveHHScatterer.hh,v 1.4 2008/04/25 14:20:13 vuzhinsk Exp $ 28 28 29 29 #ifndef G4DiffractiveHHScatterer_h … … 44 44 class G4KineticTrack; 45 45 #include "G4KineticTrackVector.hh" 46 #include "G4FTFParameters.hh" // Uzhi 21.04.08 46 47 47 48 class G4DiffractiveHHScatterer … … 57 58 const G4DiffractiveExcitation * theExcitation; 58 59 G4LundStringFragmentation * theStringFragmentation; 60 G4FTFParameters *theParameters; // Uzhi 21.04.08 59 61 }; 60 62 -
trunk/source/processes/hadronic/models/parton_string/diffraction/include/G4DiffractiveSplitableHadron.hh
r819 r962 26 26 // 27 27 // $Id: G4DiffractiveSplitableHadron.hh,v 1.4 2006/06/29 20:54:27 gunter Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 -
trunk/source/processes/hadronic/models/parton_string/diffraction/include/G4FTFModel.hh
r819 r962 25 25 // 26 26 // 27 // $Id: G4FTFModel.hh,v 1. 5 2007/04/24 10:32:59 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $27 // $Id: G4FTFModel.hh,v 1.7 2008/04/25 14:20:13 vuzhinsk Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // Class Description … … 52 52 class G4VSplitableHadron; 53 53 class G4ExcitedString; 54 55 #include "G4FTFParameters.hh" // Uzhi 29.03.08 54 56 #include "G4FTFParticipants.hh" 55 57 56 58 #include "G4ExcitedStringVector.hh" 57 59 #include "G4DiffractiveExcitation.hh" 58 60 #include "G4ElasticHNScattering.hh" 59 61 60 62 class G4FTFModel : public G4VPartonStringModel … … 84 86 85 87 private: 86 88 89 G4ReactionProduct theProjectile; 87 90 G4FTFParticipants theParticipants; 88 G4ReactionProduct theProjectile; 89 91 92 G4FTFParameters *theParameters; // Uzhi 29.03.08 90 93 G4DiffractiveExcitation * theExcitation; 91 94 G4ElasticHNScattering * theElastic; // Uzhi 29.03.08 92 95 93 96 94 97 }; 95 98 99 // ------------------------------------------------------------ 96 100 inline 97 101 G4V3DNucleus * G4FTFModel::GetWoundedNucleus() const -
trunk/source/processes/hadronic/models/parton_string/diffraction/include/G4FTFParticipants.hh
r819 r962 25 25 // 26 26 // 27 // $Id: G4FTFParticipants.hh,v 1. 4 2006/06/29 20:54:32 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $27 // $Id: G4FTFParticipants.hh,v 1.5 2008/03/31 15:34:01 vuzhinsk Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 … … 41 41 42 42 #include "G4VParticipants.hh" 43 #include "G4FTFParameters.hh" // Uzhi 29.03.08 43 44 #include <vector> 44 45 #include "G4Nucleon.hh" … … 60 61 int operator!=(const G4FTFParticipants &right) const; 61 62 62 void BuildInteractions(const G4ReactionProduct &thePrimary); 63 void GetList(const G4ReactionProduct &thePrimary, 64 G4FTFParameters *theParameters); // Uzhi 29.03.08 65 66 void StartLoop(); 63 67 G4bool Next(); 64 68 const G4InteractionContent & GetInteraction() const; 65 66 void StartLoop();67 69 70 std::vector<G4InteractionContent *> theInteractions; 68 71 private: 69 72 70 std::vector<G4InteractionContent *> theInteractions;73 // std::vector<G4InteractionContent *> theInteractions; 71 74 72 75 G4int currentInteraction; … … 95 98 96 99 #endif 97 98 -
trunk/source/processes/hadronic/models/parton_string/diffraction/src/G4DiffractiveExcitation.cc
r819 r962 25 25 // 26 26 // 27 // $Id: G4DiffractiveExcitation.cc,v 1. 1 2007/05/25 06:56:53 vuzhinskExp $27 // $Id: G4DiffractiveExcitation.cc,v 1.7 2008/12/18 13:01:58 gunter Exp $ 28 28 // ------------------------------------------------------------ 29 29 // GEANT 4 class implemetation file … … 31 31 // ---------------- G4DiffractiveExcitation -------------- 32 32 // by Gunter Folger, October 1998. 33 // 34 // 35 // 33 // diffractive Excitation used by strings models 34 // Take a projectile and a target 35 // excite the projectile and target 36 36 // Essential changed by V. Uzhinsky in November - December 2006 37 37 // in order to put it in a correspondence with original FRITIOF 38 38 // model. Variant of FRITIOF with nucleon de-excitation is implemented. 39 39 // Other changes by V.Uzhinsky in May 2007 were introduced to fit 40 // meson-nucleon interactions 40 // meson-nucleon interactions. Additional changes by V. Uzhinsky 41 // were introduced in December 2006. They treat diffraction dissociation 42 // processes more exactly. 41 43 // --------------------------------------------------------------------- 42 44 … … 51 53 #include "G4VSplitableHadron.hh" 52 54 #include "G4ExcitedString.hh" 55 #include "G4FTFParameters.hh" // Uzhi 19.04.08 53 56 //#include "G4ios.hh" 54 55 G4DiffractiveExcitation::G4DiffractiveExcitation() // Uzhi 56 { 57 } 58 57 //#include "UZHI_diffraction.hh" 58 59 G4DiffractiveExcitation::G4DiffractiveExcitation() 60 { 61 } 62 63 // --------------------------------------------------------------------- 59 64 G4bool G4DiffractiveExcitation:: 60 ExciteParticipants(G4VSplitableHadron *projectile, G4VSplitableHadron *target) const 61 { 62 63 G4LorentzVector Pprojectile=projectile->Get4Momentum(); 64 65 // -------------------- Projectile parameters ----------------------------------- 66 G4bool PutOnMassShell=0; 67 68 // With de-excitation 69 // G4double M0projectile=projectile->GetDefinition()->GetPDGMass(); 70 // Without de-excitation 71 G4double M0projectile = Pprojectile.mag(); 72 73 if(M0projectile < projectile->GetDefinition()->GetPDGMass()) 74 { 75 PutOnMassShell=1; 76 M0projectile=projectile->GetDefinition()->GetPDGMass(); 77 } 78 79 G4double Mprojectile2 = M0projectile * M0projectile; 80 81 G4int PDGcode=projectile->GetDefinition()->GetPDGEncoding(); 82 G4int absPDGcode=std::abs(PDGcode); 83 G4double ProjectileDiffCut; 84 G4double ProjectileBackgroundWeight; // Uzhi May 2007 85 86 G4double TargetBackgroundWeight; // Uzhi May 2007 87 88 G4double AveragePt2; 89 90 if( absPDGcode > 1000 ) //------Projectile is baryon -------- 91 { 92 ProjectileDiffCut = 1.1; // GeV 93 ProjectileBackgroundWeight=0.; // Uzhi May 2007 94 AveragePt2 = 0.3; // GeV^2 95 } 96 else if( absPDGcode == 211 || PDGcode == 111) //------Projectile is Pion ----------- 97 { 98 ProjectileDiffCut = 0.6; // GeV Uzhi May 2007 1.0->0.6 99 ProjectileBackgroundWeight=0.9; // Uzhi May 2007 100 AveragePt2 = 0.3; // GeV^2 101 } 102 else if( absPDGcode == 321 || PDGcode == -311) //------Projectile is Kaon ----------- 103 { 104 ProjectileDiffCut = 0.7; // GeV 1.1 105 ProjectileBackgroundWeight=0.5; // Uzhi May 2007 ??? 106 AveragePt2 = 0.3; // GeV^2 107 } 108 else //------Projectile is undefined, 109 //------Nucleon assumed 110 { 111 ProjectileDiffCut = 1.1; // GeV 112 ProjectileBackgroundWeight=0.; // Uzhi May 2007 113 AveragePt2 = 0.3; // GeV^2 114 }; 115 116 ProjectileDiffCut = ProjectileDiffCut * GeV; 117 AveragePt2 = AveragePt2 * GeV*GeV; 118 119 // -------------------- Target parameters ---------------------------------------------- 120 G4LorentzVector Ptarget=target->Get4Momentum(); 121 122 G4double M0target = Ptarget.mag(); 123 124 if(M0target < target->GetDefinition()->GetPDGMass()) 125 { 126 PutOnMassShell=1; 127 M0target=target->GetDefinition()->GetPDGMass(); 128 } 129 130 G4double Mtarget2 = M0target * M0target; //Ptarget.mag2(); 131 // for AA-inter. 132 133 G4double NuclearNucleonDiffCut = 1.1*GeV; 134 TargetBackgroundWeight=0.; // Uzhi May 2007 135 136 G4double ProjectileDiffCut2 = ProjectileDiffCut * ProjectileDiffCut; 137 G4double NuclearNucleonDiffCut2 = NuclearNucleonDiffCut * NuclearNucleonDiffCut; 65 ExciteParticipants(G4VSplitableHadron *projectile, 66 G4VSplitableHadron *target, 67 G4FTFParameters *theParameters) const 68 { 69 G4bool PutOnMassShell=0; 70 71 // -------------------- Projectile parameters ----------------------- 72 73 G4LorentzVector Pprojectile=projectile->Get4Momentum(); 74 // G4double M0projectile=projectile->GetDefinition()->GetPDGMass(); // With de-excitation 75 G4double M0projectile = Pprojectile.mag(); // Without de-excitation 76 /* 77 G4cout<<"ExciteParticipants-------------------"<<G4endl; 78 G4cout<<"Mom "<<Pprojectile<<" mass "<<M0projectile<<G4endl; 79 */ 80 if(M0projectile < projectile->GetDefinition()->GetPDGMass()) 81 { 82 PutOnMassShell=1; 83 M0projectile=projectile->GetDefinition()->GetPDGMass(); 84 } 85 86 G4double M0projectile2 = M0projectile * M0projectile; 87 88 G4int PDGcode=projectile->GetDefinition()->GetPDGEncoding(); 89 G4int absPDGcode=std::abs(PDGcode); 90 91 G4double ProjectileDiffStateMinMass=theParameters->GetProjMinDiffMass(); 92 G4double ProjectileNonDiffStateMinMass=theParameters->GetProjMinNonDiffMass(); 93 G4double ProbProjectileDiffraction=theParameters->GetProbabilityOfProjDiff(); 94 /* 95 G4cout<<ProjectileDiffStateMinMass<<" "<<ProjectileNonDiffStateMinMass<<" "<<ProbProjectileDiffraction<<G4endl; 96 */ 97 // -------------------- Target paraExciteParticipantsmeters ------------------------- 98 G4LorentzVector Ptarget=target->Get4Momentum(); 99 G4double M0target = Ptarget.mag(); 100 101 //G4cout<<"Mom "<<Ptarget<<" mass "<<M0target<<G4endl; 102 103 if(M0target < target->GetDefinition()->GetPDGMass()) 104 { 105 PutOnMassShell=1; 106 M0target=target->GetDefinition()->GetPDGMass(); 107 } 108 109 G4double M0target2 = M0target * M0target; //Ptarget.mag2(); 110 // for AA-inter. 111 G4double TargetDiffStateMinMass=theParameters->GetTarMinDiffMass(); 112 G4double TargetNonDiffStateMinMass=theParameters->GetTarMinNonDiffMass(); 113 G4double ProbTargetDiffraction=theParameters->GetProbabilityOfTarDiff(); 114 /* 115 G4cout<<TargetDiffStateMinMass<<" "<<TargetNonDiffStateMinMass<<" "<<ProbTargetDiffraction<<G4endl; 116 */ 117 G4double AveragePt2=theParameters->GetAveragePt2(); 118 119 // Kinematical properties of the interactions -------------- 120 G4LorentzVector Psum; // 4-momentum in CMS 121 Psum=Pprojectile+Ptarget; 122 G4double S=Psum.mag2(); 123 124 //G4cout<<" sqrt(s) "<<std::sqrt(S)<<G4endl; 125 126 // ------------------------------------------------------------------ 127 128 //ProbProjectileDiffraction=1.; 129 //ProbTargetDiffraction =1.; 130 G4double ProbOfDiffraction=ProbProjectileDiffraction + 131 ProbTargetDiffraction; 132 133 if(ProbOfDiffraction!=0.) 134 { 135 ProbProjectileDiffraction/=ProbOfDiffraction; 136 } 137 else 138 { 139 ProbProjectileDiffraction=0.; 140 } 141 // ProbTargetDiffraction /=ProbOfDiffraction; 142 143 //G4cout<<"ProbOfDiffraction "<<ProbOfDiffraction<<"ProbProjectileDiffraction "<<ProbProjectileDiffraction<<G4endl; // Vova 144 145 G4double ProjectileDiffStateMinMass2 = ProjectileDiffStateMinMass * 146 ProjectileDiffStateMinMass; 147 G4double ProjectileNonDiffStateMinMass2 = ProjectileNonDiffStateMinMass * 148 ProjectileNonDiffStateMinMass; 149 150 G4double TargetDiffStateMinMass2 = TargetDiffStateMinMass * 151 TargetDiffStateMinMass; 152 G4double TargetNonDiffStateMinMass2 = TargetNonDiffStateMinMass * 153 TargetNonDiffStateMinMass; 138 154 139 155 // Transform momenta to cms and then rotate parallel to z axis; 140 156 141 G4LorentzVector Psum; 142 Psum=Pprojectile+Ptarget; 143 144 G4LorentzRotation toCms(-1*Psum.boostVector()); 145 146 G4LorentzVector Ptmp=toCms*Pprojectile; 147 148 if ( Ptmp.pz() <= 0. ) 149 { 157 // G4LorentzVector Psum; 158 // Psum=Pprojectile+Ptarget; 159 160 G4LorentzRotation toCms(-1*Psum.boostVector()); 161 162 G4LorentzVector Ptmp=toCms*Pprojectile; 163 if ( Ptmp.pz() <= 0. ) 164 { 150 165 // "String" moving backwards in CMS, abort collision !! 151 166 //G4cout << " abort Collision!! " << G4endl; 152 return false; 153 } 154 155 toCms.rotateZ(-1*Ptmp.phi()); 156 toCms.rotateY(-1*Ptmp.theta()); 157 158 G4LorentzRotation toLab(toCms.inverse()); 159 160 Pprojectile.transform(toCms); 161 Ptarget.transform(toCms); 162 163 G4double Pt2; 164 G4double ProjMassT2, ProjMassT; 165 G4double TargMassT2, TargMassT; 166 G4double PZcms2, PZcms; 167 G4double PMinusNew, TPlusNew; 168 169 G4double S=Psum.mag2(); 170 G4double SqrtS=std::sqrt(S); 171 172 if(absPDGcode > 1000 && SqrtS < 2200*MeV) 173 {return false;} // The model cannot work for 174 // p+p-interactions 175 // at Plab < 1.3 GeV/c. 176 177 if(( absPDGcode == 211 || PDGcode == 111) && SqrtS < 1600*MeV) 178 {return false;} // The model cannot work for 179 // Pi+p-interactions 180 // at Plab < 1. GeV/c. 181 182 if(( absPDGcode == 321 || PDGcode == -311) && SqrtS < 1600*MeV) 183 {return false;} // The model cannot work for 184 // K+p-interactions 185 // at Plab < ??? GeV/c. ??? 186 187 PZcms2=(S*S+Mprojectile2*Mprojectile2+Mtarget2*Mtarget2- 188 2*S*Mprojectile2-2*S*Mtarget2-2*Mprojectile2*Mtarget2)/4./S; 189 if(PZcms2 < 0) 190 {return false;} // It can be in an interaction with off-shell nuclear nucleon 191 192 PZcms = std::sqrt(PZcms2); 193 194 if(PutOnMassShell) 167 return false; 168 } 169 170 toCms.rotateZ(-1*Ptmp.phi()); 171 toCms.rotateY(-1*Ptmp.theta()); 172 173 G4LorentzRotation toLab(toCms.inverse()); 174 175 Pprojectile.transform(toCms); 176 Ptarget.transform(toCms); 177 178 G4double Pt2; 179 G4double ProjMassT2, ProjMassT; 180 G4double TargMassT2, TargMassT; 181 G4double PZcms2, PZcms; 182 G4double PMinusMin, PMinusMax; 183 // G4double PPlusMin , PPlusMax; 184 G4double TPlusMin , TPlusMax; 185 G4double PMinusNew, PPlusNew, TPlusNew, TMinusNew; 186 187 // G4double S=Psum.mag2(); 188 G4double SqrtS=std::sqrt(S); 189 190 if(absPDGcode > 1000 && SqrtS < 2200*MeV) 191 {return false;} // The model cannot work for 192 // p+p-interactions 193 // at Plab < 1.3 GeV/c. 194 195 if(( absPDGcode == 211 || PDGcode == 111) && SqrtS < 1600*MeV) 196 {return false;} // The model cannot work for 197 // Pi+p-interactions 198 // at Plab < 1. GeV/c. 199 200 if(( absPDGcode == 321 || PDGcode == -311) && SqrtS < 1600*MeV) 201 {return false;} // The model cannot work for 202 // K+p-interactions 203 // at Plab < ??? GeV/c. ??? 204 205 PZcms2=(S*S+M0projectile2*M0projectile2+M0target2*M0target2- 206 2*S*M0projectile2 - 2*S*M0target2 - 2*M0projectile2*M0target2) 207 /4./S; 208 209 if(PZcms2 < 0) 210 {return false;} // It can be in an interaction with off-shell nuclear nucleon 211 212 PZcms = std::sqrt(PZcms2); 213 214 if(PutOnMassShell) 215 { 216 if(Pprojectile.z() > 0.) 217 { 218 Pprojectile.setPz( PZcms); 219 Ptarget.setPz( -PZcms); 220 } 221 else 222 { 223 Pprojectile.setPz(-PZcms); 224 Ptarget.setPz( PZcms); 225 }; 226 227 Pprojectile.setE(std::sqrt(M0projectile2 + 228 Pprojectile.x()*Pprojectile.x()+ 229 Pprojectile.y()*Pprojectile.y()+ 230 PZcms2)); 231 Ptarget.setE(std::sqrt(M0target2 + 232 Ptarget.x()*Ptarget.x()+ 233 Ptarget.y()*Ptarget.y()+ 234 PZcms2)); 235 } 236 237 G4double maxPtSquare; // = PZcms2; 238 /* 239 G4cout << "Pprojectile aft boost : " << Pprojectile <<" "<<Pprojectile.mag()<< G4endl; 240 G4cout << "Ptarget aft boost : " << Ptarget <<" "<<Ptarget.mag()<< G4endl; 241 G4cout << "cms aft boost : " << (Pprojectile+ Ptarget) << G4endl; 242 G4cout << " Projectile Xplus / Xminus : " << 243 Pprojectile.plus() << " / " << Pprojectile.minus() << G4endl; 244 G4cout << " Target Xplus / Xminus : " << Ptarget.plus() << " / " << Ptarget.minus() << G4endl; 245 G4cout<<"maxPtSquare "<<maxPtSquare<<G4endl; 246 */ 247 G4LorentzVector Qmomentum; 248 G4double Qminus, Qplus; 249 250 G4int whilecount=0; 251 // Choose a process 252 253 if(G4UniformRand() < ProbOfDiffraction) 254 { 255 if(G4UniformRand() < ProbProjectileDiffraction) 256 { //-------- projectile diffraction --------------- 257 //G4cout<<" Projectile diffraction"<<G4endl; 258 //Uzhi_projectilediffraction++; 259 do { 260 // Generate pt 261 // if (whilecount++ >= 500 && (whilecount%100)==0) 262 // G4cout << "G4DiffractiveExcitation::ExciteParticipants possibly looping" 263 // << ", loop count/ maxPtSquare : " 264 // << whilecount << " / " << maxPtSquare << G4endl; 265 if (whilecount > 1000 ) 195 266 { 196 if(Pprojectile.z() > 0.) 197 { 198 Pprojectile.setPz( PZcms); 199 Ptarget.setPz( -PZcms); 200 } 201 else 202 { 203 Pprojectile.setPz(-PZcms); 204 Ptarget.setPz( PZcms); 205 }; 206 207 Pprojectile.setE(std::sqrt(Mprojectile2+ 208 Pprojectile.x()*Pprojectile.x()+ 209 Pprojectile.y()*Pprojectile.y()+ 210 PZcms2)); 211 Ptarget.setE(std::sqrt( Mtarget2 + 212 Ptarget.x()*Ptarget.x()+ 213 Ptarget.y()*Ptarget.y()+ 214 PZcms2)); 215 } 216 217 G4double maxPtSquare = PZcms2; 218 219 //G4cout << "Pprojectile aft boost : " << Pprojectile << G4endl; 220 //G4cout << "Ptarget aft boost : " << Ptarget << G4endl; 221 // G4cout << "cms aft boost : " << (Pprojectile+ Ptarget) << G4endl; 222 223 // G4cout << " Projectile Xplus / Xminus : " << 224 // Pprojectile.plus() << " / " << Pprojectile.minus() << G4endl; 225 // G4cout << " Target Xplus / Xminus : " << 226 // Ptarget.plus() << " / " << Ptarget.minus() << G4endl; 227 228 G4LorentzVector Qmomentum; 229 G4double Qminus, Qplus; 230 231 G4int whilecount=0; 232 do { 233 // Generate pt 234 235 if (whilecount++ >= 500 && (whilecount%100)==0) 267 Qmomentum=G4LorentzVector(0.,0.,0.,0.); 268 return false; // Ignore this interaction 269 }; 270 // --------------- Check that the interaction is possible ----------- 271 ProjMassT2=ProjectileDiffStateMinMass2; 272 ProjMassT =ProjectileDiffStateMinMass; 273 274 TargMassT2=M0target2; 275 TargMassT =M0target; 276 277 PZcms2=(S*S + ProjMassT2*ProjMassT2 + TargMassT2*TargMassT2- 278 2.*S*ProjMassT2-2.*S*TargMassT2-2.*ProjMassT2*TargMassT2) 279 /4./S; 280 //G4cout<<" Pt2 Mpt Mtt Pz2 "<<Pt2<<" "<<ProjMassT<<" "<<TargMassT<<" "<<PZcms2<<G4endl; 281 282 if(PZcms2 < 0 ) 283 { 284 /* 285 G4cout<<"whilecount "<<whilecount<<" "<<Pt2<<" "<<ProjMassT<<" "<<TargMassT<<" "<<PZcms2<<G4endl; 286 G4int Uzhi; G4cin>>Uzhi; 287 */ 288 return false; 289 }; 290 maxPtSquare=PZcms2; 291 292 Qmomentum=G4LorentzVector(GaussianPt(AveragePt2,maxPtSquare),0); 293 Pt2=G4ThreeVector(Qmomentum.vect()).mag2(); 294 295 ProjMassT2=ProjectileDiffStateMinMass2+Pt2; 296 ProjMassT =std::sqrt(ProjMassT2); 297 298 TargMassT2=M0target2+Pt2; 299 TargMassT =std::sqrt(TargMassT2); 300 301 PZcms2=(S*S + ProjMassT2*ProjMassT2 + TargMassT2*TargMassT2- 302 2.*S*ProjMassT2-2.*S*TargMassT2-2.*ProjMassT2*TargMassT2) 303 /4./S; 304 //G4cout<<" Pt2 Mpt Mtt Pz2 "<<Pt2<<" "<<ProjMassT<<" "<<TargMassT<<" "<<PZcms2<<G4endl; 305 306 // if(PZcms2 < 0 ) {PZcms2=0;}; 307 if(PZcms2 < 0 ) continue; 308 PZcms =std::sqrt(PZcms2); 309 310 PMinusMin=std::sqrt(ProjMassT2+PZcms2)-PZcms; 311 PMinusMax=SqrtS-TargMassT; 312 //G4cout<<" SqrtS P+mim max "<<SqrtS<<" "<<PMinusMin<<" "<<PMinusMax<<G4endl; 313 314 PMinusNew=ChooseP(PMinusMin, PMinusMax); 315 // PMinusNew=1./sqrt(1./PMinusMin-G4UniformRand()*(1./PMinusMin-1./PMinusMax)); 316 317 TMinusNew=SqrtS-PMinusNew; 318 Qminus=Ptarget.minus()-TMinusNew; 319 TPlusNew=TargMassT2/TMinusNew; 320 Qplus=Ptarget.plus()-TPlusNew; 321 322 Qmomentum.setPz( (Qplus-Qminus)/2 ); 323 Qmomentum.setE( (Qplus+Qminus)/2 ); 324 } while ( 325 ((Pprojectile+Qmomentum).mag2() < ProjectileDiffStateMinMass2) || //No without excitation 326 ((Ptarget -Qmomentum).mag2() < M0target2 )); 327 } 328 else 329 { // -------------- Target diffraction ---------------- 330 //G4cout<<" Target difraction"<<G4endl; 331 //Uzhi_targetdiffraction++; 332 do { 333 // Generate pt 334 // if (whilecount++ >= 500 && (whilecount%100)==0) 236 335 // G4cout << "G4DiffractiveExcitation::ExciteParticipants possibly looping" 237 // << ", loop count/ maxPtSquare : " 336 // << ", loop count/ maxPtSquare : " 238 337 // << whilecount << " / " << maxPtSquare << G4endl; 239 if (whilecount > 1000 ) 240 { 241 Qmomentum=G4LorentzVector(0.,0.,0.,0.); 242 return false; // Ignore this interaction 243 } 244 245 Qmomentum=G4LorentzVector(GaussianPt(AveragePt2,maxPtSquare),0); 246 247 //G4cout << "generated Pt " << Qmomentum << G4endl; 248 //G4cout << "Pprojectile with pt : " << Pprojectile+Qmomentum << G4endl; 249 //G4cout << "Ptarget with pt : " << Ptarget-Qmomentum << G4endl; 250 251 // Momentum transfer 252 /* // Uzhi 253 G4double Xmin = minmass / ( Pprojectile.e() + Ptarget.e() ); 254 G4double Xmax=1.; 255 G4double Xplus =ChooseX(Xmin,Xmax); 256 G4double Xminus=ChooseX(Xmin,Xmax); 257 258 // G4cout << " X-plus " << Xplus << G4endl; 259 // G4cout << " X-minus " << Xminus << G4endl; 260 261 G4double pt2=G4ThreeVector(Qmomentum.vect()).mag2(); 262 G4double Qplus =-1 * pt2 / Xminus/Ptarget.minus(); 263 G4double Qminus= pt2 / Xplus /Pprojectile.plus(); 264 */ // Uzhi * 265 266 Pt2=G4ThreeVector(Qmomentum.vect()).mag2(); 267 ProjMassT2=Mprojectile2+Pt2; 268 ProjMassT =std::sqrt(ProjMassT2); 269 270 TargMassT2=Mtarget2+Pt2; 271 TargMassT =std::sqrt(TargMassT2); 272 273 PZcms2=(S*S+ProjMassT2*ProjMassT2+ 274 TargMassT2*TargMassT2- 275 2.*S*ProjMassT2-2.*S*TargMassT2- 276 2.*ProjMassT2*TargMassT2)/4./S; 277 if(PZcms2 < 0 ) {PZcms2=0;}; 278 PZcms =std::sqrt(PZcms2); 279 280 G4double PMinusMin=std::sqrt(ProjMassT2+PZcms2)-PZcms; 281 G4double PMinusMax=SqrtS-TargMassT; 282 283 if(G4UniformRand() < ProjectileBackgroundWeight) // Uzhi May 2007 284 { 285 PMinusNew=PMinusMax-(PMinusMax-PMinusMin)*G4UniformRand(); // Uzhi May 2007 286 } // Uzhi May 2007 287 else // Uzhi May 2007 288 { // Uzhi May 2007 289 PMinusNew=ChooseP(PMinusMin, PMinusMax); // Uzhi May 2007 290 }; // Uzhi May 2007 291 // PMinusNew=ChooseP(PMinusMin, PMinusMax); // Uzhi May 2007 292 Qminus=PMinusNew-Pprojectile.minus(); 293 294 G4double TPlusMin=std::sqrt(TargMassT2+PZcms2)-PZcms; 295 G4double TPlusMax=SqrtS-PMinusNew; // Uzhi May 2007 296 // G4double TPlusMax=SqrtS-ProjMassT; // Uzhi May 2007 297 298 if(G4UniformRand() < TargetBackgroundWeight) // Uzhi May 2007 299 { 300 TPlusNew=TPlusMax-(TPlusMax-TPlusMin)*G4UniformRand(); // Uzhi May 2007 301 } // Uzhi May 2007 302 else // Uzhi May 2007 303 { // Uzhi May 2007 304 TPlusNew=ChooseP(TPlusMin, TPlusMax); // Uzhi May 2007 305 }; // Uzhi May 2007 306 307 // TPlusNew=ChooseP(TPlusMin, TPlusMax); // Uzhi May 2007 308 Qplus=-(TPlusNew-Ptarget.plus()); 309 310 Qmomentum.setPz( (Qplus-Qminus)/2 ); 311 Qmomentum.setE( (Qplus+Qminus)/2 ); 312 313 //G4cout << "Qplus / Qminus " << Qplus << " / " << Qminus<<G4endl; 314 // G4cout << "pt2" << pt2 << G4endl; 315 // G4cout << "Qmomentum " << Qmomentum << G4endl; 316 // G4cout << " Masses (P/T) : " << (Pprojectile+Qmomentum).mag() << 317 // " / " << (Ptarget-Qmomentum).mag() << G4endl; 318 319 } while ( 320 ( (Pprojectile+Qmomentum).mag2() < Mprojectile2 || // Uzhi No without excitation 321 (Ptarget -Qmomentum).mag2() < Mtarget2 ) || // Uzhi 322 ( (Pprojectile+Qmomentum).mag2() < ProjectileDiffCut2 && // Uzhi No double Diffraction 323 (Ptarget -Qmomentum).mag2() < NuclearNucleonDiffCut2) );// Uzhi 324 325 if((Ptarget-Qmomentum).mag2() < NuclearNucleonDiffCut2) // Uzhi 326 //Projectile diffraction 338 if (whilecount > 1000 ) 327 339 { 328 G4double TMinusNew=SqrtS-PMinusNew; 329 Qminus=Ptarget.minus()-TMinusNew; 330 TPlusNew=TargMassT2/TMinusNew; 331 Qplus=Ptarget.plus()-TPlusNew; 332 333 Qmomentum.setPz( (Qplus-Qminus)/2 ); 334 Qmomentum.setE( (Qplus+Qminus)/2 ); 335 } 336 else if((Pprojectile+Qmomentum).mag2() < ProjectileDiffCut2) // Uzhi 337 //Target diffraction 340 Qmomentum=G4LorentzVector(0.,0.,0.,0.); 341 return false; // Ignore this interaction 342 }; 343 // --------------- Check that the interaction is possible ----------- 344 ProjMassT2=M0projectile2; 345 ProjMassT =M0projectile; 346 347 TargMassT2=TargetDiffStateMinMass2; 348 TargMassT =TargetDiffStateMinMass; 349 350 PZcms2=(S*S + ProjMassT2*ProjMassT2 + TargMassT2*TargMassT2- 351 2.*S*ProjMassT2-2.*S*TargMassT2-2.*ProjMassT2*TargMassT2) 352 /4./S; 353 //G4cout<<" Pt2 Mpt Mtt Pz2 "<<Pt2<<" "<<ProjMassT<<" "<<TargMassT<<" "<<PZcms2<<G4endl; 354 355 if(PZcms2 < 0 ) 356 { 357 /* 358 G4cout<<"whilecount "<<whilecount<<" "<<Pt2<<" "<<ProjMassT<<" "<<TargMassT<<" "<<PZcms2<<G4endl; 359 G4int Uzhi; G4cin>>Uzhi; 360 */ 361 return false; 362 }; 363 maxPtSquare=PZcms2; 364 365 Qmomentum=G4LorentzVector(GaussianPt(AveragePt2,maxPtSquare),0); 366 Pt2=G4ThreeVector(Qmomentum.vect()).mag2(); 367 368 ProjMassT2=M0projectile2+Pt2; 369 ProjMassT =std::sqrt(ProjMassT2); 370 371 TargMassT2=TargetDiffStateMinMass2+Pt2; 372 TargMassT =std::sqrt(TargMassT2); 373 374 PZcms2=(S*S + ProjMassT2*ProjMassT2 + TargMassT2*TargMassT2- 375 2.*S*ProjMassT2-2.*S*TargMassT2-2.*ProjMassT2*TargMassT2) 376 /4./S; 377 /* 378 if(PZcms2 < 0 ) 379 { 380 G4cout<<"whilecount "<<whilecount<<" "<<Pt2<<" "<<ProjMassT<<" "<<TargMassT<<" "<<PZcms2<<G4endl; 381 G4int Uzhi; G4cin>>Uzhi; 382 return false; 383 }; 384 */ 385 if(PZcms2 < 0 ) continue; 386 PZcms =std::sqrt(PZcms2); 387 388 TPlusMin=std::sqrt(TargMassT2+PZcms2)-PZcms; 389 TPlusMax=SqrtS-ProjMassT; 390 391 //G4cout<<" Tmin max "<<TPlusMin<<" "<<TPlusMax<<G4endl; 392 393 TPlusNew=ChooseP(TPlusMin, TPlusMax); 394 395 //TPlusNew=TPlusMax; 396 //G4cout<<"T+new "<<TPlusNew<<G4endl; 397 398 PPlusNew=SqrtS-TPlusNew; 399 Qplus=PPlusNew-Pprojectile.plus(); 400 PMinusNew=ProjMassT2/PPlusNew; 401 Qminus=PMinusNew-Pprojectile.minus(); 402 403 Qmomentum.setPz( (Qplus-Qminus)/2 ); 404 Qmomentum.setE( (Qplus+Qminus)/2 ); 405 406 } while ( 407 ((Pprojectile+Qmomentum).mag2() < M0projectile2 ) || //No without excitation 408 ((Ptarget -Qmomentum).mag2() < TargetDiffStateMinMass2)); 409 } 410 } 411 else //----------- Non-diffraction process ------------ 412 { 413 //G4cout<<" Non-difraction"<<G4endl; 414 do { 415 // Generate pt 416 // if (whilecount++ >= 500 && (whilecount%100)==0) 417 // G4cout << "G4DiffractiveExcitation::ExciteParticipants possibly looping" 418 // << ", loop count/ maxPtSquare : " 419 // << whilecount << " / " << maxPtSquare << G4endl; 420 if (whilecount > 1000 ) 338 421 { 339 G4double PPlusNew=SqrtS-TPlusNew; 340 Qplus=PPlusNew-Pprojectile.plus(); 341 PMinusNew=ProjMassT2/PPlusNew; 342 Qminus=PMinusNew-Pprojectile.minus(); 343 344 Qmomentum.setPz( (Qplus-Qminus)/2 ); 345 Qmomentum.setE( (Qplus+Qminus)/2 ); 422 Qmomentum=G4LorentzVector(0.,0.,0.,0.); 423 return false; // Ignore this interaction 346 424 }; 425 // --------------- Check that the interaction is possible ----------- 426 ProjMassT2=ProjectileNonDiffStateMinMass2; 427 ProjMassT =ProjectileNonDiffStateMinMass; 428 429 TargMassT2=TargetNonDiffStateMinMass2; 430 TargMassT =TargetNonDiffStateMinMass; 431 432 PZcms2=(S*S + ProjMassT2*ProjMassT2 + TargMassT2*TargMassT2- 433 2.*S*ProjMassT2-2.*S*TargMassT2-2.*ProjMassT2*TargMassT2) 434 /4./S; 435 //G4cout<<" Pt2 Mpt Mtt Pz2 "<<Pt2<<" "<<ProjMassT<<" "<<TargMassT<<" "<<PZcms2<<G4endl; 436 437 if(PZcms2 < 0 ) 438 { 439 /* 440 G4cout<<"whilecount "<<whilecount<<" "<<Pt2<<" "<<ProjMassT<<" "<<TargMassT<<" "<<PZcms2<<G4endl; 441 G4int Uzhi; G4cin>>Uzhi; 442 */ 443 return false; 444 }; 445 maxPtSquare=PZcms2; 446 Qmomentum=G4LorentzVector(GaussianPt(AveragePt2,maxPtSquare),0); 447 Pt2=G4ThreeVector(Qmomentum.vect()).mag2(); 448 449 ProjMassT2=ProjectileNonDiffStateMinMass2+Pt2; 450 ProjMassT =std::sqrt(ProjMassT2); 451 452 TargMassT2=TargetNonDiffStateMinMass2+Pt2; 453 TargMassT =std::sqrt(TargMassT2); 454 455 PZcms2=(S*S + ProjMassT2*ProjMassT2 + TargMassT2*TargMassT2- 456 2.*S*ProjMassT2-2.*S*TargMassT2-2.*ProjMassT2*TargMassT2) 457 /4./S; 458 /* 459 G4cout<<"ProjectileNonDiffStateMinMass2 "<<ProjectileNonDiffStateMinMass2<<G4endl; 460 G4cout<<"TargetNonDiffStateMinMass2 "<<TargetNonDiffStateMinMass2<<G4endl; 461 G4cout<<"Mt "<<ProjMassT<<" "<<TargMassT<<" "<<Pt2<<" "<<PZcms2<<G4endl<<G4endl; 462 */ 463 // if(PZcms2 < 0 ) {PZcms2=0;}; 464 if(PZcms2 < 0 ) continue; 465 PZcms =std::sqrt(PZcms2); 466 467 PMinusMin=std::sqrt(ProjMassT2+PZcms2)-PZcms; 468 PMinusMax=SqrtS-TargMassT; 469 470 PMinusNew=ChooseP(PMinusMin, PMinusMax); 471 // PMinusNew=1./sqrt(1./PMinusMin-G4UniformRand()*(1./PMinusMin-1./PMinusMax)); 472 473 //G4cout<<"Proj "<<PMinusMin<<" "<<PMinusMax<<" "<<PMinusNew<<G4endl; 474 475 //PMinusNew=PMinusMax; //+++++++++++++++++++++++++++++++++++ Vova 476 477 Qminus=PMinusNew-Pprojectile.minus(); 478 479 TPlusMin=std::sqrt(TargMassT2+PZcms2)-PZcms; 480 // TPlusMax=SqrtS-PMinusNew; // Vova 481 TPlusMax=SqrtS-ProjMassT; // Vova 482 483 TPlusNew=ChooseP(TPlusMin, TPlusMax); 484 485 //G4cout<<"Targ "<<TPlusMin<<" "<<TPlusMax<<" "<<TPlusNew<<G4endl; 486 //G4cout<<PMinusNew<<" "<<TPlusNew<<G4endl; 487 488 Qplus=-(TPlusNew-Ptarget.plus()); 489 490 Qmomentum.setPz( (Qplus-Qminus)/2 ); 491 Qmomentum.setE( (Qplus+Qminus)/2 ); 492 /* 493 G4cout << "Qplus / Qminus " << Qplus << " / " << Qminus<<G4endl; 494 G4cout << "pt2" << pt2 << G4endl; 495 G4cout << "Qmomentum " << Qmomentum << G4endl; 496 G4cout << " Masses (P/T) : " << (Pprojectile+Qmomentum).mag() << 497 " / " << (Ptarget-Qmomentum).mag() << G4endl; // mag() 498 G4cout<<"Mprojectile "<<std::sqrt(M0projectile2)<<G4endl; 499 G4cout<<"Mtarget "<<std::sqrt(M0target2 )<<G4endl; 500 G4cout<<"ProjectileDiffStateMinMass "<<std::sqrt(ProjectileDiffStateMinMass2)<<G4endl; 501 G4cout<<"TargetDiffStateMinMass "<<std::sqrt(TargetDiffStateMinMass2)<<G4endl; 502 */ 503 } while ( 504 ((Pprojectile+Qmomentum).mag2() < ProjectileNonDiffStateMinMass2) || //No double Diffraction 505 ((Ptarget -Qmomentum).mag2() < TargetNonDiffStateMinMass2 )); 506 } 507 508 //G4int Uzhiinp; G4cin>>Uzhiinp; // Vova 347 509 348 510 Pprojectile += Qmomentum; 349 511 Ptarget -= Qmomentum; 350 351 /* 352 Pprojectile.setPz(0.); 353 Pprojectile.setE(SqrtS-M0target); 354 355 Ptarget.setPz(0.); 356 Ptarget.setE(M0target); 357 */ 358 359 //G4cout << "Pprojectile with Q : " << Pprojectile << G4endl; 360 //G4cout << "Ptarget with Q : " << Ptarget << G4endl; 361 362 // G4cout << "Projectile back: " << toLab * Pprojectile << G4endl; 363 // G4cout << "Target back: " << toLab * Ptarget << G4endl; 512 /* 513 G4cout << "Pprojectile with Q : " << Pprojectile << G4endl; 514 G4cout << "Ptarget with Q : " << Ptarget << G4endl; 515 G4cout << "Target mass " << Ptarget.mag() << G4endl; 516 G4cout << "Projectile mass " << Pprojectile.mag() << G4endl; 517 // 518 //G4cout << "Projectile back: " << toLab * Pprojectile << G4endl; 519 //G4cout << "Target back: " << toLab * Ptarget << G4endl; 520 */ 521 //-------------- Flip if projectale moves in backward direction ------------ 522 //G4bool Flip=Pprojectile.pz()< 0.; 523 364 524 365 525 // Transform back and update SplitableHadron Participant. … … 369 529 //G4cout << "Pprojectile with Q M: " << Pprojectile<<" "<< Pprojectile.mag() << G4endl; 370 530 //G4cout << "Ptarget with Q M: " << Ptarget <<" "<< Ptarget.mag() << G4endl; 371 372 //G4cout << "Target mass " << Ptarget.mag() << G4endl; 373 531 //G4cout << "Target mass " << Ptarget.mag() << G4endl; 532 //G4cout << "Projectile mass " << Pprojectile.mag() << G4endl; 533 534 /* 535 if(!Flip){ 536 projectile->Set4Momentum(Pprojectile); 374 537 target->Set4Momentum(Ptarget); 375 376 //G4cout << "Projectile mass " << Pprojectile.mag() << G4endl; 538 } 539 else { 540 G4ParticleDefinition * t_Definition=projectile->GetDefinition(); 541 projectile->SetDefinition(target->GetDefinition()); 542 projectile->Set4Momentum(Ptarget); 543 target->SetDefinition(t_Definition); 544 target->Set4Momentum(Pprojectile); 545 } 546 */ 547 // 548 /* 549 if(G4UniformRand() < 1.) { 550 G4ParticleDefinition * t_Definition=projectile->GetDefinition(); 551 projectile->SetDefinition(target->GetDefinition()); 552 target->SetDefinition(t_Definition); 553 } 554 */ // For flip, for HARP 555 556 G4double ZcoordinateOfCurrentInteraction = target->GetPosition().z(); 557 // It is assumed that nucleon z-coordinates are ordered on increasing ----------- 558 559 G4double betta_z=projectile->Get4Momentum().pz()/projectile->Get4Momentum().e(); 560 561 G4double ZcoordinateOfPreviousCollision=projectile->GetPosition().z(); 562 if(projectile->GetSoftCollisionCount()==0) { 563 projectile->SetTimeOfCreation(0.); 564 target->SetTimeOfCreation(0.); 565 ZcoordinateOfPreviousCollision=ZcoordinateOfCurrentInteraction; 566 } 567 568 G4ThreeVector thePosition(projectile->GetPosition().x(), 569 projectile->GetPosition().y(), 570 ZcoordinateOfCurrentInteraction); 571 projectile->SetPosition(thePosition); 572 573 G4double TimeOfPreviousCollision=projectile->GetTimeOfCreation(); 574 G4double TimeOfCurrentCollision=TimeOfPreviousCollision+ 575 (ZcoordinateOfCurrentInteraction-ZcoordinateOfPreviousCollision)/betta_z; 576 577 projectile->SetTimeOfCreation(TimeOfCurrentCollision); 578 target->SetTimeOfCreation(TimeOfCurrentCollision); 377 579 378 580 projectile->Set4Momentum(Pprojectile); 581 target->Set4Momentum(Ptarget); 582 583 projectile->IncrementCollisionCount(1); 584 target->IncrementCollisionCount(1); 585 586 // 587 //G4cout<<"Out of Excitation --------------------"<<G4endl; 588 //G4int Uzhiinp; G4cin>>Uzhiinp; // Vova 379 589 380 590 return true; 381 591 } 382 592 383 593 // --------------------------------------------------------------------- 384 594 G4ExcitedString * G4DiffractiveExcitation:: 385 595 String(G4VSplitableHadron * hadron, G4bool isProjectile) const 386 596 { 597 598 //G4cout<<"G4DiffractiveExcitation::String isProj"<<isProjectile<<G4endl; 599 387 600 hadron->SplitUp(); 388 601 G4Parton *start= hadron->GetNextParton(); 389 if ( start==NULL) 602 if ( start==NULL) 390 603 { G4cout << " G4FTFModel::String() Error:No start parton found"<< G4endl; 391 604 return NULL; 392 605 } 393 606 G4Parton *end = hadron->GetNextParton(); 394 if ( end==NULL) 607 if ( end==NULL) 395 608 { G4cout << " G4FTFModel::String() Error:No end parton found"<< G4endl; 396 609 return NULL; 397 610 } 398 611 399 612 G4ExcitedString * string; 400 if ( isProjectile ) 613 if ( isProjectile ) 401 614 { 402 615 string= new G4ExcitedString(end,start, +1); … … 404 617 string= new G4ExcitedString(start,end, -1); 405 618 } 406 619 // Uzhi 620 //G4cout<<"G4ExcitedString * G4DiffractiveExcitation::String"<<G4endl; 621 //G4cout<<hadron->GetTimeOfCreation()<<" "<<hadron->GetPosition()/fermi<<G4endl; 622 623 string->SetTimeOfCreation(hadron->GetTimeOfCreation()); 407 624 string->SetPosition(hadron->GetPosition()); 408 625 409 626 // momenta of string ends 627 // 628 G4double Momentum=hadron->Get4Momentum().vect().mag(); 629 G4double Plus=hadron->Get4Momentum().e() + Momentum; 630 G4double Minus=hadron->Get4Momentum().e() - Momentum; 631 632 G4ThreeVector tmp; 633 if(Momentum > 0.) 634 { 635 tmp.set(hadron->Get4Momentum().px(), 636 hadron->Get4Momentum().py(), 637 hadron->Get4Momentum().pz()); 638 tmp/=Momentum; 639 } 640 else 641 { 642 tmp.set(0.,0.,1.); 643 }; 644 645 G4LorentzVector Pstart(tmp,0.); 646 G4LorentzVector Pend(tmp,0.); 647 648 if(isProjectile) 649 { 650 Pstart*=(-1.)*Minus/2.; 651 Pend *=(+1.)*Plus /2.; 652 } 653 else 654 { 655 Pstart*=(+1.)*Plus/2.; 656 Pend *=(-1.)*Minus/2.; 657 }; 658 659 Momentum=-Pstart.mag(); 660 Pstart.setT(Momentum); // It is assumed that quark has m=0. 661 662 Momentum=-Pend.mag(); 663 Pend.setT(Momentum); // It is assumed that di-quark has m=0. 664 // 665 /* Uzhi 410 666 G4double ptSquared= hadron->Get4Momentum().perp2(); 411 667 G4double transverseMassSquared= hadron->Get4Momentum().plus() … … 416 672 sqr( std::sqrt(transverseMassSquared) - std::sqrt(ptSquared) ); 417 673 418 G4double widthOfPtSquare = 0.25 ; // Uzhi<Pt^2>=0.25 ??????????????????674 G4double widthOfPtSquare = 0.25*GeV*GeV; // Uzhi 11.07 <Pt^2>=0.25 ?????????????????? 419 675 G4ThreeVector pt=GaussianPt(widthOfPtSquare,maxAvailMomentumSquared); 420 676 … … 432 688 433 689 G4int Sign= isProjectile ? -1 : 1; 434 690 435 691 G4double endMinus = 0.5 * (tm1 + Sign*tm2); 436 692 G4double startMinus= hadron->Get4Momentum().minus() - endMinus; … … 444 700 Pend.setPz(0.5*(endPlus - endMinus)); 445 701 Pend.setE(0.5*(endPlus + endMinus)); 446 702 */ // Uzhi 447 703 start->Set4Momentum(Pstart); 448 704 end->Set4Momentum(Pend); 449 705 /* 706 G4cout<<"G4DiffractiveExcitation::String hadro"<<hadron->Get4Momentum()<<" "<<hadron->Get4Momentum().mag2()<<G4endl; 707 708 G4cout<<"G4DiffractiveExcitation::String start"<<start->Get4Momentum()<<" "<<start->GetPDGcode()<<G4endl; 709 710 G4cout<<"G4DiffractiveExcitation::String end "<< end->Get4Momentum()<<" "<< end->GetPDGcode()<<G4endl; 711 G4int Uzhi; G4cin>>Uzhi; 712 */ 450 713 #ifdef G4_FTFDEBUG 451 G4cout << " generated string flavors " << start->GetPDGcode() << " / " << end->GetPDGcode() << G4endl; 452 G4cout << " generated string momenta: quark " << start->Get4Momentum() << "mass : " <<start->Get4Momentum().mag()<< G4endl; 453 G4cout << " generated string momenta: Diquark " << end ->Get4Momentum() << "mass : " <<end->Get4Momentum().mag()<< G4endl; 714 G4cout << " generated string flavors " 715 << start->GetPDGcode() << " / " 716 << end->GetPDGcode() << G4endl; 717 G4cout << " generated string momenta: quark " 718 << start->Get4Momentum() << "mass : " 719 <<start->Get4Momentum().mag() << G4endl; 720 G4cout << " generated string momenta: Diquark " 721 << end ->Get4Momentum() 722 << "mass : " <<end->Get4Momentum().mag()<< G4endl; 454 723 G4cout << " sum of ends " << Pstart+Pend << G4endl; 455 724 G4cout << " Original " << hadron->Get4Momentum() << G4endl; 456 725 #endif 457 458 return string; 726 727 return string; 459 728 } 460 729 … … 462 731 // --------- private methods ---------------------- 463 732 733 // --------------------------------------------------------------------- 464 734 G4double G4DiffractiveExcitation::ChooseP(G4double Pmin, G4double Pmax) const // Uzhi 465 735 { 466 736 // choose an x between Xmin and Xmax with P(x) ~ 1/x 467 468 737 // to be improved... 469 738 470 739 G4double range=Pmax-Pmin; // Uzhi 471 472 if ( Pmin <= 0. || range <=0. ) 740 741 if ( Pmin <= 0. || range <=0. ) 473 742 { 474 743 G4cout << " Pmin, range : " << Pmin << " , " << range << G4endl; … … 489 758 } 490 759 491 G4ThreeVector G4DiffractiveExcitation::GaussianPt(G4double AveragePt2, G4double maxPtSquare) const // Uzhi 760 // --------------------------------------------------------------------- 761 G4ThreeVector G4DiffractiveExcitation::GaussianPt(G4double AveragePt2, 762 G4double maxPtSquare) const // Uzhi 492 763 { // @@ this method is used in FTFModel as well. Should go somewhere common! 493 764 494 765 G4double Pt2; 495 766 /* // Uzhi … … 499 770 */ // Uzhi 500 771 501 Pt2 = -AveragePt2 * std::log(1. + G4UniformRand() * (std::exp(-maxPtSquare/AveragePt2)-1.));// Uzhi 502 772 Pt2 = -AveragePt2 * std::log(1. + G4UniformRand() * 773 (std::exp(-maxPtSquare/AveragePt2)-1.));// Uzhi 774 503 775 G4double Pt=std::sqrt(Pt2); 504 776 505 777 G4double phi=G4UniformRand() * twopi; 506 507 return G4ThreeVector (Pt*std::cos(phi), Pt*std::sin(phi), 0.); 508 } 509 778 779 return G4ThreeVector (Pt*std::cos(phi), Pt*std::sin(phi), 0.); 780 } 781 782 // --------------------------------------------------------------------- 510 783 G4DiffractiveExcitation::G4DiffractiveExcitation(const G4DiffractiveExcitation &) 511 784 { -
trunk/source/processes/hadronic/models/parton_string/diffraction/src/G4DiffractiveHHScatterer.cc
r819 r962 30 30 #include "G4KineticTrack.hh" 31 31 #include "G4DiffractiveSplitableHadron.hh" 32 #include "G4FTFParameters.hh" // Uzhi 21.04.08 32 33 33 34 G4DiffractiveHHScatterer::G4DiffractiveHHScatterer() … … 37 38 {} 38 39 40 // ------------------------------------------------------------------- 39 41 G4KineticTrackVector * G4DiffractiveHHScatterer:: 40 42 Scatter(const G4KineticTrack & aTrack, const G4KineticTrack & bTrack) … … 44 46 G4DiffractiveSplitableHadron aHadron(& aTrack); 45 47 G4DiffractiveSplitableHadron bHadron(& bTrack); 46 if ( ! theExcitation->ExciteParticipants(& aHadron, & bHadron)) 48 theParameters = new G4FTFParameters(aHadron.GetDefinition(), // -------- Uzhi 21.04.08 49 1.,1., 100.); 50 //s);// ------------------------- Uzhi 21.04.08 51 if ( ! theExcitation->ExciteParticipants(& aHadron, 52 & bHadron, 53 theParameters)) // -------- Uzhi 21.04.08 47 54 { 48 55 return NULL; -
trunk/source/processes/hadronic/models/parton_string/diffraction/src/G4DiffractiveSplitableHadron.cc
r819 r962 25 25 // 26 26 // 27 // $Id: G4DiffractiveSplitableHadron.cc,v 1. 6 2006/06/29 20:54:36 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $27 // $Id: G4DiffractiveSplitableHadron.cc,v 1.7 2008/03/31 15:34:01 vuzhinsk Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 -
trunk/source/processes/hadronic/models/parton_string/diffraction/src/G4FTFModel.cc
r819 r962 25 25 // 26 26 // 27 // $Id: G4FTFModel.cc,v 1. 7 2007/04/24 10:32:59 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $27 // $Id: G4FTFModel.cc,v 1.13 2008/12/09 10:40:52 vuzhinsk Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 … … 38 38 39 39 #include "G4FTFModel.hh" 40 #include "G4FTFParameters.hh" // Uzhi 29.03.08 40 41 #include "G4FTFParticipants.hh" 41 42 #include "G4InteractionContent.hh" … … 43 44 #include "G4ParticleDefinition.hh" 44 45 #include "G4ios.hh" 46 #include <utility> // Uzhi 29.03.08 45 47 46 48 // Class G4FTFModel 47 49 48 G4FTFModel::G4FTFModel():theExcitation(new G4DiffractiveExcitation()) // Uzhi 50 G4FTFModel::G4FTFModel():theExcitation(new G4DiffractiveExcitation()), 51 theElastic(new G4ElasticHNScattering()) // Uzhi 29.03.08 49 52 { 50 53 G4VPartonStringModel::SetThisPointer(this); 51 } 52 53 G4FTFModel::G4FTFModel(G4double a, G4double b, G4double c):theExcitation(new G4DiffractiveExcitation()) 54 theParameters=0; // Uzhi 9.12.08 55 } 56 57 /* 58 G4FTFModel::G4FTFModel(G4double , G4double , G4double ):theExcitation(new // Uzhi 9.12.08 G4DiffractiveExcitation()) 54 59 { 55 60 G4VPartonStringModel::SetThisPointer(this); … … 62 67 G4VPartonStringModel::SetThisPointer(this); 63 68 } 64 69 */ 65 70 66 71 67 72 G4FTFModel::~G4FTFModel() 68 {} 73 { 74 if( theParameters != 0 ) delete theParameters; // Uzhi 5.12.08 75 // Because FTF model can be called for various particles 76 // theParameters must be erased at the end of each call. 77 // Thus the delete is olso in G4FTFModel::GetStrings() method 78 if( theExcitation != 0 ) delete theExcitation; // Uzhi 5.12.08 79 if( theElastic != 0 ) delete theElastic; // Uzhi 5.12.08 80 } 69 81 70 82 … … 86 98 } 87 99 100 // ------------------------------------------------------------ 88 101 void G4FTFModel::Init(const G4Nucleus & aNucleus, const G4DynamicParticle & aProjectile) 89 102 { 90 theParticipants.Init(aNucleus.GetN(),aNucleus.GetZ()); // Uzhi N-mass number Z-charge91 92 103 theProjectile = aProjectile; 93 } 94 104 //G4cout<<"G4FTFModel::Init "<<aNucleus.GetN()<<" "<<aNucleus.GetZ()<<G4endl; 105 theParticipants.Init(aNucleus.GetN(),aNucleus.GetZ()); 106 // Uzhi N-mass number Z-charge ------------------------- Uzhi 29.03.08 107 108 // --- cms energy 109 110 G4double s = sqr( theProjectile.GetMass() ) + 111 sqr( G4Proton::Proton()->GetPDGMass() ) + 112 2*theProjectile.GetTotalEnergy()*G4Proton::Proton()->GetPDGMass(); 113 /* 114 G4cout << " primary Total E (GeV): " << theProjectile.GetTotalEnergy()/GeV << G4endl; 115 G4cout << " primary Mass (GeV): " << theProjectile.GetMass() /GeV << G4endl; 116 G4cout << "cms std::sqrt(s) (GeV) = " << std::sqrt(s) / GeV << G4endl; 117 */ 118 119 if( theParameters != 0 ) delete theParameters; // Uzhi 9.12.08 120 theParameters = new G4FTFParameters(theProjectile.GetDefinition(), 121 aNucleus.GetN(),aNucleus.GetZ(), 122 s);// ------------------------- Uzhi 19.04.08 123 //theParameters->SetProbabilityOfElasticScatt(0.); // To turn on/off (1/0) elastic scattering 124 } 125 126 // ------------------------------------------------------------ 95 127 G4ExcitedStringVector * G4FTFModel::GetStrings() 96 128 { 97 theParticipants.BuildInteractions(theProjectile); 98 129 //G4cout<<"theParticipants.GetList"<<G4endl; 130 theParticipants.GetList(theProjectile,theParameters); 131 //G4cout<<"ExciteParticipants()"<<G4endl; 99 132 if (! ExciteParticipants()) return NULL;; 100 133 //G4cout<<"theStrings = BuildStrings()"<<G4endl; 101 134 G4ExcitedStringVector * theStrings = BuildStrings(); 102 135 //G4cout<<"Return to theStrings "<<G4endl; 136 if( theParameters != 0 ) // Uzhi 9.12.08 137 { // Uzhi 9.12.08 138 delete theParameters; // Uzhi 9.12.08 139 theParameters=0; // Uzhi 9.12.08 140 } // Uzhi 9.12.08 103 141 return theStrings; 104 142 } 105 143 144 // ------------------------------------------------------------ 106 145 struct DeleteVSplitableHadron { void operator()(G4VSplitableHadron * aH){delete aH;} }; 107 146 108 G4ExcitedStringVector * G4FTFModel::BuildStrings() 109 { 110 111 // Loop over all collisions; find all primaries, and all target ( targets may 112 // be duplicate in the List ( to unique G4VSplitableHadrons) 113 114 G4ExcitedStringVector * strings; 115 strings = new G4ExcitedStringVector(); 116 117 std::vector<G4VSplitableHadron *> primaries; 118 std::vector<G4VSplitableHadron *> targets; 119 120 theParticipants.StartLoop(); // restart a loop 121 while ( theParticipants.Next() ) 122 { 123 const G4InteractionContent & interaction=theParticipants.GetInteraction(); 124 // do not allow for duplicates ... 125 if ( primaries.end() == std::find(primaries.begin(), primaries.end(), interaction.GetProjectile()) ) 126 primaries.push_back(interaction.GetProjectile()); 127 128 if ( targets.end() == std::find(targets.begin(), targets.end(),interaction.GetTarget()) ) 129 targets.push_back(interaction.GetTarget()); 130 } 131 132 133 // G4cout << "BuildStrings prim/targ " << primaries.entries() << " , " << 134 // targets.entries() << G4endl; 135 136 137 unsigned int ahadron; 138 for ( ahadron=0; ahadron < primaries.size() ; ahadron++) 139 { 140 G4bool isProjectile=true; 141 strings->push_back(theExcitation->String(primaries[ahadron], isProjectile)); 142 } 143 for ( ahadron=0; ahadron < targets.size() ; ahadron++) 144 { 145 G4bool isProjectile=false; 146 strings->push_back(theExcitation->String(targets[ahadron], isProjectile)); 147 } 148 149 std::for_each(primaries.begin(), primaries.end(), DeleteVSplitableHadron()); 150 primaries.clear(); 151 std::for_each(targets.begin(), targets.end(), DeleteVSplitableHadron()); 152 targets.clear(); 153 154 return strings; 155 } 156 147 // ------------------------------------------------------------ 157 148 G4bool G4FTFModel::ExciteParticipants() 158 149 { 159 150 /* // Uzhi 29.03.08 For elastic Scatt. 151 G4cout<<" In ExciteParticipants() "<<theParticipants.theInteractions.size()<<G4endl; 152 G4cout<<" test Params Tot "<<theParameters->GetTotalCrossSection()<<G4endl; 153 G4cout<<" test Params Ela "<<theParameters->GetElasticCrossSection()<<G4endl; 154 155 G4int counter=0; 156 */ // Uzhi 29.03.08 157 158 159 160 160 while (theParticipants.Next()) 161 161 { 162 162 const G4InteractionContent & collision=theParticipants.GetInteraction(); 163 164 //G4cout << " soft colls : " << collision.GetNumberOfSoftCollisions() << G4endl; // Uzhi no match 163 /* 164 counter++; 165 G4cout<<" Inter # "<<counter<<G4endl; 166 */ 165 167 G4VSplitableHadron * projectile=collision.GetProjectile(); 166 168 G4VSplitableHadron * target=collision.GetTarget(); 167 169 168 if ( ! theExcitation->ExciteParticipants(projectile, target) ) 170 // // Uzhi 29.03.08 171 G4bool Successfull; 172 if(G4UniformRand()< theParameters->GetProbabilityOfElasticScatt()) 173 { 174 //G4cout<<"Elastic"<<G4endl; 175 Successfull=theElastic->ElasticScattering(projectile, target, theParameters); 176 } 177 else 178 { 179 //G4cout<<"Inelastic"<<G4endl; 180 Successfull=theExcitation->ExciteParticipants(projectile, target, theParameters); 181 } 182 // if(!Successfull) 183 // // Uzhi 29.03.08 184 185 // if ( ! theExcitation->ExciteParticipants(projectile, target) ) 186 if(!Successfull) 169 187 { 170 188 // give up, clean up … … 176 194 const G4InteractionContent & interaction=theParticipants.GetInteraction(); 177 195 // do not allow for duplicates ... 178 if ( primaries.end() == std::find(primaries.begin(), primaries.end(), interaction.GetProjectile()) ) 196 if ( primaries.end() == std::find(primaries.begin(), primaries.end(), 197 interaction.GetProjectile()) ) 179 198 primaries.push_back(interaction.GetProjectile()); 180 199 181 if ( targets.end() == std::find(targets.begin(), targets.end(),interaction.GetTarget()) ) 200 if ( targets.end() == std::find(targets.begin(), targets.end(), 201 interaction.GetTarget()) ) 182 202 targets.push_back(interaction.GetTarget()); 183 203 } … … 188 208 189 209 return false; 190 } 191 210 } // End of the loop Uzhi 211 } 212 return true; 213 } 214 // ------------------------------------------------------------ 215 G4ExcitedStringVector * G4FTFModel::BuildStrings() 216 { 217 // Loop over all collisions; find all primaries, and all target ( targets may 218 // be duplicate in the List ( to unique G4VSplitableHadrons) 219 220 G4ExcitedStringVector * strings; 221 strings = new G4ExcitedStringVector(); 222 223 std::vector<G4VSplitableHadron *> primaries; 224 std::vector<G4VSplitableHadron *> targets; 225 226 theParticipants.StartLoop(); // restart a loop 227 while ( theParticipants.Next() ) 228 { 229 const G4InteractionContent & interaction=theParticipants.GetInteraction(); 230 // do not allow for duplicates ... 231 if ( primaries.end() == std::find(primaries.begin(), primaries.end(), 232 interaction.GetProjectile()) ) 233 primaries.push_back(interaction.GetProjectile()); 234 235 if ( targets.end() == std::find(targets.begin(), targets.end(), 236 interaction.GetTarget()) ) 237 targets.push_back(interaction.GetTarget()); 192 238 } 193 return true; 194 } 239 240 241 // G4cout << "BuildStrings prim/targ " << primaries.size() << " , " << 242 // targets.size() << G4endl; 243 244 unsigned int ahadron; 245 // Only for hA-interactions Uzhi ------------------------------------- 246 for ( ahadron=0; ahadron < primaries.size() ; ahadron++) 247 { 248 //G4ThreeVector aPosition=primaries[ahadron]->GetPosition(); 249 //G4cout<<"Proj Build "<<aPosition<<" "<<primaries[ahadron]->GetTimeOfCreation()<<G4endl; 250 G4bool isProjectile=true; 251 strings->push_back(theExcitation->String(primaries[ahadron], isProjectile)); 252 } 253 254 for ( ahadron=0; ahadron < targets.size() ; ahadron++) 255 { 256 //G4ThreeVector aPosition=targets[ahadron]->GetPosition(); 257 //G4cout<<"Targ Build "<<aPosition<<" "<<targets[ahadron]->GetTimeOfCreation()<<G4endl; 258 G4bool isProjectile=false; 259 strings->push_back(theExcitation->String(targets[ahadron], isProjectile)); 260 } 261 262 std::for_each(primaries.begin(), primaries.end(), DeleteVSplitableHadron()); 263 primaries.clear(); 264 std::for_each(targets.begin(), targets.end(), DeleteVSplitableHadron()); 265 targets.clear(); 266 267 return strings; 268 } 269 // ------------------------------------------------------------ -
trunk/source/processes/hadronic/models/parton_string/diffraction/src/G4FTFParticipants.cc
r819 r962 25 25 // 26 26 // 27 // $Id: G4FTFParticipants.cc,v 1. 7 2007/04/24 10:33:00 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $27 // $Id: G4FTFParticipants.cc,v 1.9 2008/06/13 12:49:23 vuzhinsk Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // ------------------------------------------------------------ … … 38 38 // ------------------------------------------------------------ 39 39 40 #include "G4FTFParameters.hh" // Uzhi 29.03.08 40 41 #include "G4FTFParticipants.hh" 41 42 #include "G4DiffractiveSplitableHadron.hh" 42 43 #include "G4VSplitableHadron.hh" 43 //#include "G4PomeronCrossSection.hh" // Uzhi44 #include "G4FTFCrossSection.hh" // Uzhi45 44 #include "Randomize.hh" 46 #include <utility> 47 45 #include <utility> // Uzhi 29.03.08 48 46 49 47 // Class G4FTFParticipants 50 51 52 48 53 49 G4FTFParticipants::G4FTFParticipants() … … 75 71 //{} 76 72 77 void G4FTFParticipants::BuildInteractions(const G4ReactionProduct &thePrimary) 73 void G4FTFParticipants::GetList(const G4ReactionProduct &thePrimary, 74 G4FTFParameters *theParameters) // Uzhi 29.03.08 78 75 { 79 76 … … 83 80 theInteractions.clear(); 84 81 85 // --- cms energy 86 87 G4double s = sqr( thePrimary.GetMass() ) + 88 sqr( G4Proton::Proton()->GetPDGMass() ) + 89 2*thePrimary.GetTotalEnergy()*G4Proton::Proton()->GetPDGMass(); 90 91 // G4cout << " primary Total E (GeV): " << thePrimary.GetTotalEnergy()/GeV << G4endl; 92 // G4cout << " primary Mass (GeV): " << thePrimary.GetMass() /GeV << G4endl; 93 // G4cout << "cms std::sqrt(s) (GeV) = " << std::sqrt(s) / GeV << G4endl; 94 95 // G4PomeronCrossSection theCrossSection(thePrimary.GetDefinition()); // Uzhi 96 G4FTFCrossSection theCrossSection(thePrimary.GetDefinition(),s); // Uzhi 97 98 99 G4double deltaxy=2 * fermi; 82 G4double deltaxy=2 * fermi; // Extra nuclear radius 100 83 101 84 G4VSplitableHadron * primarySplitable=new G4DiffractiveSplitableHadron(thePrimary); 102 85 103 G4double xyradius; 104 xyradius =theNucleus->GetOuterRadius() + deltaxy; 105 86 G4double xyradius; 87 xyradius =theNucleus->GetOuterRadius() + deltaxy; // Impact parameter sampling 88 // radius 106 89 G4bool nucleusNeedsShift = true; 107 90 … … 115 98 theNucleus->StartLoop(); 116 99 G4Nucleon * nucleon; 117 while ( (nucleon=theNucleus->GetNextNucleon()) ) 100 //G4int InterNumber=0; // Uzhi 101 //while ( (nucleon=theNucleus->GetNextNucleon())&& (InterNumber < 1) ) // Uzhi 102 while ( (nucleon=theNucleus->GetNextNucleon()) ) // Uzhi 118 103 { 119 104 G4double impact2= sqr(impactX - nucleon->GetPosition().x()) + 120 sqr(impactY - nucleon->GetPosition().y()); 121 // if ( theCrossSection.GetInelasticProbability(s,impact2) // Uzhi 122 if ( theCrossSection.GetInelasticProbability( impact2/fermi/fermi) // Uzhi 105 sqr(impactY - nucleon->GetPosition().y()); 106 107 // if ( theParameters->GetInelasticProbability(impact2/fermi/fermi) // Uzhi 29.03.08 108 if ( theParameters->GetProbabilityOfInteraction(impact2/fermi/fermi) // Uzhi 29.03.08 123 109 > G4UniformRand() ) 124 110 { 111 //InterNumber++; 125 112 if ( nucleusNeedsShift ) 126 113 { // on the first hit, shift nucleus … … 136 123 nucleon->Hit(targetSplitable); 137 124 } 138 G4InteractionContent * aInteraction = new G4InteractionContent(primarySplitable); 125 G4InteractionContent * aInteraction = 126 new G4InteractionContent(primarySplitable); 139 127 aInteraction->SetTarget(targetSplitable); 140 128 theInteractions.push_back(aInteraction); … … 152 140 153 141 // Implementation (private) methods 154 155 156 157 158 -
trunk/source/processes/hadronic/models/parton_string/hadronization/include/G4ExcitedStringDecay.hh
r819 r962 26 26 // 27 27 // $Id: G4ExcitedStringDecay.hh,v 1.7 2007/05/03 22:06:17 gunter Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 #ifndef G4ExcitedStringDecay_h -
trunk/source/processes/hadronic/models/parton_string/hadronization/include/G4FragmentingString.hh
r819 r962 25 25 // 26 26 // 27 // $Id: G4FragmentingString.hh,v 1. 3 2006/06/29 20:54:44 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $27 // $Id: G4FragmentingString.hh,v 1.4 2007/12/20 15:38:06 vuzhinsk Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 … … 58 58 G4ParticleDefinition * newdecay, 59 59 const G4LorentzVector *momentum); 60 60 G4FragmentingString(const G4FragmentingString &old, // Uzhi 61 G4ParticleDefinition * newdecay); // Uzhi 62 61 63 ~G4FragmentingString(); 62 64 … … 77 79 G4double Mass() const; 78 80 G4double Mass2() const; 79 81 G4double MassT2() const; 80 82 81 83 G4ParticleDefinition* GetLeftParton(void) const; -
trunk/source/processes/hadronic/models/parton_string/hadronization/include/G4HadronBuilder.hh
r819 r962 26 26 // 27 27 // $Id: G4HadronBuilder.hh,v 1.3 2006/06/29 20:54:46 gunter Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // ----------------------------------------------------------------------------- -
trunk/source/processes/hadronic/models/parton_string/hadronization/include/G4LundStringFragmentation.hh
r819 r962 25 25 // 26 26 // 27 // $Id: G4LundStringFragmentation.hh,v 1. 4 2007/04/24 14:55:23 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $ Maxim Komogorov27 // $Id: G4LundStringFragmentation.hh,v 1.6 2008/04/25 14:20:14 vuzhinsk Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ Maxim Komogorov 29 29 // 30 30 // ----------------------------------------------------------------------------- … … 44 44 { 45 45 public: 46 46 47 G4LundStringFragmentation(); 47 // G4LundStringFragmentation(G4double sigmaPt); 48 G4LundStringFragmentation(const G4LundStringFragmentation &right); 49 virtual ~G4LundStringFragmentation(); 50 virtual G4KineticTrackVector* FragmentString(const G4ExcitedString& theString); 48 G4LundStringFragmentation(const G4LundStringFragmentation &right); 49 virtual ~G4LundStringFragmentation(); 51 50 52 public:53 51 const G4LundStringFragmentation & operator=(const G4LundStringFragmentation &right); 54 52 int operator==(const G4LundStringFragmentation &right) const; 55 53 int operator!=(const G4LundStringFragmentation &right) const; 56 54 55 virtual G4KineticTrackVector* FragmentString(const G4ExcitedString& theString); 57 56 58 57 private: 59 virtual G4double GetLightConeZ(G4double zmin, G4double zmax, G4int PartonEncoding, G4ParticleDefinition* pHadron, G4double Px, G4double Py); 58 void SetMinimalStringMass(const G4FragmentingString * const string); 59 void SetMinimalStringMass2(const G4double aValue); 60 60 61 virtual void Sample4Momentum(G4LorentzVector* Mom, G4double Mass, G4LorentzVector* AntiMom, G4double AntiMass, G4double InitialMass);62 61 virtual G4bool StopFragmenting(const G4FragmentingString * const string); 63 62 virtual G4bool IsFragmentable(const G4FragmentingString * const string); 64 virtual G4LorentzVector * SplitEandP(G4ParticleDefinition * pHadron, G4FragmentingString * string); 63 65 64 virtual G4bool SplitLast(G4FragmentingString * string, 66 G4KineticTrackVector * LeftVector, 67 G4KineticTrackVector * RightVector); 68 void SetMinimalStringMass(const G4FragmentingString * const string); 69 void SetMinimalStringMass2(const G4double aValue); 65 G4KineticTrackVector * LeftVector, 66 G4KineticTrackVector * RightVector); 70 67 68 virtual void Sample4Momentum(G4LorentzVector* Mom, G4double Mass, 69 G4LorentzVector* AntiMom, G4double AntiMass, 70 G4double InitialMass); 71 72 virtual G4LorentzVector * SplitEandP(G4ParticleDefinition * pHadron, 73 G4FragmentingString * string, 74 G4FragmentingString * newString); // Uzhi 75 76 virtual G4double GetLightConeZ(G4double zmin, G4double zmax, 77 G4int PartonEncoding, 78 G4ParticleDefinition* pHadron, 79 G4double Px, G4double Py); 80 71 81 private: 82 // ------ For estimation of a minimal string mass --------------- 83 G4double Mass_of_light_quark; 84 G4double Mass_of_heavy_quark; 85 G4double Mass_of_string_junction; 86 // ------ An estimated minimal string mass ---------------------- 72 87 G4double MinimalStringMass; 73 88 G4double MinimalStringMass2; 89 // ------ Minimal invariant mass used at a string fragmentation - 74 90 G4double WminLUND; 75 91 }; -
trunk/source/processes/hadronic/models/parton_string/hadronization/include/G4QGSMFragmentation.hh
r819 r962 25 25 // 26 26 // 27 // $Id: G4QGSMFragmentation.hh,v 1. 4 2007/04/24 14:55:23 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $27 // $Id: G4QGSMFragmentation.hh,v 1.5 2007/12/20 15:38:07 vuzhinsk Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // ----------------------------------------------------------------------------- … … 57 57 virtual G4bool StopFragmenting(const G4FragmentingString * const string); 58 58 virtual G4bool IsFragmentable(const G4FragmentingString * const string); 59 virtual G4LorentzVector * SplitEandP(G4ParticleDefinition * pHadron, G4FragmentingString * string); 59 virtual G4LorentzVector * SplitEandP(G4ParticleDefinition * pHadron, 60 G4FragmentingString * string, // Uzhi 61 G4FragmentingString * newString); // Uzhi 60 62 virtual G4bool SplitLast(G4FragmentingString * string, 61 63 G4KineticTrackVector * LeftVector, -
trunk/source/processes/hadronic/models/parton_string/hadronization/include/G4VKinkyStringDecay.hh
r819 r962 26 26 // 27 27 // $Id: G4VKinkyStringDecay.hh,v 1.3 2006/06/29 20:54:53 gunter Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // Maxim Komogorov 30 30 // -
trunk/source/processes/hadronic/models/parton_string/hadronization/include/G4VLongitudinalStringDecay.hh
r819 r962 25 25 // 26 26 // 27 // $Id: G4VLongitudinalStringDecay.hh,v 1. 4 2007/04/24 14:55:23 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $27 // $Id: G4VLongitudinalStringDecay.hh,v 1.6 2008/06/23 08:35:54 vuzhinsk Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // Maxim Komogorov 30 30 // … … 43 43 44 44 class G4FragmentingString; 45 //************************************************************************************** ********45 //************************************************************************************** 46 46 47 47 class G4VLongitudinalStringDecay 48 48 { 49 49 public: 50 G4VLongitudinalStringDecay();50 G4VLongitudinalStringDecay(); 51 51 virtual ~G4VLongitudinalStringDecay(); 52 52 53 53 private: 54 // G4VLongitudinalStringDecay(const G4VLongitudinalStringDecay &right); 55 // const G4VLongitudinalStringDecay & operator=(const G4VLongitudinalStringDecay &right); 54 56 55 int operator==(const G4VLongitudinalStringDecay &right) const; 57 56 int operator!=(const G4VLongitudinalStringDecay &right) const; … … 59 58 public: 60 59 virtual G4KineticTrackVector* FragmentString(const G4ExcitedString& theString)=0; 61 60 61 protected: 62 63 // For changing Mass Cut used for selection of very small mass strings 64 virtual void SetMassCut(G4double aValue); 65 66 // For handling a string with very low mass 67 G4KineticTrackVector * LightFragmentationTest(const G4ExcitedString * const theString); 68 69 // To store created quarks or 2 last hadrons 70 typedef std::pair<G4ParticleDefinition*, G4ParticleDefinition*> pDefPair; 71 72 // For creation of hadrons from given quark pair 73 typedef G4ParticleDefinition * (G4HadronBuilder::*Pcreate) 74 (G4ParticleDefinition*, G4ParticleDefinition*); 75 76 //----------------------------------------------------------------------------- 77 // Used by LightFragmentationTest for estimation of lowest possible mass of 78 // given quark system 79 G4double FragmentationMass(const G4FragmentingString * const string, 80 Pcreate build=0, 81 pDefPair * pdefs=0); 82 83 G4ParticleDefinition* FindParticle(G4int Encoding); 84 85 virtual void Sample4Momentum(G4LorentzVector* Mom, G4double Mass, 86 G4LorentzVector* AntiMom, G4double AntiMass, 87 G4double InitialMass)=0; 88 //----------------------------------------------------------------------------- 89 // For decision on continue or stop string fragmentation 90 virtual G4bool StopFragmenting(const G4FragmentingString * const string)=0; 91 virtual G4bool IsFragmentable(const G4FragmentingString * const string)=0; 92 93 // If a string can not fragment, make last break into 2 hadrons 94 virtual G4bool SplitLast(G4FragmentingString * string, 95 G4KineticTrackVector * LeftVector, 96 G4KineticTrackVector * RightVector)=0; 97 //----------------------------------------------------------------------------- 98 99 // If a string fragments, do the following 100 101 // For transver of a string to its CMS frame 102 G4ExcitedString *CPExcited(const G4ExcitedString& string); 103 104 G4KineticTrack * Splitup(G4FragmentingString *string, 105 G4FragmentingString *&newString); 106 107 G4ParticleDefinition * QuarkSplitup(G4ParticleDefinition* decay, 108 G4ParticleDefinition *&created); 109 110 G4ParticleDefinition * DiQuarkSplitup(G4ParticleDefinition* decay, 111 G4ParticleDefinition *&created); 112 113 pDefPair CreatePartonPair(G4int NeedParticle, G4bool AllowDiquarks=true); 114 115 public: 116 // used by G4VKinkyStringDecy.. 117 G4int SampleQuarkFlavor(void); 118 G4ThreeVector SampleQuarkPt(); 119 120 protected: 121 122 //----------------------------------------------------------------------------- 123 // For determination of kinematical properties of created hadron 124 // virtual G4LorentzVector * SplitEandP(G4ParticleDefinition * pHadron, // Uzhi 125 // G4FragmentingString * string )=0; // Uzhi 126 127 virtual G4LorentzVector * SplitEandP(G4ParticleDefinition * pHadron, // Uzhi 128 G4FragmentingString * string, // Uzhi 129 G4FragmentingString * newString )=0;// Uzhi 130 131 virtual G4double GetLightConeZ(G4double zmin, G4double zmax, 132 G4int PartonEncoding, 133 G4ParticleDefinition* pHadron, 134 G4double Px, G4double Py ) = 0; 135 136 void CalculateHadronTimePosition(G4double theInitialStringMass, 137 G4KineticTrackVector *); 138 139 // Used for some test purposes ------------------------------------------------ 140 void ConstructParticle(); 141 142 G4ParticleDefinition* CreateHadron(G4int id1, G4int id2, 143 G4bool theGivenSpin, G4int theSpin); 144 145 //----------------------------------------------------------------------------- 146 public: 147 62 148 G4KineticTrackVector* DecayResonans (G4KineticTrackVector* aHadrons); 149 63 150 void SetSigmaTransverseMomentum(G4double aQT); 64 151 void SetStrangenessSuppression(G4double aValue); … … 72 159 void SetVectorMesonMixings( std::vector<G4double> aVector); 73 160 74 // used by G4VKinkyStringDecy.. 75 G4int SampleQuarkFlavor(void); 76 G4ThreeVector SampleQuarkPt(); 77 161 void SetStringTensionParameter(G4double aValue); // Uzhi 20 June 08 162 78 163 //private: 79 164 protected: … … 83 168 G4double GetClusterMass() {return ClusterMass;}; 84 169 G4int GetClusterLoopInterrupt() {return ClusterLoopInterrupt;}; 85 86 G4ParticleDefinition* CreateHadron(G4int id1, G4int id2, G4bool theGivenSpin, G4int theSpin); 87 virtual void Sample4Momentum(G4LorentzVector* Mom, G4double Mass, G4LorentzVector* AntiMom, G4double AntiMass, G4double InitialMass)=0; 88 89 protected: 90 // Additional protected declarations 91 virtual G4double GetLightConeZ(G4double zmin, G4double zmax, G4int PartonEncoding, G4ParticleDefinition* pHadron, G4double Px, G4double Py) = 0; 92 170 171 G4double GetStringTensionParameter() {return Kappa;}; // Uzhi 20 June 08 172 93 173 //private: 94 174 protected: … … 105 185 G4HadronBuilder *hadronizer; 106 186 107 void ConstructParticle();108 109 187 G4double pspin_meson; 110 188 G4double pspin_barion; … … 113 191 114 192 G4bool PastInitPhase; 115 116 117 G4KineticTrackVector * LightFragmentationTest(const G4ExcitedString * const theString); 118 virtual G4bool StopFragmenting(const G4FragmentingString * const string)=0; 119 virtual G4bool IsFragmentable(const G4FragmentingString * const string)=0; 193 194 G4double Kappa; // String tension parameter // Uzhi 20 June 08 195 120 196 // G4double MinFragmentationMass(G4ExcitedString * theString, 121 197 // G4ParticleDefinition*& Hadron1, 122 198 // G4ParticleDefinition*& Hadron2); 123 typedef std::pair<G4ParticleDefinition*, G4ParticleDefinition*> pDefPair;124 typedef G4ParticleDefinition * (G4HadronBuilder::*Pcreate)125 (G4ParticleDefinition*, G4ParticleDefinition*);126 G4double FragmentationMass(127 const G4FragmentingString * const string,128 Pcreate build=0,129 pDefPair * pdefs=0);130 G4KineticTrack * Splitup(G4FragmentingString *string, G4FragmentingString *&newString);131 virtual G4LorentzVector * SplitEandP(G4ParticleDefinition * pHadron, G4FragmentingString * string)=0;132 virtual G4bool SplitLast(G4FragmentingString * string,133 G4KineticTrackVector * LeftVector,134 G4KineticTrackVector * RightVector)=0;135 void CalculateHadronTimePosition(G4double theInitialStringMass, G4KineticTrackVector *);136 G4ExcitedString *CPExcited(const G4ExcitedString& string);137 G4ParticleDefinition* FindParticle(G4int Encoding);138 139 // Additional Implementation Declarations140 G4ParticleDefinition * QuarkSplitup(G4ParticleDefinition* decay,141 G4ParticleDefinition *&created);142 G4ParticleDefinition * DiQuarkSplitup(G4ParticleDefinition* decay,143 G4ParticleDefinition *&created);144 145 pDefPair CreatePartonPair(G4int NeedParticle, G4bool AllowDiquarks=true);146 147 199 148 200 }; 149 201 150 151 //********************************************************************************************** 202 //************************************************************************************* 152 203 // Class G4VLongitudinalStringDecay 153 204 #endif 154 155 -
trunk/source/processes/hadronic/models/parton_string/hadronization/src/G4FragmentingString.cc
r819 r962 80 80 if ( old.decaying == Left ) 81 81 { 82 //G4cout<<" Left "<<G4endl; 83 //G4cout<<"Pt right "<<Ptright<<G4endl; 84 //G4cout<<"Pt left "<<Ptleft <<G4endl; 82 85 RightParton= old.RightParton; 83 86 Ptright = old.Ptright; … … 85 88 Ptleft = old.Ptleft - momentum->vect(); 86 89 Ptleft.setZ(0.); 90 //G4cout<<"Pt right "<<Ptright<<G4endl; 91 //G4cout<<"Pt left "<<Ptleft <<G4endl; 87 92 } else if ( old.decaying == Right ) 88 93 { 94 //G4cout<<" Right "<<G4endl; 95 //G4cout<<"Pt right "<<Ptright<<G4endl; 96 //G4cout<<"Pt left "<<Ptleft <<G4endl; 89 97 RightParton = newdecay; 90 98 Ptright = old.Ptright - momentum->vect(); … … 92 100 LeftParton = old.LeftParton; 93 101 Ptleft = old.Ptleft; 102 //G4cout<<"Pt right "<<Ptright<<G4endl; 103 //G4cout<<"Pt left "<<Ptleft <<G4endl; 94 104 } else 95 105 { … … 106 116 //--------------------------------------------------------------------------------- 107 117 118 G4FragmentingString::G4FragmentingString(const G4FragmentingString &old, // Uzhi 119 G4ParticleDefinition * newdecay) // Uzhi 120 { // Uzhi 121 decaying=None; // Uzhi 122 if ( old.decaying == Left ) // Uzhi 123 { // Uzhi 124 RightParton= old.RightParton; // Uzhi 125 LeftParton = newdecay; // Uzhi 126 } else if ( old.decaying == Right ) // Uzhi 127 { // Uzhi 128 RightParton = newdecay; // Uzhi 129 LeftParton = old.LeftParton; // Uzhi 130 } else // Uzhi 131 { 132 throw G4HadronicException(__FILE__, __LINE__, "G4FragmentingString::G4FragmentingString: no decay Direction defined"); 133 } 134 } 135 136 137 //--------------------------------------------------------------------------------- 138 108 139 G4FragmentingString::~G4FragmentingString() 109 140 {} … … 215 246 return std::sqrt(this->Mass2()); 216 247 } 248 249 G4double G4FragmentingString::MassT2() const 250 { 251 return Pplus*Pminus; 252 } -
trunk/source/processes/hadronic/models/parton_string/hadronization/src/G4HadronBuilder.cc
r819 r962 25 25 // 26 26 // 27 // $Id: G4HadronBuilder.cc,v 1. 6 2006/06/29 20:55:01 gunterExp $28 // GEANT4 tag $Name: $27 // $Id: G4HadronBuilder.cc,v 1.7 2008/04/25 14:20:14 vuzhinsk Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // ----------------------------------------------------------------------------- -
trunk/source/processes/hadronic/models/parton_string/hadronization/src/G4LundStringFragmentation.cc
r819 r962 25 25 // 26 26 // 27 // $Id: G4LundStringFragmentation.cc,v 1. 7 2007/04/24 14:55:23 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $27 // $Id: G4LundStringFragmentation.cc,v 1.13 2008/06/23 09:17:10 gcosmo Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 1.8 29 29 // 30 30 // ----------------------------------------------------------------------------- … … 41 41 42 42 // Class G4LundStringFragmentation 43 //************************************************************************************* ***43 //************************************************************************************* 44 44 45 45 G4LundStringFragmentation::G4LundStringFragmentation() 46 46 { 47 MinimalStringMass = 0.; // Uzhi 48 MinimalStringMass2 = 0.; // Uzhi 49 WminLUND = 1.*GeV; // Uzhi 50 SmoothParam = 0.2; // Uzhi 51 47 // ------ For estimation of a minimal string mass --------------- 48 Mass_of_light_quark =140.*MeV; 49 Mass_of_heavy_quark =500.*MeV; 50 Mass_of_string_junction=720.*MeV; 51 // ------ An estimated minimal string mass ---------------------- 52 MinimalStringMass = 0.; 53 MinimalStringMass2 = 0.; 54 // ------ Minimal invariant mass used at a string fragmentation - 55 WminLUND = 0.7*GeV; // Uzhi 0.8 1.5 56 // ------ Smooth parameter used at a string fragmentation for --- 57 // ------ smearinr sharp mass cut-off --------------------------- 58 SmoothParam = 0.2; 59 60 SetStringTensionParameter(0.25); // Uzhi 20 June 08 52 61 } 53 62 54 // G4LundStringFragmentation::G4LundStringFragmentation(G4double sigmaPt) 55 // : G4VLongitudinalStringDecay(sigmaPt) 56 // { 57 // } 58 63 // -------------------------------------------------------------- 59 64 G4LundStringFragmentation::G4LundStringFragmentation(const G4LundStringFragmentation &) : G4VLongitudinalStringDecay() 60 65 { 61 66 } 62 67 63 64 68 G4LundStringFragmentation::~G4LundStringFragmentation() 65 69 { 66 70 } 67 71 68 //************************************************************************************* ***72 //************************************************************************************* 69 73 70 74 const G4LundStringFragmentation & G4LundStringFragmentation::operator=(const G4LundStringFragmentation &) … … 84 88 } 85 89 86 //**************************************************************************************** 87 //---------------------------------------------------------------------------------------------------------- 88 89 G4KineticTrackVector* G4LundStringFragmentation::FragmentString(const G4ExcitedString& theString) 90 //-------------------------------------------------------------------------------------- 91 void G4LundStringFragmentation::SetMinimalStringMass(const G4FragmentingString * const string) // Uzhi 92 { 93 /* 94 G4cout<<"In SetMinMass -------------------"<<std::sqrt(string->Mass2())<<G4endl; 95 G4cout<<string->GetLeftParton()->GetPDGEncoding()<<" "<< 96 string->GetRightParton()->GetPDGEncoding()<<G4endl; 97 */ 98 G4double EstimatedMass=0.; 99 G4int Number_of_quarks=0; 100 101 G4int Qleft =std::abs(string->GetLeftParton()->GetPDGEncoding()); 102 103 if( Qleft > 1000) 104 { 105 Number_of_quarks+=2; 106 G4int q1=Qleft/1000; 107 if( q1 < 3) {EstimatedMass +=Mass_of_light_quark;} 108 if( q1 > 2) {EstimatedMass +=Mass_of_heavy_quark;} 109 110 G4int q2=(Qleft/100)%10; 111 if( q2 < 3) {EstimatedMass +=Mass_of_light_quark;} 112 if( q2 > 2) {EstimatedMass +=Mass_of_heavy_quark;} 113 EstimatedMass +=Mass_of_string_junction; 114 } 115 else 116 { 117 Number_of_quarks++; 118 if( Qleft < 3) {EstimatedMass +=Mass_of_light_quark;} 119 if( Qleft > 2) {EstimatedMass +=Mass_of_heavy_quark;} 120 } 121 122 G4int Qright=std::abs(string->GetRightParton()->GetPDGEncoding()); 123 124 if( Qright > 1000) 125 { 126 Number_of_quarks+=2; 127 G4int q1=Qright/1000; 128 if( q1 < 3) {EstimatedMass +=Mass_of_light_quark;} 129 if( q1 > 2) {EstimatedMass +=Mass_of_heavy_quark;} 130 131 G4int q2=(Qright/100)%10; 132 if( q2 < 3) {EstimatedMass +=Mass_of_light_quark;} 133 if( q2 > 2) {EstimatedMass +=Mass_of_heavy_quark;} 134 EstimatedMass +=Mass_of_string_junction; 135 } 136 else 137 { 138 Number_of_quarks++; 139 if( Qright < 3) {EstimatedMass +=Mass_of_light_quark;} 140 if( Qright > 2) {EstimatedMass +=Mass_of_heavy_quark;} 141 } 142 143 if(Number_of_quarks==2){EstimatedMass +=100.*MeV;} 144 if(Number_of_quarks==3){EstimatedMass += 20.*MeV;} 145 if(Number_of_quarks==4){EstimatedMass -=2.*Mass_of_string_junction; 146 if(EstimatedMass <= 1600.*MeV){EstimatedMass-=200.*MeV;} 147 else {EstimatedMass+=100.*MeV;} 148 } 149 MinimalStringMass=EstimatedMass; 150 SetMinimalStringMass2(EstimatedMass); 151 //G4cout<<"Out SetMinimalStringMass "<<MinimalStringMass<<G4endl; 152 } 153 154 //-------------------------------------------------------------------------------------- 155 void G4LundStringFragmentation::SetMinimalStringMass2( 156 const G4double aValue) 157 { 158 MinimalStringMass2=aValue * aValue; 159 } 160 161 //-------------------------------------------------------------------------------------- 162 G4KineticTrackVector* G4LundStringFragmentation::FragmentString( 163 const G4ExcitedString& theString) 90 164 { 91 165 … … 96 170 97 171 // check if string has enough mass to fragment... 172 173 SetMassCut(160.*MeV); // For LightFragmentationTest it is required 174 // that no one pi-meson can be produced 175 /* 176 G4cout<<G4endl<<"G4LundStringFragmentation::"<<G4endl; 177 G4cout<<"FragmentString Position"<<theString.GetPosition()/fermi<<" "<< 178 theString.GetTimeOfCreation()/fermi<<G4endl; 179 G4cout<<"FragmentString Momentum"<<theString.Get4Momentum()<<theString.Get4Momentum().mag()<<G4endl; 180 */ 98 181 G4KineticTrackVector * LeftVector=LightFragmentationTest(&theString); 99 182 if ( LeftVector != 0 ) { 100 //G4cout<<"Return single hadron from string"<<G4endl; 101 return LeftVector;} 102 103 LeftVector = new G4KineticTrackVector; 183 //G4cout<<"Return single hadron insted of string"<<G4endl; 184 // Uzhi insert 6.05.08 start 185 if(LeftVector->size() == 1){ 186 // One hadron is saved in the interaction 187 LeftVector->operator[](0)->SetFormationTime(theString.GetTimeOfCreation()); 188 LeftVector->operator[](0)->SetPosition(theString.GetPosition()); 189 190 /* // To set large formation time open * 191 LeftVector->operator[](0)->SetFormationTime(theString.GetTimeOfCreation()+100.*fermi); 192 LeftVector->operator[](0)->SetPosition(theString.GetPosition()); 193 G4ThreeVector aPosition(theString.GetPosition().x(), 194 theString.GetPosition().y(), 195 theString.GetPosition().z()+100.*fermi); 196 LeftVector->operator[](0)->SetPosition(aPosition); 197 */ 198 //G4cout<<"Single hadron "<<LeftVector->operator[](0)->GetPosition()<<" "<<LeftVector->operator[](0)->GetFormationTime()<<G4endl; 199 } else { // 2 hadrons created from qq-qqbar are stored 200 LeftVector->operator[](0)->SetFormationTime(theString.GetTimeOfCreation()); 201 LeftVector->operator[](0)->SetPosition(theString.GetPosition()); 202 LeftVector->operator[](1)->SetFormationTime(theString.GetTimeOfCreation()); 203 LeftVector->operator[](1)->SetPosition(theString.GetPosition()); 204 } 205 // Uzhi insert 6.05.08 end 206 return LeftVector; 207 } 208 209 //--------------------- The string can fragment ------------------------------- 210 //--------------- At least two particles can be produced ---------------------- 211 212 LeftVector =new G4KineticTrackVector; 104 213 G4KineticTrackVector * RightVector=new G4KineticTrackVector; 105 214 106 // this should work but its only a semi deep copy. %GF G4ExcitedString theStringInCMS(theString);107 215 G4ExcitedString *theStringInCMS=CPExcited(theString); 108 216 G4LorentzRotation toCms=theStringInCMS->TransformToAlignedCms(); … … 111 219 G4int attempt=0; 112 220 while ( !success && attempt++ < StringLoopInterrupt ) 113 { 221 { // If the string fragmentation do not be happend, repeat the fragmentation--- 114 222 G4FragmentingString *currentString=new G4FragmentingString(*theStringInCMS); 115 223 116 //G4cout<<" MainFragmentString cur M2 "<<std::sqrt(currentString->Mass2())<<G4endl;117 118 std::for_each(LeftVector->begin() , LeftVector->end(), DeleteKineticTrack());224 //G4cout<<"FragmentString cur M2 "<<std::sqrt(currentString->Mass2())<<G4endl; 225 // Cleaning up the previously produced hadrons ------------------------------ 226 std::for_each(LeftVector->begin() , LeftVector->end() , DeleteKineticTrack()); 119 227 LeftVector->clear(); 228 120 229 std::for_each(RightVector->begin(), RightVector->end(), DeleteKineticTrack()); 121 230 RightVector->clear(); 122 231 232 // Main fragmentation loop until the string will not be able to fragment ---- 123 233 inner_sucess=true; // set false on failure.. 124 234 while (! StopFragmenting(currentString) ) 125 235 { // Split current string into hadron + new string 126 127 // G4FragmentingString *PreviousString=currentString; // Uzhi128 129 236 G4FragmentingString *newString=0; // used as output from SplitUp... 130 237 131 238 //G4cout<<"FragmentString to Splitup ===================================="<<G4endl; 239 //G4cout<<"++++++++++++++++++++++++++ Enter num--------------------------"<<G4endl; 132 240 //G4int Uzhi; G4cin>>Uzhi; // Uzhi 241 133 242 G4KineticTrack * Hadron=Splitup(currentString,newString); 134 243 //G4cout<<" Hadron "<<Hadron<<G4endl; 135 244 136 // if ( Hadron != 0 && IsFragmentable(newString)) // Uzhi 137 if ( Hadron != 0 ) // Uzhi 245 if ( Hadron != 0 ) // Store the hadron 138 246 { 139 247 if ( currentString->GetDecayDirection() > 0 ) … … 143 251 delete currentString; 144 252 currentString=newString; 145 } /* else { // Uzhi 146 // abandon ... start from the beginning 147 if (newString) delete newString; // ??? Uzhi local? 148 if (Hadron) delete Hadron; 149 // currentString = PreviousString; // Uzhi 150 inner_sucess=false; 151 break; 152 } */ // Uzhi 153 // delete PreviousString; // ??? Uzhi local? 253 } 154 254 }; 155 // Split current string into 2 final Hadrons255 // Split remaining string into 2 final Hadrons ------------------------ 156 256 //G4cout<<"FragmentString to SplitLast if inner_sucess#0"<<inner_sucess<<G4endl; 157 if ( inner_sucess && // Uzhi257 if ( inner_sucess && 158 258 SplitLast(currentString,LeftVector, RightVector) ) 159 259 { … … 161 261 } 162 262 delete currentString; 163 } 263 } // End of the loop in attemps to fragment the string 164 264 165 265 delete theStringInCMS; … … 188 288 G4LorentzRotation toObserverFrame(toCms.inverse()); 189 289 290 // LeftVector->operator[](0)->SetFormationTime(theString.GetTimeOfCreation()); 291 // LeftVector->operator[](0)->SetPosition(theString.GetPosition()); 292 293 G4double TimeOftheStringCreation=theString.GetTimeOfCreation(); 294 G4ThreeVector PositionOftheStringCreation(theString.GetPosition()); 295 296 /* // For large formation time open * 297 G4double TimeOftheStringCreation=theString.GetTimeOfCreation()+100*fermi; 298 G4ThreeVector PositionOftheStringCreation(theString.GetPosition().x(), 299 theString.GetPosition().y(), 300 theString.GetPosition().z()+100*fermi); 301 */ 302 303 /* 304 if(theString.GetPosition().y() > 100.*fermi){ 305 // It is a projectile-like string ------------------------------------- 306 G4double Zmin=theString.GetPosition().y()-1000.*fermi; 307 G4double Zmax=theString.GetPosition().z(); 308 TimeOftheStringCreation= 309 (Zmax-Zmin)*theString.Get4Momentum().e()/theString.Get4Momentum().z(); 310 311 G4ThreeVector aPosition(0.,0.,Zmax); 312 PositionOftheStringCreation=aPosition; 313 } 314 */ 190 315 for(size_t C1 = 0; C1 < LeftVector->size(); C1++) 191 316 { … … 194 319 Momentum = toObserverFrame*Momentum; 195 320 Hadron->Set4Momentum(Momentum); 321 196 322 G4LorentzVector Coordinate(Hadron->GetPosition(), Hadron->GetFormationTime()); 197 323 Momentum = toObserverFrame*Coordinate; 198 Hadron->SetFormationTime( Momentum.e());324 Hadron->SetFormationTime(TimeOftheStringCreation+Momentum.e()); 199 325 G4ThreeVector aPosition(Momentum.vect()); 200 Hadron->SetPosition(theString.GetPosition()+aPosition); 201 } 326 // Hadron->SetPosition(theString.GetPosition()+aPosition); 327 Hadron->SetPosition(PositionOftheStringCreation+aPosition); 328 //G4cout<<"Hadron "<<C1<<" "<<Hadron->GetPosition()/fermi<<" "<<Hadron->GetFormationTime()/fermi<<G4endl; 329 }; 202 330 203 331 //G4cout<<"Out FragmentString"<<G4endl; 204 332 return LeftVector; 205 333 206 207 208 334 } 209 335 336 //---------------------------------------------------------------------------------- 337 G4bool G4LundStringFragmentation::IsFragmentable(const G4FragmentingString * const string) 338 { 339 //G4cout<<"In IsFragmentable"<<G4endl; 340 SetMinimalStringMass(string); // Uzhi 341 //G4cout<<"Out IsFragmentable MinMass"<<MinimalStringMass<<" String Mass"<<std::sqrt(string->Get4Momentum().mag2())<<G4endl; 342 return sqr(MinimalStringMass + WminLUND) < string->Get4Momentum().mag2(); // Uzhi 343 344 // return sqr(FragmentationMass(string)+MassCut) < // Uzhi 345 // string->Mass2(); // Uzhi 346 } 347 348 //---------------------------------------------------------------------------------------- 349 G4bool G4LundStringFragmentation::StopFragmenting(const G4FragmentingString * const string) 350 { 351 //G4cout<<"StopFragmenting"<<G4endl; 352 353 SetMinimalStringMass(string); 354 355 //G4cout<<"StopFragm MinMass "<<MinimalStringMass<<" String Mass "<<std::sqrt(string->Get4Momentum().mag2())<<G4endl; 356 357 return (MinimalStringMass + WminLUND)* 358 (1 + SmoothParam * (1.-2*G4UniformRand())) > 359 string->Mass(); 360 } 361 362 //---------------------------------------------------------------------------------------- 363 G4bool G4LundStringFragmentation::SplitLast(G4FragmentingString * string, 364 G4KineticTrackVector * LeftVector, 365 G4KineticTrackVector * RightVector) 366 { 367 //... perform last cluster decay 368 /* 369 G4cout<<"SplitLast String mass "<<string->Mass()<<G4endl; 370 G4cout<<string->GetLeftParton()->GetPDGEncoding()<<" "<<G4endl; 371 G4cout<<string->GetRightParton()->GetPDGEncoding()<<" "<<G4endl; 372 */ 373 G4LorentzVector Str4Mom=string->Get4Momentum(); 374 //G4cout<<"String 4 momentum "<<Str4Mom<<G4endl; 375 G4ThreeVector ClusterVel =string->Get4Momentum().boostVector(); 376 377 G4double ResidualMass = string->Mass(); 378 379 G4ParticleDefinition * LeftHadron, * RightHadron; 380 381 G4int cClusterInterrupt = 0; 382 do 383 { 384 //G4cout<<" Cicle "<<cClusterInterrupt<<" "<< ClusterLoopInterrupt<<G4endl; 385 386 if (cClusterInterrupt++ >= ClusterLoopInterrupt) 387 { 388 return false; 389 } 390 G4ParticleDefinition * quark = NULL; 391 string->SetLeftPartonStable(); // to query quark contents.. 392 393 if (!string->FourQuarkString() ) 394 { 395 // The string is q-qbar, or q-qq, or qbar-qqbar type 396 if (string->DecayIsQuark() && string->StableIsQuark() ) 397 { 398 //... there are quarks on cluster ends 399 LeftHadron= QuarkSplitup(string->GetLeftParton(), quark); 400 } else 401 { 402 //... there is a Diquark on one of the cluster ends 403 G4int IsParticle; 404 405 if ( string->StableIsQuark() ) 406 { 407 IsParticle=(string->GetLeftParton()->GetPDGEncoding()>0) ? -1 : +1; 408 } else 409 { 410 IsParticle=(string->GetLeftParton()->GetPDGEncoding()>0) ? +1 : -1; 411 } 412 413 pDefPair QuarkPair = CreatePartonPair(IsParticle,false); // no diquarks wanted 414 quark = QuarkPair.second; 415 416 LeftHadron=hadronizer->Build(QuarkPair.first, string->GetLeftParton()); 417 } 418 419 RightHadron = hadronizer->Build(string->GetRightParton(), quark); 420 } else 421 { 422 // The string is qq-qqbar type. Diquarks are on the string ends 423 G4int LiftQuark1= string->GetLeftParton()->GetPDGEncoding()/1000; 424 G4int LiftQuark2=(string->GetLeftParton()->GetPDGEncoding()/100)%10; 425 426 G4int RightQuark1= string->GetRightParton()->GetPDGEncoding()/1000; 427 G4int RightQuark2=(string->GetRightParton()->GetPDGEncoding()/100)%10; 428 429 if(G4UniformRand()<0.5) 430 { 431 LeftHadron =hadronizer->Build(FindParticle( LiftQuark1), 432 FindParticle(RightQuark1)); 433 RightHadron=hadronizer->Build(FindParticle( LiftQuark2), 434 FindParticle(RightQuark2)); 435 } else 436 { 437 LeftHadron =hadronizer->Build(FindParticle( LiftQuark1), 438 FindParticle(RightQuark2)); 439 RightHadron=hadronizer->Build(FindParticle( LiftQuark2), 440 FindParticle(RightQuark1)); 441 } 442 } 443 /* 444 G4cout<<"SplitLast Left Right hadrons "<<LeftHadron->GetPDGEncoding()<<" "<<RightHadron->GetPDGEncoding()<<G4endl; 445 G4cout<<"SplitLast Left Right hadrons "<<LeftHadron->GetPDGMass()<<" "<<RightHadron->GetPDGMass()<<G4endl; 446 G4cout<<"Sum H mass Str Mass "<<LeftHadron->GetPDGMass() + RightHadron->GetPDGMass()<<" "<<ResidualMass<<G4endl; 447 */ 448 //... repeat procedure, if mass of cluster is too low to produce hadrons 449 //... ClusterMassCut = 0.15*GeV model parameter 450 451 } 452 while (ResidualMass <= LeftHadron->GetPDGMass() + RightHadron->GetPDGMass());// UzhiVOVA 453 454 //... compute hadron momenta and energies 455 456 G4LorentzVector LeftMom, RightMom; 457 G4ThreeVector Pos; 458 459 Sample4Momentum(&LeftMom, LeftHadron->GetPDGMass(), 460 &RightMom, RightHadron->GetPDGMass(), 461 ResidualMass); 462 463 LeftMom.boost(ClusterVel); 464 RightMom.boost(ClusterVel); 465 466 LeftVector->push_back(new G4KineticTrack(LeftHadron, 0, Pos, LeftMom)); 467 RightVector->push_back(new G4KineticTrack(RightHadron, 0, Pos, RightMom)); 468 469 //G4cout<<"Out SplitLast "<<G4endl; 470 return true; 471 472 } 473 210 474 //---------------------------------------------------------------------------------------------------------- 211 475 212 //G4double G4LundStringFragmentation::GetLightConeZ(G4double zmin, G4double zmax, // Uzhi 213 // G4int , G4ParticleDefinition* pHadron, // Uzhi 214 G4double G4LundStringFragmentation::GetLightConeZ(G4double zmin, G4double zmax, 215 G4int, G4ParticleDefinition* pHadron, // Uzhi 216 G4double Px, G4double Py) 476 void G4LundStringFragmentation::Sample4Momentum(G4LorentzVector* Mom, G4double Mass, G4LorentzVector* AntiMom, G4double AntiMass, G4double InitialMass) 477 { 478 // ------ Sampling of momenta of 2 last produced hadrons -------------------- 479 G4ThreeVector Pt; 480 G4double MassMt2, AntiMassMt2; 481 G4double AvailablePz, AvailablePz2; 482 483 //G4cout<<"Sample4Momentum "<<G4endl; 484 //G4cout<<"Sample4Momentum Mass"<<Mass<<" "<<AntiMass<<" "<<InitialMass<<G4endl; 485 486 if(Mass > 930. || AntiMass > 930.) // If there is a baryon 217 487 { 218 const G4double alund = 0.7/GeV/GeV; 219 220 // If blund get restored, you MUST adapt the calculation of zOfMaxyf. 221 // const G4double blund = 1; 222 223 G4double z, yf; 224 G4double Mass = pHadron->GetPDGMass(); 488 // ----------------- Isotripic decay ------------------------------------ 489 G4double r_val = sqr(InitialMass*InitialMass - Mass*Mass - AntiMass*AntiMass) - 490 sqr(2.*Mass*AntiMass); 491 G4double Pabs = (r_val > 0.)? std::sqrt(r_val)/(2.*InitialMass) : 0; 492 493 //... sample unit vector 494 G4double pz = 1. - 2.*G4UniformRand(); 495 G4double st = std::sqrt(1. - pz * pz)*Pabs; 496 G4double phi = 2.*pi*G4UniformRand(); 497 G4double px = st*std::cos(phi); 498 G4double py = st*std::sin(phi); 499 pz *= Pabs; 225 500 226 G4double Mt2 = Px*Px + Py*Py + Mass*Mass; 227 G4double zOfMaxyf=alund*Mt2/(alund*Mt2 + 1.); 228 G4double maxYf=(1-zOfMaxyf)/zOfMaxyf * std::exp(-alund*Mt2/zOfMaxyf); 229 230 // G4double N=1.; // Uzhi 231 // G4double OverN=1./N; // Uzhi 232 // G4double ZminN=std::pow(zmin,N); // Uzhi 233 // G4double ZmaxN=std::pow(zmax,N); // Uzhi 234 // G4double Brac=ZmaxN-ZminN; // Uzhi 235 236 //G4cout<<" ZminN ZmaxN Brac Code "<<ZminN<<" "<< ZmaxN<<" "<<Brac<<" "<<PartonEncoding<<G4endl; 237 238 // if(std::abs(PartonEncoding) < 1000) // Uzhi 239 { // Uzhi q or q-bar 240 //G4cout<<" quark "<<G4endl; // Vova 241 do // Uzhi 242 { 243 z = zmin + G4UniformRand()*(zmax-zmin); 244 // yf = std::pow(1. - z, blund)/z*std::exp(-alund*Mt2/z); 245 yf = (1-z)/z * std::exp(-alund*Mt2/z); 246 } 247 while (G4UniformRand()*maxYf > yf); 248 } // Uzhi 249 // else // Uzhi 250 // { // Uzhi qq or qq-bar 251 // //G4cout<<"Di-quark"<<G4endl; // Vova 252 // z = std::pow(Brac * G4UniformRand() + ZminN, OverN); // Uzhi 253 // }; // Uzhi 254 // 255 //G4cout<<" test z "<<std::pow(2.,3.)<<" "<<z<<G4endl; // Vova 256 return z; 501 Mom->setPx(px); Mom->setPy(py); Mom->setPz(pz); 502 Mom->setE(std::sqrt(Pabs*Pabs + Mass*Mass)); 503 504 AntiMom->setPx(-px); AntiMom->setPy(-py); AntiMom->setPz(-pz); 505 AntiMom->setE (std::sqrt(Pabs*Pabs + AntiMass*AntiMass)); 506 } 507 else 508 { 509 do 510 { 511 Pt=SampleQuarkPt(); Pt.setZ(0); G4double Pt2=Pt.mag2(); 512 513 //G4cout<<"Sample4Momentum Pt x y "<<Pt.getX()<<" "<<Pt.getY()<<G4endl; 514 515 MassMt2 = Mass * Mass + Pt2; 516 AntiMassMt2= AntiMass * AntiMass + Pt2; 517 518 //G4cout<<"Mts "<<MassMt2<<" "<<AntiMassMt2<<" "<<InitialMass*InitialMass<<G4endl; 519 520 AvailablePz2= sqr(InitialMass*InitialMass - MassMt2 - AntiMassMt2) - 521 4.*MassMt2*AntiMassMt2; 522 } 523 while(AvailablePz2 < 0.); 524 525 AvailablePz2 /=(4.*InitialMass*InitialMass); 526 AvailablePz = std::sqrt(AvailablePz2); 527 528 //G4cout<<"AvailablePz "<<AvailablePz<<G4endl; 529 530 G4double Px=Pt.getX(); 531 G4double Py=Pt.getY(); 532 533 //if(Mass > AntiMass){AvailablePz=-AvailablePz;} // May30 // Uzhi 534 535 Mom->setPx(Px); Mom->setPy(Py); Mom->setPz(AvailablePz); 536 Mom->setE(std::sqrt(MassMt2+AvailablePz2)); 537 538 //G4cout<<" 1 part "<<Px<<" "<<Py<<" "<<AvailablePz<<" "<<std::sqrt(MassMt2+AvailablePz2)<<G4endl; 539 540 AntiMom->setPx(-Px); AntiMom->setPy(-Py); AntiMom->setPz(-AvailablePz); 541 AntiMom->setE (std::sqrt(AntiMassMt2+AvailablePz2)); 542 543 //G4cout<<" 2 part "<<-Px<<" "<<-Py<<" "<<-AvailablePz<<" "<<std::sqrt(AntiMassMt2+AvailablePz2)<<G4endl; 257 544 } 258 //----------------------------------------------------------------------------------------- 545 546 //G4cout<<"Out Sample4Momentum "<<G4endl; 547 } 548 549 //----------------------------------------------------------------------------- 259 550 260 551 G4LorentzVector * G4LundStringFragmentation::SplitEandP(G4ParticleDefinition * pHadron, 261 G4FragmentingString * string) 262 { 552 G4FragmentingString * string, G4FragmentingString * newString) 553 { 554 /* 555 G4cout<<"SplitEandP "<<G4endl; 556 G4cout<<"SplitEandP string mass "<<string->Mass()<<G4endl; 557 G4cout<<string->GetLeftParton()->GetPDGEncoding()<<" " 558 <<string->GetRightParton()->GetPDGEncoding()<<" "<<G4endl; 559 G4cout<<G4endl; 560 G4cout<<newString->GetLeftParton()->GetPDGEncoding()<<" "<<G4endl; 561 G4cout<<newString->GetRightParton()->GetPDGEncoding()<<" "<<G4endl; 562 */ 563 G4LorentzVector String4Momentum=string->Get4Momentum(); 564 G4double StringMT2=string->Get4Momentum().mt2(); 565 //G4cout<<"StringMt2 "<<StringMT2<<G4endl; 566 263 567 G4double HadronMass = pHadron->GetPDGMass(); 264 SetMinimalStringMass(string); // Uzhi 265 G4double StringMass2 = string->Mass2(); // Uzhi 266 267 //G4cout<<"SplitEandP string mass "<<string->Mass()<<" Hadron mass "<<HadronMass<<pHadron->GetParticleName()<<G4endl; // Uzhi 268 //G4cout<<string->GetLeftParton()->GetPDGEncoding()<<" "<<G4endl;269 //G4cout<< string->GetRightParton()->GetPDGEncoding()<<" "<<G4endl;270 //G4cout<<" 271 272 // calculate and assign hadron transverse momentum component HadronPx andHadronPy568 //G4cout<<"Hadron mass "<<HadronMass<<" "<<pHadron->GetParticleName()<<G4endl; 569 570 SetMinimalStringMass(newString); 571 String4Momentum.setPz(0.); 572 G4ThreeVector StringPt=String4Momentum.vect(); 573 //G4cout<<"StringPt "<<StringPt<<G4endl<<G4endl; 574 //G4cout<<"Min string mass "<<MinimalStringMass<<G4endl; 575 576 // calculate and assign hadron transverse momentum component HadronPx and HadronPy 273 577 G4ThreeVector thePt; 274 578 thePt=SampleQuarkPt(); … … 276 580 G4ThreeVector HadronPt = thePt +string->DecayPt(); 277 581 HadronPt.setZ(0); 582 //G4cout<<"Hadron Pt"<<HadronPt<<G4endl; 583 584 G4ThreeVector RemSysPt = StringPt - HadronPt; 585 //G4cout<<"RemSys Pt"<<RemSysPt<<G4endl; 586 278 587 //... sample z to define hadron longitudinal momentum and energy 279 588 //... but first check the available phase space 280 589 281 // G4double DecayQuarkMass2 = sqr(string->GetDecayParton()->GetPDGMass()); 282 283 //G4cout<<" QuarkMass "<<string->GetDecayParton()->GetPDGMass()<<G4endl; // Uzhi 284 285 G4double HadronMass2T = sqr(HadronMass) + HadronPt.mag2(); 286 // G4double ResidualMass2T=sqr(MinimalStringMass + WminLUND) + HadronPt.mag2(); // Uzhi 287 G4double ResidualMass2T=sqr(MinimalStringMass + WminLUND) + HadronPt.mag2(); // Uzhi 288 289 //G4cout<<" Mt h res str "<<std::sqrt(HadronMass2T)<<" "<<std::sqrt(ResidualMass2T)<<" srt mass"<<string->Mass()<<G4endl; 290 291 // if (DecayQuarkMass2 + HadronMass2T >= SmoothParam*(string->Mass2()) ) // Uzhi 292 293 G4double Pz2 = (sqr(StringMass2 - HadronMass2T - ResidualMass2T) - // Uzhi 294 4*HadronMass2T * ResidualMass2T)/4./StringMass2; // Uzhi 295 296 //G4cout<<" Pz**2 "<<Pz2<<G4endl; 297 298 if(Pz2 < 0 ) {return 0;} // have to start all over! // Uzhi 590 G4double HadronMassT2 = sqr(HadronMass) + HadronPt.mag2(); 591 G4double ResidualMassT2=sqr(MinimalStringMass) + RemSysPt.mag2(); 592 593 //G4cout<<"Mt h res str "<<std::sqrt(HadronMassT2)<<" "<<std::sqrt(ResidualMassT2)<<" srt mass"<<StringMT2<<G4endl; 594 595 G4double Pz2 = (sqr(StringMT2 - HadronMassT2 - ResidualMassT2) - 596 4*HadronMassT2 * ResidualMassT2)/4./StringMT2; 597 598 //G4cout<<"Pz**2 "<<Pz2<<G4endl; 599 600 if(Pz2 < 0 ) {return 0;} // have to start all over! 299 601 300 602 //... then compute allowed z region z_min <= z <= z_max 301 603 302 G4double Pz = std::sqrt(Pz2); // Uzhi 303 G4double zMin = (std::sqrt(HadronMass2T+Pz2) - Pz)/std::sqrt(StringMass2); // Uzhi 304 G4double zMax = (std::sqrt(HadronMass2T+Pz2) + Pz)/std::sqrt(StringMass2); // Uzhi 305 306 //G4cout<<" Zmin max "<<zMin<<" "<<zMax<<G4endl; // Uzhi 307 308 // G4double zMax = 1. - DecayQuarkMass2/(string->Mass2()); // Uzhi 604 G4double Pz = std::sqrt(Pz2); 605 G4double zMin = (std::sqrt(HadronMassT2+Pz2) - Pz)/std::sqrt(StringMT2); 606 G4double zMax = (std::sqrt(HadronMassT2+Pz2) + Pz)/std::sqrt(StringMT2); 607 608 //G4cout<<"Zmin max "<<zMin<<" "<<zMax<<G4endl; // Uzhi 609 309 610 if (zMin >= zMax) return 0; // have to start all over! 310 611 … … 318 619 HadronPt.setZ(0.5* string->GetDecayDirection() * 319 620 (z * string->LightConeDecay() - 320 HadronMass 2T/(z * string->LightConeDecay())));621 HadronMassT2/(z * string->LightConeDecay()))); 321 622 322 623 G4double HadronE = 0.5* (z * string->LightConeDecay() + 323 HadronMass 2T/(z * string->LightConeDecay()));624 HadronMassT2/(z * string->LightConeDecay())); 324 625 325 626 G4LorentzVector * a4Momentum= new G4LorentzVector(HadronPt,HadronE); 326 627 327 //G4cout<<"Out of SplitEandP Pz E "<<HadronPt.getZ()<<" "<<0.5* (z * string->LightConeDecay() + HadronMass2T/(z * string->LightConeDecay()))<<G4endl; 628 //G4cout<<"Hadron Pt"<<HadronPt<<G4endl; 629 //G4cout<<"Out of SplitEandP Pz E "<<HadronPt.getZ()<<" "<<HadronE<<G4endl; 328 630 329 631 return a4Momentum; 330 632 } 331 633 332 333 634 //----------------------------------------------------------------------------------------- 334 335 G4bool G4LundStringFragmentation::SplitLast(G4FragmentingString * string,336 G4KineticTrackVector * LeftVector,337 G4KineticTrackVector * RightVector)635 G4double G4LundStringFragmentation::GetLightConeZ(G4double zmin, G4double zmax, 636 G4int PDGEncodingOfDecayParton, 637 G4ParticleDefinition* pHadron, 638 G4double Px, G4double Py) 338 639 { 339 //... perform last cluster decay 340 //G4cout<<"SplitLast String mass "<<string->Mass()<<G4endl; 341 //G4cout<<string->GetLeftParton()->GetPDGEncoding()<<" "<<G4endl; 342 //G4cout<<string->GetRightParton()->GetPDGEncoding()<<" "<<G4endl; 343 344 G4ThreeVector ClusterVel =string->Get4Momentum().boostVector(); 345 346 G4double ResidualMass = string->Mass(); 347 // G4double ClusterMassCut = ClusterMass; 348 349 G4int cClusterInterrupt = 0; 350 351 G4ParticleDefinition * LeftHadron, * RightHadron; 352 do 353 { 354 //G4cout<<" Cicle "<<cClusterInterrupt<<" "<< ClusterLoopInterrupt<<G4endl; 355 356 if (cClusterInterrupt++ >= ClusterLoopInterrupt) 357 { 358 return false; 359 } 360 G4ParticleDefinition * quark = NULL; 361 string->SetLeftPartonStable(); // to query quark contents.. 362 363 if (string->DecayIsQuark() && string->StableIsQuark() ) 364 { 365 //... there are quarks on cluster ends 366 LeftHadron= QuarkSplitup(string->GetLeftParton(), quark); 367 } else { 368 //... there is a Diquark on cluster ends 369 G4int IsParticle; 370 371 if ( string->StableIsQuark() ) { 372 IsParticle=(string->GetLeftParton()->GetPDGEncoding()>0) ? -1 : +1; 373 } else { 374 IsParticle=(string->GetLeftParton()->GetPDGEncoding()>0) ? +1 : -1; 375 } 376 377 pDefPair QuarkPair = CreatePartonPair(IsParticle,false); // no diquarks wanted 378 quark = QuarkPair.second; 379 380 LeftHadron=hadronizer->Build(QuarkPair.first, string->GetLeftParton()); 381 } 382 383 RightHadron = hadronizer->Build(string->GetRightParton(), quark); 384 385 //G4cout<<"SplitLast Left Right hadrons "<<LeftHadron->GetPDGEncoding()<<" "<<RightHadron->GetPDGEncoding()<<G4endl; 386 //G4cout<<"SplitLast Left Right hadrons "<<LeftHadron->GetPDGMass()<<" "<<RightHadron->GetPDGMass()<<G4endl; 387 //G4cout<<" Sum H mass Str Mass "<<LeftHadron->GetPDGMass() + RightHadron->GetPDGMass()<<" "<<ResidualMass<<G4endl; 388 389 //... repeat procedure, if mass of cluster is too low to produce hadrons 390 //... ClusterMassCut = 0.15*GeV model parameter 391 // if ( quark->GetParticleSubType()== "quark" ) {ClusterMassCut = 0.;} // Uzhi 392 // else {ClusterMassCut = ClusterMass;} // Uzhi 393 394 } 395 while (ResidualMass <= LeftHadron->GetPDGMass() + RightHadron->GetPDGMass()); // Uzhi VOVA 396 // while (ResidualMass <= LeftHadron->GetPDGMass() + RightHadron->GetPDGMass() + ClusterMassCut); // Uzhi 397 //... compute hadron momenta and energies 398 399 G4LorentzVector LeftMom, RightMom; 400 G4ThreeVector Pos; 401 402 //G4cout<<"Sample4Momentum"<<G4endl; 403 404 Sample4Momentum(&LeftMom, LeftHadron->GetPDGMass(), &RightMom, RightHadron->GetPDGMass(), ResidualMass); 405 406 LeftMom.boost(ClusterVel); 407 RightMom.boost(ClusterVel); 408 409 LeftVector->push_back(new G4KineticTrack(LeftHadron, 0, Pos, LeftMom)); 410 RightVector->push_back(new G4KineticTrack(RightHadron, 0, Pos, RightMom)); 411 412 return true; 413 414 } 415 //---------------------------------------------------------------------------------------------------------- 416 417 G4bool G4LundStringFragmentation::IsFragmentable(const G4FragmentingString * const string) 418 { 419 //G4cout<<"In IsFragmentable"<<G4endl; 420 SetMinimalStringMass(string); // Uzhi 421 //G4cout<<"Out IsFragmentable MinMass"<<MinimalStringMass<<" String Mass"<<std::sqrt(string->Get4Momentum().mag2())<<G4endl; 422 return sqr(MinimalStringMass + WminLUND) < string->Get4Momentum().mag2(); // Uzhi 423 424 // return sqr(FragmentationMass(string)+MassCut) < // Uzhi 425 // string->Mass2(); // Uzhi 426 } 427 428 //---------------------------------------------------------------------------------------------------------- 429 430 G4bool G4LundStringFragmentation::StopFragmenting(const G4FragmentingString * const string) 431 { 432 //G4cout<<"StopFragmenting"<<G4endl; 433 434 SetMinimalStringMass(string); // Uzhi 435 //G4cout<<"StopFragm MinMass "<<MinimalStringMass<<" String Mass "<<std::sqrt(string->Get4Momentum().mag2())<<G4endl; 436 return sqr((MinimalStringMass + WminLUND)*(1 + SmoothParam * (1.-2*G4UniformRand()))) > // Uzhi 437 string->Get4Momentum().mag2(); // Uzhi 438 // sqr(FragmentationMass(string,&G4HadronBuilder::BuildHighSpin)+MassCut) > // Uzhi 439 // string->Get4Momentum().mag2(); // Uzhi 440 } 441 442 //---------------------------------------------------------------------------------------------------------- 443 444 void G4LundStringFragmentation::Sample4Momentum(G4LorentzVector* Mom, G4double Mass, G4LorentzVector* AntiMom, G4double AntiMass, G4double InitialMass) 445 { 446 G4ThreeVector Pt; // Uzhi 447 G4double MassMt2, AntiMassMt2; // Uzhi 448 G4double AvailablePz, AvailablePz2; // Uzhi 449 450 //G4cout<<" Smpl4Mom "<<Mass<<" "<<AntiMass<<" "<<InitialMass<<G4endl; 451 // Uzhi 452 do // Uzhi 453 { // Uzhi 454 Pt=SampleQuarkPt(); Pt.setZ(0); G4double Pt2=Pt.mag2(); // Uzhi 455 456 //G4cout<<"Sample4Momentum Pt x y "<<Pt.getX()<<" "<<Pt.getY()<<G4endl; 457 458 MassMt2 = Mass * Mass + Pt2; // Uzhi 459 AntiMassMt2= AntiMass * AntiMass + Pt2; // Uzhi 460 461 //G4cout<<"Mts "<<MassMt2<<" "<<AntiMassMt2<<" "<<InitialMass*InitialMass<<G4endl; 462 463 AvailablePz2= sqr(InitialMass*InitialMass - MassMt2 - AntiMassMt2) - 464 4.*MassMt2*AntiMassMt2; // Uzhi 465 } // Uzhi 466 while(AvailablePz2 < 0.); // Uzhi 467 // Uzhi 468 AvailablePz2 /=(4.*InitialMass*InitialMass); // Uzhi 469 // Uzhi 470 AvailablePz = std::sqrt(AvailablePz2); // Uzhi 471 472 //G4cout<<"AvailablePz "<<AvailablePz<<G4endl; 473 474 475 G4double Px=Pt.getX(); // Uzhi 476 G4double Py=Pt.getY(); // Uzhi 477 // Uzhi 478 Mom->setPx(Px); Mom->setPy(Py); Mom->setPz(AvailablePz); // Uzhi 479 Mom->setE(std::sqrt(MassMt2+AvailablePz2)); // Uzhi 480 481 //G4cout<<" 1 part "<<Px<<" "<<Py<<" "<<AvailablePz<<" "<<std::sqrt(MassMt2+AvailablePz2)<<G4endl; 482 483 // Uzhi 484 AntiMom->setPx(-Px); AntiMom->setPy(-Py); AntiMom->setPz(-AvailablePz); // Uzhi 485 AntiMom->setE (std::sqrt(AntiMassMt2+AvailablePz2)); // Uzhi 486 487 //G4cout<<" 2 part "<<-Px<<" "<<-Py<<" "<<-AvailablePz<<" "<<std::sqrt(AntiMassMt2+AvailablePz2)<<G4endl; 488 489 // Maybe it must be inversed! // Uzhi 490 /* // Uzhi 491 G4double r_val = sqr(InitialMass*InitialMass - Mass*Mass - AntiMass*AntiMass) - sqr(2.*Mass*AntiMass); 492 G4double Pabs = (r_val > 0.)? std::sqrt(r_val)/(2.*InitialMass) : 0; 493 494 //... sample unit vector 495 G4double pz = 1. - 2.*G4UniformRand(); 496 G4double st = std::sqrt(1. - pz * pz)*Pabs; 497 G4double phi = 2.*pi*G4UniformRand(); 498 G4double px = st*std::cos(phi); 499 G4double py = st*std::sin(phi); 500 pz *= Pabs; 640 G4double alund; 641 642 // If blund get restored, you MUST adapt the calculation of zOfMaxyf. 643 // const G4double blund = 1; 644 645 G4double z, yf; 646 G4double Mass = pHadron->GetPDGMass(); 647 // G4int HadronEncoding=pHadron->GetPDGEncoding(); 501 648 502 Mom->setPx(px); Mom->setPy(py); Mom->setPz(pz); 503 Mom->setE(std::sqrt(Pabs*Pabs + Mass*Mass)); 504 505 AntiMom->setPx(-px); AntiMom->setPy(-py); AntiMom->setPz(-pz); 506 AntiMom->setE (std::sqrt(Pabs*Pabs + AntiMass*AntiMass)); 507 */ // Uzhi 649 G4double Mt2 = Px*Px + Py*Py + Mass*Mass; 650 651 if(std::abs(PDGEncodingOfDecayParton) < 1000) 652 { 653 // ---------------- Quark fragmentation ---------------------- 654 alund=0.35/GeV/GeV; // Instead of 0.7 because kinks are not considered 655 G4double zOfMaxyf=alund*Mt2/(alund*Mt2 + 1.); 656 G4double maxYf=(1-zOfMaxyf)/zOfMaxyf * std::exp(-alund*Mt2/zOfMaxyf); 657 658 do 659 { 660 z = zmin + G4UniformRand()*(zmax-zmin); 661 // yf = std::pow(1. - z, blund)/z*std::exp(-alund*Mt2/z); 662 yf = (1-z)/z * std::exp(-alund*Mt2/z); 663 } 664 while (G4UniformRand()*maxYf > yf); 665 } 666 else 667 { 668 // ---------------- Di-quark fragmentation ---------------------- 669 //G4cout<<"Di-quark"<<G4endl; // Vova 670 alund=0.7/GeV/GeV; // 0.7 2.0 671 G4double zOfMaxyf=alund*Mt2/(alund*Mt2 + 1.); 672 G4double maxYf=(1-zOfMaxyf)/zOfMaxyf * std::exp(-alund*Mt2/zOfMaxyf); 673 do 674 { 675 z = zmin + G4UniformRand()*(zmax-zmin); 676 // yf = std::pow(1. - z, blund)/z*std::exp(-alund*Mt2/z); 677 yf = (1-z)/z * std::exp(-alund*Mt2/z); 678 } 679 while (G4UniformRand()*maxYf > yf); 680 }; 681 682 //G4cout<<" test z "<<std::pow(2.,3.)<<" "<<z<<G4endl; 683 return z; 508 684 } 509 510 511 void G4LundStringFragmentation::SetMinimalStringMass(const G4FragmentingString * const string) // Uzhi512 {513 //G4cout<<"In SetMinMass -------------------"<<std::sqrt(string->Mass2())<<G4endl;514 //G4cout<<string->GetLeftParton()->GetPDGEncoding()<<G4endl;515 //G4cout<<string->GetRightParton()->GetPDGEncoding()<<G4endl;516 517 G4double EstimatedMass=0.750* GeV; // 2*m_q518 519 G4int Qleft =std::abs(string->GetLeftParton()->GetPDGEncoding());520 521 if( Qleft > 1000)522 {523 G4int q1=Qleft/1000;524 if( q1 < 3) {EstimatedMass += 0.325* GeV;}525 if( q1 > 2) {EstimatedMass += 0.500* GeV;}526 527 G4int q2=(Qleft/100)%10;528 if( q2 < 3) {EstimatedMass += 0.325* GeV;}529 if( q2 > 2) {EstimatedMass += 0.500* GeV;}530 }531 else532 {533 if( Qleft < 3) {EstimatedMass += 0.325* GeV;}534 if( Qleft > 2) {EstimatedMass += 0.500* GeV;}535 }536 537 G4int Qright=std::abs(string->GetRightParton()->GetPDGEncoding());538 539 if( Qright > 1000)540 {541 G4int q1=Qright/1000;542 if( q1 < 3) {EstimatedMass += 0.325* GeV;}543 if( q1 > 2) {EstimatedMass += 0.500* GeV;}544 545 G4int q2=(Qright/100)%10;546 if( q2 < 3) {EstimatedMass += 0.325* GeV;}547 if( q2 > 2) {EstimatedMass += 0.500* GeV;}548 }549 else550 {551 if( Qright < 3) {EstimatedMass += 0.325* GeV;}552 if( Qright > 2) {EstimatedMass += 0.500* GeV;}553 }554 555 MinimalStringMass=EstimatedMass;556 SetMinimalStringMass2(EstimatedMass);557 558 /*559 Pcreate build=&G4HadronBuilder::BuildLowSpin;560 561 G4ParticleDefinition *Hadron1, *Hadron2=0;562 563 G4int iflc = (G4UniformRand() < 0.5)? 1 : 2;564 565 if (string->GetLeftParton()->GetParticleSubType() == "quark") iflc = -iflc;566 567 if (string->GetLeftParton()->GetPDGEncoding() < 0) iflc = -iflc;568 569 // 1/2 baryon (anti-baryon) and scalar meson (QQ-q or QbarQbar-Qbar),570 // or 2 scalar mesons (Q-Qbar),571 // or 2 1/2 baryons (anti-baryons) will be built (QQ-QbarQbar)572 573 //G4cout<<"In SetMinMass -------------------"<<std::sqrt(string->Mass2())<<G4endl;574 //G4cout<<string->GetLeftParton()->GetPDGEncoding()<<" "<<FindParticle(iflc)->GetPDGEncoding()<<G4endl;575 //G4cout<<string->GetRightParton()->GetPDGEncoding()<<" "<<FindParticle(-iflc)->GetPDGEncoding()<<G4endl;576 577 Hadron1 = (hadronizer->*build)(string->GetLeftParton(),FindParticle(iflc));578 Hadron2 =(hadronizer->*build)(string->GetRightParton(),FindParticle(-iflc));579 MinimalStringMass = (Hadron1)->GetPDGMass() + (Hadron2)->GetPDGMass();580 581 //G4cout<<(Hadron1)->GetPDGEncoding()<<" "<<(Hadron2)->GetPDGEncoding()<<G4endl;582 //G4cout<<"Out SetMinMass "<<MinimalStringMass<<G4endl;583 */584 // SetMinimalStringMass2(MinimalStringMass);585 }586 //*******************************************************************************************************587 588 void G4LundStringFragmentation::SetMinimalStringMass2(const G4double aValue) // Uzhi589 {590 MinimalStringMass2=aValue * aValue;591 }592 //*******************************************************************************************************593 594 //**************************************************************************************** -
trunk/source/processes/hadronic/models/parton_string/hadronization/src/G4QGSMFragmentation.cc
r819 r962 25 25 // 26 26 // 27 // $Id: G4QGSMFragmentation.cc,v 1. 6 2007/04/24 14:55:23 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $27 // $Id: G4QGSMFragmentation.cc,v 1.9 2008/06/23 08:35:55 vuzhinsk Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // ----------------------------------------------------------------------------- … … 121 121 } else { 122 122 // abandon ... start from the beginning 123 if (newString) delete newString; 123 if (newString) delete newString; // Uzhi restore 20.06.08 124 124 if (Hadron) delete Hadron; 125 125 inner_sucess=false; … … 229 229 230 230 G4LorentzVector * G4QGSMFragmentation::SplitEandP(G4ParticleDefinition * pHadron, 231 G4FragmentingString * string) 231 G4FragmentingString * string, // Uzhi 232 G4FragmentingString * ) // Uzhi 232 233 { 233 234 G4double HadronMass = pHadron->GetPDGMass(); -
trunk/source/processes/hadronic/models/parton_string/hadronization/src/G4VKinkyStringDecay.cc
r819 r962 25 25 // 26 26 // 27 // $Id: G4VKinkyStringDecay.cc,v 1. 3 2006/06/29 20:55:07 gunterExp $28 // GEANT4 tag $Name: $27 // $Id: G4VKinkyStringDecay.cc,v 1.4 2008/04/25 14:20:14 vuzhinsk Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // Maxim Komogorov 30 30 // -
trunk/source/processes/hadronic/models/parton_string/hadronization/src/G4VLongitudinalStringDecay.cc
r819 r962 25 25 // 26 26 // 27 // $Id: G4VLongitudinalStringDecay.cc,v 1. 8 2007/04/24 14:55:23 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $27 // $Id: G4VLongitudinalStringDecay.cc,v 1.13 2008/06/23 08:35:55 vuzhinsk Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // ----------------------------------------------------------------------------- … … 75 75 76 76 StrangeSuppress = 0.44; // 27 % strange quarks produced, ie. u:d:s=1:1:0.27 77 DiquarkSuppress = 0. 1;77 DiquarkSuppress = 0.07; 78 78 DiquarkBreakProb = 0.1; 79 79 … … 106 106 hadronizer = new G4HadronBuilder(pspin_meson,pspin_barion, 107 107 scalarMesonMix,vectorMesonMix); 108 Kappa = 1.0 * GeV/fermi; 109 110 108 111 } 109 112 … … 114 117 } 115 118 116 //============================================================================= ================-------------119 //============================================================================= 117 120 118 121 // Operators … … 122 125 // } 123 126 124 //----------------------------------------------------------------------------- -----------------------------127 //----------------------------------------------------------------------------- 125 128 126 129 int G4VLongitudinalStringDecay::operator==(const G4VLongitudinalStringDecay &) const … … 130 133 } 131 134 132 //------------------------------------------------------------------------------------- ---------------------135 //------------------------------------------------------------------------------------- 133 136 134 137 int G4VLongitudinalStringDecay::operator!=(const G4VLongitudinalStringDecay &) const … … 138 141 } 139 142 140 //========================================================================================================== 143 //*********************************************************************************** 144 145 // For changing Mass Cut used for selection of very small mass strings 146 void G4VLongitudinalStringDecay::SetMassCut(G4double aValue){MassCut=aValue;} 147 148 //----------------------------------------------------------------------------- 149 150 // For handling a string with very low mass 151 152 G4KineticTrackVector* G4VLongitudinalStringDecay::LightFragmentationTest(const 153 G4ExcitedString * const string) 154 { 155 // Check string decay threshold 156 157 G4KineticTrackVector * result=0; // return 0 when string exceeds the mass cut 158 159 pDefPair hadrons((G4ParticleDefinition *)0,(G4ParticleDefinition *)0); 160 161 G4FragmentingString aString(*string); 162 163 if ( sqr(FragmentationMass(&aString,0,&hadrons)+MassCut) < aString.Mass2()) { 164 return 0; 165 } 166 167 // The string mass is very low --------------------------- 168 169 result=new G4KineticTrackVector; 170 171 if ( hadrons.second ==0 ) 172 { 173 // Substitute string by light hadron, Note that Energy is not conserved here! 174 175 /* 176 #ifdef DEBUG_LightFragmentationTest 177 G4cout << "VlongSF Warning replacing string by single hadron " <<G4endl; 178 G4cout << hadrons.first->GetParticleName() 179 << "string .. " << string->Get4Momentum() << " " 180 << string->Get4Momentum().m() << G4endl; 181 #endif 182 G4cout << "VlongSF Warning replacing string by single hadron " <<G4endl; 183 G4cout << hadrons.first->GetParticleName() << " string .. " <<G4endl; 184 G4cout << string->Get4Momentum() << " " << string->Get4Momentum().m() << G4endl; 185 */ 186 G4ThreeVector Mom3 = string->Get4Momentum().vect(); 187 G4LorentzVector Mom(Mom3, 188 std::sqrt(Mom3.mag2() + 189 sqr(hadrons.first->GetPDGMass()))); 190 result->push_back(new G4KineticTrack(hadrons.first, 0, 191 string->GetPosition(), 192 Mom)); 193 } else 194 { 195 //... string was qq--qqbar type: Build two stable hadrons, 196 197 #ifdef DEBUG_LightFragmentationTest 198 G4cout << "VlongSF Warning replacing qq-qqbar string by TWO hadrons " 199 << hadrons.first->GetParticleName() << " / " 200 << hadrons.second->GetParticleName() 201 << "string .. " << string->Get4Momentum() << " " 202 << string->Get4Momentum().m() << G4endl; 203 #endif 204 205 // Uzhi Formation time in the case??? 206 207 G4LorentzVector Mom1, Mom2; 208 Sample4Momentum(&Mom1, hadrons.first->GetPDGMass(), 209 &Mom2,hadrons.second->GetPDGMass(), 210 string->Get4Momentum().mag()); 211 212 result->push_back(new G4KineticTrack(hadrons.first, 0, 213 string->GetPosition(), 214 Mom1)); 215 result->push_back(new G4KineticTrack(hadrons.second, 0, 216 string->GetPosition(), 217 Mom2)); 218 219 G4ThreeVector Velocity = string->Get4Momentum().boostVector(); 220 result->Boost(Velocity); 221 } 222 223 return result; 224 225 } 226 227 //---------------------------------------------------------------------------------------- 228 229 G4double G4VLongitudinalStringDecay::FragmentationMass( 230 const G4FragmentingString * const string, 231 Pcreate build, pDefPair * pdefs ) 232 { 233 234 G4double mass; 235 static G4bool NeedInit(true); 236 static std::vector<double> nomix; 237 static G4HadronBuilder * minMassHadronizer; 238 if ( NeedInit ) 239 { 240 NeedInit = false; 241 nomix.resize(6); 242 for ( G4int i=0; i<6 ; i++ ) nomix[i]=0; 243 244 // minMassHadronizer=new G4HadronBuilder(pspin_meson,pspin_barion,nomix,nomix); 245 minMassHadronizer=hadronizer; 246 } 247 248 if ( build==0 ) build=&G4HadronBuilder::BuildLowSpin; 249 250 G4ParticleDefinition *Hadron1, *Hadron2=0; 251 252 if (!string->FourQuarkString() ) 253 { 254 // spin 0 meson or spin 1/2 barion will be built 255 256 Hadron1 = (minMassHadronizer->*build)(string->GetLeftParton(), 257 string->GetRightParton()); 258 mass= (Hadron1)->GetPDGMass(); 259 } else 260 { 261 //... string is qq--qqbar: Build two stable hadrons, 262 //... with extra uubar or ddbar quark pair 263 G4int iflc = (G4UniformRand() < 0.5)? 1 : 2; 264 if (string->GetLeftParton()->GetPDGEncoding() < 0) iflc = -iflc; 265 266 //... theSpin = 4; spin 3/2 baryons will be built 267 Hadron1 = (minMassHadronizer->*build)(string->GetLeftParton(), 268 FindParticle(iflc) ); 269 Hadron2 = (minMassHadronizer->*build)(string->GetRightParton(), 270 FindParticle(-iflc) ); 271 mass = (Hadron1)->GetPDGMass() + (Hadron2)->GetPDGMass(); 272 } 273 274 if ( pdefs != 0 ) 275 { // need to return hadrons as well.... 276 pdefs->first = Hadron1; 277 pdefs->second = Hadron2; 278 } 279 280 return mass; 281 } 282 283 //---------------------------------------------------------------------------- 284 285 G4ParticleDefinition* G4VLongitudinalStringDecay::FindParticle(G4int Encoding) 286 { 287 G4ParticleDefinition* ptr = G4ParticleTable::GetParticleTable()->FindParticle(Encoding); 288 if (ptr == NULL) 289 { 290 G4cout << "Particle with encoding "<<Encoding<<" does not exist!!!"<<G4endl; 291 throw G4HadronicException(__FILE__, __LINE__, "Check your particle table"); 292 } 293 return ptr; 294 } 295 296 //----------------------------------------------------------------------------- 297 // virtual void Sample4Momentum(G4LorentzVector* Mom, G4double Mass, 298 // G4LorentzVector* AntiMom, G4double AntiMass, 299 // G4double InitialMass)=0; 300 //----------------------------------------------------------------------------- 301 302 //********************************************************************************* 303 // For decision on continue or stop string fragmentation 304 // virtual G4bool StopFragmenting(const G4FragmentingString * const string)=0; 305 // virtual G4bool IsFragmentable(const G4FragmentingString * const string)=0; 306 307 // If a string can not fragment, make last break into 2 hadrons 308 // virtual G4bool SplitLast(G4FragmentingString * string, 309 // G4KineticTrackVector * LeftVector, 310 // G4KineticTrackVector * RightVector)=0; 311 //----------------------------------------------------------------------------- 312 // 313 // If a string fragments, do the following 314 // 315 // For transver of a string to its CMS frame 316 //----------------------------------------------------------------------------- 317 318 G4ExcitedString *G4VLongitudinalStringDecay::CPExcited(const G4ExcitedString & in) 319 { 320 G4Parton *Left=new G4Parton(*in.GetLeftParton()); 321 G4Parton *Right=new G4Parton(*in.GetRightParton()); 322 return new G4ExcitedString(Left,Right,in.GetDirection()); 323 } 324 325 //----------------------------------------------------------------------------- 326 327 G4KineticTrack * G4VLongitudinalStringDecay::Splitup( 328 G4FragmentingString *string, 329 G4FragmentingString *&newString) 330 { 331 //G4cout<<"In G4VLong String Dec######################"<<G4endl; 332 333 //... random choice of string end to use for creating the hadron (decay) 334 SideOfDecay = (G4UniformRand() < 0.5)? 1: -1; 335 if (SideOfDecay < 0) 336 { 337 string->SetLeftPartonStable(); 338 } else 339 { 340 string->SetRightPartonStable(); 341 } 342 343 G4ParticleDefinition *newStringEnd; 344 G4ParticleDefinition * HadronDefinition; 345 if (string->DecayIsQuark()) 346 { 347 HadronDefinition= QuarkSplitup(string->GetDecayParton(), newStringEnd); 348 } else { 349 HadronDefinition= DiQuarkSplitup(string->GetDecayParton(), newStringEnd); 350 } 351 // create new String from old, ie. keep Left and Right order, but replace decay 352 353 newString=new G4FragmentingString(*string,newStringEnd); // To store possible 354 // quark containt of new string 355 G4LorentzVector* HadronMomentum=SplitEandP(HadronDefinition, string, newString); 356 357 delete newString; newString=0; // Uzhi 20.06.08 358 359 G4KineticTrack * Hadron =0; 360 if ( HadronMomentum != 0 ) { 361 362 G4ThreeVector Pos; 363 Hadron = new G4KineticTrack(HadronDefinition, 0,Pos, *HadronMomentum); 364 365 newString=new G4FragmentingString(*string,newStringEnd, 366 HadronMomentum); 367 368 //G4cout<<"Out G4VLong String Dec######################"<<G4endl; 369 //G4cout<<"newString 4Mom"<<newString->Get4Momentum()<<G4endl; 370 //G4cout<<"newString Pl "<<newString->LightConePlus()<<G4endl; 371 //G4cout<<"newString Mi "<<newString->LightConeMinus()<<G4endl; 372 //G4cout<<"newString Pts "<<newString->StablePt()<<G4endl; 373 //G4cout<<"newString Ptd "<<newString->DecayPt()<<G4endl; 374 //G4cout<<"newString M2 "<<newString->Mass2()<<G4endl; 375 //G4cout<<"newString M2 "<<newString->Mass()<<G4endl; 376 delete HadronMomentum; 377 } 378 return Hadron; 379 } 380 381 //-------------------------------------------------------------------------------------- 382 383 G4ParticleDefinition * 384 G4VLongitudinalStringDecay::QuarkSplitup(G4ParticleDefinition* 385 decay, G4ParticleDefinition *&created) 386 { 387 G4int IsParticle=(decay->GetPDGEncoding()>0) ? -1 : +1; // if we have a quark, 388 // we need antiquark 389 // (or diquark) 390 pDefPair QuarkPair = CreatePartonPair(IsParticle); 391 created = QuarkPair.second; 392 return hadronizer->Build(QuarkPair.first, decay); 393 394 } 395 396 //----------------------------------------------------------------------------- 397 398 G4ParticleDefinition *G4VLongitudinalStringDecay::DiQuarkSplitup( 399 G4ParticleDefinition* decay, 400 G4ParticleDefinition *&created) 401 { 402 //... can Diquark break or not? 403 if (G4UniformRand() < DiquarkBreakProb ){ 404 //... Diquark break 405 406 G4int stableQuarkEncoding = decay->GetPDGEncoding()/1000; 407 G4int decayQuarkEncoding = (decay->GetPDGEncoding()/100)%10; 408 if (G4UniformRand() < 0.5) 409 { 410 G4int Swap = stableQuarkEncoding; 411 stableQuarkEncoding = decayQuarkEncoding; 412 decayQuarkEncoding = Swap; 413 } 414 415 G4int IsParticle=(decayQuarkEncoding>0) ? -1 : +1; 416 // if we have a quark, we need antiquark) 417 pDefPair QuarkPair = CreatePartonPair(IsParticle,false); // no diquarks wanted 418 //... Build new Diquark 419 G4int QuarkEncoding=QuarkPair.second->GetPDGEncoding(); 420 G4int i10 = std::max(std::abs(QuarkEncoding), std::abs(stableQuarkEncoding)); 421 G4int i20 = std::min(std::abs(QuarkEncoding), std::abs(stableQuarkEncoding)); 422 G4int spin = (i10 != i20 && G4UniformRand() <= 0.5)? 1 : 3; 423 G4int NewDecayEncoding = -1*IsParticle*(i10 * 1000 + i20 * 100 + spin); 424 created = FindParticle(NewDecayEncoding); 425 G4ParticleDefinition * decayQuark=FindParticle(decayQuarkEncoding); 426 G4ParticleDefinition * had=hadronizer->Build(QuarkPair.first, decayQuark); 427 return had; 428 // return hadronizer->Build(QuarkPair.first, decayQuark); 429 430 } else { 431 //... Diquark does not break 432 433 G4int IsParticle=(decay->GetPDGEncoding()>0) ? +1 : -1; 434 // if we have a diquark, we need quark) 435 pDefPair QuarkPair = CreatePartonPair(IsParticle,false); // no diquarks wanted 436 created = QuarkPair.second; 437 438 G4ParticleDefinition * had=hadronizer->Build(QuarkPair.first, decay); 439 return had; 440 // return G4ParticleDefinition * had=hadronizer->Build(QuarkPair.first, decay); 441 } 442 } 443 444 //----------------------------------------------------------------------------- 141 445 142 446 G4int G4VLongitudinalStringDecay::SampleQuarkFlavor(void) … … 145 449 } 146 450 147 //----------------------------------------------------------------------------- -----------------------------451 //----------------------------------------------------------------------------- 148 452 149 453 G4VLongitudinalStringDecay::pDefPair G4VLongitudinalStringDecay::CreatePartonPair(G4int NeedParticle,G4bool AllowDiquarks) … … 170 474 } 171 475 172 //----------------------------------------------------------------------------- -----------------------------476 //----------------------------------------------------------------------------- 173 477 174 478 // G4ThreeVector G4VLongitudinalStringDecay::SampleQuarkPt() … … 180 484 // return G4ThreeVector(Pt * std::cos(phi),Pt * std::sin(phi),0); 181 485 // } 486 182 487 G4ThreeVector G4VLongitudinalStringDecay::SampleQuarkPt() 183 488 { … … 188 493 } 189 494 190 // ----------------------------------------------------------------------------------------------------------495 //****************************************************************************** 191 496 192 497 void G4VLongitudinalStringDecay::CalculateHadronTimePosition(G4double theInitialStringMass, G4KineticTrackVector* Hadrons) 193 498 { 499 194 500 // `yo-yo` formation time 195 const G4double kappa = 1.0 * GeV/fermi; 501 // const G4double kappa = 1.0 * GeV/fermi/4.; // Uzhi String tension 1.06.08 502 G4double kappa = GetStringTensionParameter(); 503 //G4cout<<"Kappa "<<kappa<<G4endl; // Uzhi 20.06.08 504 //G4int Uzhi; G4cin>>Uzhi; // Uzhi 20.06.08 196 505 for(size_t c1 = 0; c1 < Hadrons->size(); c1++) 197 506 { … … 211 520 } 212 521 213 //----------------------------------------------------------------------------- -----------------------------522 //----------------------------------------------------------------------------- 214 523 215 524 /* … … 237 546 */ 238 547 548 549 //***************************************************************************** 550 551 void G4VLongitudinalStringDecay::SetSigmaTransverseMomentum(G4double aValue) 552 { 553 if ( PastInitPhase ) { 554 throw G4HadronicException(__FILE__, __LINE__, "4VLongitudinalStringDecay::SetSigmaTransverseMomentum after FragmentString() not allowed"); 555 } else { 556 SigmaQT = aValue; 557 } 558 } 559 239 560 //---------------------------------------------------------------------------------------------------------- 240 561 241 G4ParticleDefinition * 242 G4VLongitudinalStringDecay::QuarkSplitup(G4ParticleDefinition* 243 decay, G4ParticleDefinition *&created) 244 { 245 G4int IsParticle=(decay->GetPDGEncoding()>0) ? -1 : +1; // if we have a quark, we need antiquark (or diquark) 246 pDefPair QuarkPair = CreatePartonPair(IsParticle); 247 created = QuarkPair.second; 248 return hadronizer->Build(QuarkPair.first, decay); 249 562 void G4VLongitudinalStringDecay::SetStrangenessSuppression(G4double aValue) 563 { 564 if ( PastInitPhase ) { 565 throw G4HadronicException(__FILE__, __LINE__, "4VLongitudinalStringDecay::SetStrangenessSuppression after FragmentString() not allowed"); 566 } else { 567 StrangeSuppress = aValue; 568 } 250 569 } 251 570 252 571 //---------------------------------------------------------------------------------------------------------- 253 572 254 G4ParticleDefinition *G4VLongitudinalStringDecay::DiQuarkSplitup(255 G4ParticleDefinition* decay,256 G4ParticleDefinition *&created)257 {258 //... can Diquark break or not?259 if (G4UniformRand() < DiquarkBreakProb ){260 //... Diquark break261 262 G4int stableQuarkEncoding = decay->GetPDGEncoding()/1000;263 G4int decayQuarkEncoding = (decay->GetPDGEncoding()/100)%10;264 if (G4UniformRand() < 0.5)265 {266 G4int Swap = stableQuarkEncoding;267 stableQuarkEncoding = decayQuarkEncoding;268 decayQuarkEncoding = Swap;269 }270 271 G4int IsParticle=(decayQuarkEncoding>0) ? -1 : +1;272 // if we have a quark, we need antiquark)273 pDefPair QuarkPair = CreatePartonPair(IsParticle,false); // no diquarks wanted274 //... Build new Diquark275 G4int QuarkEncoding=QuarkPair.second->GetPDGEncoding();276 G4int i10 = std::max(std::abs(QuarkEncoding), std::abs(stableQuarkEncoding));277 G4int i20 = std::min(std::abs(QuarkEncoding), std::abs(stableQuarkEncoding));278 G4int spin = (i10 != i20 && G4UniformRand() <= 0.5)? 1 : 3;279 G4int NewDecayEncoding = -1*IsParticle*(i10 * 1000 + i20 * 100 + spin);280 created = FindParticle(NewDecayEncoding);281 G4ParticleDefinition * decayQuark=FindParticle(decayQuarkEncoding);282 G4ParticleDefinition * had=hadronizer->Build(QuarkPair.first, decayQuark);283 return had;284 // return hadronizer->Build(QuarkPair.first, decayQuark);285 286 } else {287 //... Diquark does not break288 289 G4int IsParticle=(decay->GetPDGEncoding()>0) ? +1 : -1;290 // if we have a diquark, we need quark)291 pDefPair QuarkPair = CreatePartonPair(IsParticle,false); // no diquarks wanted292 created = QuarkPair.second;293 294 G4ParticleDefinition * had=hadronizer->Build(QuarkPair.first, decay);295 return had;296 // return G4ParticleDefinition * had=hadronizer->Build(QuarkPair.first, decay);297 }298 }299 300 //-----------------------------------------------------------------------------------------301 302 G4KineticTrack * G4VLongitudinalStringDecay::Splitup(303 G4FragmentingString *string,304 G4FragmentingString *&newString)305 {306 307 //... random choice of string end to use for creating the hadron (decay)308 SideOfDecay = (G4UniformRand() < 0.5)? 1: -1;309 if (SideOfDecay < 0)310 {311 string->SetLeftPartonStable();312 } else313 {314 string->SetRightPartonStable();315 }316 317 G4ParticleDefinition *newStringEnd;318 G4ParticleDefinition * HadronDefinition;319 if (string->DecayIsQuark())320 {321 HadronDefinition= QuarkSplitup(string->GetDecayParton(), newStringEnd);322 } else {323 HadronDefinition= DiQuarkSplitup(string->GetDecayParton(), newStringEnd);324 }325 // create new String from old, ie. keep Left and Right order, but replace decay326 G4LorentzVector* HadronMomentum=SplitEandP(HadronDefinition, string);327 328 G4KineticTrack * Hadron =0;329 if ( HadronMomentum != 0 ) {330 331 G4ThreeVector Pos;332 Hadron = new G4KineticTrack(HadronDefinition, 0,Pos, *HadronMomentum);333 334 newString=new G4FragmentingString(*string,newStringEnd,335 HadronMomentum);336 337 delete HadronMomentum;338 }339 return Hadron;340 }341 342 //----------------------------------------------------------------------------------------------------------343 344 G4ExcitedString *G4VLongitudinalStringDecay::CPExcited(const G4ExcitedString & in)345 {346 G4Parton *Left=new G4Parton(*in.GetLeftParton());347 G4Parton *Right=new G4Parton(*in.GetRightParton());348 return new G4ExcitedString(Left,Right,in.GetDirection());349 }350 351 G4double G4VLongitudinalStringDecay::FragmentationMass(352 const G4FragmentingString *353 const string,354 Pcreate build,355 pDefPair * pdefs)356 {357 358 G4double mass;359 static G4bool NeedInit(true);360 static std::vector<double> nomix;361 static G4HadronBuilder * minMassHadronizer;362 if ( NeedInit )363 {364 NeedInit = false;365 nomix.resize(6);366 for ( G4int i=0; i<6 ; i++ ) nomix[i]=0;367 // minMassHadronizer=new G4HadronBuilder(pspin_meson,pspin_barion,nomix,nomix);368 minMassHadronizer=hadronizer;369 }370 371 if ( build==0 ) build=&G4HadronBuilder::BuildLowSpin;372 373 G4ParticleDefinition *Hadron1, *Hadron2=0;374 375 if (!string->FourQuarkString() )376 {377 // spin 0 meson or spin 1/2 barion will be built378 379 Hadron1 = (minMassHadronizer->*build)(string->GetLeftParton(),380 string->GetRightParton());381 mass= (Hadron1)->GetPDGMass();382 } else383 {384 //... string is qq--qqbar: Build two stable hadrons,385 //... with extra uubar or ddbar quark pair386 G4int iflc = (G4UniformRand() < 0.5)? 1 : 2;387 if (string->GetLeftParton()->GetPDGEncoding() < 0) iflc = -iflc;388 389 //... theSpin = 4; spin 3/2 baryons will be built390 Hadron1 = (minMassHadronizer->*build)(string->GetLeftParton(),FindParticle(iflc));391 Hadron2 =(minMassHadronizer->*build)(string->GetRightParton(),FindParticle(-iflc));392 mass = (Hadron1)->GetPDGMass() + (Hadron2)->GetPDGMass();393 }394 395 if ( pdefs != 0 )396 { // need to return hadrons as well....397 pdefs->first = Hadron1;398 pdefs->second = Hadron2;399 }400 401 return mass;402 }403 404 G4KineticTrackVector* G4VLongitudinalStringDecay::LightFragmentationTest(const405 G4ExcitedString * const string)406 {407 // Check string decay threshold408 409 G4KineticTrackVector * result=0; // return 0 when string exceeds the mass cut410 411 pDefPair hadrons((G4ParticleDefinition *)0,(G4ParticleDefinition *)0);412 G4FragmentingString aString(*string);413 if ( sqr(FragmentationMass(&aString,0,&hadrons)+MassCut) < aString.Mass2()) {414 return 0;415 }416 417 result=new G4KineticTrackVector;418 419 if ( hadrons.second ==0 )420 {421 // Substitute string by light hadron, Note that Energy is not conserved here!422 423 #ifdef DEBUG_LightFragmentationTest424 G4cout << "VlongSF Warning replacing string by single hadron "425 << hadrons.first->GetParticleName()426 << "string .. " << string->Get4Momentum() << " "427 << string->Get4Momentum().m() << G4endl;428 #endif429 430 G4ThreeVector Mom3 = string->Get4Momentum().vect();431 G4LorentzVector Mom(Mom3,432 std::sqrt(Mom3.mag2() + sqr(hadrons.first->GetPDGMass())));433 result->push_back(new G4KineticTrack(hadrons.first, 0, string->GetPosition(), Mom));434 } else435 {436 //... string was qq--qqbar type: Build two stable hadrons,437 438 #ifdef DEBUG_LightFragmentationTest439 G4cout << "VlongSF Warning replacing qq-qqbar string by TWO hadrons "440 << hadrons.first->GetParticleName() << " / "441 << hadrons.second->GetParticleName()442 << "string .. " << string->Get4Momentum() << " "443 << string->Get4Momentum().m() << G4endl;444 #endif445 446 G4LorentzVector Mom1, Mom2;447 Sample4Momentum(&Mom1, hadrons.first->GetPDGMass(),448 &Mom2,hadrons.second->GetPDGMass(),449 string->Get4Momentum().mag());450 result->push_back(new G4KineticTrack(hadrons.first, 0, string->GetPosition(), Mom1));451 result->push_back(new G4KineticTrack(hadrons.second, 0, string->GetPosition(), Mom2));452 G4ThreeVector Velocity = string->Get4Momentum().boostVector();453 result->Boost(Velocity);454 }455 456 return result;457 458 }459 460 //----------------------------------------------------------------------------------------------------------461 462 G4ParticleDefinition* G4VLongitudinalStringDecay::FindParticle(G4int Encoding)463 {464 G4ParticleDefinition* ptr = G4ParticleTable::GetParticleTable()->FindParticle(Encoding);465 if (ptr == NULL)466 {467 G4cout << "Particle with encoding "<<Encoding<<" does not exist!!!"<<G4endl;468 throw G4HadronicException(__FILE__, __LINE__, "Check your particle table");469 }470 return ptr;471 }472 473 //----------------------------------------------------------------------------------------------------------474 475 void G4VLongitudinalStringDecay::SetSigmaTransverseMomentum(G4double aValue)476 {477 if ( PastInitPhase ) {478 throw G4HadronicException(__FILE__, __LINE__, "4VLongitudinalStringDecay::SetSigmaTransverseMomentum after FragmentString() not allowed");479 } else {480 SigmaQT = aValue;481 }482 }483 484 //----------------------------------------------------------------------------------------------------------485 486 void G4VLongitudinalStringDecay::SetStrangenessSuppression(G4double aValue)487 {488 if ( PastInitPhase ) {489 throw G4HadronicException(__FILE__, __LINE__, "4VLongitudinalStringDecay::SetStrangenessSuppression after FragmentString() not allowed");490 } else {491 StrangeSuppress = aValue;492 }493 }494 495 //----------------------------------------------------------------------------------------------------------496 497 573 void G4VLongitudinalStringDecay::SetDiquarkSuppression(G4double aValue) 498 574 { … … 503 579 } 504 580 } 581 582 //---------------------------------------------------------------------------------------- 505 583 506 584 void G4VLongitudinalStringDecay::SetDiquarkBreakProbability(G4double aValue) … … 582 660 583 661 } 662 } 663 664 //------------------------------------------------------------------------------------------- 665 void G4VLongitudinalStringDecay::SetStringTensionParameter(G4double aValue)// Uzhi 20 June 08 666 { 667 Kappa = aValue * GeV/fermi; 584 668 } 585 //******************************************************************************************************* 669 //************************************************************************************** 670 -
trunk/source/processes/hadronic/models/parton_string/management/History
r819 r962 1 $Id: History,v 1. 3 2007/04/24 10:37:10 gunterExp $1 $Id: History,v 1.4 2008/04/01 08:20:25 vuzhinsk Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 25 25 model 26 26 27 31-March-2008 V. Uzhinsky Tag : had-partonstring-mgt-V09-01-00 28 - G4FTFCrossSection.cc and G4FTFCrossSection.hh were re-named into 29 G4FTFParameters.cc and .hh, and moved to diffraction directory. 30 The corresponding class was re-named too. All of these characterize 31 the content of the files more exactly. -
trunk/source/processes/hadronic/models/parton_string/management/include/G4EventGenerator.hh
r819 r962 26 26 // 27 27 // $Id: G4EventGenerator.hh,v 1.3 2006/06/29 20:55:13 gunter Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 #ifndef G4EventGenerator_h -
trunk/source/processes/hadronic/models/parton_string/management/include/G4InteractionCode.hh
r819 r962 26 26 // 27 27 // $Id: G4InteractionCode.hh,v 1.3 2006/06/29 20:55:15 gunter Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 #ifndef G4InteractionCode_h -
trunk/source/processes/hadronic/models/parton_string/management/include/G4InteractionContent.hh
r819 r962 26 26 // 27 27 // $Id: G4InteractionContent.hh,v 1.4 2007/01/24 10:28:54 gunter Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 -
trunk/source/processes/hadronic/models/parton_string/management/include/G4PomeronCrossSection.hh
r819 r962 28 28 // 29 29 // $Id: G4PomeronCrossSection.hh,v 1.3 2006/06/29 20:55:19 gunter Exp $ 30 // GEANT4 tag $Name: $30 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 31 31 // 32 32 #include "G4Proton.hh" -
trunk/source/processes/hadronic/models/parton_string/management/include/G4StringModel.hh
r819 r962 26 26 // 27 27 // $Id: G4StringModel.hh,v 1.3 2006/06/29 20:55:23 gunter Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 #ifndef G4StringModel_h -
trunk/source/processes/hadronic/models/parton_string/management/include/G4VParticipants.hh
r819 r962 25 25 // 26 26 // 27 // $Id: G4VParticipants.hh,v 1. 3 2006/06/29 20:55:25 gunterExp $28 // GEANT4 tag $Name: $27 // $Id: G4VParticipants.hh,v 1.4 2008/05/19 13:03:20 vuzhinsk Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 … … 90 90 if ( theNucleus == NULL ) theNucleus = new G4Fancy3DNucleus(); 91 91 theNucleus->Init(theA, theZ); 92 theNucleus->SortNucleonsInZ(); // Uzhi 16.05.08 Sorting of nucleon-Z 92 93 } 93 94 -
trunk/source/processes/hadronic/models/parton_string/management/include/G4VPartonStringModel.hh
r819 r962 26 26 // 27 27 // $Id: G4VPartonStringModel.hh,v 1.3 2006/06/29 20:55:27 gunter Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 #ifndef G4VPartonStringModel_h -
trunk/source/processes/hadronic/models/parton_string/management/include/G4VSplitableHadron.hh
r819 r962 25 25 // 26 26 // 27 // $Id: G4VSplitableHadron.hh,v 1. 3 2006/06/29 20:55:29 gunterExp $28 // GEANT4 tag $Name: $27 // $Id: G4VSplitableHadron.hh,v 1.4 2008/05/19 13:03:20 vuzhinsk Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 … … 75 75 void SetCollisionCount(G4int aCount); 76 76 77 void SetTimeOfCreation(G4double aTime); // Uzhi 7.05.08 78 G4double GetTimeOfCreation(); // Uzhi 7.05.08 79 77 80 void SetPosition(const G4ThreeVector &aPosition); 78 81 const G4ThreeVector & GetPosition() const; … … 83 86 G4bool IsSplit() { return isSplit;} 84 87 88 G4int GetSoftCollisionCount(); 89 protected: 85 90 86 protected:87 G4int GetSoftCollisionCount();88 91 void Splitting() {isSplit = true;} 89 92 … … 99 102 G4LorentzVector the4Momentum; 100 103 104 G4double TimeOfCreation; // Uzhi 7.05.08 101 105 G4ThreeVector thePosition; 102 106 G4int theCollisionCount; … … 141 145 } 142 146 147 inline void G4VSplitableHadron::SetTimeOfCreation(G4double aTime) // Uzhi 7.05.08 148 { 149 TimeOfCreation=aTime; 150 } 151 152 inline G4double G4VSplitableHadron::GetTimeOfCreation() // Uzhi 7.05.08 153 { 154 return TimeOfCreation; 155 } 143 156 144 157 inline void G4VSplitableHadron::SetPosition(const G4ThreeVector &aPosition) -
trunk/source/processes/hadronic/models/parton_string/management/include/G4VStringFragmentation.hh
r819 r962 26 26 // 27 27 // $Id: G4VStringFragmentation.hh,v 1.3 2006/06/29 20:55:31 gunter Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 #ifndef G4VStringFragmentation_h -
trunk/source/processes/hadronic/models/parton_string/management/include/G4VertexCode.hh
r819 r962 26 26 // 27 27 // $Id: G4VertexCode.hh,v 1.3 2006/06/29 20:55:33 gunter Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 #ifndef G4VertexCode_h -
trunk/source/processes/hadronic/models/parton_string/management/src/G4EventGenerator.cc
r819 r962 26 26 // 27 27 // $Id: G4EventGenerator.cc,v 1.4 2006/06/29 20:55:37 gunter Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // G4EventGenerator -
trunk/source/processes/hadronic/models/parton_string/management/src/G4InteractionContent.cc
r819 r962 26 26 // 27 27 // $Id: G4InteractionContent.cc,v 1.4 2006/06/29 20:55:39 gunter Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // ------------------------------------------------------------ -
trunk/source/processes/hadronic/models/parton_string/management/src/G4PomeronCrossSection.cc
r819 r962 26 26 // 27 27 // $Id: G4PomeronCrossSection.cc,v 1.6 2006/11/07 12:51:39 gunter Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 -
trunk/source/processes/hadronic/models/parton_string/management/src/G4StringModel.cc
r819 r962 26 26 // 27 27 // $Id: G4StringModel.cc,v 1.4 2006/06/29 20:55:45 gunter Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // G4StringModel -
trunk/source/processes/hadronic/models/parton_string/management/src/G4VParticipants.cc
r819 r962 26 26 // 27 27 // $Id: G4VParticipants.cc,v 1.3 2006/06/29 20:55:47 gunter Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // ------------------------------------------------------------ -
trunk/source/processes/hadronic/models/parton_string/management/src/G4VPartonStringModel.cc
r819 r962 26 26 // 27 27 // $Id: G4VPartonStringModel.cc,v 1.5 2007/01/24 10:29:30 gunter Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 //// ------------------------------------------------------------ -
trunk/source/processes/hadronic/models/parton_string/management/src/G4VSplitableHadron.cc
r819 r962 25 25 // 26 26 // 27 // $Id: G4VSplitableHadron.cc,v 1. 4 2006/06/29 20:55:51 gunterExp $28 // GEANT4 tag $Name: $27 // $Id: G4VSplitableHadron.cc,v 1.5 2008/05/19 13:03:20 vuzhinsk Exp $ 28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 … … 42 42 43 43 G4VSplitableHadron::G4VSplitableHadron() 44 : theDefinition(NULL), theCollisionCount(0), isSplit(false)44 : theDefinition(NULL), TimeOfCreation(0.), theCollisionCount(0), isSplit(false) // Uzhi 8.05.08 45 45 { 46 46 } 47 47 48 48 G4VSplitableHadron::G4VSplitableHadron(const G4ReactionProduct & aPrimary) 49 : theCollisionCount(0), isSplit(false)49 : TimeOfCreation(0.), theCollisionCount(0), isSplit(false) // Uzhi 8.05.08 50 50 { 51 51 theDefinition=aPrimary.GetDefinition(); … … 56 56 G4VSplitableHadron::G4VSplitableHadron(const G4Nucleon & aNucleon) 57 57 { 58 theCollisionCount=0; 59 isSplit = false; 60 theDefinition=aNucleon.GetParticleType(); 61 the4Momentum=aNucleon.GetMomentum(); 62 thePosition=aNucleon.GetPosition(); 58 TimeOfCreation = 0.; // Uzhi 8.05.08 59 theCollisionCount= 0; 60 isSplit = false; 61 theDefinition =aNucleon.GetParticleType(); 62 the4Momentum =aNucleon.GetMomentum(); 63 thePosition =aNucleon.GetPosition(); 63 64 } 64 65 65 66 G4VSplitableHadron::G4VSplitableHadron(const G4VKineticNucleon * aNucleon) 66 67 { 67 theCollisionCount=0; 68 isSplit = false; 69 theDefinition=aNucleon->GetDefinition(); 70 the4Momentum=aNucleon->Get4Momentum(); 71 thePosition=aNucleon->GetPosition(); 68 TimeOfCreation = 0.; // Uzhi 8.05.08 69 theCollisionCount= 0; 70 isSplit = false; 71 theDefinition =aNucleon->GetDefinition(); 72 the4Momentum =aNucleon->Get4Momentum(); 73 thePosition =aNucleon->GetPosition(); 72 74 } 73 75 74 76 G4VSplitableHadron::G4VSplitableHadron(const G4VSplitableHadron &right) 75 77 { 76 theCollisionCount=0; 77 isSplit = false; 78 theDefinition= right.GetDefinition(); 79 the4Momentum= right.Get4Momentum(); 80 thePosition= right.GetPosition(); 78 TimeOfCreation = 0.; // Uzhi 8.05.08 79 theCollisionCount= 0; 80 isSplit = false; 81 theDefinition = right.GetDefinition(); 82 the4Momentum = right.Get4Momentum(); 83 thePosition = right.GetPosition(); 81 84 } 82 85 -
trunk/source/processes/hadronic/models/parton_string/management/src/G4VStringFragmentation.cc
r819 r962 26 26 // 27 27 // $Id: G4VStringFragmentation.cc,v 1.4 2006/06/29 20:55:53 gunter Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 29 29 // 30 30 // G4VStringFragmentation -
trunk/source/processes/hadronic/models/parton_string/qgsm/History
r819 r962 1 $Id: History,v 1. 4.2.1 2008/04/23 15:25:01 gcosmoExp $1 $Id: History,v 1.6 2008/09/19 09:54:23 gunter Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 16 16 --------------------------------------------------------------- 17 17 18 23 Apr 2008 Gabriele Cosmo (hadr-qgsm-V09-00-00) 18 19 15 Sep 2008 G.Folger (hadr-qgsm-V09-01-01) 19 20 ------------------------------------------------ 20 - Tag for release 9.1.p02. 21 - Fix for bug found on windows in G4QGSParticipants.cc, bug 1018: 22 decrement of iterator fails, improve logic to not decrement. 21 23 22 24 31 Mar 2008 Dennis Wright (hadr-qgsm-V09-01-00) 23 25 ----------------------------------------------- 24 - Fix gcc-4.3 compiler warnings at lines 293, 395 of G4QGSMSplittableHadron.cc26 - fix gcc-4.3 compiler warnings at lines 293, 395 of G4QGSMSplittableHadron.cc 25 27 26 28 24 Apr 2007 Gunter Folger (hadr-qgsm-V08-02-02) 27 29 ------------------------------------------------ 28 - Merge in change done by ftf dev; ie. in G4QGSParticipants, theDiffExcitaton29 is constructed with default arguments.30 - merge in change done by ftf dev; ie. in G4QGSParticipants, theDiffExcitaton 31 is constructed with default arguments. 30 32 31 33 25 Jan 2007 Gunter Folger (hadr-qgsm-V08-02-01) … … 35 37 24 Jan 2007 Gunter Folger (hadr-qgsm-V08-02-00) 36 38 ------------------------------------------------ 37 - Correct E-p non-conservation in QGS. In 4QGSMSplitableHadron.cc the smaller38 of the lightcone momenta Q+/Q- was ignored.39 - G4QGSMSplitableHadron correct divide by 0 in SampleX()40 - Add debugging output to several classes39 - Correct E-p non-conservation in QGS. In 4QGSMSplitableHadron.cc the smaller 40 of the lightcone momenta Q+/Q- was ignored. 41 - G4QGSMSplitableHadron correct divide by 0 in SampleX() 42 - Add debugging output to several classes 41 43 42 44 30 Nov 2005 Gabriele Cosmo (hadr-qgsm-V07-01-00) -
trunk/source/processes/hadronic/models/parton_string/qgsm/src/G4QGSParticipants.cc
r819 r962 262 262 std::vector<G4InteractionContent*>::iterator i; 263 263 G4LorentzVector str4Mom; 264 for(i = theInteractions.begin(); i != theInteractions.end(); i++) 264 i = theInteractions.begin(); 265 while ( i != theInteractions.end() ) 265 266 { 266 267 G4InteractionContent* anIniteraction = *i; … … 304 305 } 305 306 delete *i; 306 i=theInteractions.erase(i); 307 i--; 308 } 307 i=theInteractions.erase(i); // i now points to the next interaction 308 } else { 309 i++; 310 } 309 311 } 310 312 #ifdef debug_G4QGSPart_PSoftColl
Note: See TracChangeset
for help on using the changeset viewer.