Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
G4VLongitudinalStringDecay Class Referenceabstract

#include <G4VLongitudinalStringDecay.hh>

Inheritance diagram for G4VLongitudinalStringDecay:
G4LundStringFragmentation G4QGSMFragmentation

Public Member Functions

 G4VLongitudinalStringDecay ()
 
virtual ~G4VLongitudinalStringDecay ()
 
virtual G4KineticTrackVectorFragmentString (const G4ExcitedString &theString)=0
 
G4int SampleQuarkFlavor (void)
 
G4ThreeVector SampleQuarkPt (G4double ptMax=-1.)
 
G4KineticTrackVectorDecayResonans (G4KineticTrackVector *aHadrons)
 
void SetSigmaTransverseMomentum (G4double aQT)
 
void SetStrangenessSuppression (G4double aValue)
 
void SetDiquarkSuppression (G4double aValue)
 
void SetDiquarkBreakProbability (G4double aValue)
 
void SetVectorMesonProbability (G4double aValue)
 
void SetSpinThreeHalfBarionProbability (G4double aValue)
 
void SetScalarMesonMixings (std::vector< G4double > aVector)
 
void SetVectorMesonMixings (std::vector< G4double > aVector)
 
void SetStringTensionParameter (G4double aValue)
 

Protected Types

typedef std::pair
< G4ParticleDefinition
*, G4ParticleDefinition * > 
pDefPair
 
typedef G4ParticleDefinition
*(G4HadronBuilder::* 
Pcreate )(G4ParticleDefinition *, G4ParticleDefinition *)
 

Protected Member Functions

virtual void SetMassCut (G4double aValue)
 
G4KineticTrackVectorLightFragmentationTest (const G4ExcitedString *const theString)
 
G4double FragmentationMass (const G4FragmentingString *const string, Pcreate build=0, pDefPair *pdefs=0)
 
G4ParticleDefinitionFindParticle (G4int Encoding)
 
virtual void Sample4Momentum (G4LorentzVector *Mom, G4double Mass, G4LorentzVector *AntiMom, G4double AntiMass, G4double InitialMass)=0
 
virtual G4bool StopFragmenting (const G4FragmentingString *const string)=0
 
virtual G4bool IsFragmentable (const G4FragmentingString *const string)=0
 
virtual G4bool SplitLast (G4FragmentingString *string, G4KineticTrackVector *LeftVector, G4KineticTrackVector *RightVector)=0
 
G4ExcitedStringCPExcited (const G4ExcitedString &string)
 
G4KineticTrackSplitup (G4FragmentingString *string, G4FragmentingString *&newString)
 
G4ParticleDefinitionQuarkSplitup (G4ParticleDefinition *decay, G4ParticleDefinition *&created)
 
G4ParticleDefinitionDiQuarkSplitup (G4ParticleDefinition *decay, G4ParticleDefinition *&created)
 
pDefPair CreatePartonPair (G4int NeedParticle, G4bool AllowDiquarks=true)
 
virtual G4LorentzVectorSplitEandP (G4ParticleDefinition *pHadron, G4FragmentingString *string, G4FragmentingString *newString)=0
 
virtual G4double GetLightConeZ (G4double zmin, G4double zmax, G4int PartonEncoding, G4ParticleDefinition *pHadron, G4double Px, G4double Py)=0
 
void CalculateHadronTimePosition (G4double theInitialStringMass, G4KineticTrackVector *)
 
void ConstructParticle ()
 
G4ParticleDefinitionCreateHadron (G4int id1, G4int id2, G4bool theGivenSpin, G4int theSpin)
 
G4double GetDiquarkSuppress ()
 
G4double GetDiquarkBreakProb ()
 
G4double GetStrangeSuppress ()
 
G4double GetClusterMass ()
 
G4int GetClusterLoopInterrupt ()
 
G4double GetStringTensionParameter ()
 

Protected Attributes

G4double MassCut
 
G4double ClusterMass
 
G4double SigmaQT
 
G4double DiquarkSuppress
 
G4double DiquarkBreakProb
 
G4double SmoothParam
 
G4double StrangeSuppress
 
G4int StringLoopInterrupt
 
G4int ClusterLoopInterrupt
 
G4HadronBuilderhadronizer
 
G4double pspin_meson
 
G4double pspin_barion
 
std::vector< G4doublevectorMesonMix
 
std::vector< G4doublescalarMesonMix
 
G4bool PastInitPhase
 
G4double Kappa
 

Detailed Description

Definition at line 46 of file G4VLongitudinalStringDecay.hh.

Member Typedef Documentation

typedef G4ParticleDefinition*(G4HadronBuilder::* G4VLongitudinalStringDecay::Pcreate)(G4ParticleDefinition *, G4ParticleDefinition *)
protected

Definition at line 75 of file G4VLongitudinalStringDecay.hh.

Definition at line 71 of file G4VLongitudinalStringDecay.hh.

Constructor & Destructor Documentation

G4VLongitudinalStringDecay::G4VLongitudinalStringDecay ( )

Definition at line 63 of file G4VLongitudinalStringDecay.cc.

References ClusterLoopInterrupt, ClusterMass, DiquarkBreakProb, DiquarkSuppress, python.hepunit::fermi, python.hepunit::GeV, hadronizer, Kappa, MassCut, PastInitPhase, pspin_barion, pspin_meson, scalarMesonMix, SigmaQT, SmoothParam, StrangeSuppress, StringLoopInterrupt, and vectorMesonMix.

64 {
65  MassCut = 0.35*GeV;
66  ClusterMass = 0.15*GeV;
67 
68  SmoothParam = 0.9;
69  StringLoopInterrupt = 1000;
71 
72 // Changable Parameters below.
73  SigmaQT = 0.5 * GeV; // 0.5 0.1
74 
75  StrangeSuppress = 0.44; // 27 % strange quarks produced, ie. u:d:s=1:1:0.27
76  DiquarkSuppress = 0.07;
77  DiquarkBreakProb = 0.1;
78 
79  //... pspin_meson is probability to create vector meson
80  pspin_meson = 0.5;
81 
82  //... pspin_barion is probability to create 3/2 barion
83  pspin_barion = 0.5;
84 
85  //... vectorMesonMix[] is quark mixing parameters for vector mesons (Variable spin = 3)
86  vectorMesonMix.resize(6);
87  vectorMesonMix[0] = 0.5;
88  vectorMesonMix[1] = 0.0;
89  vectorMesonMix[2] = 0.5;
90  vectorMesonMix[3] = 0.0;
91  vectorMesonMix[4] = 1.0;
92  vectorMesonMix[5] = 1.0;
93 
94  //... scalarMesonMix[] is quark mixing parameters for scalar mesons (Variable spin=1)
95  scalarMesonMix.resize(6);
96  scalarMesonMix[0] = 0.5;
97  scalarMesonMix[1] = 0.25;
98  scalarMesonMix[2] = 0.5;
99  scalarMesonMix[3] = 0.25;
100  scalarMesonMix[4] = 1.0;
101  scalarMesonMix[5] = 0.5;
102 
103 // Parameters may be changed until the first fragmentation starts
104  PastInitPhase=false;
107  Kappa = 1.0 * GeV/fermi;
108 
109 
110 }
std::vector< G4double > vectorMesonMix
std::vector< G4double > scalarMesonMix
G4VLongitudinalStringDecay::~G4VLongitudinalStringDecay ( )
virtual

Definition at line 113 of file G4VLongitudinalStringDecay.cc.

References hadronizer.

114  {
115  delete hadronizer;
116  }

Member Function Documentation

void G4VLongitudinalStringDecay::CalculateHadronTimePosition ( G4double  theInitialStringMass,
G4KineticTrackVector Hadrons 
)
protected

Definition at line 485 of file G4VLongitudinalStringDecay.cc.

References plottest35::c1, python.hepunit::c_light, and GetStringTensionParameter().

Referenced by G4QGSMFragmentation::FragmentString(), and G4LundStringFragmentation::FragmentString().

486  {
487 
488 // `yo-yo` formation time
489 // const G4double kappa = 1.0 * GeV/fermi/4.;
491  for(size_t c1 = 0; c1 < Hadrons->size(); c1++)
492  {
493  G4double SumPz = 0;
494  G4double SumE = 0;
495  for(size_t c2 = 0; c2 < c1; c2++)
496  {
497  SumPz += Hadrons->operator[](c2)->Get4Momentum().pz();
498  SumE += Hadrons->operator[](c2)->Get4Momentum().e();
499  }
500  G4double HadronE = Hadrons->operator[](c1)->Get4Momentum().e();
501  G4double HadronPz = Hadrons->operator[](c1)->Get4Momentum().pz();
502  Hadrons->operator[](c1)->SetFormationTime(
503 (theInitialStringMass - 2.*SumPz + HadronE - HadronPz)/(2.*kappa)/c_light);
504 
505  G4ThreeVector aPosition(0, 0,
506 (theInitialStringMass - 2.*SumE - HadronE + HadronPz)/(2.*kappa));
507  Hadrons->operator[](c1)->SetPosition(aPosition);
508 
509  }
510  }
double G4double
Definition: G4Types.hh:76
float c_light
Definition: hepunit.py:257
tuple c1
Definition: plottest35.py:14
void G4VLongitudinalStringDecay::ConstructParticle ( )
protected
G4ExcitedString * G4VLongitudinalStringDecay::CPExcited ( const G4ExcitedString string)
protected

Definition at line 314 of file G4VLongitudinalStringDecay.cc.

References G4ExcitedString::GetDirection(), G4ExcitedString::GetLeftParton(), and G4ExcitedString::GetRightParton().

Referenced by G4QGSMFragmentation::FragmentString(), and G4LundStringFragmentation::FragmentString().

315 {
316  G4Parton *Left=new G4Parton(*in.GetLeftParton());
317  G4Parton *Right=new G4Parton(*in.GetRightParton());
318  return new G4ExcitedString(Left,Right,in.GetDirection());
319 }
G4ParticleDefinition* G4VLongitudinalStringDecay::CreateHadron ( G4int  id1,
G4int  id2,
G4bool  theGivenSpin,
G4int  theSpin 
)
protected
G4VLongitudinalStringDecay::pDefPair G4VLongitudinalStringDecay::CreatePartonPair ( G4int  NeedParticle,
G4bool  AllowDiquarks = true 
)
protected

Definition at line 444 of file G4VLongitudinalStringDecay.cc.

References DiquarkSuppress, FindParticle(), G4UniformRand, G4INCL::Math::max(), G4INCL::Math::min(), and SampleQuarkFlavor().

Referenced by DiQuarkSplitup(), and QuarkSplitup().

445 {
446 // NeedParticle = +1 for Particle, -1 for Antiparticle
447 
448  if ( AllowDiquarks && G4UniformRand() < DiquarkSuppress )
449  {
450  // Create a Diquark - AntiDiquark pair , first in pair is anti to IsParticle
451  G4int q1 = SampleQuarkFlavor();
452  G4int q2 = SampleQuarkFlavor();
453  G4int spin = (q1 != q2 && G4UniformRand() <= 0.5)? 1 : 3;
454  // convention: quark with higher PDG number is first
455  G4int PDGcode = (std::max(q1,q2) * 1000 + std::min(q1,q2) * 100 + spin) * NeedParticle;
456  return pDefPair (FindParticle(-PDGcode),FindParticle(PDGcode));
457 
458 
459  } else {
460  // Create a Quark - AntiQuark pair, first in pair IsParticle
461  G4int PDGcode=SampleQuarkFlavor()*NeedParticle;
462  return pDefPair (FindParticle(PDGcode),FindParticle(-PDGcode));
463  }
464 
465 }
int G4int
Definition: G4Types.hh:78
#define G4UniformRand()
Definition: Randomize.hh:87
std::pair< G4ParticleDefinition *, G4ParticleDefinition * > pDefPair
G4ParticleDefinition * FindParticle(G4int Encoding)
T max(const T t1, const T t2)
brief Return the largest of the two arguments
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
G4KineticTrackVector* G4VLongitudinalStringDecay::DecayResonans ( G4KineticTrackVector aHadrons)
G4ParticleDefinition * G4VLongitudinalStringDecay::DiQuarkSplitup ( G4ParticleDefinition decay,
G4ParticleDefinition *&  created 
)
protected

Definition at line 389 of file G4VLongitudinalStringDecay.cc.

References G4HadronBuilder::Build(), CreatePartonPair(), DiquarkBreakProb, FindParticle(), G4UniformRand, G4ParticleDefinition::GetPDGEncoding(), hadronizer, G4INCL::Math::max(), and G4INCL::Math::min().

Referenced by Splitup().

392 {
393  //... can Diquark break or not?
395  //... Diquark break
396 
397  G4int stableQuarkEncoding = decay->GetPDGEncoding()/1000;
398  G4int decayQuarkEncoding = (decay->GetPDGEncoding()/100)%10;
399  if (G4UniformRand() < 0.5)
400  {
401  G4int Swap = stableQuarkEncoding;
402  stableQuarkEncoding = decayQuarkEncoding;
403  decayQuarkEncoding = Swap;
404  }
405 
406  G4int IsParticle=(decayQuarkEncoding>0) ? -1 : +1;
407  // if we have a quark, we need antiquark)
408  pDefPair QuarkPair = CreatePartonPair(IsParticle,false); // no diquarks wanted
409  //... Build new Diquark
410  G4int QuarkEncoding=QuarkPair.second->GetPDGEncoding();
411  G4int i10 = std::max(std::abs(QuarkEncoding), std::abs(stableQuarkEncoding));
412  G4int i20 = std::min(std::abs(QuarkEncoding), std::abs(stableQuarkEncoding));
413  G4int spin = (i10 != i20 && G4UniformRand() <= 0.5)? 1 : 3;
414  G4int NewDecayEncoding = -1*IsParticle*(i10 * 1000 + i20 * 100 + spin);
415  created = FindParticle(NewDecayEncoding);
416  G4ParticleDefinition * decayQuark=FindParticle(decayQuarkEncoding);
417  G4ParticleDefinition * had=hadronizer->Build(QuarkPair.first, decayQuark);
418  return had;
419 // return hadronizer->Build(QuarkPair.first, decayQuark);
420 
421  } else {
422  //... Diquark does not break
423 
424  G4int IsParticle=(decay->GetPDGEncoding()>0) ? +1 : -1;
425  // if we have a diquark, we need quark)
426  pDefPair QuarkPair = CreatePartonPair(IsParticle,false); // no diquarks wanted
427  created = QuarkPair.second;
428 
429  G4ParticleDefinition * had=hadronizer->Build(QuarkPair.first, decay);
430  return had;
431 // return G4ParticleDefinition * had=hadronizer->Build(QuarkPair.first, decay);
432  }
433 }
G4ParticleDefinition * Build(G4ParticleDefinition *black, G4ParticleDefinition *white)
int G4int
Definition: G4Types.hh:78
pDefPair CreatePartonPair(G4int NeedParticle, G4bool AllowDiquarks=true)
#define G4UniformRand()
Definition: Randomize.hh:87
std::pair< G4ParticleDefinition *, G4ParticleDefinition * > pDefPair
G4ParticleDefinition * FindParticle(G4int Encoding)
T max(const T t1, const T t2)
brief Return the largest of the two arguments
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
G4ParticleDefinition * G4VLongitudinalStringDecay::FindParticle ( G4int  Encoding)
protected

Definition at line 281 of file G4VLongitudinalStringDecay.cc.

References G4ParticleTable::FindParticle(), G4cout, G4endl, and G4ParticleTable::GetParticleTable().

Referenced by CreatePartonPair(), DiQuarkSplitup(), and FragmentationMass().

282  {
284  if (ptr == NULL)
285  {
286  G4cout << "Particle with encoding "<<Encoding<<" does not exist!!!"<<G4endl;
287  throw G4HadronicException(__FILE__, __LINE__, "Check your particle table");
288  }
289  return ptr;
290  }
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
G4GLOB_DLL std::ostream G4cout
static G4ParticleTable * GetParticleTable()
#define G4endl
Definition: G4ios.hh:61
G4double G4VLongitudinalStringDecay::FragmentationMass ( const G4FragmentingString *const  string,
Pcreate  build = 0,
pDefPair pdefs = 0 
)
protected

Definition at line 223 of file G4VLongitudinalStringDecay.cc.

References G4HadronBuilder::BuildLowSpin(), FindParticle(), G4FragmentingString::FourQuarkString(), G4ThreadLocal, G4UniformRand, G4FragmentingString::GetLeftParton(), G4ParticleDefinition::GetPDGEncoding(), G4FragmentingString::GetRightParton(), and hadronizer.

Referenced by LightFragmentationTest().

226 {
227 
228  G4double mass;
229  static G4ThreadLocal G4bool NeedInit(true);
230  static G4ThreadLocal std::vector<double> *nomix_G4MT_TLS_ = 0 ; if (!nomix_G4MT_TLS_) nomix_G4MT_TLS_ = new std::vector<double> ; std::vector<double> &nomix = *nomix_G4MT_TLS_;
231  static G4ThreadLocal G4HadronBuilder * minMassHadronizer;
232  if ( NeedInit )
233  {
234  NeedInit = false;
235  nomix.resize(6);
236  for ( G4int i=0; i<6 ; i++ ) nomix[i]=0;
237 
238 // minMassHadronizer=new G4HadronBuilder(pspin_meson,pspin_barion,nomix,nomix);
239  minMassHadronizer=hadronizer;
240  }
241 
242  if ( build==0 ) build=&G4HadronBuilder::BuildLowSpin;
243 
244  G4ParticleDefinition *Hadron1, *Hadron2=0;
245 
246  if (!string->FourQuarkString() )
247  {
248  // spin 0 meson or spin 1/2 barion will be built
249 
250 //G4cout<<"String Left Right "<<string->GetLeftParton()<<" "<<string->GetRightParton()<<G4endl;
251  Hadron1 = (minMassHadronizer->*build)(string->GetLeftParton(),
252  string->GetRightParton());
253 //G4cout<<"Hadron1 "<<Hadron1->GetParticleName()<<G4endl;
254  mass= (Hadron1)->GetPDGMass();
255  } else
256  {
257  //... string is qq--qqbar: Build two stable hadrons,
258  //... with extra uubar or ddbar quark pair
259  G4int iflc = (G4UniformRand() < 0.5)? 1 : 2;
260  if (string->GetLeftParton()->GetPDGEncoding() < 0) iflc = -iflc;
261 
262  //... theSpin = 4; spin 3/2 baryons will be built
263  Hadron1 = (minMassHadronizer->*build)(string->GetLeftParton(),
264  FindParticle(iflc) );
265  Hadron2 = (minMassHadronizer->*build)(string->GetRightParton(),
266  FindParticle(-iflc) );
267  mass = (Hadron1)->GetPDGMass() + (Hadron2)->GetPDGMass();
268  }
269 
270  if ( pdefs != 0 )
271  { // need to return hadrons as well....
272  pdefs->first = Hadron1;
273  pdefs->second = Hadron2;
274  }
275 
276  return mass;
277 }
G4ParticleDefinition * GetRightParton(void) const
G4ParticleDefinition * BuildLowSpin(G4ParticleDefinition *black, G4ParticleDefinition *white)
#define G4ThreadLocal
Definition: tls.hh:52
int G4int
Definition: G4Types.hh:78
G4ParticleDefinition * GetLeftParton(void) const
#define G4UniformRand()
Definition: Randomize.hh:87
bool G4bool
Definition: G4Types.hh:79
G4ParticleDefinition * FindParticle(G4int Encoding)
G4bool FourQuarkString(void) const
double G4double
Definition: G4Types.hh:76
virtual G4KineticTrackVector* G4VLongitudinalStringDecay::FragmentString ( const G4ExcitedString theString)
pure virtual
G4int G4VLongitudinalStringDecay::GetClusterLoopInterrupt ( )
inlineprotected
G4double G4VLongitudinalStringDecay::GetClusterMass ( )
inlineprotected

Definition at line 169 of file G4VLongitudinalStringDecay.hh.

References ClusterMass.

G4double G4VLongitudinalStringDecay::GetDiquarkBreakProb ( )
inlineprotected

Definition at line 167 of file G4VLongitudinalStringDecay.hh.

References DiquarkBreakProb.

G4double G4VLongitudinalStringDecay::GetDiquarkSuppress ( )
inlineprotected

Definition at line 166 of file G4VLongitudinalStringDecay.hh.

References DiquarkSuppress.

virtual G4double G4VLongitudinalStringDecay::GetLightConeZ ( G4double  zmin,
G4double  zmax,
G4int  PartonEncoding,
G4ParticleDefinition pHadron,
G4double  Px,
G4double  Py 
)
protectedpure virtual
G4double G4VLongitudinalStringDecay::GetStrangeSuppress ( )
inlineprotected

Definition at line 168 of file G4VLongitudinalStringDecay.hh.

References StrangeSuppress.

G4double G4VLongitudinalStringDecay::GetStringTensionParameter ( )
inlineprotected

Definition at line 172 of file G4VLongitudinalStringDecay.hh.

Referenced by CalculateHadronTimePosition().

172 {return Kappa;}; // Uzhi 20 June 08
virtual G4bool G4VLongitudinalStringDecay::IsFragmentable ( const G4FragmentingString *const  string)
protectedpure virtual
G4KineticTrackVector * G4VLongitudinalStringDecay::LightFragmentationTest ( const G4ExcitedString *const  theString)
protected

Definition at line 151 of file G4VLongitudinalStringDecay.cc.

References G4KineticTrackVector::Boost(), FragmentationMass(), G4cout, G4endl, G4ExcitedString::GetPosition(), CLHEP::HepLorentzVector::mag(), CLHEP::Hep3Vector::mag2(), G4FragmentingString::Mass2(), MassCut, Sample4Momentum(), and sqr().

Referenced by G4QGSMFragmentation::FragmentString(), and G4LundStringFragmentation::FragmentString().

153 {
154  // Check string decay threshold
155 
156  G4KineticTrackVector * result=0; // return 0 when string exceeds the mass cut
157 
159 
160  G4FragmentingString aString(*string);
161 
162  if ( sqr(FragmentationMass(&aString,0,&hadrons)+MassCut) < aString.Mass2()) {
163  return 0;
164  }
165 
166 // The string mass is very low ---------------------------
167 
168  result=new G4KineticTrackVector;
169 
170  if ( hadrons.second ==0 )
171  {
172 // Substitute string by light hadron, Note that Energy is not conserved here!
173 
174 /*
175 #ifdef DEBUG_LightFragmentationTest
176  G4cout << "VlongSF Warning replacing string by single hadron " <<G4endl;
177  G4cout << hadrons.first->GetParticleName()
178  << "string .. " << string->Get4Momentum() << " "
179  << string->Get4Momentum().m() << G4endl;
180 #endif
181 */
182  G4ThreeVector Mom3 = string->Get4Momentum().vect();
183  G4LorentzVector Mom(Mom3,
184  std::sqrt(Mom3.mag2() +
185  sqr(hadrons.first->GetPDGMass())));
186  result->push_back(new G4KineticTrack(hadrons.first, 0,
187  string->GetPosition(),
188  Mom));
189  } else
190  {
191 //... string was qq--qqbar type: Build two stable hadrons,
192 
193 #ifdef DEBUG_LightFragmentationTest
194  G4cout << "VlongSF Warning replacing qq-qqbar string by TWO hadrons "
195  << hadrons.first->GetParticleName() << " / "
196  << hadrons.second->GetParticleName()
197  << "string .. " << string->Get4Momentum() << " "
198  << string->Get4Momentum().m() << G4endl;
199 #endif
200 
201  G4LorentzVector Mom1, Mom2;
202  Sample4Momentum(&Mom1, hadrons.first->GetPDGMass(),
203  &Mom2,hadrons.second->GetPDGMass(),
204  string->Get4Momentum().mag());
205 
206  result->push_back(new G4KineticTrack(hadrons.first, 0,
207  string->GetPosition(),
208  Mom1));
209  result->push_back(new G4KineticTrack(hadrons.second, 0,
210  string->GetPosition(),
211  Mom2));
212 
213  G4ThreeVector Velocity = string->Get4Momentum().boostVector();
214  result->Boost(Velocity);
215  }
216 
217  return result;
218 
219 }
G4double FragmentationMass(const G4FragmentingString *const string, Pcreate build=0, pDefPair *pdefs=0)
G4GLOB_DLL std::ostream G4cout
std::pair< G4ParticleDefinition *, G4ParticleDefinition * > pDefPair
double mag() const
virtual void Sample4Momentum(G4LorentzVector *Mom, G4double Mass, G4LorentzVector *AntiMom, G4double AntiMass, G4double InitialMass)=0
void Boost(G4ThreeVector &Velocity)
double mag2() const
#define G4endl
Definition: G4ios.hh:61
T sqr(const T &x)
Definition: templates.hh:145
G4ParticleDefinition * G4VLongitudinalStringDecay::QuarkSplitup ( G4ParticleDefinition decay,
G4ParticleDefinition *&  created 
)
protected

Definition at line 375 of file G4VLongitudinalStringDecay.cc.

References G4HadronBuilder::Build(), CreatePartonPair(), G4ParticleDefinition::GetPDGEncoding(), and hadronizer.

Referenced by Splitup().

377 {
378  G4int IsParticle=(decay->GetPDGEncoding()>0) ? -1 : +1; // if we have a quark,
379  // we need antiquark
380  // (or diquark)
381  pDefPair QuarkPair = CreatePartonPair(IsParticle);
382  created = QuarkPair.second;
383  return hadronizer->Build(QuarkPair.first, decay);
384 
385 }
G4ParticleDefinition * Build(G4ParticleDefinition *black, G4ParticleDefinition *white)
int G4int
Definition: G4Types.hh:78
pDefPair CreatePartonPair(G4int NeedParticle, G4bool AllowDiquarks=true)
std::pair< G4ParticleDefinition *, G4ParticleDefinition * > pDefPair
virtual void G4VLongitudinalStringDecay::Sample4Momentum ( G4LorentzVector Mom,
G4double  Mass,
G4LorentzVector AntiMom,
G4double  AntiMass,
G4double  InitialMass 
)
protectedpure virtual

Referenced by LightFragmentationTest().

G4int G4VLongitudinalStringDecay::SampleQuarkFlavor ( void  )

Definition at line 437 of file G4VLongitudinalStringDecay.cc.

References G4UniformRand, and StrangeSuppress.

Referenced by CreatePartonPair(), and G4VKinkyStringDecay::FragmentString().

438  {
439  return (1 + (int)(G4UniformRand()/StrangeSuppress));
440  }
#define G4UniformRand()
Definition: Randomize.hh:87
G4ThreeVector G4VLongitudinalStringDecay::SampleQuarkPt ( G4double  ptMax = -1.)

Definition at line 468 of file G4VLongitudinalStringDecay.cc.

References G4UniformRand, python.hepunit::pi, G4INCL::DeJongSpin::shoot(), SigmaQT, and sqr().

Referenced by G4VKinkyStringDecay::FragmentString().

469  {
470  G4double Pt;
471  if ( ptMax < 0 ) {
472  // sample full gaussian
473  Pt = -std::log(G4UniformRand());
474  } else {
475  // sample in limited range
476  Pt = -std::log(G4RandFlat::shoot(std::exp(-sqr(ptMax)/sqr(SigmaQT)), 1.));
477  }
478  Pt = SigmaQT * std::sqrt(Pt);
479  G4double phi = 2.*pi*G4UniformRand();
480  return G4ThreeVector(Pt * std::cos(phi),Pt * std::sin(phi),0);
481  }
ThreeVector shoot(const G4int Ap, const G4int Af)
CLHEP::Hep3Vector G4ThreeVector
#define G4UniformRand()
Definition: Randomize.hh:87
T sqr(const T &x)
Definition: templates.hh:145
double G4double
Definition: G4Types.hh:76
void G4VLongitudinalStringDecay::SetDiquarkBreakProbability ( G4double  aValue)

Definition at line 547 of file G4VLongitudinalStringDecay.cc.

References DiquarkBreakProb, and PastInitPhase.

Referenced by G4LundStringFragmentation::G4LundStringFragmentation().

548 {
549  if ( PastInitPhase ) {
550  throw G4HadronicException(__FILE__, __LINE__, "4VLongitudinalStringDecay::SetDiquarkBreakProbability after FragmentString() not allowed");
551  } else {
552  DiquarkBreakProb = aValue;
553  }
554 }
void G4VLongitudinalStringDecay::SetDiquarkSuppression ( G4double  aValue)

Definition at line 536 of file G4VLongitudinalStringDecay.cc.

References DiquarkSuppress, and PastInitPhase.

Referenced by G4LundStringFragmentation::G4LundStringFragmentation().

537 {
538  if ( PastInitPhase ) {
539  throw G4HadronicException(__FILE__, __LINE__, "4VLongitudinalStringDecay::SetDiquarkSuppression after FragmentString() not allowed");
540  } else {
541  DiquarkSuppress = aValue;
542  }
543 }
void G4VLongitudinalStringDecay::SetMassCut ( G4double  aValue)
protectedvirtual

Definition at line 145 of file G4VLongitudinalStringDecay.cc.

References MassCut.

Referenced by G4LundStringFragmentation::FragmentString().

void G4VLongitudinalStringDecay::SetScalarMesonMixings ( std::vector< G4double aVector)

Definition at line 586 of file G4VLongitudinalStringDecay.cc.

References hadronizer, PastInitPhase, pspin_barion, pspin_meson, scalarMesonMix, and vectorMesonMix.

587 {
588  if ( PastInitPhase ) {
589  throw G4HadronicException(__FILE__, __LINE__, "G4VLongitudinalStringDecay::SetScalarMesonMixings after FragmentString() not allowed");
590  } else {
591  if ( aVector.size() < 6 )
592  throw G4HadronicException(__FILE__, __LINE__, "G4VLongitudinalStringDecay::SetScalarMesonMixings( argument Vector too small");
593  scalarMesonMix[0] = aVector[0];
594  scalarMesonMix[1] = aVector[1];
595  scalarMesonMix[2] = aVector[2];
596  scalarMesonMix[3] = aVector[3];
597  scalarMesonMix[4] = aVector[4];
598  scalarMesonMix[5] = aVector[5];
599  delete hadronizer;
602  }
603 }
std::vector< G4double > vectorMesonMix
std::vector< G4double > scalarMesonMix
void G4VLongitudinalStringDecay::SetSigmaTransverseMomentum ( G4double  aQT)

Definition at line 514 of file G4VLongitudinalStringDecay.cc.

References PastInitPhase, and SigmaQT.

515 {
516  if ( PastInitPhase ) {
517  throw G4HadronicException(__FILE__, __LINE__, "4VLongitudinalStringDecay::SetSigmaTransverseMomentum after FragmentString() not allowed");
518  } else {
519  SigmaQT = aValue;
520  }
521 }
void G4VLongitudinalStringDecay::SetSpinThreeHalfBarionProbability ( G4double  aValue)

Definition at line 572 of file G4VLongitudinalStringDecay.cc.

References hadronizer, PastInitPhase, pspin_barion, pspin_meson, scalarMesonMix, and vectorMesonMix.

573 {
574  if ( PastInitPhase ) {
575  throw G4HadronicException(__FILE__, __LINE__, "G4VLongitudinalStringDecay::SetSpinThreeHalfBarionProbability after FragmentString() not allowed");
576  } else {
577  pspin_barion = aValue;
578  delete hadronizer;
581  }
582 }
std::vector< G4double > vectorMesonMix
std::vector< G4double > scalarMesonMix
void G4VLongitudinalStringDecay::SetStrangenessSuppression ( G4double  aValue)

Definition at line 525 of file G4VLongitudinalStringDecay.cc.

References PastInitPhase, and StrangeSuppress.

Referenced by G4LundStringFragmentation::G4LundStringFragmentation().

526 {
527  if ( PastInitPhase ) {
528  throw G4HadronicException(__FILE__, __LINE__, "4VLongitudinalStringDecay::SetStrangenessSuppression after FragmentString() not allowed");
529  } else {
530  StrangeSuppress = aValue;
531  }
532 }
void G4VLongitudinalStringDecay::SetStringTensionParameter ( G4double  aValue)
void G4VLongitudinalStringDecay::SetVectorMesonMixings ( std::vector< G4double aVector)

Definition at line 607 of file G4VLongitudinalStringDecay.cc.

References hadronizer, PastInitPhase, pspin_barion, pspin_meson, scalarMesonMix, and vectorMesonMix.

608 {
609  if ( PastInitPhase ) {
610  throw G4HadronicException(__FILE__, __LINE__, "G4VLongitudinalStringDecay::SetVectorMesonMixings after FragmentString() not allowed");
611  } else {
612  if ( aVector.size() < 6 )
613  throw G4HadronicException(__FILE__, __LINE__, "G4VLongitudinalStringDecay::SetVectorMesonMixings( argument Vector too small");
614  vectorMesonMix[0] = aVector[0];
615  vectorMesonMix[1] = aVector[1];
616  vectorMesonMix[2] = aVector[2];
617  vectorMesonMix[3] = aVector[3];
618  vectorMesonMix[4] = aVector[4];
619  vectorMesonMix[5] = aVector[5];
620  delete hadronizer;
623 
624  }
625 }
std::vector< G4double > vectorMesonMix
std::vector< G4double > scalarMesonMix
void G4VLongitudinalStringDecay::SetVectorMesonProbability ( G4double  aValue)

Definition at line 558 of file G4VLongitudinalStringDecay.cc.

References hadronizer, PastInitPhase, pspin_barion, pspin_meson, scalarMesonMix, and vectorMesonMix.

559 {
560  if ( PastInitPhase ) {
561  throw G4HadronicException(__FILE__, __LINE__, "G4VLongitudinalStringDecay::SetVectorMesonProbability after FragmentString() not allowed");
562  } else {
563  pspin_meson = aValue;
564  delete hadronizer;
567  }
568 }
std::vector< G4double > vectorMesonMix
std::vector< G4double > scalarMesonMix
virtual G4LorentzVector* G4VLongitudinalStringDecay::SplitEandP ( G4ParticleDefinition pHadron,
G4FragmentingString string,
G4FragmentingString newString 
)
protectedpure virtual

Referenced by Splitup().

virtual G4bool G4VLongitudinalStringDecay::SplitLast ( G4FragmentingString string,
G4KineticTrackVector LeftVector,
G4KineticTrackVector RightVector 
)
protectedpure virtual
G4KineticTrack * G4VLongitudinalStringDecay::Splitup ( G4FragmentingString string,
G4FragmentingString *&  newString 
)
protected

Definition at line 323 of file G4VLongitudinalStringDecay.cc.

References G4FragmentingString::DecayIsQuark(), DiQuarkSplitup(), G4UniformRand, G4FragmentingString::GetDecayParton(), QuarkSplitup(), and SplitEandP().

Referenced by G4QGSMFragmentation::FragmentString().

326 {
327 //G4cout<<"Start SplitUP"<<G4endl;
328  //... random choice of string end to use for creating the hadron (decay)
329  G4int SideOfDecay = (G4UniformRand() < 0.5)? 1: -1;
330  if (SideOfDecay < 0)
331  {
332  string->SetLeftPartonStable();
333  } else
334  {
335  string->SetRightPartonStable();
336  }
337 
338  G4ParticleDefinition *newStringEnd;
339  G4ParticleDefinition * HadronDefinition;
340  if (string->DecayIsQuark())
341  {
342  HadronDefinition= QuarkSplitup(string->GetDecayParton(), newStringEnd);
343  } else {
344  HadronDefinition= DiQuarkSplitup(string->GetDecayParton(), newStringEnd);
345  }
346 
347 //G4cout<<"New had "<<HadronDefinition->GetParticleName()<<G4endl;
348 // create new String from old, ie. keep Left and Right order, but replace decay
349 
350  newString=new G4FragmentingString(*string,newStringEnd); // To store possible
351  // quark containt of new string
352 //G4cout<<"SplitEandP "<<G4endl;
353  G4LorentzVector* HadronMomentum=SplitEandP(HadronDefinition, string, newString);
354 
355  delete newString; newString=0;
356 
357  G4KineticTrack * Hadron =0;
358  if ( HadronMomentum != 0 ) {
359 
361  Hadron = new G4KineticTrack(HadronDefinition, 0,Pos, *HadronMomentum);
362 
363  newString=new G4FragmentingString(*string,newStringEnd,
364  HadronMomentum);
365 
366  delete HadronMomentum;
367  }
368 //G4cout<<"End SplitUP"<<G4endl;
369  return Hadron;
370 }
G4ParticleDefinition * QuarkSplitup(G4ParticleDefinition *decay, G4ParticleDefinition *&created)
ush Pos
Definition: deflate.h:89
G4ParticleDefinition * DiQuarkSplitup(G4ParticleDefinition *decay, G4ParticleDefinition *&created)
int G4int
Definition: G4Types.hh:78
G4ParticleDefinition * GetDecayParton() const
#define G4UniformRand()
Definition: Randomize.hh:87
virtual G4LorentzVector * SplitEandP(G4ParticleDefinition *pHadron, G4FragmentingString *string, G4FragmentingString *newString)=0
virtual G4bool G4VLongitudinalStringDecay::StopFragmenting ( const G4FragmentingString *const  string)
protectedpure virtual

Field Documentation

G4int G4VLongitudinalStringDecay::ClusterLoopInterrupt
protected
G4double G4VLongitudinalStringDecay::ClusterMass
protected

Definition at line 177 of file G4VLongitudinalStringDecay.hh.

Referenced by G4VLongitudinalStringDecay(), and GetClusterMass().

G4double G4VLongitudinalStringDecay::DiquarkBreakProb
protected
G4double G4VLongitudinalStringDecay::DiquarkSuppress
protected
G4HadronBuilder* G4VLongitudinalStringDecay::hadronizer
protected
G4double G4VLongitudinalStringDecay::Kappa
protected
G4double G4VLongitudinalStringDecay::MassCut
protected
G4bool G4VLongitudinalStringDecay::PastInitPhase
protected
G4double G4VLongitudinalStringDecay::pspin_barion
protected
G4double G4VLongitudinalStringDecay::pspin_meson
protected
std::vector<G4double> G4VLongitudinalStringDecay::scalarMesonMix
protected
G4double G4VLongitudinalStringDecay::SigmaQT
protected
G4double G4VLongitudinalStringDecay::SmoothParam
protected
G4double G4VLongitudinalStringDecay::StrangeSuppress
protected
G4int G4VLongitudinalStringDecay::StringLoopInterrupt
protected
std::vector<G4double> G4VLongitudinalStringDecay::vectorMesonMix
protected

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