Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4VKinkyStringDecay Class Reference

#include <G4VKinkyStringDecay.hh>

Public Member Functions

 G4VKinkyStringDecay (G4VLongitudinalStringDecay *theModal)
 
virtual ~G4VKinkyStringDecay ()
 
G4KineticTrackVectorFragmentString (const G4ExcitedString &String)
 
virtual G4double GetLightConeGluonZ (G4double zmin, G4double zmax)
 
void SetLongitudinalStringDecay (G4VLongitudinalStringDecay *)
 

Detailed Description

Definition at line 43 of file G4VKinkyStringDecay.hh.

Constructor & Destructor Documentation

G4VKinkyStringDecay::G4VKinkyStringDecay ( G4VLongitudinalStringDecay theModal)

Definition at line 43 of file G4VKinkyStringDecay.cc.

44 {
45  this->SetLongitudinalStringDecay(theModal);
46 }
void SetLongitudinalStringDecay(G4VLongitudinalStringDecay *)

Here is the call graph for this function:

virtual G4VKinkyStringDecay::~G4VKinkyStringDecay ( )
inlinevirtual

Definition at line 47 of file G4VKinkyStringDecay.hh.

47 {};

Member Function Documentation

G4KineticTrackVector * G4VKinkyStringDecay::FragmentString ( const G4ExcitedString String)

Definition at line 63 of file G4VKinkyStringDecay.cc.

64 {
65  G4LorentzVector Mom = String.GetGluon()->Get4Momentum();
66  G4ThreeVector Pos = String.GetGluon()->GetPosition();
67  G4int QuarkEncoding = theLongitudinalStringDecay->SampleQuarkFlavor();
68  G4ThreeVector Pquark=theLongitudinalStringDecay->SampleQuarkPt();
69  G4double Pt2 = Pquark.mag2();
70  G4double z = GetLightConeGluonZ(0, 1);
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());
83  G4KineticTrackVector* KTV1 = theLongitudinalStringDecay->FragmentString(Str1);
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());
91  G4KineticTrackVector* KTV2 = theLongitudinalStringDecay->FragmentString(Str2);
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 }
G4Parton * GetGluon(void) const
ush Pos
Definition: deflate.h:89
const G4LorentzVector & Get4Momentum() const
Definition: G4Parton.hh:143
virtual G4KineticTrackVector * FragmentString(const G4ExcitedString &theString)=0
void Set4Momentum(const G4LorentzVector &aMomentum)
Definition: G4Parton.hh:148
G4ThreeVector SampleQuarkPt(G4double ptMax=-1.)
int G4int
Definition: G4Types.hh:78
void setZ(double)
G4Parton * GetAntiColorParton(void) const
G4Parton * GetColorParton(void) const
const G4ThreeVector & GetPosition() const
Definition: G4Parton.hh:132
virtual G4double GetLightConeGluonZ(G4double zmin, G4double zmax)
double mag2() const
double pz() const
G4int GetDirection(void) const
double G4double
Definition: G4Types.hh:76
void SetPosition(const G4ThreeVector &aPosition)
Definition: G4Parton.hh:137

Here is the call graph for this function:

G4double G4VKinkyStringDecay::GetLightConeGluonZ ( G4double  zmin,
G4double  zmax 
)
virtual

Definition at line 50 of file G4VKinkyStringDecay.cc.

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 }
#define G4UniformRand()
Definition: Randomize.hh:97
T sqr(const T &x)
Definition: templates.hh:145
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

Here is the caller graph for this function:

void G4VKinkyStringDecay::SetLongitudinalStringDecay ( G4VLongitudinalStringDecay theModal)
inline

Definition at line 61 of file G4VKinkyStringDecay.hh.

62 {
63  theLongitudinalStringDecay = theModal;
64 }

Here is the caller graph for this function:


The documentation for this class was generated from the following files: