Geant4-11
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
G4ConcreteNNToDeltaDelta Class Reference

#include <G4ConcreteNNToDeltaDelta.hh>

Inheritance diagram for G4ConcreteNNToDeltaDelta:
G4ConcreteNNTwoBodyResonance G4VScatteringCollision G4VCollision

Public Member Functions

virtual G4double CrossSection (const G4KineticTrack &trk1, const G4KineticTrack &trk2) const
 
void establish_G4MT_TLS_G4ConcreteNNTwoBodyResonance (const G4ParticleDefinition *aPrimary, const G4ParticleDefinition *bPriamry, const G4ParticleDefinition *aSecondary, const G4ParticleDefinition *bSecondary, const G4VXResonanceTable &sigmaTable)
 
void establish_G4MT_TLS_G4VCollision ()
 
void establish_G4MT_TLS_G4VScatteringCollision ()
 
virtual G4KineticTrackVectorFinalState (const G4KineticTrack &trk1, const G4KineticTrack &trk2) const
 
 G4ConcreteNNToDeltaDelta (const G4ParticleDefinition *aPrimary, const G4ParticleDefinition *bPriamry, const G4ParticleDefinition *aSecondary, const G4ParticleDefinition *bSecondary)
 
virtual const G4VAngularDistributionGetAngularDistribution () const
 
virtual const std::vector< G4String > & GetListOfColliders (G4int) const
 
virtual G4String GetName () const
 
virtual G4bool IsInCharge (const G4KineticTrack &trk1, const G4KineticTrack &trk2) const
 
G4bool operator!= (const G4ConcreteNNTwoBodyResonance &right) const
 
G4bool operator!= (const G4VCollision &right) const
 
G4bool operator!= (const G4VScatteringCollision &right) const
 
G4bool operator== (const G4ConcreteNNTwoBodyResonance &right) const
 
G4bool operator== (const G4VCollision &right) const
 
G4bool operator== (const G4VScatteringCollision &right) const
 
virtual void Print () const
 
virtual void Print (const G4KineticTrack &trk1, const G4KineticTrack &trk2) const
 
virtual ~G4ConcreteNNToDeltaDelta ()
 

Protected Member Functions

virtual const G4CollisionVectorGetComponents () const
 
virtual const G4VCrossSectionSourceGetCrossSectionSource () const
 
G4int GetNumberOfPartons (const G4ParticleDefinition *aP) const
 
virtual const std::vector< const G4ParticleDefinition * > & GetOutgoingParticles () const
 

Private Member Functions

double BrWigInt0 (const double x, const double gamma, const double m0) const
 
G4double BrWigInt1 (const G4double x, const G4double gamma, const G4double m0) const
 
double BrWigInv (const double x, const double gamma, const double m0) const
 
 G4ConcreteNNToDeltaDelta (const G4ConcreteNNToDeltaDelta &)
 
G4bool operator!= (const G4ConcreteNNToDeltaDelta &right) const
 
G4ConcreteNNToDeltaDeltaoperator= (const G4ConcreteNNToDeltaDelta &)
 
G4bool operator== (const G4ConcreteNNToDeltaDelta &right) const
 
double SampleResonanceMass (const double poleMass, const double width, const double minMass, const double maxMass) const
 

Private Attributes

G4VCrossSectionSourcecrossSectionSource
 
G4VAngularDistributiontheAngularDistribution
 
std::vector< const G4ParticleDefinition * > theOutGoing
 
const G4ParticleDefinitionthePrimary1
 
const G4ParticleDefinitionthePrimary2
 

Static Private Attributes

static G4ThreadLocal G4XDeltaDeltaTabletheSigmaTable_G4MT_TLS_ = 0
 

Detailed Description

Definition at line 40 of file G4ConcreteNNToDeltaDelta.hh.

Constructor & Destructor Documentation

◆ G4ConcreteNNToDeltaDelta() [1/2]

G4ConcreteNNToDeltaDelta::G4ConcreteNNToDeltaDelta ( const G4ParticleDefinition aPrimary,
const G4ParticleDefinition bPriamry,
const G4ParticleDefinition aSecondary,
const G4ParticleDefinition bSecondary 
)

Definition at line 42 of file G4ConcreteNNToDeltaDelta.cc.

45 :
46 G4ConcreteNNTwoBodyResonance(NULL, NULL, NULL, NULL, NULL, NULL, NULL)
47{
50 establish_G4MT_TLS_G4ConcreteNNTwoBodyResonance(aPrimary,bPrimary,aSecondary,bSecondary,theSigmaTable);
51}
static G4ThreadLocal G4XDeltaDeltaTable * theSigmaTable_G4MT_TLS_
G4ConcreteNNTwoBodyResonance(const G4ParticleDefinition *aPrimary, const G4ParticleDefinition *bPriamry, const G4ParticleDefinition *aSecondary, const G4ParticleDefinition *bSecondary, const G4VXResonanceTable &sigmaTable)
void establish_G4MT_TLS_G4ConcreteNNTwoBodyResonance(const G4ParticleDefinition *aPrimary, const G4ParticleDefinition *bPriamry, const G4ParticleDefinition *aSecondary, const G4ParticleDefinition *bSecondary, const G4VXResonanceTable &sigmaTable)

References G4ConcreteNNTwoBodyResonance::establish_G4MT_TLS_G4ConcreteNNTwoBodyResonance(), and theSigmaTable_G4MT_TLS_.

◆ ~G4ConcreteNNToDeltaDelta()

virtual G4ConcreteNNToDeltaDelta::~G4ConcreteNNToDeltaDelta ( )
inlinevirtual

Definition at line 50 of file G4ConcreteNNToDeltaDelta.hh.

50{};

◆ G4ConcreteNNToDeltaDelta() [2/2]

G4ConcreteNNToDeltaDelta::G4ConcreteNNToDeltaDelta ( const G4ConcreteNNToDeltaDelta )
private

Member Function Documentation

◆ BrWigInt0()

double G4VScatteringCollision::BrWigInt0 ( const double  x,
const double  gamma,
const double  m0 
) const
inlineprivateinherited

Definition at line 84 of file G4VScatteringCollision.hh.

85 { return 2.0*gamma*std::atan( 2.0 * (x-m0)/ gamma ); }

Referenced by G4VScatteringCollision::BrWigInt1(), and G4VScatteringCollision::SampleResonanceMass().

◆ BrWigInt1()

G4double G4VScatteringCollision::BrWigInt1 ( const G4double  x,
const G4double  gamma,
const G4double  m0 
) const
inlineprivateinherited

Definition at line 87 of file G4VScatteringCollision.hh.

88 { return 0.5*gamma*gamma*G4Log( (x-m0)*(x-m0)+gamma*gamma/4.0 ) + m0*BrWigInt0(x,gamma,m0); }
G4double G4Log(G4double x)
Definition: G4Log.hh:226
double BrWigInt0(const double x, const double gamma, const double m0) const

References G4VScatteringCollision::BrWigInt0(), and G4Log().

◆ BrWigInv()

double G4VScatteringCollision::BrWigInv ( const double  x,
const double  gamma,
const double  m0 
) const
inlineprivateinherited

Definition at line 90 of file G4VScatteringCollision.hh.

91 { return 0.5*gamma*std::tan( 0.5*x/gamma )+m0; }

Referenced by G4VScatteringCollision::SampleResonanceMass().

◆ CrossSection()

G4double G4VCollision::CrossSection ( const G4KineticTrack trk1,
const G4KineticTrack trk2 
) const
virtualinherited

Reimplemented in G4CollisionComposite, G4CollisionMesonBaryonToResonance, and G4CollisionNN.

Definition at line 54 of file G4VCollision.cc.

56{
57 G4double sigma = 0.;
58
60
61 if (xSource != 0)
62 {
63 // There is a cross section for this Collision
64 sigma = xSource->CrossSection(aTrk1,aTrk2);
65 }
66 return sigma;
67}
double G4double
Definition: G4Types.hh:83
virtual const G4VCrossSectionSource * GetCrossSectionSource() const =0
virtual G4double CrossSection(const G4KineticTrack &trk1, const G4KineticTrack &trk2) const =0

References G4VCrossSectionSource::CrossSection(), and G4VCollision::GetCrossSectionSource().

Referenced by G4Scatterer::GetCrossSection(), G4Scatterer::GetTimeToInteraction(), G4VCollision::Print(), and G4Scatterer::Scatter().

◆ establish_G4MT_TLS_G4ConcreteNNTwoBodyResonance()

void G4ConcreteNNTwoBodyResonance::establish_G4MT_TLS_G4ConcreteNNTwoBodyResonance ( const G4ParticleDefinition aPrimary,
const G4ParticleDefinition bPriamry,
const G4ParticleDefinition aSecondary,
const G4ParticleDefinition bSecondary,
const G4VXResonanceTable sigmaTable 
)
inherited

Definition at line 82 of file G4ConcreteNNTwoBodyResonance.cc.

87{
89 thePrimary1=aPrimary;
90 thePrimary2=bPrimary;
91 theOutGoing.push_back(aSecondary);
92 theOutGoing.push_back(bSecondary);
93
94 crossSectionSource = new G4XResonance(aPrimary, bPrimary,
95 aSecondary->GetPDGiIsospin(),
96 aSecondary->GetPDGiSpin(),
97 aSecondary->GetPDGMass(),
98 bSecondary->GetPDGiIsospin(),
99 bSecondary->GetPDGiSpin(),
100 bSecondary->GetPDGMass(),
101 aSecondary->GetParticleName(),
102 bSecondary->GetParticleName(),
103 sigmaTable);
104}
const G4ParticleDefinition * thePrimary1
std::vector< const G4ParticleDefinition * > theOutGoing
const G4ParticleDefinition * thePrimary2
const G4String & GetParticleName() const

References G4ConcreteNNTwoBodyResonance::crossSectionSource, G4VScatteringCollision::establish_G4MT_TLS_G4VScatteringCollision(), G4ParticleDefinition::GetParticleName(), G4ParticleDefinition::GetPDGiIsospin(), G4ParticleDefinition::GetPDGiSpin(), G4ParticleDefinition::GetPDGMass(), G4ConcreteNNTwoBodyResonance::theOutGoing, G4ConcreteNNTwoBodyResonance::thePrimary1, and G4ConcreteNNTwoBodyResonance::thePrimary2.

Referenced by G4ConcreteNNToDeltaDelta(), G4ConcreteNNToDeltaDeltastar::G4ConcreteNNToDeltaDeltastar(), G4ConcreteNNToDeltaNstar::G4ConcreteNNToDeltaNstar(), G4ConcreteNNToNDelta::G4ConcreteNNToNDelta(), G4ConcreteNNToNDeltaStar::G4ConcreteNNToNDeltaStar(), G4ConcreteNNToNNStar::G4ConcreteNNToNNStar(), and G4ConcreteNStarNToNN::G4ConcreteNStarNToNN().

◆ establish_G4MT_TLS_G4VCollision()

void G4VCollision::establish_G4MT_TLS_G4VCollision ( )
inherited

◆ establish_G4MT_TLS_G4VScatteringCollision()

void G4VScatteringCollision::establish_G4MT_TLS_G4VScatteringCollision ( )
inherited

◆ FinalState()

G4KineticTrackVector * G4VScatteringCollision::FinalState ( const G4KineticTrack trk1,
const G4KineticTrack trk2 
) const
virtualinherited

Implements G4VCollision.

Definition at line 60 of file G4VScatteringCollision.cc.

62{
63 const G4VAngularDistribution* angDistribution = GetAngularDistribution();
64 G4LorentzVector p = trk1.Get4Momentum() + trk2.Get4Momentum();
65 G4double sqrtS = p.m();
66 G4double S = sqrtS * sqrtS;
67
68 std::vector<const G4ParticleDefinition*> OutputDefinitions = GetOutgoingParticles();
69 if (OutputDefinitions.size() != 2)
70 throw G4HadronicException(__FILE__, __LINE__, "G4VScatteringCollision: Too many output particles!");
71
72 if (OutputDefinitions[0]->IsShortLived() && OutputDefinitions[1]->IsShortLived())
73 {
74 if(std::getenv("G4KCDEBUG")) G4cerr << "two shortlived for Type = "<<typeid(*this).name()<<G4endl;
75 // throw G4HadronicException(__FILE__, __LINE__, "G4VScatteringCollision: can't handle two shortlived particles!"); // @hpw@
76 }
77
78 G4double outm1 = OutputDefinitions[0]->GetPDGMass();
79 G4double outm2 = OutputDefinitions[1]->GetPDGMass();
80
81 if (OutputDefinitions[0]->IsShortLived())
82 {
83 outm1 = SampleResonanceMass(outm1,
84 OutputDefinitions[0]->GetPDGWidth(),
85 G4Neutron::NeutronDefinition()->GetPDGMass()+G4PionPlus::PionPlus()->GetPDGMass(),
86 sqrtS-(G4Neutron::NeutronDefinition()->GetPDGMass()+G4PionPlus::PionPlus()->GetPDGMass()));
87
88 }
89 if (OutputDefinitions[1]->IsShortLived())
90 {
91 outm2 = SampleResonanceMass(outm2, OutputDefinitions[1]->GetPDGWidth(),
92 G4Neutron::NeutronDefinition()->GetPDGMass()+G4PionPlus::PionPlus()->GetPDGMass(),
93 sqrtS-outm1);
94 }
95
96 // Angles of outgoing particles
97 G4double cosTheta = angDistribution->CosTheta(S, trk1.GetActualMass(), trk2.GetActualMass());
98 G4double phi = angDistribution->Phi();
99
100 // Unit vector of three-momentum
101 G4LorentzRotation fromCMSFrame(p.boostVector());
102 G4LorentzRotation toCMSFrame(fromCMSFrame.inverse());
103 G4LorentzVector TempPtr = toCMSFrame*trk1.Get4Momentum();
105 toZ.rotateZ(-1*TempPtr.phi());
106 toZ.rotateY(-1*TempPtr.theta());
107 G4LorentzRotation toCMS(toZ.inverse());
108
109 G4ThreeVector pFinal1(std::sin(std::acos(cosTheta))*std::cos(phi), std::sin(std::acos(cosTheta))*std::sin(phi), cosTheta);
110
111 // Three momentum in cm system
112 G4double pCM = std::sqrt( (S-(outm1+outm2)*(outm1+outm2)) * (S-(outm1-outm2)*(outm1-outm2)) /(4.*S));
113 pFinal1 = pFinal1 * pCM;
114 G4ThreeVector pFinal2 = -pFinal1;
115
116 G4double eFinal1 = std::sqrt(pFinal1.mag2() + outm1*outm1);
117 G4double eFinal2 = std::sqrt(pFinal2.mag2() + outm2*outm2);
118
119 G4LorentzVector p4Final1(pFinal1, eFinal1);
120 G4LorentzVector p4Final2(pFinal2, eFinal2);
121 p4Final1 = toCMS*p4Final1;
122 p4Final2 = toCMS*p4Final2;
123
124
125 // Lorentz transformation
126 G4LorentzRotation toLabFrame(p.boostVector());
127 p4Final1 *= toLabFrame;
128 p4Final2 *= toLabFrame;
129
130 // Final tracks are copies of incoming ones, with modified 4-momenta
131
132 G4double chargeBalance = OutputDefinitions[0]->GetPDGCharge()+OutputDefinitions[1]->GetPDGCharge();
133 chargeBalance-= trk1.GetDefinition()->GetPDGCharge();
134 chargeBalance-= trk2.GetDefinition()->GetPDGCharge();
135 if(std::abs(chargeBalance) >.1)
136 {
137 G4cout << "Charges in "<<typeid(*this).name()<<G4endl;
138 G4cout << OutputDefinitions[0]->GetPDGCharge()<<" "<<OutputDefinitions[0]->GetParticleName()
139 << OutputDefinitions[1]->GetPDGCharge()<<" "<<OutputDefinitions[1]->GetParticleName()
140 << trk1.GetDefinition()->GetPDGCharge()<<" "<<trk1.GetDefinition()->GetParticleName()
141 << trk2.GetDefinition()->GetPDGCharge()<<" "<<trk2.GetDefinition()->GetParticleName()<<G4endl;
142 }
143 G4KineticTrack* final1 = new G4KineticTrack(OutputDefinitions[0], 0.0, trk1.GetPosition(), p4Final1);
144 G4KineticTrack* final2 = new G4KineticTrack(OutputDefinitions[1], 0.0, trk2.GetPosition(), p4Final2);
145
147
148 finalTracks->push_back(final1);
149 finalTracks->push_back(final2);
150
151 return finalTracks;
152}
G4double S(G4double temp)
G4GLOB_DLL std::ostream G4cerr
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
double mag2() const
HepLorentzRotation & rotateY(double delta)
HepLorentzRotation & rotateZ(double delta)
HepLorentzRotation inverse() const
double theta() const
Hep3Vector boostVector() const
const G4ThreeVector & GetPosition() const
const G4ParticleDefinition * GetDefinition() const
const G4LorentzVector & Get4Momentum() const
G4double GetActualMass() const
static G4Neutron * NeutronDefinition()
Definition: G4Neutron.cc:98
G4double GetPDGCharge() const
static G4PionPlus * PionPlus()
Definition: G4PionPlus.cc:97
virtual G4double Phi() const
virtual G4double CosTheta(G4double s, G4double m1, G4double m2) const =0
virtual const G4VAngularDistribution * GetAngularDistribution() const
double SampleResonanceMass(const double poleMass, const double width, const double minMass, const double maxMass) const
virtual const std::vector< const G4ParticleDefinition * > & GetOutgoingParticles() const =0

References CLHEP::HepLorentzVector::boostVector(), G4VAngularDistribution::CosTheta(), G4cerr, G4cout, G4endl, G4KineticTrack::Get4Momentum(), G4KineticTrack::GetActualMass(), G4VScatteringCollision::GetAngularDistribution(), G4KineticTrack::GetDefinition(), G4VScatteringCollision::GetOutgoingParticles(), G4ParticleDefinition::GetParticleName(), G4ParticleDefinition::GetPDGCharge(), G4KineticTrack::GetPosition(), CLHEP::HepLorentzRotation::inverse(), CLHEP::HepLorentzVector::m(), CLHEP::Hep3Vector::mag2(), G4Neutron::NeutronDefinition(), CLHEP::HepLorentzVector::phi(), G4VAngularDistribution::Phi(), G4PionPlus::PionPlus(), CLHEP::HepLorentzRotation::rotateY(), CLHEP::HepLorentzRotation::rotateZ(), S(), G4VScatteringCollision::SampleResonanceMass(), and CLHEP::HepLorentzVector::theta().

◆ GetAngularDistribution()

virtual const G4VAngularDistribution * G4VScatteringCollision::GetAngularDistribution ( ) const
inlinevirtualinherited

◆ GetComponents()

virtual const G4CollisionVector * G4VCollision::GetComponents ( ) const
inlineprotectedvirtualinherited

◆ GetCrossSectionSource()

virtual const G4VCrossSectionSource * G4ConcreteNNTwoBodyResonance::GetCrossSectionSource ( ) const
inlineprotectedvirtualinherited

◆ GetListOfColliders()

virtual const std::vector< G4String > & G4ConcreteNNTwoBodyResonance::GetListOfColliders ( G4int  ) const
inlinevirtualinherited

Implements G4VCollision.

Definition at line 62 of file G4ConcreteNNTwoBodyResonance.hh.

63 {
64 throw G4HadronicException(__FILE__, __LINE__, "Tried to call G4ConcreteNNTwoBodyResonance::GetListOfColliders. Please find out why!");
65 std::vector<G4String> * aList = new std::vector<G4String>;
66 return *aList;
67 }

◆ GetName()

virtual G4String G4ConcreteNNToDeltaDelta::GetName ( ) const
inlinevirtual

Reimplemented from G4ConcreteNNTwoBodyResonance.

Definition at line 52 of file G4ConcreteNNToDeltaDelta.hh.

53 {
54 return "ConcreteNNToDeltaDelta";
55 }

◆ GetNumberOfPartons()

G4int G4VCollision::GetNumberOfPartons ( const G4ParticleDefinition aP) const
inlineprotectedinherited

Definition at line 68 of file G4VCollision.hh.

69 {
70 G4int result = 0;
71 for(G4int i=0; i<6; i++)
72 {
73 result += aP->GetQuarkContent(i+1);
74 result += aP->GetAntiQuarkContent(i+1);
75 }
76 return result;
77 }
int G4int
Definition: G4Types.hh:85
G4int GetQuarkContent(G4int flavor) const
G4int GetAntiQuarkContent(G4int flavor) const

References G4ParticleDefinition::GetAntiQuarkContent(), and G4ParticleDefinition::GetQuarkContent().

Referenced by G4CollisionMesonBaryonElastic::IsInCharge().

◆ GetOutgoingParticles()

virtual const std::vector< const G4ParticleDefinition * > & G4ConcreteNNTwoBodyResonance::GetOutgoingParticles ( ) const
inlineprotectedvirtualinherited

Implements G4VScatteringCollision.

Definition at line 82 of file G4ConcreteNNTwoBodyResonance.hh.

83 {
84 return theOutGoing;
85 }

References G4ConcreteNNTwoBodyResonance::theOutGoing.

◆ IsInCharge()

G4bool G4ConcreteNNTwoBodyResonance::IsInCharge ( const G4KineticTrack trk1,
const G4KineticTrack trk2 
) const
virtualinherited

Implements G4VCollision.

Definition at line 70 of file G4ConcreteNNTwoBodyResonance.cc.

72{
73 if (trk1.GetDefinition()==thePrimary1 && trk2.GetDefinition()==thePrimary2) return true;
74 if (trk1.GetDefinition()==thePrimary2 && trk2.GetDefinition()==thePrimary1) return true;
75 return false;
76}

References G4KineticTrack::GetDefinition(), G4ConcreteNNTwoBodyResonance::thePrimary1, and G4ConcreteNNTwoBodyResonance::thePrimary2.

◆ operator!=() [1/4]

G4bool G4ConcreteNNToDeltaDelta::operator!= ( const G4ConcreteNNToDeltaDelta right) const
private

◆ operator!=() [2/4]

G4bool G4ConcreteNNTwoBodyResonance::operator!= ( const G4ConcreteNNTwoBodyResonance right) const
inherited

◆ operator!=() [3/4]

G4bool G4VCollision::operator!= ( const G4VCollision right) const
inherited

Definition at line 48 of file G4VCollision.cc.

49{
50 return (this != (G4VCollision *) &right);
51}

◆ operator!=() [4/4]

G4bool G4VScatteringCollision::operator!= ( const G4VScatteringCollision right) const
inherited

◆ operator=()

G4ConcreteNNToDeltaDelta & G4ConcreteNNToDeltaDelta::operator= ( const G4ConcreteNNToDeltaDelta )
private

◆ operator==() [1/4]

G4bool G4ConcreteNNToDeltaDelta::operator== ( const G4ConcreteNNToDeltaDelta right) const
private

◆ operator==() [2/4]

G4bool G4ConcreteNNTwoBodyResonance::operator== ( const G4ConcreteNNTwoBodyResonance right) const
inherited

◆ operator==() [3/4]

G4bool G4VCollision::operator== ( const G4VCollision right) const
inherited

Definition at line 42 of file G4VCollision.cc.

43{
44 return (this == (G4VCollision *) &right);
45}

◆ operator==() [4/4]

G4bool G4VScatteringCollision::operator== ( const G4VScatteringCollision right) const
inherited

◆ Print() [1/2]

void G4VCollision::Print ( ) const
virtualinherited

Definition at line 70 of file G4VCollision.cc.

71{
73
74 G4cout << "---- " << name << "---- Cross section" << G4endl;
75
77 if (xSource) xSource->Print();
78
79 G4int nComponents = 0;
80 const G4CollisionVector* components = GetComponents();
81 if (components)
82 {
83 nComponents = components->size();
84 }
85 G4cout << "---- " << name << "---- has " << nComponents << " components" <<G4endl;
86 G4int i = 0;
87 G4CollisionVector::const_iterator iter;
88 if (components)
89 {
90 for (iter = components->begin(); iter != components->end(); ++iter)
91 {
92 G4cout << "---- " << name << " ---- Component " << i << G4endl;
93 ((*iter))->Print();
94 i++;
95 }
96 }
97
98}
std::vector< G4VCollision * > G4CollisionVector
virtual const G4CollisionVector * GetComponents() const
Definition: G4VCollision.hh:79
virtual void Print() const
Definition: G4VCollision.cc:70
virtual G4String GetName() const =0
virtual void Print() const
const char * name(G4int ptype)

References G4cout, G4endl, G4VCollision::GetComponents(), G4VCollision::GetCrossSectionSource(), G4VCollision::GetName(), G4InuclParticleNames::name(), G4VCollision::Print(), and G4VCrossSectionSource::Print().

Referenced by G4VCollision::Print().

◆ Print() [2/2]

void G4VCollision::Print ( const G4KineticTrack trk1,
const G4KineticTrack trk2 
) const
virtualinherited

Definition at line 101 of file G4VCollision.cc.

103{
105
106 if (IsInCharge(trk1,trk2))
107 {
108 G4cout << "---- " << name << "is in charge ---- " << G4endl;
109 }
110 else
111 {
112 G4cout << "---- " << name << "is not in charge ---- " << G4endl;
113 }
114
115 G4cout << "---- " << name << "---- Cross section" << G4endl;
116
118 if (xSource) xSource->Print();
119 G4cout << "Cross section = " << CrossSection(trk1,trk2) << G4endl;
120
121 G4int nComponents = 0;
122 const G4CollisionVector* components = GetComponents();
123 if (components)
124 {
125 nComponents = components->size();
126 }
127 G4cout << "---- " << name << "has " << nComponents << " components" <<G4endl;
128
129 G4int i = 0;
130 G4CollisionVector::const_iterator iter;
131 if (components)
132 {
133 for (iter = components->begin(); iter != components->end(); ++iter)
134 {
135 G4cout << "Component " << i << G4endl;
136 ((*iter))->Print();
137 i++;
138 }
139 }
140}
virtual G4double CrossSection(const G4KineticTrack &trk1, const G4KineticTrack &trk2) const
Definition: G4VCollision.cc:54
virtual G4bool IsInCharge(const G4KineticTrack &trk1, const G4KineticTrack &trk2) const =0

References G4VCollision::CrossSection(), G4cout, G4endl, G4VCollision::GetComponents(), G4VCollision::GetCrossSectionSource(), G4VCollision::GetName(), G4VCollision::IsInCharge(), G4InuclParticleNames::name(), G4VCollision::Print(), and G4VCrossSectionSource::Print().

◆ SampleResonanceMass()

double G4VScatteringCollision::SampleResonanceMass ( const double  poleMass,
const double  width,
const double  minMass,
const double  maxMass 
) const
privateinherited

Definition at line 156 of file G4VScatteringCollision.cc.

160{
161 // Chooses a mass randomly between minMass and maxMass
162 // according to a Breit-Wigner function with constant
163 // width gamma and pole poleMass
164
165 G4double minMass = aMinMass;
166 if (minMass > maxMass) G4cerr << "##################### SampleResonanceMass: particle out of mass range" << G4endl;
167 if(minMass > maxMass) minMass -= G4PionPlus::PionPlus()->GetPDGMass();
168 if(minMass > maxMass) minMass = 0;
169
170 if (gamma < 1E-10*GeV)
171 return std::max(minMass,std::min(maxMass, poleMass));
172 else {
173 double fmin = BrWigInt0(minMass, gamma, poleMass);
174 double fmax = BrWigInt0(maxMass, gamma, poleMass);
175 double f = fmin + (fmax-fmin)*G4UniformRand();
176 return BrWigInv(f, gamma, poleMass);
177 }
178}
static constexpr double GeV
Definition: G4SIunits.hh:203
#define G4UniformRand()
Definition: Randomize.hh:52
double BrWigInv(const double x, const double gamma, const double m0) const
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

References G4VScatteringCollision::BrWigInt0(), G4VScatteringCollision::BrWigInv(), G4cerr, G4endl, G4UniformRand, G4ParticleDefinition::GetPDGMass(), GeV, G4INCL::Math::max(), G4INCL::Math::min(), and G4PionPlus::PionPlus().

Referenced by G4VScatteringCollision::FinalState().

Field Documentation

◆ crossSectionSource

G4VCrossSectionSource* G4ConcreteNNTwoBodyResonance::crossSectionSource
privateinherited

◆ theAngularDistribution

G4VAngularDistribution* G4VScatteringCollision::theAngularDistribution
privateinherited

◆ theOutGoing

std::vector<const G4ParticleDefinition*> G4ConcreteNNTwoBodyResonance::theOutGoing
privateinherited

◆ thePrimary1

const G4ParticleDefinition* G4ConcreteNNTwoBodyResonance::thePrimary1
privateinherited

◆ thePrimary2

const G4ParticleDefinition* G4ConcreteNNTwoBodyResonance::thePrimary2
privateinherited

◆ theSigmaTable_G4MT_TLS_

G4ThreadLocal G4XDeltaDeltaTable * G4ConcreteNNToDeltaDelta::theSigmaTable_G4MT_TLS_ = 0
staticprivate

Definition at line 65 of file G4ConcreteNNToDeltaDelta.hh.

Referenced by G4ConcreteNNToDeltaDelta().


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