Ignore:
Timestamp:
Nov 5, 2010, 3:45:55 PM (14 years ago)
Author:
garnier
Message:

update ti head

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/hadronic/models/theo_high_energy/src/G4QuasiElasticChannel.cc

    r1337 r1340  
    2525//
    2626//
    27 // $Id: G4QuasiElasticChannel.cc,v 1.7 2009/04/09 08:28:42 mkossov Exp $
    28 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     27// $Id: G4QuasiElasticChannel.cc,v 1.9 2010/09/17 11:34:29 gunter Exp $
     28// GEANT4 tag $Name: geant4-09-03-ref-09 $
    2929//
    3030
     
    5858    const G4DynamicParticle & thePrimary)
    5959{
     60    #ifdef debug_scatter   
     61      G4cout << "G4QuasiElasticChannel:: P=" << thePrimary.GetTotalMomentum()
     62             << ", pPDG=" << thePrimary.GetDefinition()->GetPDGEncoding()
     63             << ", Z = "  << theNucleus.GetZ_asInt())
     64             << ", N = "  << theNucleus.GetN_asInt())
     65             << ", A = "  << theNucleus.GetA_asInt() << G4endl;
     66    #endif
     67
    6068  std::pair<G4double,G4double> ratios;
    61 #ifdef debug_scatter   
    62   G4cout << "G4QuasiElasticChannel:: P=" << thePrimary.GetTotalMomentum()
    63          << ", pPDG=" << thePrimary.GetDefinition()->GetPDGEncoding()
    64          << ", Z = "  << G4lrint(theNucleus.GetZ())
    65          << ", N = "  << G4lrint(theNucleus.GetN()-theNucleus.GetZ()) << G4endl;
    66 #endif
    6769  ratios=theQuasiElastic->GetRatios(thePrimary.GetTotalMomentum(),
    6870                                    thePrimary.GetDefinition()->GetPDGEncoding(),
    69                                     G4lrint(theNucleus.GetZ()),
    70                                     G4lrint(theNucleus.GetN()-theNucleus.GetZ()));
    71 #ifdef debug_scatter   
    72   G4cout << "G4QuasiElasticChannel::ratios " << ratios.first << " x " <<ratios.second
    73          << "  = " << ratios.first*ratios.second << G4endl;
    74 #endif
     71                                    theNucleus.GetZ_asInt(),
     72                                    theNucleus.GetN_asInt());
     73    #ifdef debug_scatter   
     74      G4cout << "G4QuasiElasticChannel::ratios " << ratios.first << " x " <<ratios.second
     75             << "  = " << ratios.first*ratios.second << G4endl;
     76    #endif
    7577       
    7678  return ratios.first*ratios.second;
    77   //return 0.; // Switch off quasielastic (temporary) M.K.
    78   //return 1.; // Only quasielastic (temporary) M.K. (DANGEROSE! Crashes at A=1!)
    7979}
    8080
     
    8282                                                      const G4DynamicParticle & thePrimary)
    8383{
    84   G4int A=G4lrint(theNucleus.GetN());
    85   G4int Z=G4lrint(theNucleus.GetZ());                                 // M.K. ResNuc
     84  G4int A=theNucleus.GetA_asInt();
     85  G4int Z=theNucleus.GetZ_asInt();
    8686  //   build Nucleus and choose random nucleon to scatter with
    87   the3DNucleus.Init(theNucleus.GetN(),theNucleus.GetZ());
    88 #ifdef debug_scatter
    89   G4cout<<"G4QElC::Scat: Before GetNucleons " << G4endl;
    90 #endif
     87  the3DNucleus.Init(theNucleus.GetA_asInt(),theNucleus.GetZ_asInt());
    9188  const std::vector<G4Nucleon *> nucleons=the3DNucleus.GetNucleons();
    9289  G4double targetNucleusMass=the3DNucleus.GetMass();                  // M.K. ResNuc
    93 #ifdef debug_scatter
    94   G4cout<<"G4QElC::Scat: targetMass = " << targetNucleusMass << G4endl;
    95 #endif
    9690  G4LorentzVector targetNucleus4Mom(0.,0.,0.,targetNucleusMass);      // M.K. ResNuc
    9791  G4int index;
     
    10094    index=G4lrint((A-1)*G4UniformRand());
    10195  } while (index < 0 || index >= static_cast<G4int>(nucleons.size()));
    102 #ifdef debug_scatter
    103   G4cout<<"G4QElC::Scat: index = " << index << G4endl;
    104 #endif
    10596  G4ParticleDefinition * pDef= nucleons[index]->GetDefinition();
     97
    10698  G4int resA=A-1;                                                     // M.K. ResNuc
    10799  G4int resZ=Z-static_cast<int>(pDef->GetPDGCharge());                // M.K. ResNuc
     
    113105    residualNucleusMass=resDef->GetPDGMass();                         // M.K. ResNuc
    114106  }
    115   else residualNucleusMass*=resA;                           // resA=resN M.K. ResNuc
    116 #ifdef debug_scatter
    117   G4cout<<"G4QElChan::Scatter: neutron - proton? A ="<<A<<", Z="<<Z<<", projName="
    118         <<pDef->GetParticleName()<<G4endl;
    119 #endif
    120   // G4LorentzVector pNucleon(G4ThreeVector(0,0,0),pDef->GetPDGMass());
     107  else {
     108    residualNucleusMass*=resA;
     109  }
     110   #ifdef debug_scatter
     111     G4cout<<"G4QElChan::Scatter: neutron - proton? A ="<<A<<", Z="<<Z<<", projName="
     112           <<pDef->GetParticleName()<<G4endl;
     113   #endif
     114
    121115  G4LorentzVector pNucleon=nucleons[index]->Get4Momentum();
    122116  G4double residualNucleusEnergy=std::sqrt(residualNucleusMass*residualNucleusMass+
Note: See TracChangeset for help on using the changeset viewer.