Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/processes/hadronic/models/qmd/src/G4LightIonQMDReaction.cc

Version: [ ReleaseNotes ] [ 1.0 ] [ 1.1 ] [ 2.0 ] [ 3.0 ] [ 3.1 ] [ 3.2 ] [ 4.0 ] [ 4.0.p1 ] [ 4.0.p2 ] [ 4.1 ] [ 4.1.p1 ] [ 5.0 ] [ 5.0.p1 ] [ 5.1 ] [ 5.1.p1 ] [ 5.2 ] [ 5.2.p1 ] [ 5.2.p2 ] [ 6.0 ] [ 6.0.p1 ] [ 6.1 ] [ 6.2 ] [ 6.2.p1 ] [ 6.2.p2 ] [ 7.0 ] [ 7.0.p1 ] [ 7.1 ] [ 7.1.p1 ] [ 8.0 ] [ 8.0.p1 ] [ 8.1 ] [ 8.1.p1 ] [ 8.1.p2 ] [ 8.2 ] [ 8.2.p1 ] [ 8.3 ] [ 8.3.p1 ] [ 8.3.p2 ] [ 9.0 ] [ 9.0.p1 ] [ 9.0.p2 ] [ 9.1 ] [ 9.1.p1 ] [ 9.1.p2 ] [ 9.1.p3 ] [ 9.2 ] [ 9.2.p1 ] [ 9.2.p2 ] [ 9.2.p3 ] [ 9.2.p4 ] [ 9.3 ] [ 9.3.p1 ] [ 9.3.p2 ] [ 9.4 ] [ 9.4.p1 ] [ 9.4.p2 ] [ 9.4.p3 ] [ 9.4.p4 ] [ 9.5 ] [ 9.5.p1 ] [ 9.5.p2 ] [ 9.6 ] [ 9.6.p1 ] [ 9.6.p2 ] [ 9.6.p3 ] [ 9.6.p4 ] [ 10.0 ] [ 10.0.p1 ] [ 10.0.p2 ] [ 10.0.p3 ] [ 10.0.p4 ] [ 10.1 ] [ 10.1.p1 ] [ 10.1.p2 ] [ 10.1.p3 ] [ 10.2 ] [ 10.2.p1 ] [ 10.2.p2 ] [ 10.2.p3 ] [ 10.3 ] [ 10.3.p1 ] [ 10.3.p2 ] [ 10.3.p3 ] [ 10.4 ] [ 10.4.p1 ] [ 10.4.p2 ] [ 10.4.p3 ] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /processes/hadronic/models/qmd/src/G4LightIonQMDReaction.cc (Version 11.3.0) and /processes/hadronic/models/qmd/src/G4LightIonQMDReaction.cc (Version 6.0.p1)


  1 //                                                  1 
  2 // *******************************************    
  3 // * License and Disclaimer                       
  4 // *                                              
  5 // * The  Geant4 software  is  copyright of th    
  6 // * the Geant4 Collaboration.  It is provided    
  7 // * conditions of the Geant4 Software License    
  8 // * LICENSE and available at  http://cern.ch/    
  9 // * include a list of copyright holders.         
 10 // *                                              
 11 // * Neither the authors of this software syst    
 12 // * institutes,nor the agencies providing fin    
 13 // * work  make  any representation or  warran    
 14 // * regarding  this  software system or assum    
 15 // * use.  Please see the license in the file     
 16 // * for the full disclaimer and the limitatio    
 17 // *                                              
 18 // * This  code  implementation is the result     
 19 // * technical work of the GEANT4 collaboratio    
 20 // * By using,  copying,  modifying or  distri    
 21 // * any work based  on the software)  you  ag    
 22 // * use  in  resulting  scientific  publicati    
 23 // * acceptance of all terms of the Geant4 Sof    
 24 // *******************************************    
 25 //                                                
 26 // 080505 Fixed and changed sampling method of    
 27 // 080602 Fix memory leaks by T. Koi              
 28 // 080612 Delete unnecessary dependency and un    
 29 //        Change criterion of reaction by T. K    
 30 // 081107 Add UnUseGEM (then use the default c    
 31 //            UseFrag (chage criterion of a in    
 32 //        Fix bug in nucleon projectiles  by T    
 33 // 090122 Be8 -> Alpha + Alpha                    
 34 // 090331 Change member shenXS and genspaXS ob    
 35 // 091119 Fix for incidence of neutral particl    
 36 //                                                
 37 // 230306 Fix in the judgement of elasticLike_    
 38 //            in line 450 by Y-H. Sato and A.     
 39 // 230306 Fix for nucleon deplication             
 40 //          added system->Clear() in line 522     
 41 // 230306 Allowing to simlate nucleon-nucleon,    
 42 //          pion is accepted in the Ratherford    
 43 //                                                
 44 #include "G4LightIonQMDReaction.hh"               
 45 #include "G4LightIonQMDNucleus.hh"                
 46 #include "G4LightIonQMDGroundStateNucleus.hh"     
 47 #include "G4Pow.hh"                               
 48 #include "G4PhysicalConstants.hh"                 
 49 #include "G4SystemOfUnits.hh"                     
 50 #include "G4NistManager.hh"                       
 51                                                   
 52 #include "G4CrossSectionDataSetRegistry.hh"       
 53 #include "G4BGGPionElasticXS.hh"                  
 54 #include "G4BGGPionInelasticXS.hh"                
 55 #include "G4VCrossSectionDataSet.hh"              
 56 #include "G4CrossSectionInelastic.hh"             
 57 #include "G4ComponentGGNuclNuclXsc.hh"            
 58 #include "G4PhysicsModelCatalog.hh"               
 59                                                   
 60 // Fpr inelastic cross section check              
 61 #include "G4NuclearRadii.hh"                      
 62 #include "G4HadronNucleonXsc.hh"                  
 63 // test.csv (writting reaction data (particle,    
 64 #include <iostream>                               
 65 #include <fstream>                                
 66 using std::endl;        // ***                    
 67 using std::ofstream;    // ***                    
 68 // -- test.csv                                    
 69                                                   
 70 G4LightIonQMDReaction::G4LightIonQMDReaction()    
 71 : G4HadronicInteraction("LightIonQMDModel")       
 72 , system ( NULL )                                 
 73 , deltaT ( 1 ) // in fsec (c=1)                   
 74 , maxTime ( 100 ) // will have maxTime-th time    
 75 , envelopF ( 1.05 ) // 10% for Peripheral reac    
 76 , gem ( true )                                    
 77 , frag ( false )                                  
 78 , secID( -1 )                                     
 79 {                                                 
 80    G4cout << "G4LightIonQMDReaction::G4LightIo    
 81    G4cout << "Recommended Energy of LightIonQM    
 82                                                   
 83    theXS = new G4CrossSectionInelastic( new G4    
 84    pipElNucXS = new G4BGGPionElasticXS(G4PionP    
 85    pipElNucXS->BuildPhysicsTable(*(G4PionPlus:    
 86                                                   
 87    pimElNucXS = new G4BGGPionElasticXS(G4PionM    
 88    pimElNucXS->BuildPhysicsTable(*(G4PionMinus    
 89                                                   
 90    pipInelNucXS = new G4BGGPionInelasticXS(G4P    
 91    pipInelNucXS->BuildPhysicsTable(*(G4PionPlu    
 92                                                   
 93    pimInelNucXS = new G4BGGPionInelasticXS(G4P    
 94    pimInelNucXS->BuildPhysicsTable(*(G4PionMin    
 95                                                   
 96    meanField = new G4LightIonQMDMeanField();      
 97    collision = new G4LightIonQMDCollision();      
 98                                                   
 99    excitationHandler = new G4ExcitationHandler    
100    setEvaporationCh();                            
101                                                   
102    coulomb_collision_gamma_proj = 0.0;            
103    coulomb_collision_rx_proj = 0.0;               
104    coulomb_collision_rz_proj = 0.0;               
105    coulomb_collision_px_proj = 0.0;               
106    coulomb_collision_pz_proj = 0.0;               
107                                                   
108    coulomb_collision_gamma_targ = 0.0;            
109    coulomb_collision_rx_targ = 0.0;               
110    coulomb_collision_rz_targ = 0.0;               
111    coulomb_collision_px_targ = 0.0;               
112    coulomb_collision_pz_targ = 0.0;               
113                                                   
114    secID = G4PhysicsModelCatalog::GetModelID(     
115 }                                                 
116                                                   
117                                                   
118 G4LightIonQMDReaction::~G4LightIonQMDReaction(    
119 {                                                 
120    delete excitationHandler;                      
121    delete collision;                              
122    delete meanField;                              
123 }                                                 
124                                                   
125                                                   
126 G4HadFinalState* G4LightIonQMDReaction::ApplyY    
127 {                                                 
128    //G4cout << "G4LightIonQMDReaction::ApplyYo    
129                                                   
130    theParticleChange.Clear();                     
131                                                   
132    system = new G4QMDSystem;                      
133                                                   
134    G4int proj_Z = 0;                              
135    G4int proj_A = 0;                              
136    const G4ParticleDefinition* proj_pd = ( con    
137    if ( proj_pd->GetParticleType() == "nucleus    
138    {                                              
139       proj_Z = proj_pd->GetAtomicNumber();        
140       proj_A = proj_pd->GetAtomicMass();          
141    }                                              
142    else                                           
143    {                                              
144       proj_Z = (int)( proj_pd->GetPDGCharge()/    
145       proj_A = 1;                                 
146    }                                              
147    //G4int targ_Z = int ( target.GetZ() + 0.5     
148    //G4int targ_A = int ( target.GetN() + 0.5     
149    //migrate to integer A and Z (GetN_asInt re    
150    G4int targ_Z = target.GetZ_asInt();            
151    G4int targ_A = target.GetA_asInt();            
152    const G4ParticleDefinition* targ_pd = G4Ion    
153                                                   
154                                                   
155    //G4NistManager* nistMan = G4NistManager::I    
156 //   G4Element* G4NistManager::FindOrBuildElem    
157                                                   
158    const G4DynamicParticle* proj_dp = new G4Dy    
159    //const G4Element* targ_ele =  nistMan->Fin    
160    //G4double aTemp = projectile.GetMaterial()    
161                                                   
162    // Glauber-Gribov nucleus-nucleus cross sec    
163    // therefore call GetElementCrossSection in    
164    //G4double xs_0 = theXS->GetIsoCrossSection    
165    G4double xs_0 = theXS->GetElementCrossSecti    
166                                                   
167    // When the projectile is a pion               
168    if (proj_pd == G4PionPlus::PionPlus() ) {      
169      xs_0 = pipElNucXS->GetElementCrossSection    
170             pipInelNucXS->GetElementCrossSecti    
171    } else if (proj_pd == G4PionMinus::PionMinu    
172      xs_0 = pimElNucXS->GetElementCrossSection    
173             pimInelNucXS->GetElementCrossSecti    
174    }                                              
175                                                   
176    //G4double xs_0 = genspaXS->GetCrossSection    
177    //G4double xs_0 = theXS->GetCrossSection (     
178    //110822                                       
179                                                   
180      G4double bmax_0 = std::sqrt( xs_0 / pi );    
181      //std::cout << "bmax_0 in fm (fermi) " <<    
182                                                   
183      //delete proj_dp;                            
184                                                   
185    G4bool elastic = true;                         
186                                                   
187    std::vector< G4LightIonQMDNucleus* > nucleu    
188    G4ThreeVector boostToReac; // ReactionSyste    
189    G4ThreeVector boostBackToLAB; // Reaction S    
190                                                   
191    G4LorentzVector targ4p( G4ThreeVector( 0.0     
192    G4ThreeVector boostLABtoCM = targ4p.findBoo    
193                                                   
194    G4double p1 = proj_dp->GetMomentum().mag()/    
195    G4double m1 = proj_dp->GetDefinition()->Get    
196    G4double e1 = std::sqrt( p1*p1 + m1*m1 );      
197    G4double e2 = targ_pd->GetPDGMass()/GeV/tar    
198    G4double beta_nn = -p1 / ( e1+e2 );            
199                                                   
200    G4ThreeVector boostLABtoNN ( 0. , 0. , beta    
201                                                   
202    G4double beta_nncm = ( - boostLABtoCM.beta(    
203                                                   
204    //std::cout << targ4p << std::endl;            
205    //std::cout << proj_dp->Get4Momentum()<< st    
206    //std::cout << beta_nncm << std::endl;         
207    G4ThreeVector boostNNtoCM( 0. , 0. , beta_n    
208    G4ThreeVector boostCMtoNN( 0. , 0. , -beta_    
209                                                   
210    boostToReac = boostLABtoNN;                    
211    boostBackToLAB = -boostLABtoNN;                
212                                                   
213    delete proj_dp;                                
214    G4int icounter = 0;                            
215    G4int icounter_max = 1024;                     
216    while ( elastic ) // Loop checking, 11.03.2    
217    {                                              
218       icounter++;                                 
219       if ( icounter > icounter_max ) {            
220    G4cout << "Loop-counter exceeded the thresh    
221          break;                                   
222       }                                           
223                                                   
224 // impact parameter                               
225       //G4double bmax = 1.05*(bmax_0/fermi);      
226       G4double bmax = envelopF*(bmax_0/fermi);    
227       G4double b = bmax * std::sqrt ( G4Unifor    
228 //071112                                          
229       //G4double b = 0;                           
230       //G4double b = bmax;                        
231       //G4double b = bmax/1.05 * 0.7 * G4Unifo    
232                                                   
233       //G4cout << "G4QMDRESULT bmax_0 = " << b    
234                                                   
235       G4double plab = projectile.GetTotalMomen    
236       G4double elab = ( projectile.GetKineticE    
237                                                   
238       calcOffSetOfCollision( b , proj_pd , tar    
239                                                   
240 // Projectile                                     
241       G4LorentzVector proj4pLAB = projectile.G    
242                                                   
243       G4LightIonQMDGroundStateNucleus* proj(NU    
244       if ( projectile.GetDefinition()->GetPart    
245         || projectile.GetDefinition()->GetPart    
246         || projectile.GetDefinition()->GetPart    
247       {                                           
248                                                   
249           proj_Z = proj_pd->GetAtomicNumber();    
250           proj_A = proj_pd->GetAtomicMass();      
251           proj = new G4LightIonQMDGroundStateN    
252           //proj->ShowParticipants();             
253                                                   
254                                                   
255           meanField->SetSystem ( proj );          
256           if ( proj_A != 1 )                      
257           {                                       
258               proj->SetTotalPotential( meanFie    
259               proj->CalEnergyAndAngularMomentu    
260           }                                       
261       }                                           
262                                                   
263 // Target                                         
264       //G4int iz = int ( target.GetZ() );         
265       //G4int ia = int ( target.GetN() );         
266       //migrate to integer A and Z (GetN_asInt    
267       G4int iz = int ( target.GetZ_asInt() );     
268       G4int ia = int ( target.GetA_asInt() );     
269       G4LightIonQMDGroundStateNucleus* targ =     
270                                                   
271       meanField->SetSystem (targ );               
272       if ( ia != 1 )                              
273       {                                           
274           targ->SetTotalPotential( meanField->    
275           targ->CalEnergyAndAngularMomentumInC    
276       }                                           
277                                                   
278       //G4LorentzVector targ4p( G4ThreeVector(    
279 // Boost Vector to CM                             
280       //boostToCM = targ4p.findBoostToCM( proj    
281                                                   
282 //    Target                                      
283       for ( G4int i = 0 ; i < targ->GetTotalNu    
284       {                                           
285                                                   
286          G4ThreeVector p0 = targ->GetParticipa    
287          G4ThreeVector r0 = targ->GetParticipa    
288                                                   
289          G4ThreeVector p ( p0.x() + coulomb_co    
290                          , p0.y()                 
291                          , p0.z() * coulomb_co    
292                                                   
293          G4ThreeVector r ( r0.x() + coulomb_co    
294                          , r0.y()                 
295                          , r0.z() / coulomb_co    
296                                                   
297          system->SetParticipant( new G4QMDPart    
298          system->GetParticipant( i )->SetTarge    
299                                                   
300       }                                           
301                                                   
302       G4LorentzVector proj4pCM = CLHEP::boostO    
303       G4LorentzVector targ4pCM = CLHEP::boostO    
304                                                   
305 //    Projectile                                  
306       //G4cout << "proj : " << proj << G4endl;    
307       //if ( proj != NULL )                       
308       if ( proj_A != 1 )                          
309       {                                           
310                                                   
311 //    projectile is nucleus                       
312                                                   
313          for ( G4int i = 0 ; i < proj->GetTota    
314          {                                        
315                                                   
316             G4ThreeVector p0 = proj->GetPartic    
317             G4ThreeVector r0 = proj->GetPartic    
318                                                   
319             G4ThreeVector p ( p0.x() + coulomb    
320                             , p0.y()              
321                             , p0.z() * coulomb    
322                                                   
323             G4ThreeVector r ( r0.x() + coulomb    
324                             , r0.y()              
325                             , r0.z() / coulomb    
326                                                   
327             system->SetParticipant( new G4QMDP    
328             system->GetParticipant ( i + targ-    
329          }                                        
330                                                   
331       }                                           
332       else                                        
333       {                                           
334                                                   
335 //       projectile is particle                   
336                                                   
337          // avoid multiple set in "elastic" lo    
338          //G4cout << "system Total Participant    
339          if ( system->GetTotalNumberOfParticip    
340          {                                        
341                                                   
342             G4int i = targ->GetTotalNumberOfPa    
343                                                   
344             G4ThreeVector p0( 0 );                
345             G4ThreeVector r0( 0 );                
346                                                   
347             G4ThreeVector p ( p0.x() + coulomb    
348                             , p0.y()              
349                             , p0.z() * coulomb    
350                                                   
351             G4ThreeVector r ( r0.x() + coulomb    
352                             , r0.y()              
353                             , r0.z() / coulomb    
354                                                   
355             system->SetParticipant( new G4QMDP    
356             // This is not important becase on    
357             system->GetParticipant ( i )->SetP    
358          }                                        
359                                                   
360       }                                           
361       //system->ShowParticipants();               
362                                                   
363       delete targ;                                
364       delete proj;                                
365                                                   
366    meanField->SetSystem ( system );               
367    collision->SetMeanField ( meanField );         
368                                                   
369 // Time Evolution                                 
370    //std::cout << "Start time evolution " << s    
371    //system->ShowParticipants();                  
372    for ( G4int i = 0 ; i < maxTime ; i++ )        
373    {                                              
374       //G4cout << " do Paropagate " << i << "     
375       meanField->DoPropagation( deltaT );         
376       //system->ShowParticipants();               
377       collision->CalKinematicsOfBinaryCollisio    
378                                                   
379       //if ( i / 10 * 10 == i )                   
380       //{                                         
381          //G4cout << i << " th time step. " <<    
382          //system->ShowParticipants();            
383       //}                                         
384       //system->ShowParticipants();               
385    }                                              
386    //system->ShowParticipants();                  
387                                                   
388                                                   
389    //std::cout << "Doing Cluster Judgment " <<    
390                                                   
391    nucleuses = meanField->DoClusterJudgment();    
392                                                   
393 // Elastic Judgment                               
394                                                   
395    G4int numberOfSecondary = int ( nucleuses.s    
396                                                   
397    G4int sec_a_Z = 0;                             
398    G4int sec_a_A = 0;                             
399    const G4ParticleDefinition* sec_a_pd = NULL    
400    G4int sec_b_Z = 0;                             
401    G4int sec_b_A = 0;                             
402    const G4ParticleDefinition* sec_b_pd = NULL    
403                                                   
404    if ( numberOfSecondary == 2 )                  
405    {                                              
406                                                   
407       G4bool elasticLike_system = false;          
408       if ( nucleuses.size() == 2 )                
409       {                                           
410                                                   
411          sec_a_Z = nucleuses[0]->GetAtomicNumb    
412          sec_a_A = nucleuses[0]->GetMassNumber    
413          sec_b_Z = nucleuses[1]->GetAtomicNumb    
414          sec_b_A = nucleuses[1]->GetMassNumber    
415                                                   
416          if ( ( sec_a_Z == proj_Z && sec_a_A =    
417            || ( sec_a_Z == targ_Z && sec_a_A =    
418          {                                        
419             elasticLike_system = true;            
420          }                                        
421                                                   
422       }                                           
423       else if ( nucleuses.size() == 1 )           
424       {                                           
425                                                   
426          sec_a_Z = nucleuses[0]->GetAtomicNumb    
427          sec_a_A = nucleuses[0]->GetMassNumber    
428          sec_b_pd = system->GetParticipant( 0     
429                                                   
430          if ( ( sec_a_Z == proj_Z && sec_a_A =    
431            || ( sec_a_Z == targ_Z && sec_a_A =    
432          {                                        
433             elasticLike_system = true;            
434          }                                        
435                                                   
436       }                                           
437       else                                        
438       {                                           
439                                                   
440          sec_a_pd = system->GetParticipant( 0     
441          sec_b_pd = system->GetParticipant( 1     
442                                                   
443          if ( ( sec_a_pd == proj_pd && sec_b_p    
444            || ( sec_a_pd == targ_pd && sec_b_p    
445          {                                        
446             elasticLike_system = true;            
447          }                                        
448           // QMD should be inelastic collision    
449           if ( (proj_pd->GetParticleName() ==     
450               || (proj_pd->GetParticleName() =    
451               || (proj_pd->GetParticleName() =    
452               || (proj_pd->GetParticleName() =    
453           {                                       
454               elasticLike_system = false;         
455               //G4cout << "elasticLike_system     
456               if ( system->GetNOCollision() ==    
457           }                                       
458           // Addition -- end                      
459       }                                           
460                                                   
461       if ( elasticLike_system == true )           
462       {                                           
463                                                   
464          G4bool elasticLike_energy = true;        
465 //    Cal ExcitationEnergy                        
466          for ( G4int i = 0 ; i < int ( nucleus    
467          {                                        
468                                                   
469             //meanField->SetSystem( nucleuses[    
470             meanField->SetNucleus( nucleuses[i    
471             //nucleuses[i]->SetTotalPotential(    
472             //nucleuses[i]->CalEnergyAndAngula    
473                                                   
474             if ( nucleuses[i]->GetExcitationEn    
475                                                   
476          }                                        
477                                                   
478 //    Check Collision                             
479          G4bool withCollision = true;             
480          if ( system->GetNOCollision() == 0 )     
481                                                   
482 //    Final judegement for Inelasitc or Elasti    
483 //                                                
484 //       ElasticLike without Collision            
485          //if ( elasticLike_energy == true &&     
486 //       ElasticLike with Collision               
487          //if ( elasticLike_energy == true &&     
488 //       InelasticLike without Collision          
489          //if ( elasticLike_energy == false )     
490          if ( frag == true )                      
491             if ( elasticLike_energy == false )    
492 //       InelasticLike with Collision             
493          if ( elasticLike_energy == false && w    
494                                                   
495       }                                           
496                                                   
497       }                                           
498       else                                        
499       {                                           
500                                                   
501 //       numberOfSecondary != 2                   
502          elastic = false;                         
503                                                   
504       }                                           
505                                                   
506 //071115                                          
507       //G4cout << elastic << G4endl;              
508       // if elastic is true try again from sam    
509                                                   
510       if ( elastic == true )                      
511       {                                           
512          // delete this nucleues                  
513          for ( std::vector< G4LightIonQMDNucle    
514                it = nucleuses.begin() ; it !=     
515          {                                        
516             delete *it;                           
517          }                                        
518          nucleuses.clear();                       
519          // system->Clear() should be included    
520          system->Clear();                         
521       }                                           
522                                                   
523    }                                              
524                                                   
525                                                   
526 // Statical Decay Phase                           
527                                                   
528    for ( std::vector< G4LightIonQMDNucleus* >:    
529        = nucleuses.begin() ; it != nucleuses.e    
530    {                                              
531                                                   
532 /*                                                
533       G4cout << "G4QMDRESULT "                    
534              << (*it)->GetAtomicNumber()          
535              << " "                               
536              << (*it)->GetMassNumber()            
537              << " "                               
538              << (*it)->Get4Momentum()             
539              << " "                               
540              << (*it)->Get4Momentum().vect()      
541              << " "                               
542              << (*it)->Get4Momentum().restMass    
543              << " "                               
544              << (*it)->GetNuclearMass()/GeV       
545              << G4endl;                           
546 */                                                
547                                                   
548       meanField->SetNucleus ( *it );              
549                                                   
550       if ( (*it)->GetAtomicNumber() == 0  // n    
551         || (*it)->GetAtomicNumber() == (*it)->    
552       {                                           
553          // push back system                      
554          for ( G4int i = 0 ; i < (*it)->GetTot    
555          {                                        
556             G4QMDParticipant* aP = new G4QMDPa    
557             system->SetParticipant ( aP );        
558          }                                        
559          continue;                                
560       }                                           
561                                                   
562       G4double nucleus_e = std::sqrt ( G4Pow::    
563       G4LorentzVector nucleus_p4CM ( (*it)->Ge    
564                                                   
565 //      std::cout << "G4QMDRESULT nucleus delt    
566                                                   
567       G4int ia = (*it)->GetMassNumber();          
568       G4int iz = (*it)->GetAtomicNumber();        
569                                                   
570       G4LorentzVector lv ( G4ThreeVector( 0.0     
571                                                   
572       G4Fragment* aFragment = new G4Fragment(     
573                                                   
574       G4ReactionProductVector* rv;                
575       rv = excitationHandler->BreakItUp( *aFra    
576       G4bool notBreak = true;                     
577       for ( G4ReactionProductVector::iterator     
578           = rv->begin() ; itt != rv->end() ; i    
579       {                                           
580                                                   
581           notBreak = false;                       
582           // Secondary from this nucleus (*it)    
583           const G4ParticleDefinition* pd = (*i    
584                                                   
585           G4LorentzVector p4 ( (*itt)->GetMome    
586           G4LorentzVector p4_CM = CLHEP::boost    
587           G4LorentzVector p4_LAB = CLHEP::boos    
588                                                   
589                                                   
590 //090122                                          
591           //theParticleChange.AddSecondary( dp    
592           if ( !( pd->GetAtomicNumber() == 4 &    
593           {                                       
594              //G4cout << "pd out of notBreak l    
595              G4DynamicParticle* dp = new G4Dyn    
596              theParticleChange.AddSecondary( d    
597           }                                       
598           else                                    
599           {                                       
600              //Be8 -> Alpha + Alpha + Q           
601              G4ThreeVector randomized_directio    
602              randomized_direction = randomized    
603              G4double q_decay = (*itt)->GetMas    
604              G4double p_decay = std::sqrt ( G4    
605              G4LorentzVector p4_a1 ( p_decay*r    
606                                                   
607              G4LorentzVector p4_a1_Be8 = CLHEP    
608              G4LorentzVector p4_a1_CM = CLHEP:    
609              G4LorentzVector p4_a1_LAB = CLHEP    
610                                                   
611              G4LorentzVector p4_a2 ( -p_decay*    
612                                                   
613              G4LorentzVector p4_a2_Be8 = CLHEP    
614              G4LorentzVector p4_a2_CM = CLHEP:    
615              G4LorentzVector p4_a2_LAB = CLHEP    
616                                                   
617              G4DynamicParticle* dp1 = new G4Dy    
618              G4DynamicParticle* dp2 = new G4Dy    
619              theParticleChange.AddSecondary( d    
620              theParticleChange.AddSecondary( d    
621           }                                       
622 //090122                                          
623                                                   
624 /*                                                
625           G4cout                                  
626                 << "Regist Secondary "            
627                 << (*itt)->GetDefinition()->Ge    
628                 << " "                            
629                 << (*itt)->GetMomentum()/GeV      
630                 << " "                            
631                 << (*itt)->GetKineticEnergy()/    
632                 << " "                            
633                 << (*itt)->GetMass()/GeV          
634                 << " "                            
635                 << (*itt)->GetTotalEnergy()/Ge    
636                 << " "                            
637                 << (*itt)->GetTotalEnergy()/Ge    
638                  - (*itt)->GetMomentum()/GeV *    
639                 << " "                            
640                 << nucleus_p4CM.findBoostToCM(    
641                 << " "                            
642                 << p4                             
643                 << " "                            
644                 << p4_CM                          
645                 << " "                            
646                 << p4_LAB                         
647                 << G4endl;                        
648 */                                                
649                                                   
650       }                                           
651       if ( notBreak == true )                     
652       {                                           
653                                                   
654          const G4ParticleDefinition* pd = G4Io    
655              //G4cout << "pd in notBreak loop     
656          G4LorentzVector p4_CM = nucleus_p4CM;    
657          G4LorentzVector p4_LAB = CLHEP::boost    
658          G4DynamicParticle* dp = new G4Dynamic    
659          theParticleChange.AddSecondary( dp );    
660                                                   
661       }                                           
662                                                   
663       for ( G4ReactionProductVector::iterator     
664           = rv->begin() ; itt != rv->end() ; i    
665       {                                           
666           delete *itt;                            
667       }                                           
668       delete rv;                                  
669                                                   
670       delete aFragment;                           
671                                                   
672    }                                              
673                                                   
674                                                   
675                                                   
676    for ( G4int i = 0 ; i < system->GetTotalNum    
677    {                                              
678       // Secondary particles                      
679                                                   
680       const G4ParticleDefinition* pd = system-    
681       G4LorentzVector p4_CM = system->GetParti    
682       G4LorentzVector p4_LAB = CLHEP::boostOf(    
683       G4DynamicParticle* dp = new G4DynamicPar    
684       theParticleChange.AddSecondary( dp );       
685       //G4cout << "In the last theParticleChan    
686                                                   
687 /*                                                
688       G4cout << "G4QMDRESULT "                    
689       << "r" << i << " " << system->GetPartici    
690       << "p" << i << " " << system->GetPartici    
691       << G4endl;                                  
692 */                                                
693                                                   
694    }                                              
695                                                   
696    for ( std::vector< G4LightIonQMDNucleus* >:    
697        = nucleuses.begin() ; it != nucleuses.e    
698    {                                              
699       delete *it;  // delete nulceuse             
700    }                                              
701    nucleuses.clear();                             
702                                                   
703    system->Clear();                               
704    delete system;                                 
705                                                   
706    theParticleChange.SetStatusChange( stopAndK    
707                                                   
708    for (G4int i = 0; i < G4int(theParticleChan    
709    {                                              
710      //G4cout << "Particle : " << theParticleC    
711      //G4cout << "KEnergy : " << theParticleCh    
712      //G4cout << "modelID : " << theParticleCh    
713      theParticleChange.GetSecondary(i)->SetCre    
714    }                                              
715                                                   
716    return &theParticleChange;                     
717                                                   
718 }                                                 
719                                                   
720                                                   
721                                                   
722 void G4LightIonQMDReaction::calcOffSetOfCollis    
723 const G4ParticleDefinition* pd_proj ,             
724 const G4ParticleDefinition* pd_targ ,             
725 G4double ptot , G4double etot , G4double bmax     
726 {                                                 
727                                                   
728    G4double mass_proj = pd_proj->GetPDGMass()/    
729    G4double mass_targ = pd_targ->GetPDGMass()/    
730                                                   
731    G4double stot = std::sqrt ( etot*etot - pto    
732                                                   
733    G4double pstt = std::sqrt ( ( stot*stot - (    
734                   ) * ( stot*stot - ( mass_pro    
735                  / ( 2.0 * stot );                
736                                                   
737    G4double pzcc = pstt;                          
738    G4double eccm = stot - ( mass_proj + mass_t    
739                                                   
740    G4int zp = 1;                                  
741    G4int ap = 1;                                  
742    if ( pd_proj->GetParticleType() == "nucleus    
743    {                                              
744       zp = pd_proj->GetAtomicNumber();            
745       ap = pd_proj->GetAtomicMass();              
746    }                                              
747    else                                           
748    {                                              
749       // proton, neutron, mesons                  
750       zp = int ( pd_proj->GetPDGCharge()/eplus    
751       // ap = 1;                                  
752    }                                              
753                                                   
754                                                   
755    G4int zt = pd_targ->GetAtomicNumber();         
756    G4int at = pd_targ->GetAtomicMass();           
757                                                   
758                                                   
759    // Check the ramx0 value                       
760    //G4double rmax0 = 8.0;  // T.K dicide para    
761    G4double rmax0 = bmax + 4.0;                   
762    G4double rmax = std::sqrt( rmax0*rmax0 + b*    
763                                                   
764    G4double ccoul = 0.001439767;                  
765    G4double pcca = 1.0 - double ( zp * zt ) *     
766                                                   
767    G4double pccf = std::sqrt( pcca );             
768                                                   
769    //Fix for neutral particles                    
770    G4double aas1 = 0.0;                           
771    G4double bbs = 0.0;                            
772                                                   
773    if ( zp != 0 )                                 
774    {                                              
775       G4double aas = 2.0 * eccm * b / double (    
776       bbs = 1.0 / std::sqrt ( 1.0 + aas*aas );    
777       aas1 = ( 1.0 + aas * b / rmax ) * bbs;      
778    }                                              
779                                                   
780    G4double cost = 0.0;                           
781    G4double sint = 0.0;                           
782    G4double thet1 = 0.0;                          
783    G4double thet2 = 0.0;                          
784    if ( 1.0 - aas1*aas1 <= 0 || 1.0 - bbs*bbs     
785    {                                              
786       cost = 1.0;                                 
787       sint = 0.0;                                 
788    }                                              
789    else                                           
790    {                                              
791       G4double aat1 = aas1 / std::sqrt ( 1.0 -    
792       G4double aat2 = bbs / std::sqrt ( 1.0 -     
793                                                   
794       thet1 = std::atan ( aat1 );                 
795       thet2 = std::atan ( aat2 );                 
796                                                   
797 //    TK enter to else block                      
798       G4double theta = thet1 - thet2;             
799       cost = std::cos( theta );                   
800       sint = std::sin( theta );                   
801    }                                              
802                                                   
803    G4double rzpr = -rmax * cost * ( mass_targ     
804    G4double rzta =  rmax * cost * ( mass_proj     
805                                                   
806    G4double rxpr = rmax / 2.0 * sint;             
807                                                   
808    G4double rxta = -rxpr;                         
809                                                   
810                                                   
811    G4double pzpc = pzcc * (  cost * pccf + sin    
812    G4double pxpr = pzcc * ( -sint * pccf + cos    
813                                                   
814    G4double pztc = - pzpc;                        
815    G4double pxta = - pxpr;                        
816                                                   
817    G4double epc = std::sqrt ( pzpc*pzpc + pxpr    
818    G4double etc = std::sqrt ( pztc*pztc + pxta    
819                                                   
820    G4double pzpr = pzpc;                          
821    G4double pzta = pztc;                          
822    G4double epr = epc;                            
823    G4double eta = etc;                            
824                                                   
825 // CM -> NN                                       
826    G4double gammacm = boostToCM.gamma();          
827    //G4double betacm = -boostToCM.beta();         
828    G4double betacm = boostToCM.z();               
829    pzpr = pzpc + betacm * gammacm * ( gammacm     
830    pzta = pztc + betacm * gammacm * ( gammacm     
831    epr = gammacm * ( epc + betacm * pzpc );       
832    eta = gammacm * ( etc + betacm * pztc );       
833                                                   
834    //G4double betpr = pzpr / epr;                 
835    //G4double betta = pzta / eta;                 
836                                                   
837    G4double gammpr = epr / ( mass_proj );         
838    G4double gammta = eta / ( mass_targ );         
839                                                   
840    pzta = pzta / double ( at );                   
841    pxta = pxta / double ( at );                   
842                                                   
843    pzpr = pzpr / double ( ap );                   
844    pxpr = pxpr / double ( ap );                   
845                                                   
846    G4double zeroz = 0.0;                          
847                                                   
848    rzpr = rzpr -zeroz;                            
849    rzta = rzta -zeroz;                            
850                                                   
851    // Set results                                 
852    coulomb_collision_gamma_proj = gammpr;         
853    coulomb_collision_rx_proj = rxpr;              
854    coulomb_collision_rz_proj = rzpr;              
855    coulomb_collision_px_proj = pxpr;              
856    coulomb_collision_pz_proj = pzpr;              
857                                                   
858    coulomb_collision_gamma_targ = gammta;         
859    coulomb_collision_rx_targ = rxta;              
860    coulomb_collision_rz_targ = rzta;              
861    coulomb_collision_px_targ = pxta;              
862    coulomb_collision_pz_targ = pzta;              
863                                                   
864 }                                                 
865                                                   
866 void G4LightIonQMDReaction::setEvaporationCh()    
867 {                                                 
868   //fEvaporation - 8 default channels             
869   //fCombined    - 8 default + 60 GEM             
870   //fGEM         - 2 default + 66 GEM             
871   G4DeexChannelType ctype = gem ? fGEM : fComb    
872   excitationHandler->SetDeexChannelsType(ctype    
873 }                                                 
874                                                   
875 void G4LightIonQMDReaction::ModelDescription(s    
876 {                                                 
877    outFile << "Lorentz covarianted Quantum Mol    
878 }                                                 
879