Ignore:
Timestamp:
Jan 8, 2010, 11:56:51 AM (15 years ago)
Author:
garnier
Message:

update geant4.9.3 tag

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/hadronic/models/qmd/src/G4QMDReaction.cc

    r1196 r1228  
    5252   shenXS = new G4IonsShenCrossSection();
    5353   //genspaXS = new G4GeneralSpaceNNCrossSection();
     54   piNucXS = new G4PiNuclearCrossSection();
    5455   meanField = new G4QMDMeanField();
    5556   collision = new G4QMDCollision();
     
    107108
    108109     //090331
    109      G4double xs_0 = shenXS->GetCrossSection ( proj_dp , targ_ele , aTemp );
     110 
     111   G4VCrossSectionDataSet* theXS = shenXS;
     112
     113   if ( proj_pd->GetParticleType() == "meson" ) theXS = piNucXS;
     114
     115   G4double xs_0 = theXS->GetCrossSection ( proj_dp , targ_ele , aTemp );
     116
    110117     //G4double xs_0 = genspaXS->GetCrossSection ( proj_dp , targ_ele , aTemp );
    111118     G4double bmax_0 = std::sqrt( xs_0 / pi );
     
    158165
    159166      G4double plab = projectile.GetTotalMomentum()/GeV;
    160       G4double elab = (projectile.GetKineticEnergy() + proj_pd->GetPDGMass() + targ_pd->GetPDGMass() )/GeV;
     167      G4double elab = ( projectile.GetKineticEnergy() + proj_pd->GetPDGMass() + targ_pd->GetPDGMass() )/GeV;
    161168
    162169      calcOffSetOfCollision( b , proj_pd , targ_pd , plab , elab , bmax , boostCMtoNN );
     
    177184         //proj->ShowParticipants();
    178185
    179       }
    180 
    181       meanField->SetSystem ( proj );
    182       proj->SetTotalPotential( meanField->GetTotalPotential() );
    183       proj->CalEnergyAndAngularMomentumInCM();
     186
     187         meanField->SetSystem ( proj );
     188         proj->SetTotalPotential( meanField->GetTotalPotential() );
     189         proj->CalEnergyAndAngularMomentumInCM();
     190
     191      }
    184192
    185193// Target
     
    220228      G4LorentzVector targ4pCM = CLHEP::boostOf ( targ4p , boostToReac );
    221229
    222 
    223230//    Projectile
    224231      if ( proj != NULL )
     
    251258//       projectile is particle
    252259
    253          G4int i = targ->GetTotalNumberOfParticipant();
     260         // avoid multiple set in "elastic" loop
     261         if ( system->GetTotalNumberOfParticipant() == targ->GetTotalNumberOfParticipant() )
     262         {
     263
     264            G4int i = targ->GetTotalNumberOfParticipant();
    254265     
    255          G4ThreeVector p0( 0 );
    256          G4ThreeVector r0( 0 );
    257 
    258 
    259          G4ThreeVector p ( p0.x() + coulomb_collision_px_proj
    260                          , p0.y()
    261                          , p0.z() * coulomb_collision_gamma_proj + coulomb_collision_pz_proj );
    262 
    263          G4ThreeVector r ( r0.x() + coulomb_collision_rx_proj
    264                          , r0.y()
    265                          , r0.z() / coulomb_collision_gamma_proj + coulomb_collision_rz_proj );
    266 
    267          system->SetParticipant( new G4QMDParticipant( (G4ParticleDefinition*)projectile.GetDefinition() , p , r ) );
    268          system->GetParticipant ( i )->SetProjectile();
    269       }
     266            G4ThreeVector p0( 0 );
     267            G4ThreeVector r0( 0 );
     268
     269            G4ThreeVector p ( p0.x() + coulomb_collision_px_proj
     270                            , p0.y()
     271                            , p0.z() * coulomb_collision_gamma_proj + coulomb_collision_pz_proj );
     272
     273            G4ThreeVector r ( r0.x() + coulomb_collision_rx_proj
     274                            , r0.y()
     275                            , r0.z() / coulomb_collision_gamma_proj + coulomb_collision_rz_proj );
     276
     277            system->SetParticipant( new G4QMDParticipant( (G4ParticleDefinition*)projectile.GetDefinition() , p , r ) );
     278            // This is not important becase only 1 projectile particle.
     279            system->GetParticipant ( i )->SetProjectile();
     280         }
     281
     282      }
     283      //system->ShowParticipants();
    270284
    271285      delete targ;
    272286      delete proj;
    273 
    274287
    275288   meanField->SetSystem ( system );
     
    611624G4double ptot , G4double etot , G4double bmax , G4ThreeVector boostToCM )
    612625{
     626
    613627   G4double mass_proj = pd_proj->GetPDGMass()/GeV;
    614628   G4double mass_targ = pd_targ->GetPDGMass()/GeV;
     
    623637   G4double eccm = stot - ( mass_proj + mass_targ );
    624638   
    625    G4int zp = pd_proj->GetAtomicNumber();
    626    G4int ap = pd_proj->GetAtomicMass();
     639   G4int zp = 1;
     640   G4int ap = 1;
     641   if ( pd_proj->GetParticleType() == "nucleus" )
     642   {
     643      zp = pd_proj->GetAtomicNumber();
     644      ap = pd_proj->GetAtomicMass();
     645   }
     646   else
     647   {
     648      // proton, neutron, mesons
     649      zp = int ( pd_proj->GetPDGCharge()/eplus + 0.5 ); 
     650      // ap = 1;
     651   }
     652   
     653
    627654   G4int zt = pd_targ->GetAtomicNumber();
    628655   G4int at = pd_targ->GetAtomicMass();
     656
    629657
    630658   //G4double rmax0 = 8.0;  // T.K dicide parameter value  // for low energy
Note: See TracChangeset for help on using the changeset viewer.