Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4VKinkyStringDecay.cc
이 파일의 문서화 페이지로 가기
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 //
27 // $Id: G4VKinkyStringDecay.cc 107869 2017-12-07 14:46:39Z gcosmo $
28 // Maxim Komogorov
29 //
30 // -----------------------------------------------------------------------------
31 // GEANT 4 class implementation file
32 //
33 // History: first implementation, Maxim Komogorov, 10-Oct-1998
34 // -----------------------------------------------------------------------------
35 
36 #include "G4VKinkyStringDecay.hh"
37 #include "G4KineticTrackVector.hh"
38 #include "G4KineticTrack.hh"
39 #include "Randomize.hh"
40 
41 //*****************************************************************************************************
42 
44  {
45  this->SetLongitudinalStringDecay(theModal);
46  }
47 
48 //*****************************************************************************************************
49 
51  {
52  G4double z, yf;
53  do {
54  z = zmin + G4UniformRand()*(zmax-zmin);
55  yf = z*z +sqr(1 - z);
56  }
57  while (G4UniformRand() > yf); /* Loop checking, 07.08.2015, A.Ribon */
58  return z;
59  }
60 
61 //*****************************************************************************************************
62 
64  {
65  G4LorentzVector Mom = String.GetGluon()->Get4Momentum();
66  G4ThreeVector Pos = String.GetGluon()->GetPosition();
69  G4double Pt2 = Pquark.mag2();
71  G4double w = Mom.e() + Mom.pz();
72  //... now compute quark longitudinal momentum and energy
73 
74  Pquark.setZ( (z*w - Pt2/(z*w))*0.5);
75  G4double E = (z*w + Pt2/(z*w))*0.5;
76 
77  G4Parton* AntiColor = new G4Parton(-QuarkEncoding);
78  AntiColor->SetPosition(Pos);
79  G4LorentzVector AntiColorMom(-Pquark, E);
80  AntiColor->Set4Momentum(AntiColorMom);
81  G4Parton* Color = new G4Parton(*String.GetColorParton());
82  G4ExcitedString Str1(Color, AntiColor, String.GetDirection());
84 
85  Color = new G4Parton(QuarkEncoding);
86  Color->SetPosition(Pos);
87  G4LorentzVector ColorMom(Pquark, E);
88  Color->Set4Momentum(ColorMom);
89  AntiColor = new G4Parton(*String.GetAntiColorParton());
90  G4ExcitedString Str2(Color, AntiColor, String.GetDirection());
92 
93  if (KTV1 && KTV2)
94  while(!KTV2->empty()) /* Loop checking, 07.08.2015, A.Ribon */
95  {
96  KTV1->push_back(KTV2->back());
97  KTV1->erase(KTV1->end()-1);
98  }
99  return KTV1;
100  }
101 
102 //*****************************************************************************************************
103 
104 
105 
106 
107 
108 
109 
110 
111 
112 
113 
114 
115 
116 
ush Pos
Definition: deflate.h:92
const G4ThreeVector & GetPosition() const
Definition: G4Parton.hh:132
Double_t z
G4int GetDirection(void) const
double G4double
Definition: G4Types.hh:76
G4ThreeVector SampleQuarkPt(G4double ptMax=-1.)
void SetLongitudinalStringDecay(G4VLongitudinalStringDecay *)
void setZ(double)
G4KineticTrackVector * FragmentString(const G4ExcitedString &String)
#define G4UniformRand()
Definition: Randomize.hh:53
double mag2() const
void SetPosition(const G4ThreeVector &aPosition)
Definition: G4Parton.hh:137
G4Parton * GetColorParton(void) const
Color
Definition: test07.cc:36
G4VLongitudinalStringDecay * theLongitudinalStringDecay
int G4int
Definition: G4Types.hh:78
virtual G4double GetLightConeGluonZ(G4double zmin, G4double zmax)
G4Parton * GetGluon(void) const
double pz() const
G4Parton * GetAntiColorParton(void) const
T sqr(const T &x)
Definition: templates.hh:145
G4VKinkyStringDecay(G4VLongitudinalStringDecay *theModal)
const G4LorentzVector & Get4Momentum() const
Definition: G4Parton.hh:143
virtual G4KineticTrackVector * FragmentString(const G4ExcitedString &theString)=0
void Set4Momentum(const G4LorentzVector &aMomentum)
Definition: G4Parton.hh:148