Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
G4SingleDiffractiveExcitation Class Reference

#include <G4SingleDiffractiveExcitation.hh>

Inheritance diagram for G4SingleDiffractiveExcitation:
G4QGSDiffractiveExcitation

Public Member Functions

 G4SingleDiffractiveExcitation (G4double sigmaPt=0.6 *CLHEP::GeV, G4double minExtraMass=250 *CLHEP::MeV, G4double x0mass=250 *CLHEP::MeV)
 
 ~G4SingleDiffractiveExcitation ()
 
G4bool ExciteParticipants (G4VSplitableHadron *aPartner, G4VSplitableHadron *bPartner) const
 
- Public Member Functions inherited from G4QGSDiffractiveExcitation
 G4QGSDiffractiveExcitation ()
 
virtual ~G4QGSDiffractiveExcitation ()
 
virtual G4ExcitedStringString (G4VSplitableHadron *aHadron, G4bool isProjectile) const
 

Detailed Description

Definition at line 50 of file G4SingleDiffractiveExcitation.hh.

Constructor & Destructor Documentation

G4SingleDiffractiveExcitation::G4SingleDiffractiveExcitation ( G4double  sigmaPt = 0.6*CLHEP::GeV,
G4double  minExtraMass = 250*CLHEP::MeV,
G4double  x0mass = 250*CLHEP::MeV 
)

Definition at line 49 of file G4SingleDiffractiveExcitation.cc.

50 :
51 widthOfPtSquare(-2*sqr(sigmaPt)) , minExtraMass(minextraMass),
52 minmass(x0mass)
53 {}
T sqr(const T &x)
Definition: templates.hh:145
G4SingleDiffractiveExcitation::~G4SingleDiffractiveExcitation ( )

Definition at line 55 of file G4SingleDiffractiveExcitation.cc.

56 {}

Member Function Documentation

G4bool G4SingleDiffractiveExcitation::ExciteParticipants ( G4VSplitableHadron aPartner,
G4VSplitableHadron bPartner 
) const
virtual

Reimplemented from G4QGSDiffractiveExcitation.

Definition at line 59 of file G4SingleDiffractiveExcitation.cc.

References CLHEP::HepLorentzVector::boostVector(), G4UniformRand, G4VSplitableHadron::Get4Momentum(), G4VSplitableHadron::GetDefinition(), G4ParticleDefinition::GetPDGMass(), python.hepunit::perCent, CLHEP::HepLorentzVector::rotateY(), CLHEP::HepLorentzVector::rotateZ(), G4VSplitableHadron::Set4Momentum(), CLHEP::HepLorentzVector::setE(), CLHEP::HepLorentzVector::setPz(), sqr(), CLHEP::HepLorentzRotation::transform(), CLHEP::HepLorentzVector::transform(), and CLHEP::HepLorentzVector::vect().

Referenced by G4QGSParticipants::SelectInteractions().

60 {
61 
62  G4LorentzVector Pprojectile=projectile->Get4Momentum();
63  G4double Mprojectile2=sqr(projectile->GetDefinition()->GetPDGMass() + minExtraMass);
64 
65  G4LorentzVector Ptarget=target->Get4Momentum();
66  G4double Mtarget2=sqr(target->GetDefinition()->GetPDGMass() + minExtraMass);
67  // G4cout << "E proj, target :" << Pprojectile.e() << ", " <<
68  // Ptarget.e() << G4endl;
69 
70  G4bool KeepProjectile= G4UniformRand() > 0.5;
71 
72  // reset the min.mass of the non diffractive particle to its value, ( minus a bit for rounding...)
73  if ( KeepProjectile )
74  {
75  // cout << " Projectile fix" << G4endl;
76  Mprojectile2 = sqr(projectile->GetDefinition()->GetPDGMass() * (1-perCent) );
77  } else {
78  // cout << " Target fix" << G4endl;
79  Mtarget2=sqr(target->GetDefinition()->GetPDGMass() * (1-perCent) );
80  }
81 
82  // Transform momenta to cms and then rotate parallel to z axis;
83 
84  G4LorentzVector Psum;
85  Psum=Pprojectile+Ptarget;
86 
87  G4LorentzRotation toCms(-1*Psum.boostVector());
88 
89  G4LorentzVector Ptmp=toCms*Pprojectile;
90 
91  if ( Ptmp.pz() <= 0. )
92  {
93  // "String" moving backwards in CMS, abort collision !!
94  // G4cout << " abort Collision!! " << G4endl;
95  return false;
96  }
97 
98  toCms.rotateZ(-1*Ptmp.phi());
99  toCms.rotateY(-1*Ptmp.theta());
100 
101  // G4cout << "Pprojectile be4 boost " << Pprojectile << G4endl;
102  // G4cout << "Ptarget be4 boost : " << Ptarget << G4endl;
103 
104 
105 
106  G4LorentzRotation toLab(toCms.inverse());
107 
108  Pprojectile.transform(toCms);
109  Ptarget.transform(toCms);
110 
111  G4LorentzVector Qmomentum;
112  G4int whilecount=0;
113  do {
114  // Generate pt
115 
116  G4double maxPtSquare=sqr(Ptarget.pz());
117  if (whilecount++ >= 500 && (whilecount%100)==0)
118  // G4cout << "G4SingleDiffractiveExcitation::ExciteParticipants possibly looping"
119  // << ", loop count/ maxPtSquare : "
120  // << whilecount << " / " << maxPtSquare << G4endl;
121  if (whilecount > 1000 )
122  {
123  Qmomentum=G4LorentzVector(0.,0.,0.,0.);
124  // G4cout << "G4SingleDiffractiveExcitation::ExciteParticipants: Aborting loop!" << G4endl;
125  return false; // Ignore this interaction
126  }
127  Qmomentum=G4LorentzVector(GaussianPt(widthOfPtSquare,maxPtSquare),0);
128 
129 
130  // Momentum transfer
131  G4double Xmin = minmass / ( Pprojectile.e() + Ptarget.e() );
132  G4double Xmax=1.;
133  G4double Xplus =ChooseX(Xmin,Xmax);
134  G4double Xminus=ChooseX(Xmin,Xmax);
135 
136  G4double pt2=G4ThreeVector(Qmomentum.vect()).mag2();
137  G4double Qplus =-1 * pt2 / Xminus/Ptarget.minus();
138  G4double Qminus= pt2 / Xplus /Pprojectile.plus();
139 
140  if ( KeepProjectile )
141  {
142  Qminus = (sqr(projectile->GetDefinition()->GetPDGMass()) + pt2 )
143  / (Pprojectile.plus() + Qplus )
144  - Pprojectile.minus();
145  } else
146  {
147  Qplus = Ptarget.plus()
148  - (sqr(target->GetDefinition()->GetPDGMass()) + pt2 )
149  / (Ptarget.minus() - Qminus );
150  }
151 
152  Qmomentum.setPz( (Qplus-Qminus)/2 );
153  Qmomentum.setE( (Qplus+Qminus)/2 );
154 
155  // G4cout << "Qplus / Qminus " << Qplus << " / " << Qminus<<G4endl;
156  // G4cout << "pt2 " << pt2 << G4endl;
157  // G4cout << "Qmomentum " << Qmomentum << G4endl;
158  // G4cout << " Masses (P/T) : " << (Pprojectile+Qmomentum).mag() <<
159  // " / " << (Ptarget-Qmomentum).mag() << G4endl;
160 
161  } while ( (Ptarget-Qmomentum).mag2() <= Mtarget2
162  || (Pprojectile+Qmomentum).mag2() <= Mprojectile2
163  || (Ptarget-Qmomentum).e() < 0.
164  || (Pprojectile+Qmomentum).e() < 0. );
165 
166 
167  // G4double Ecms=Pprojectile.e() + Ptarget.e();
168 
169  Pprojectile += Qmomentum;
170 
171  Ptarget -= Qmomentum;
172 
173  // G4cout << "Pprojectile.e() : " << Pprojectile.e() << G4endl;
174  // G4cout << "Ptarget.e() : " << Ptarget.e() << G4endl;
175 
176  // G4cout << "end event_______________________________________________"<<G4endl;
177  //
178 
179 
180  // G4cout << "Pprojectile with Q : " << Pprojectile << G4endl;
181  // G4cout << "Ptarget with Q : " << Ptarget << G4endl;
182  // G4cout << "Projectile back: " << toLab * Pprojectile << G4endl;
183  // G4cout << "Target back: " << toLab * Ptarget << G4endl;
184 
185  // Transform back and update SplitableHadron Participant.
186  Pprojectile.transform(toLab);
187  Ptarget.transform(toLab);
188 
189  // G4cout << "G4SingleDiffractiveExcitation- Target mass " << Ptarget.mag() << G4endl;
190  // G4cout << "G4SingleDiffractiveExcitation- Projectile mass " << Pprojectile.mag() << G4endl;
191 
192  target->Set4Momentum(Ptarget);
193  projectile->Set4Momentum(Pprojectile);
194 
195 
196  return true;
197 }
Hep3Vector boostVector() const
CLHEP::Hep3Vector G4ThreeVector
const XML_Char * target
HepLorentzVector & rotateZ(double)
int G4int
Definition: G4Types.hh:78
Hep3Vector vect() const
#define G4UniformRand()
Definition: Randomize.hh:87
bool G4bool
Definition: G4Types.hh:79
HepLorentzRotation & transform(const HepBoost &b)
HepLorentzVector & rotateY(double)
float perCent
Definition: hepunit.py:239
HepLorentzVector & transform(const HepRotation &)
T sqr(const T &x)
Definition: templates.hh:145
double G4double
Definition: G4Types.hh:76
CLHEP::HepLorentzVector G4LorentzVector

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