Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4Quasmon Class Reference

#include <G4Quasmon.hh>

Public Member Functions

 G4Quasmon (G4QContent qQCont=G4QContent(0, 0, 0, 0, 0, 0), G4LorentzVector q4M=G4LorentzVector(0., 0., 0., 0.), G4LorentzVector ph4M=G4LorentzVector(0., 0., 0., 0.))
 
 G4Quasmon (const G4Quasmon &right)
 
 G4Quasmon (G4Quasmon *right)
 
 ~G4Quasmon ()
 
const G4Quasmonoperator= (const G4Quasmon &right)
 
G4bool operator== (const G4Quasmon &right) const
 
G4bool operator!= (const G4Quasmon &right) const
 
G4double GetTemper () const
 
G4double GetSOverU () const
 
G4double GetEtaSup () const
 
G4LorentzVector Get4Momentum () const
 
G4QContent GetQC () const
 
G4QPDGCode GetQPDG () const
 
G4int GetStatus () const
 
G4int GetCharge () const
 
G4int GetBaryonNumber () const
 
G4int GetStrangeness () const
 
void Set4Momentum (G4LorentzVector Q4M)
 
void SetQC (G4QContent QQC)
 
void Boost (const G4LorentzVector &theBoost)
 
void Boost (const G4ThreeVector &B)
 
G4QHadronVectorFragment (G4QNucleus &nucEnviron, G4int nQ=1)
 
G4QHadronVectorDecayQuasmon ()
 
G4QHadronVectorDecayQHadron (G4QHadron *hadron)
 
void ClearOutput ()
 
void InitQuasmon (const G4QContent &qQCont, const G4LorentzVector &q4M)
 
void IncreaseBy (const G4Quasmon *pQuasm)
 
void IncreaseBy (G4QContent &qQCont, const G4LorentzVector &q4M)
 
void ClearQuasmon ()
 
void KillQuasmon ()
 
G4int CalculateNumberOfQPartons (G4double qMass)
 

Static Public Member Functions

static void SetParameters (G4double temper=180., G4double ssin2g=.3, G4double etaetap=.3)
 
static void SetTemper (G4double temperature)
 
static void SetSOverU (G4double ssin2g)
 
static void SetEtaSup (G4double etaetap)
 
static void OpenElectromagneticDecays ()
 
static void CloseElectromagneticDecays ()
 

Detailed Description

Definition at line 59 of file G4Quasmon.hh.

Constructor & Destructor Documentation

◆ G4Quasmon() [1/3]

G4Quasmon::G4Quasmon ( G4QContent  qQCont = G4QContent(0,0,0,0,0,0),
G4LorentzVector  q4M = G4LorentzVector(0.,0.,0.,0.),
G4LorentzVector  ph4M = G4LorentzVector(0.,0.,0.,0.) 
)

Definition at line 74 of file G4Quasmon.cc.

75 : q4Mom(q4M), valQ(qQCont), theWorld(0), phot4M(ph4M), f2all(0), rEP(0.), rMo(0.)
76{
77#ifdef debug
78 G4cout<<"G4Quasmon:Constructor:QC="<<qQCont<<",Q4M="<<q4M<<",photonE="<<ph4M.e()<<G4endl;
79#endif
80#ifdef pardeb
81 G4cout<<"**>G4Q:Con:(1),T="<<Temperature<<",S="<<SSin2Gluons<<",E="<<EtaEtaprime<<G4endl;
82#endif
83 if(phot4M.e()>0.) q4Mom+=phot4M; // InCaseOf CaptureByQuark it will be subtracted back
84 valQ.DecQAQ(-1);
85 status=4;
86}
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout
G4int DecQAQ(const G4int &nQAQ=1)
Definition: G4QContent.cc:904

◆ G4Quasmon() [2/3]

G4Quasmon::G4Quasmon ( const G4Quasmon right)

Definition at line 88 of file G4Quasmon.cc.

88 : totMass(0), bEn(0), mbEn(0)
89{
90 q4Mom = right.q4Mom;
91 valQ = right.valQ;
92 //theEnvironment = right.theEnvironment;
93 status = right.status;
94 //theQHadrons (Vector)
95 G4int nQH = right.theQHadrons.size();
96 if(nQH) for(G4int ih=0; ih<nQH; ih++)
97 {
98 G4QHadron* curQH = new G4QHadron(right.theQHadrons[ih]);
99 theQHadrons.push_back(curQH);
100 }
101 theWorld = right.theWorld;
102 phot4M = right.phot4M;
103 nBarClust = right.nBarClust;
104 nOfQ = right.nOfQ;
105 //theQCandidates (Vector)
106 G4int nQC = right.theQCandidates.size();
107 if(nQC) for(G4int iq=0; iq<nQC; iq++)
108 {
109 G4QCandidate* curQC = new G4QCandidate(right.theQCandidates[iq]);
110 theQCandidates.push_back(curQC);
111 }
112 f2all = right.f2all;
113 rEP = right.rEP;
114 rMo = right.rMo;
115}
int G4int
Definition: G4Types.hh:66

◆ G4Quasmon() [3/3]

G4Quasmon::G4Quasmon ( G4Quasmon right)

Definition at line 117 of file G4Quasmon.cc.

117 : totMass(0), bEn(0), mbEn(0)
118{
119#ifdef sdebug
120 G4cout<<"G4Quasmon::Copy-Constructor: ***CALLED*** E="<<right->theEnvironment<<G4endl;
121#endif
122 q4Mom = right->q4Mom;
123 valQ = right->valQ;
124 //theEnvironment = right->theEnvironment;
125 status = right->status;
126 //theQHadrons (Vector)
127 G4int nQH = right->theQHadrons.size();
128#ifdef sdebug
129 G4cout<<"G4Quasmon::Copy-Constructor:nQH="<<nQH<<G4endl;
130#endif
131 if(nQH) for(G4int ih=0; ih<nQH; ih++)
132 {
133#ifdef debug
134 G4cout<<"G4Quasmon:Copy-Constructor:H#"<<ih<<",QH="<<right->theQHadrons[ih]<<G4endl;
135#endif
136 G4QHadron* curQH = new G4QHadron(right->theQHadrons[ih]);
137 theQHadrons.push_back(curQH);
138 }
139 theWorld = right->theWorld;
140 phot4M = right->phot4M;
141 nBarClust = right->nBarClust;
142 nOfQ = right->nOfQ;
143 //theQCandidates (Vector)
144 G4int nQC = right->theQCandidates.size();
145#ifdef sdebug
146 G4cout<<"G4Quasmon:Copy-Constructor: nCand="<<nQC<<G4endl;
147#endif
148 if(nQC) for(G4int iq=0; iq<nQC; iq++)
149 {
150#ifdef sdebug
151 G4cout<<"G4Quasmon:Copy-Constructor:C#"<<iq<<",QC="<<right->theQCandidates[iq]<<G4endl;
152#endif
153 G4QCandidate* curQC = new G4QCandidate(right->theQCandidates[iq]);
154 theQCandidates.push_back(curQC);
155 }
156 f2all = right->f2all;
157 rEP = right->rEP;
158 rMo = right->rMo;
159#ifdef sdebug
160 G4cout<<"G4Quasmon:Copy-Constructor: >->-> DONE <-<-<"<<G4endl;
161#endif
162}

◆ ~G4Quasmon()

G4Quasmon::~G4Quasmon ( )

Definition at line 164 of file G4Quasmon.cc.

165{
166#ifdef sdebug
167 G4cout<<"G4Quasmon::Destructor before theQCandidates delete"<<G4endl;
168#endif
169 for_each(theQCandidates.begin(), theQCandidates.end(), DeleteQCandidate());
170#ifdef sdebug
171 G4cout<<"G4Quasmon::Destructor before theQHadrons"<<G4endl;
172#endif
173 for_each(theQHadrons.begin(), theQHadrons.end(), DeleteQHadron());
174#ifdef sdebug
175 G4cout<<"G4Quasmon::Destructor === DONE ==="<<G4endl;
176#endif
177}

Member Function Documentation

◆ Boost() [1/2]

void G4Quasmon::Boost ( const G4LorentzVector theBoost)

Definition at line 6202 of file G4Quasmon.cc.

6203{
6204 // see CERNLIB short writeup U101 for the algorithm
6205 G4double bm=boost4M.mag();
6206 G4double factor = (q4Mom.vect()*boost4M.vect()/(boost4M.e()+bm) - q4Mom.e())/bm;
6207 q4Mom.setE(q4Mom.dot(boost4M)/bm);
6208 q4Mom.setVect(factor*boost4M.vect() + q4Mom.vect());
6209} // End of Boost
double G4double
Definition: G4Types.hh:64
double dot(const HepLorentzVector &) const
Hep3Vector vect() const
void setVect(const Hep3Vector &)

Referenced by G4QFragmentation::Fragment(), and G4QIonIonCollision::Fragment().

◆ Boost() [2/2]

void G4Quasmon::Boost ( const G4ThreeVector B)
inline

Definition at line 99 of file G4Quasmon.hh.

99{q4Mom.boost(B);} // Boosts 4-Momentum using v/c
HepLorentzVector & boost(double, double, double)

◆ CalculateNumberOfQPartons()

G4int G4Quasmon::CalculateNumberOfQPartons ( G4double  qMass)

G4int b = valQ.GetBaryonNumber(); G4int mq= 3*b; if (!b) mq=2; G4double mean = ((1.+sqrt(1.+qMOverT*qMOverT))/2. - mq)/2.; if(mean<0.) nOfQ=mq;

else nOfQ=mq+2*RandomPoisson(mean);

Definition at line 4423 of file G4Quasmon.cc.

4424{
4425 static const G4double mK0 = G4QPDGCode(311).GetMass();
4426 // @@ Temporary here. To have 3 quarks in Nucleon Temperature should be < M_N/4 (234 MeV)
4427 // M^2=4*n*(n-1)*T^2 => n = M/2T + 1/2 + T/4M + o(T^3/16M^3)
4428 // @@ Genius (better than 10**(-3) even for n=2!) but useless
4429 //G4double qMOver2T = qMass/(Temperature+Temperature);
4430 //G4double est = qMOver2T+1.+0.125/qMOver2T;
4431 // @@ Longer but exact
4432 G4double qMOverT = qMass/Temperature;
4433 G4int valc = valQ.GetTot();
4434 // .................................
4435 // --- Exponent, Double Split, Poisson 1 ----------------
4436 ///G4int b = valQ.GetBaryonNumber();
4437 ///G4int mq= 3*b;
4438 ///if (!b) mq=2;
4439 ///G4double mean = ((1.+sqrt(1.+qMOverT*qMOverT))/2. - mq)/2.;
4440 ///if(mean<0.) nOfQ=mq;
4441 // --- Uncomment up to here =-----------=^^^^^^^^^
4442 // Exponent ------
4443 //else nOfQ=mq-2*mean*log(G4UniformRand());
4444 // Poisson 1 ------
4445 ///else nOfQ=mq+2*RandomPoisson(mean);
4446 // Double Split ------
4447 //else
4448 //{
4449 // G4int imean = static_cast<int>(mean);
4450 // G4double dm = mean - imean;
4451 // if(G4UniformRand()>dm) nOfQ=mq+imean+imean;
4452 // else nOfQ=mq+imean+imean+2;
4453 //}
4454 // .........
4455 // Poisson 2 =-----------=
4456 //if(valc%2==0)nOfQ = 2*RandomPoisson((1.+sqrt(1.+qMOverT*qMOverT))/4.);// abs(b) is even
4457 //else nOfQ = 1+2*RandomPoisson((1.+sqrt(1.+qMOverT*qMOverT))/4.-0.5);// abs(b) is odd
4458 // Poisson 3 =-----------=
4459 nOfQ = RandomPoisson((1.+sqrt(1.+qMOverT*qMOverT))/2.);
4460 G4int ev = valc%2;
4461 if (!ev && nOfQ<2) nOfQ=2; // #of valence quarks is even
4462 else if ( ev && nOfQ<3) nOfQ=3; // #of valence quarks is odd
4463 //
4464#ifdef debug
4465 G4cout<<"G4Q::Calc#ofQP:QM="<<q4Mom<<qMass<<",T="<<Temperature<<",QC="<<valQ<<",n="<<nOfQ
4466 <<G4endl;
4467#endif
4468 G4int absb = abs(valQ.GetBaryonNumber());
4469 G4int tabn = 0;
4470 if(absb)tabn=3*absb; // Minimal QC for baryonic system fragmentation
4471 else tabn=4; // Minimal QC for mesonic system fragmentation (@@ ?)
4472 if (nOfQ<tabn) nOfQ=tabn;
4473 G4int nSeaPairs = (nOfQ-valc)/2;
4474 G4int stran = abs(valQ.GetS());
4475 G4int astra = abs(valQ.GetAS());
4476 if(astra>stran) stran=astra;
4477 G4int nMaxStrangeSea=static_cast<int>((qMass-stran*mK0)/(mK0+mK0));//KK is min for s-sea
4478 if (absb) nMaxStrangeSea=static_cast<int>((qMass-absb)/672.); //LambdaK is min for s-sea
4479#ifdef debug
4480 G4cout<<"G4Q::Calc#ofQP:"<<valQ<<",INtot="<<valc<<",nOfQ="<<nOfQ<<",SeaPairs="<<nSeaPairs
4481 <<G4endl;
4482#endif
4483 if (nSeaPairs) // Add/subtract sea pairs to/from initial quark content
4484 {
4485#ifdef debug
4486 G4int morDec=0;
4487#endif
4488 if(nSeaPairs>0)valQ.IncQAQ(nSeaPairs,SSin2Gluons);
4489#ifdef debug
4490 else morDec=valQ.DecQAQ(-nSeaPairs);
4491 if(morDec) G4cout<<"G4Q::Calc#ofQP: "<<morDec<<" pairs can be reduced more"<<G4endl;
4492#endif
4493 G4int sSea=valQ.GetS(); // Content of strange quarks
4494 G4int asSea=valQ.GetAS();
4495 if(asSea<sSea) sSea=asSea;
4496 if(sSea>nMaxStrangeSea) // @@@@@@@ Too many strange sea ??????
4497 {
4498#ifdef debug
4499 G4cout<<"G4Q::Calc#ofQP:**Reduce** S="<<sSea<<",aS="<<asSea<<",maxS="<<nMaxStrangeSea
4500 <<G4endl;
4501#endif
4502 sSea-=nMaxStrangeSea; // Strange sea excess
4503 valQ.DecS(sSea); // Reduce strange sea to adoptable limit
4504 valQ.DecAS(sSea);
4505 valQ.IncQAQ(sSea,0.); // Add notstrange sea ????????
4506 }
4507 }
4508 // @@ Chocolate rule --- Temporary (?)
4509 //G4int nmin = valc+valc-2; // Chocolate
4510 //G4int nmin = valc+absb; // String Junction
4511 //if(nOfQ<nmin) nOfQ=nmin;
4512 // --- End of Temporary
4513#ifdef debug
4514 G4cout<<"G4Quasmon::Calc#ofQP: *** RESULT IN*** nQ="<<nOfQ<<", FinalQC="<<valQ<<G4endl;
4515#endif
4516 return nOfQ;
4517} // End of "CalculateNumberOfQPartons"
void DecAS(G4int n=1)
Definition: G4QContent.hh:328
G4int GetBaryonNumber() const
Definition: G4QContent.cc:1182
G4int GetS() const
Definition: G4QContent.hh:191
void IncQAQ(const G4int &nQAQ=1, const G4double &sProb=1.)
Definition: G4QContent.cc:1036
G4int GetAS() const
Definition: G4QContent.hh:194
void DecS(G4int n=1)
Definition: G4QContent.hh:325
G4int GetTot() const
Definition: G4QContent.hh:183
G4double GetMass()
Definition: G4QPDGCode.cc:693

◆ ClearOutput()

void G4Quasmon::ClearOutput ( )
inline

Definition at line 168 of file G4Quasmon.hh.

169 {std::for_each(theQHadrons.begin(), theQHadrons.end(), DeleteQHadron());
170 theQHadrons.clear();
171 }

Referenced by KillQuasmon().

◆ ClearQuasmon()

void G4Quasmon::ClearQuasmon ( )
inline

Definition at line 200 of file G4Quasmon.hh.

201{
202 static const G4QContent zeroQC(0,0,0,0,0,0);
203 static const G4LorentzVector nothing(0.,0.,0.,0.);
204 phot4M= nothing;
205 valQ = zeroQC;
206 q4Mom = nothing;
207 status= 0;
208 std::for_each(theQCandidates.begin(), theQCandidates.end(), DeleteQCandidate());
209 theQCandidates.clear();
210
211}

Referenced by KillQuasmon().

◆ CloseElectromagneticDecays()

void G4Quasmon::CloseElectromagneticDecays ( )
static

Definition at line 189 of file G4Quasmon.cc.

189{ElMaDecays=false;}

◆ DecayQHadron()

G4QHadronVector * G4Quasmon::DecayQHadron ( G4QHadron hadron)

Definition at line 5779 of file G4Quasmon.cc.

5780{
5781 G4QHadronVector* theFragments = new G4QHadronVector; // user is responsible to delete!
5782 G4QPDGCode theQPDG = qH->GetQPDG();
5783 G4int thePDG = theQPDG.GetPDGCode(); // Get the PDG code of decaying hadron
5784 G4int pap = 0; // --- particle
5785 if(thePDG<0) pap = 1; // --- anti-particle
5786 G4LorentzVector t = qH->Get4Momentum(); // Get 4-momentum of decaying hadron
5787 G4double m_value = t.m(); // Get the mass value of decaying Hadron
5788 // --- Randomize a channel of decay
5789 G4QDecayChanVector decV = theWorld->GetQParticle(theQPDG)->GetDecayVector();
5790 G4int nChan = decV.size();
5791#ifdef debug
5792 G4cout<<"G4Quasm::DecQHadron: PDG="<<thePDG<<",m="<<m_value<<",("<<nChan<<" channels)"<<G4endl;
5793#endif
5794 if(nChan)
5795 {
5796 G4int i=0;
5797 if(nChan>1)
5798 {
5799 G4double rnd = G4UniformRand(); // Random value to select a Decay Channel
5800 for(i=0; i<nChan; i++)
5801 {
5802 G4QDecayChan* dC = decV[i]; // The i-th Decay Channel
5803#ifdef debug
5804 G4cout<<"G4Quasmon::DecaQHadr:i="<<i<<",r="<<rnd<<"<dl="<<dC->GetDecayChanLimit()
5805 <<", mm="<<dC->GetMinMass()<<G4endl;
5806#endif
5807 if(rnd<dC->GetDecayChanLimit() && m_value>dC->GetMinMass()) break;
5808 }
5809 if(i>nChan-1) i=nChan-1;
5810 }
5811 G4QPDGCodeVector cV=decV[i]->GetVecOfSecHadrons();// PDGVector of theSelectedDecChannel
5812 G4int nPart=cV.size(); // A#of particles to decay in
5813#ifdef debug
5814 G4cout<<"G4Quasmon::DecayQHadron: resi="<<i<<",nP="<<nPart<<":"<<cV[0]->GetPDGCode()
5815 <<","<<cV[1]->GetPDGCode();
5816 if(nPart>2) G4cout<<","<<cV[2]->GetPDGCode();
5817 G4cout<<G4endl;
5818#endif
5819 if(nPart<2||nPart>3)
5820 {
5821 G4cerr<<"---Warning---G4Q::DecayQHadr:n="<<nPart<<",ch#"<<i<<",PDG="<<thePDG<<G4endl;
5822 theFragments->push_back(qH); // Fill as it is (del.equiv.)
5823 return theFragments;
5824 }
5825#ifdef debug
5826 G4cout<<"G4Q::DecQH:Decay("<<ElMaDecays<<") PDG="<<thePDG<<t<<m_value<<",nP="<<nPart<<G4endl;
5827#endif
5828 if(nPart==2)
5829 {
5830 G4QHadron* fHadr;
5831 G4QHadron* sHadr;
5832 G4int fPDG=cV[0]->GetPDGCode();
5833 G4int sPDG=cV[1]->GetPDGCode();
5834 // Radiative decays In2 (eta, eta', Sigma0) are closed if the ElMaDecays=false
5835 if ( (fPDG != 22 && sPDG != 22) || ElMaDecays) {
5836#ifdef debug
5837 G4cout<<"G4Q::DecQH:Yes2,fPDG="<<fPDG<<",sPDG="<<sPDG<<",EMF="<<ElMaDecays<<G4endl;
5838#endif
5839 if(cV[0]->GetWidth()==0.)
5840 { // Randomize only the second Hardon or none
5841 fHadr = new G4QHadron(cV[0]->GetPDGCode()); // the First Hadron is created *1*
5842 if(cV[1]->GetWidth()==0.)sHadr = new G4QHadron(sPDG);//theSecondHadron is created
5843 else
5844 {
5845 G4QParticle* sPart=theWorld->GetQParticle(cV[1]);// Pt for theSecondHadron
5846 G4double sdm = m_value - fHadr->GetMass(); // MaxMassLimit for the 2-nd Hadron
5847 sHadr = new G4QHadron(sPart,sdm); // the Second Hadron is created *2*
5848 if(sPDG<0) sHadr->MakeAntiHadron();
5849 }
5850 }
5851 else // Randomize masses ofBothHadrons
5852 {
5853 G4QParticle* sPart=theWorld->GetQParticle(cV[1]);// Pt for theSecondHadron
5854 G4double mim = sPart->MinMassOfFragm(); // MinMassLimit for theSecondHadr
5855 G4double fdm = m_value - mim; // MaxMassLimit for theFirstHadr
5856 G4QParticle* fPart=theWorld->GetQParticle(cV[0]);// Pt for the First Hadron
5857 fHadr = new G4QHadron(fPart,fdm); // the 1-st Hadron is initialized
5858 if(fPDG<0) fHadr->MakeAntiHadron();
5859 G4double fm=fHadr->GetMass(); // Mass of the first hadron
5860 G4double sdm = m_value - fm; // MaxMassLimit for theSecondHadr
5861 sHadr = new G4QHadron(sPart,sdm); // the 2-nd Hadron is initialized
5862 if(sPDG<0) sHadr->MakeAntiHadron();
5863#ifdef debug
5864 G4cout<<"G4Q::DQH:M="<<m_value<<",mi="<<mim<<",fd="<<fdm<<",fm="<<fm<<",sd="<<sdm
5865 <<",sm="<<sHadr->GetMass()<<G4endl;
5866#endif
5867 }
5868#ifdef debug
5869 G4cout<<"G4Q::DQH:(DecayIn2)1="<<fHadr->GetMass()<<",2="<<sHadr->GetMass()<<G4endl;
5870#endif
5871 if(pap)
5872 {
5873 fHadr->MakeAntiHadron();
5874 sHadr->MakeAntiHadron();
5875 }
5876 G4LorentzVector f4Mom = fHadr->Get4Momentum(); // Get First Hadron 4Mom (mass)
5877 G4LorentzVector s4Mom = sHadr->Get4Momentum(); // Get Second Hadron 4Mom (mass)
5878 if(!qH->DecayIn2(f4Mom,s4Mom)) // Error in DecayIn2
5879 {
5880 delete fHadr; // Delete "new fHadr"
5881 delete sHadr; // Delete "new sHadr"
5882#ifdef debug
5883 G4cerr<<"---Warning---G4Q::DecayQHadron:in2,PDGC="<<thePDG<<", ch#"<<i<<": 4M="
5884 <<qH->Get4Momentum()<<"("<<qH->GetMass()<<")->"<<f4Mom<<"+"<<s4Mom<<G4endl;
5885 //throw G4QException("***Exception***G4Q::DecayQHadron: Failed to decay in 2");
5886#endif
5887 theFragments->push_back(qH); // Fill as it is (del.equiv.)
5888 return theFragments;
5889 }
5890 else
5891 {
5892 //qH->SetNFragments(2);
5893 //theFragments.push_back(qH); // Fill with NFr=2 (del.equiv.)
5894 // Instead
5895 delete qH; // Delete it (without History)
5896 //
5897 fHadr->Set4Momentum(f4Mom); // Put the randomized 4Mom to 1-st Hadron
5898 G4QHadronVector* theTmpQHV=DecayQHadron(fHadr); // Try to decay
5899 G4int nProd=theTmpQHV->size();
5900#ifdef debug
5901 G4cout<<"G4Q::DecayQHadr:(DecayIn2) nOfProdForQH1="<<nProd<<G4endl;
5902#endif
5903 if(nProd==1) theFragments->push_back((*theTmpQHV)[0]);// Final = no Further Decay
5904 else for(G4int ip1=0; ip1<nProd; ip1++)
5905 {
5906 G4QHadronVector* intTmpQHV = DecayQHadron((*theTmpQHV)[ip1]);
5907 G4int tmpS=intTmpQHV->size();
5908 if(tmpS==1)theFragments->push_back((*intTmpQHV)[0]);// Final = no Further Decay
5909 else
5910 {
5911 theFragments->resize(tmpS+theFragments->size());// Resize theFragments length
5912 copy(intTmpQHV->begin(), intTmpQHV->end(), theFragments->end()-tmpS);
5913 }
5914#ifdef debug
5915 G4cout<<"G4Q::DecayQHadr:(DecayIn2) Copy Sec11 nProd="<<tmpS<<G4endl;
5916#endif
5917 intTmpQHV->clear();
5918 delete intTmpQHV;
5919 }
5920 theTmpQHV->clear();
5921 delete theTmpQHV;
5922 sHadr->Set4Momentum(s4Mom); // Put the randomized 4Mom to 2-nd Hadron
5923 theTmpQHV=DecayQHadron(sHadr); // Try to decay
5924 nProd=theTmpQHV->size();
5925#ifdef debug
5926 G4cout<<"G4Q::DecayQHadr:(DecayIn2) nOfProdForQH2="<<nProd<<G4endl;
5927#endif
5928 if(nProd==1) theFragments->push_back((*theTmpQHV)[0]);// Final = no Further Decay
5929 else for(G4int ip1=0; ip1<nProd; ip1++)
5930 {
5931 G4QHadronVector* intTmpQHV = DecayQHadron((*theTmpQHV)[ip1]);
5932 G4int tmpS=intTmpQHV->size();
5933 if(tmpS==1)theFragments->push_back((*intTmpQHV)[0]);// Final = no Further Decay
5934 else
5935 {
5936 theFragments->resize(tmpS+theFragments->size());// Resize theFragments length
5937 copy(intTmpQHV->begin(), intTmpQHV->end(), theFragments->end()-tmpS);
5938 }
5939#ifdef debug
5940 G4cout<<"G4Q::DecayQHadr:(DecayIn2) Copy Sec12 nProd="<<tmpS<<G4endl;
5941#endif
5942 intTmpQHV->clear();
5943 delete intTmpQHV;
5944 }
5945 theTmpQHV->clear();
5946 delete theTmpQHV;
5947 }
5948#ifdef debug
5949 G4cout<<"G4Q::DecQHadr: DecayIn2 is made with nH="<<theFragments->size()<<G4endl;
5950#endif
5951 }
5952 else
5953 {
5954#ifdef debug
5955 if(thePDG==89999003||thePDG==90002999)G4cerr<<"*G4Q::DQH:8999003/90002999"<<G4endl;
5956#endif
5957 theFragments->push_back(qH); // Fill hadron as it is (del.equivalent)
5958 }
5959 }
5960 else if(nPart==3)
5961 {
5962 G4QHadron* fHadr;
5963 G4QHadron* sHadr;
5964 G4QHadron* tHadr;
5965 G4int fPDG=cV[0]->GetPDGCode();
5966 G4int sPDG=cV[1]->GetPDGCode();
5967 G4int tPDG=cV[2]->GetPDGCode();
5968 //The radiative decays of the GS hadrons In3 are closed if ElMaDecays=false
5969 if ( (fPDG != 22 && sPDG != 22 && tPDG != 22) || ElMaDecays)
5970 {
5971#ifdef debug
5972 G4cout<<"G4Q::DQH:Y,f="<<fPDG<<",s="<<sPDG<<",t="<<tPDG<<",F="<<ElMaDecays<<G4endl;
5973#endif
5974 if(cV[0]->GetWidth()==0.) // Don't randomize theFirstHardon
5975 {
5976 fHadr = new G4QHadron(fPDG); // theFirst Hadron is created *1*
5977 if(cV[1]->GetWidth()==0.)
5978 {
5979 sHadr = new G4QHadron(sPDG); // theSecond Hadron is created *2*
5980 if(cV[2]->GetWidth()==0.)tHadr = new G4QHadron(tPDG);//theThirdHadron isCreated
5981 else
5982 {
5983 G4QParticle* tPart=theWorld->GetQParticle(cV[2]);// Pt for the3-rdH
5984 G4double tdm = m_value-fHadr->GetMass()-sHadr->GetMass();// MaxMass for the 2d Hadr
5985 tHadr = new G4QHadron(tPart,tdm); //the3rdHadron is created
5986 if(tPDG<0) tHadr->MakeAntiHadron();
5987 }
5988 }
5989 else // Randomize 2nd & 3rd Hadrons
5990 {
5991 m_value-=fHadr->GetMass(); // Reduce the residual MaxMass
5992 G4QParticle* tPart=theWorld->GetQParticle(cV[2]);// Pt for the 3-rd Hadron
5993 G4double mim = tPart->MinMassOfFragm(); // MinMassLimit for the 3rd Hd
5994 G4double sdm = m_value - mim; // MaxMassLimit for the 2nd Hd
5995 G4QParticle* sPart=theWorld->GetQParticle(cV[1]);// Pt for the 2-nd Hadron
5996 sHadr = new G4QHadron(sPart,sdm); // theSecondHadron is created
5997 if(sPDG<0) sHadr->MakeAntiHadron();
5998 G4double tdm = m_value - sHadr->GetMass(); // MaxMassLimit for the 3-rd H
5999 tHadr = new G4QHadron(tPart,tdm); // the Third Hadron is created
6000 if(tPDG<0) tHadr->MakeAntiHadron();
6001 }
6002 }
6003 else // Randomize masses of all three Hadrons
6004 {
6005 G4QParticle* sPart=theWorld->GetQParticle(cV[1]); // Pt for theSecondHadr
6006 G4double smim = sPart->MinMassOfFragm(); // MinMassLim for SecondHadron
6007 G4QParticle* tPart=theWorld->GetQParticle(cV[2]); // Pt for the Third Hadron
6008 G4double tmim = tPart->MinMassOfFragm(); // MinMassLimit for theThirdHd
6009 G4double fdm = m_value - smim - tmim; // MaxMassLimit for theFirstHd
6010 G4QParticle* fPart=theWorld->GetQParticle(cV[0]); // Pt for the First Hadron
6011 fHadr = new G4QHadron(fPart,fdm); // the First Hadron is created
6012 if(fPDG<0) fHadr->MakeAntiHadron();
6013 m_value-=fHadr->GetMass(); // Reduce the residual MaxMass
6014 G4double sdm = m_value - tmim; // MaxMassLimit for theSecondH
6015 sHadr = new G4QHadron(sPart,sdm); // theSecondHadron is created
6016 if(sPDG<0) sHadr->MakeAntiHadron();
6017 G4double tdm = m_value - sHadr->GetMass(); // MaxMassLimit for theThird H
6018 tHadr = new G4QHadron(tPart,tdm); // the Third Hadron is created
6019 if(tPDG<0) tHadr->MakeAntiHadron();
6020 }
6021#ifdef debug
6022 G4cout<<"G4Quasmon::DecayQHadron:3Dec. m1="<<fHadr->GetMass()
6023 <<",m2="<<sHadr->GetMass()<<",m3="<<tHadr->GetMass()<<G4endl;
6024#endif
6025 if(pap)
6026 {
6027 fHadr->MakeAntiHadron();
6028 sHadr->MakeAntiHadron();
6029 tHadr->MakeAntiHadron();
6030 }
6031 G4LorentzVector f4Mom = fHadr->Get4Momentum(); // Get 4M of the First Hadron (mass)
6032 G4LorentzVector s4Mom = sHadr->Get4Momentum(); // Get 4M of the SecondHadron (mass)
6033 G4LorentzVector t4Mom = tHadr->Get4Momentum(); // Get 4M of the Third Hadron (mass)
6034 if(!qH->DecayIn3(f4Mom,s4Mom,t4Mom))
6035 {
6036 delete fHadr; // Delete "new fHadr"
6037 delete sHadr; // Delete "new sHadr"
6038 delete tHadr; // Delete "new tHadr"
6039 G4cerr<<"---Warning---G4Q::DecayQHadron:in3,PDGC="<<thePDG<<", ch#"<<i<<G4endl;
6040 theFragments->push_back(qH); // Fill as it is (delete equivalent)
6041 return theFragments;
6042 }
6043 else
6044 {
6045 //qH->SetNFragments(3);
6046 //theFragments.push_back(q); // Fill with NFr=3 (del.equiv.)
6047 // Instead
6048 delete qH;
6049 //
6050 fHadr->Set4Momentum(f4Mom); // Put the randomized 4Mom to 1-st Hadron
6051 G4QHadronVector* theTmpQHV=DecayQHadron(fHadr); // Try to decay
6052 G4int nProd=theTmpQHV->size();
6053#ifdef debug
6054 G4cout<<"G4Q::DecayQHadr:(DecayIn3) nOfProdForQH1="<<nProd<<G4endl;
6055#endif
6056 if(nProd==1) theFragments->push_back((*theTmpQHV)[0]);// Final = no Further Decay
6057 else for(G4int ip1=0; ip1<nProd; ip1++)
6058 {
6059 G4QHadronVector* intTmpQHV = DecayQHadron((*theTmpQHV)[ip1]);
6060 G4int tmpS=intTmpQHV->size();
6061 if(tmpS==1)theFragments->push_back((*intTmpQHV)[0]);// Final = no Further Decay
6062 else
6063 {
6064 theFragments->resize(tmpS+theFragments->size());// Resize theFragments length
6065 copy(intTmpQHV->begin(), intTmpQHV->end(), theFragments->end()-tmpS);
6066 }
6067#ifdef debug
6068 G4cout<<"G4Q::DecayQHadr:(DecayIn3) Copy Sec11 nProd="<<tmpS<<G4endl;
6069#endif
6070 intTmpQHV->clear();
6071 delete intTmpQHV;
6072 }
6073 theTmpQHV->clear();
6074 delete theTmpQHV;
6075
6076 sHadr->Set4Momentum(s4Mom); // Put the randomized 4Mom to 2-nd Hadron
6077 theTmpQHV=DecayQHadron(sHadr); // Try to decay
6078 nProd=theTmpQHV->size();
6079#ifdef debug
6080 G4cout<<"G4Q::DecayQHadr:(DecayIn3) nOfProdForQH2="<<nProd<<G4endl;
6081#endif
6082 if(nProd==1) theFragments->push_back((*theTmpQHV)[0]);// Final = no Further Decay
6083 else for(G4int ip1=0; ip1<nProd; ip1++)
6084 {
6085 G4QHadronVector* intTmpQHV = DecayQHadron((*theTmpQHV)[ip1]);
6086 G4int tmpS=intTmpQHV->size();
6087 if(tmpS==1)theFragments->push_back((*intTmpQHV)[0]);// Final = no Further Decay
6088 else
6089 {
6090 theFragments->resize(tmpS+theFragments->size());// Resize theFragments length
6091 copy(intTmpQHV->begin(), intTmpQHV->end(), theFragments->end()-tmpS);
6092 }
6093#ifdef debug
6094 G4cout<<"G4Q::DecayQHadr:(DecayIn3) Copy Sec12 nProd="<<tmpS<<G4endl;
6095#endif
6096 intTmpQHV->clear();
6097 delete intTmpQHV;
6098 }
6099 theTmpQHV->clear();
6100 delete theTmpQHV;
6101
6102 tHadr->Set4Momentum(t4Mom); // Put the randomized 4Mom to 3-rd Hadron
6103 theTmpQHV=DecayQHadron(tHadr); // Try to decay
6104 nProd=theTmpQHV->size();
6105#ifdef debug
6106 G4cout<<"G4Q::DecayQHadr:(DecayIn3) nOfProdForQH3="<<nProd<<G4endl;
6107#endif
6108 if(nProd==1) theFragments->push_back((*theTmpQHV)[0]);// Final = no Further Decay
6109 else for(G4int ip1=0; ip1<nProd; ip1++)
6110 {
6111 G4QHadronVector* intTmpQHV = DecayQHadron((*theTmpQHV)[ip1]);
6112 G4int tmpS=intTmpQHV->size();
6113 if(tmpS==1)theFragments->push_back((*intTmpQHV)[0]);// Final = no Further Decay
6114 else
6115 {
6116 theFragments->resize(tmpS+theFragments->size());// Resize theFragments length
6117 copy(intTmpQHV->begin(), intTmpQHV->end(), theFragments->end()-tmpS);
6118 }
6119#ifdef debug
6120 G4cout<<"G4Q::DecayQHadr:(DecayIn3) Copy Sec13 nProd="<<tmpS<<G4endl;
6121#endif
6122 intTmpQHV->clear();
6123 delete intTmpQHV;
6124 }
6125 theTmpQHV->clear();
6126 delete theTmpQHV;
6127
6128 }
6129#ifdef debug
6130 G4cout<<"G4Q::DecQHadr: DecayIn3 is made with nH="<<theFragments->size()<<G4endl;
6131#endif
6132 }
6133 else theFragments->push_back(qH); // Fill hadron as it is (del.equivalent)
6134 }
6135 }
6136 else
6137 {
6138#ifdef debug
6139 G4cout<<"G4Quas::DecQHadr:Fill PDG= "<<thePDG<<t<<m_value<<" as it is ***0***>>"<<G4endl;
6140#endif
6141 if(thePDG==89999003||thePDG==90002999)G4cerr<<"-War-G4Q::DQH:8999003/90002999"<<G4endl;
6142 theFragments->push_back(qH); // Fill as it is (delete equivalent)
6143 }
6144#ifdef debug
6145 G4cout<<"G4Q::DecQHadr:=-= HADRON IS DECAYED =-= with nH="<<theFragments->size()<<G4endl;
6146#endif
6147 return theFragments;
6148} // End of "DecayOutHadron"
std::vector< G4QDecayChan * > G4QDecayChanVector
std::vector< G4QHadron * > G4QHadronVector
std::vector< G4QPDGCode * > G4QPDGCodeVector
G4DLLIMPORT std::ostream G4cerr
#define G4UniformRand()
Definition: Randomize.hh:53
G4QParticle * GetQParticle(G4int PDG) const
G4double GetDecayChanLimit() const
Definition: G4QDecayChan.hh:92
G4double GetMinMass() const
Definition: G4QDecayChan.hh:93
G4LorentzVector Get4Momentum() const
Definition: G4QHadron.hh:79
G4double GetMass() const
Definition: G4QHadron.hh:176
G4int GetPDGCode() const
Definition: G4QHadron.hh:170
void MakeAntiHadron()
Definition: G4QHadron.hh:185
void Set4Momentum(const G4LorentzVector &aMom)
Definition: G4QHadron.hh:187
G4int GetPDGCode() const
Definition: G4QPDGCode.hh:326
G4QDecayChanVector GetDecayVector()
Definition: G4QParticle.hh:109
G4double MinMassOfFragm()
Definition: G4QParticle.hh:113
G4QHadronVector * DecayQHadron(G4QHadron *hadron)
Definition: G4Quasmon.cc:5779

Referenced by G4QFragmentation::Breeder(), G4QIonIonCollision::Breeder(), and DecayQHadron().

◆ DecayQuasmon()

G4QHadronVector * G4Quasmon::DecayQuasmon ( )

Definition at line 3769 of file G4Quasmon.cc.

3770{
3771 G4QHadron* thisQuasmon = new G4QHadron(valQ,q4Mom); // create a Hadron for this Quasmon
3772 FillHadronVector(thisQuasmon); // Fill it as a hadron
3773 G4QHadronVector* theFragments = new G4QHadronVector; // user is responsible to delete!
3774 G4int nHadrs=theQHadrons.size();
3775#ifdef debug
3776 G4cout<<"G4Q::DecayQuasmon:After decay (FillHadronVector byItself) nH="<<nHadrs<<G4endl;
3777#endif
3778 if(nHadrs) for (int hadron=0; hadron<nHadrs; hadron++)
3779 {
3780 G4QHadron* curHadr = new G4QHadron(theQHadrons[hadron]);
3781 theFragments->push_back(curHadr); // (user must delete)
3782 }
3783#ifdef pdebug
3784 else G4cerr<<"*******G4Quasmon::DecayQuasmon: *** Nothing is in the output ***"<<G4endl;
3785#endif
3786 valQ=G4QContent(0,0,0,0,0,0); // Wipe the Quasmon out
3787 q4Mom=G4LorentzVector(0.,0.,0.,0.); // ... with its 4-momentum
3788 return theFragments;
3789} // End of "DecayQuasmon"
CLHEP::HepLorentzVector G4LorentzVector

◆ Fragment()

G4QHadronVector * G4Quasmon::Fragment ( G4QNucleus nucEnviron,
G4int  nQ = 1 
)

Definition at line 6178 of file G4Quasmon.cc.

6179{
6180#ifdef debug
6181 G4cout<<"G4Quasmon::Fragment called E="<<nucEnviron<<nucEnviron.GetProbability()<<G4endl;
6182#endif
6183 G4int nQs=nQ;
6184 HadronizeQuasmon(nucEnviron,nQs);
6185 G4int nHadrs=theQHadrons.size();
6186#ifdef debug
6187 G4cout<<"G4Quasm::Fragm:after HadronizeQuasmon nH="<<nHadrs<<",Env="<<nucEnviron<<G4endl;
6188#endif
6189 G4QHadronVector* theFragments = new G4QHadronVector;// user is responsible for delition !
6190 if(nHadrs) for (int hadron=0; hadron<nHadrs; hadron++)
6191 {
6192 G4QHadron* curHadr = new G4QHadron(theQHadrons[hadron]);
6193 theFragments->push_back(curHadr); // (delete equivalent - user)
6194 }
6195#ifdef pdebug
6196 else G4cerr<<"*******G4Quasmon::Fragment *** Nothing is in the output ***"<<G4endl;
6197#endif
6198 return theFragments;
6199} // End of "Fragment"
G4double GetProbability(G4int bn=0) const
Definition: G4QNucleus.hh:79

Referenced by G4QInelastic::PostStepDoIt(), and G4QDiffractionRatio::ProjFragment().

◆ Get4Momentum()

G4LorentzVector G4Quasmon::Get4Momentum ( ) const
inline

◆ GetBaryonNumber()

G4int G4Quasmon::GetBaryonNumber ( ) const
inline

Definition at line 164 of file G4Quasmon.hh.

164{return valQ.GetBaryonNumber();}

Referenced by G4QEnvironment::AddQuasmon(), and G4QFragmentation::Fragment().

◆ GetCharge()

G4int G4Quasmon::GetCharge ( ) const
inline

◆ GetEtaSup()

G4double G4Quasmon::GetEtaSup ( ) const
inline

Definition at line 160 of file G4Quasmon.hh.

160{return EtaEtaprime;}

◆ GetQC()

G4QContent G4Quasmon::GetQC ( ) const
inline

◆ GetQPDG()

G4QPDGCode G4Quasmon::GetQPDG ( ) const
inline

Definition at line 166 of file G4Quasmon.hh.

166{return G4QPDGCode(valQ);}

◆ GetSOverU()

G4double G4Quasmon::GetSOverU ( ) const
inline

Definition at line 159 of file G4Quasmon.hh.

159{return SSin2Gluons;}

◆ GetStatus()

G4int G4Quasmon::GetStatus ( ) const
inline

Definition at line 167 of file G4Quasmon.hh.

167{return status;}

◆ GetStrangeness()

G4int G4Quasmon::GetStrangeness ( ) const
inline

Definition at line 165 of file G4Quasmon.hh.

165{return valQ.GetStrangeness();}
G4int GetStrangeness() const
Definition: G4QContent.hh:184

◆ GetTemper()

G4double G4Quasmon::GetTemper ( ) const
inline

Definition at line 158 of file G4Quasmon.hh.

158{return Temperature;}

◆ IncreaseBy() [1/2]

void G4Quasmon::IncreaseBy ( const G4Quasmon pQuasm)
inline

Definition at line 180 of file G4Quasmon.hh.

181{
182 valQ += pQuasm->GetQC();
183 q4Mom += pQuasm->Get4Momentum();
184 status= 3;
185}
G4QContent GetQC() const
Definition: G4Quasmon.hh:162
G4LorentzVector Get4Momentum() const
Definition: G4Quasmon.hh:161

◆ IncreaseBy() [2/2]

void G4Quasmon::IncreaseBy ( G4QContent qQCont,
const G4LorentzVector q4M 
)
inline

Definition at line 186 of file G4Quasmon.hh.

187{
188 valQ += qQCont;
189 q4Mom += q4M;
190 status= 3;
191}

◆ InitQuasmon()

void G4Quasmon::InitQuasmon ( const G4QContent qQCont,
const G4LorentzVector q4M 
)
inline

Definition at line 193 of file G4Quasmon.hh.

194{
195 valQ = qQCont;
196 q4Mom = q4M;
197 status= 3;
198}

◆ KillQuasmon()

void G4Quasmon::KillQuasmon ( )
inline

Definition at line 213 of file G4Quasmon.hh.

214{
215 ClearQuasmon();
216 ClearOutput();
217}
void ClearQuasmon()
Definition: G4Quasmon.hh:200
void ClearOutput()
Definition: G4Quasmon.hh:168

◆ OpenElectromagneticDecays()

void G4Quasmon::OpenElectromagneticDecays ( )
static

Definition at line 186 of file G4Quasmon.cc.

186{ElMaDecays=true;}

◆ operator!=()

G4bool G4Quasmon::operator!= ( const G4Quasmon right) const
inline

Definition at line 157 of file G4Quasmon.hh.

157{return this != &rhs;}

◆ operator=()

const G4Quasmon & G4Quasmon::operator= ( const G4Quasmon right)

Definition at line 202 of file G4Quasmon.cc.

203{
204 if(this != &right) // Beware of self assignment
205 {
206 q4Mom = right.q4Mom;
207 valQ = right.valQ;
208 //theEnvironment = right.theEnvironment;
209 status = right.status;
210 //theQHadrons (Vector)
211 G4int iQH = theQHadrons.size();
212 if(iQH) for(G4int jh=0; jh<iQH; jh++) delete theQHadrons[jh];
213 theQHadrons.clear();
214 G4int nQH = right.theQHadrons.size();
215 if(nQH) for(G4int ih=0; ih<nQH; ih++)
216 {
217 G4QHadron* curQH = new G4QHadron(right.theQHadrons[ih]);
218 theQHadrons.push_back(curQH);
219 }
220 theWorld = right.theWorld;
221 phot4M = right.phot4M;
222 nBarClust = right.nBarClust;
223 nOfQ = right.nOfQ;
224 //theQCandidates (Vector)
225 G4int iQC = theQCandidates.size();
226 if(iQC) for(G4int jq=0; jq<iQC; jq++) delete theQCandidates[jq];
227 theQCandidates.clear();
228 G4int nQC = right.theQCandidates.size();
229 if(nQC) for(G4int iq=0; iq<nQC; iq++)
230 {
231 G4QCandidate* curQC = new G4QCandidate(right.theQCandidates[iq]);
232 theQCandidates.push_back(curQC);
233 }
234 f2all = right.f2all;
235 rEP = right.rEP;
236 rMo = right.rMo;
237 }
238 return *this;
239} // End of "="

◆ operator==()

G4bool G4Quasmon::operator== ( const G4Quasmon right) const
inline

Definition at line 156 of file G4Quasmon.hh.

156{return this == &rhs;}

◆ Set4Momentum()

void G4Quasmon::Set4Momentum ( G4LorentzVector  Q4M)
inline

Definition at line 96 of file G4Quasmon.hh.

96{q4Mom=Q4M;} // Set new value for the Quasmon 4mom

Referenced by G4QFragmentation::Fragment(), and G4QIonIonCollision::Fragment().

◆ SetEtaSup()

void G4Quasmon::SetEtaSup ( G4double  etaetap)
static

Definition at line 200 of file G4Quasmon.cc.

200{EtaEtaprime=etaetap;}

◆ SetParameters()

◆ SetQC()

void G4Quasmon::SetQC ( G4QContent  QQC)
inline

Definition at line 97 of file G4Quasmon.hh.

97{valQ=QQC;} // Set new Quark Cont for the Quasmon

Referenced by G4QFragmentation::Fragment(), and G4QIonIonCollision::Fragment().

◆ SetSOverU()

void G4Quasmon::SetSOverU ( G4double  ssin2g)
static

Definition at line 199 of file G4Quasmon.cc.

199{SSin2Gluons=ssin2g;}

◆ SetTemper()

void G4Quasmon::SetTemper ( G4double  temperature)
static

Definition at line 198 of file G4Quasmon.cc.

198{Temperature=temperature;}

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