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

update geant4.9.3 tag

Location:
trunk/source/processes/hadronic/models/photolepton_hadron/muon_nuclear
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/hadronic/models/photolepton_hadron/muon_nuclear/History

    r1055 r1228  
    1 $Id: History,v 1.8 2009/02/06 08:58:20 vnivanch Exp $
     1$Id: History,v 1.10 2009/11/20 19:37:15 vnivanch Exp $
    22-------------------------------------------------------------------
    33
     
    1515     * Please list in reverse chronological order (last date on top)
    1616     ---------------------------------------------------------------
     17
     1820 Nov 2009 V.Ivantchenko (hadr-munuclear-V09-02-03)
     19----------------------------------------------------
     20- Cleanup
     21
     2204 Mar 2009 V.Ivantchenko (hadr-munuclear-V09-02-02)
     23----------------------------------------------------
     24- move constructors, destructors and virtual methods to source
    1725
    182606 Feb 2009 V.Ivantchenko (hadr-munuclear-V09-02-01)
  • trunk/source/processes/hadronic/models/photolepton_hadron/muon_nuclear/include/G4LeptonHadronProcess.hh

    r819 r1228  
    4545
    4646      G4LeptonHadronProcess(const G4String &processName = "LeptonHadron");
    47       ~G4LeptonHadronProcess();
     47      virtual ~G4LeptonHadronProcess();
    4848
    49       G4VParticleChange *PostStepDoIt( const G4Track &leptonTrack,
    50                                        const G4Step &aStep )
    51       {
    52         return G4LeptonHadronProcess::GeneralPostStepDoIt(leptonTrack, aStep);
    53       }
    54 
    55       G4VParticleChange *GeneralPostStepDoIt( const G4Track &leptonTrack,
    56                                               const G4Step &aStep );
    57 
    58       virtual G4LeptonHadronInteractionModel *chooseInteractionModel() = 0;
    59 
     49      virtual G4VParticleChange *PostStepDoIt( const G4Track &leptonTrack,
     50                                               const G4Step &aStep );
    6051
    6152    protected:
  • trunk/source/processes/hadronic/models/photolepton_hadron/muon_nuclear/include/G4MuNuclearInteraction.hh

    r1196 r1228  
    2525//
    2626//
    27 // $Id: G4MuNuclearInteraction.hh,v 1.6 2008/10/02 21:04:35 dennis Exp $
    28 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     27// $Id: G4MuNuclearInteraction.hh,v 1.7 2009/03/04 19:09:20 vnivanch Exp $
     28// GEANT4 tag $Name: geant4-09-03 $
    2929//
    3030// $Id:
     
    6666  virtual ~G4MuNuclearInteraction();
    6767
     68  void SetPhysicsTableBining(G4double lowE, G4double highE, G4int nBins);
     69
    6870  virtual G4bool IsApplicable(const G4ParticleDefinition&);
    69 
    70   void SetPhysicsTableBining(G4double lowE, G4double highE, G4int nBins);
    7171
    7272  virtual void PreparePhysicsTable(const G4ParticleDefinition& ParticleType);
     
    7676  virtual void PrintInfoDefinition() ;
    7777
    78   virtual G4double GetMeanFreePath(const G4Track& track,
    79                                    G4double previousStepSize,
    80                                    G4ForceCondition* condition ) ;
    81  
    8278  virtual G4VParticleChange *PostStepDoIt(const G4Track& track,
    8379                                          const G4Step& Step  ) ;
     
    8581protected:
    8682
     83  virtual G4double GetMeanFreePath(const G4Track& track,
     84                                   G4double previousStepSize,
     85                                   G4ForceCondition* condition ) ;
     86 
    8787  virtual G4double ComputeMeanFreePath( const G4ParticleDefinition* ParticleType,
    8888                                        G4double KineticEnergy,
     
    142142  G4ParametrizedHadronicVertex theHadronicVertex;
    143143};
    144 
    145 #include "G4MuNuclearInteraction.icc"
    146144 
    147145#endif
  • trunk/source/processes/hadronic/models/photolepton_hadron/muon_nuclear/include/G4MuonNucleusInteractionModel.hh

    r819 r1228  
    5353
    5454      G4MuonNucleusInteractionModel();
    55       ~G4MuonNucleusInteractionModel();
     55      virtual ~G4MuonNucleusInteractionModel();
    5656
    5757      void makePhysicsVector();
  • trunk/source/processes/hadronic/models/photolepton_hadron/muon_nuclear/include/G4MuonNucleusProcess.hh

    r819 r1228  
    4141
    4242      G4MuonNucleusProcess(const G4String& processName ="MuonNucleus");
    43       ~G4MuonNucleusProcess();
    44 
     43      virtual ~G4MuonNucleusProcess();
    4544
    4645      G4double GetMeanFreePath(const G4Track &muonTrack,
    4746                               G4double previousStepSize,
    4847                               G4ForceCondition *condition);
    49 
    50       G4LeptonHadronInteractionModel *chooseInteractionModel();
    51 
    52       G4VParticleChange *PostStepDoIt(const G4Track &muonTrack,
    53                                       const G4Step &aStep)
    54       {
    55         return G4LeptonHadronProcess::GeneralPostStepDoIt(muonTrack, aStep);
    56       }
    57 
    5848
    5949    private:
  • trunk/source/processes/hadronic/models/photolepton_hadron/muon_nuclear/include/G4ParametrizedHadronicVertex.hh

    r819 r1228  
    2828
    2929#include "globals.hh"
    30 #include "G4ParticleChange.hh"
     30#include "G4VParticleChange.hh"
     31#include "G4HEInelastic.hh"
    3132#include "G4Nucleus.hh"
    32 #include "G4ReactionProduct.hh"
    33 #include "G4LEPionPlusInelastic.hh"
    34 #include "G4LEPionMinusInelastic.hh"
    35 #include "G4HEPionPlusInelastic.hh"
    36 #include "G4HEPionMinusInelastic.hh"
    3733#include "G4Track.hh"
     34
     35class G4LEPionPlusInelastic;
     36class G4LEPionMinusInelastic;
     37class G4HEPionPlusInelastic;
     38class G4HEPionMinusInelastic;
    3839
    3940class G4ParametrizedHadronicVertex
    4041{
    41   public:
    42    G4ParametrizedHadronicVertex()
    43    {
    44      theLowEPionPlus = new G4LEPionPlusInelastic;
    45      theLowEPionMinus = new G4LEPionMinusInelastic;
    46      theHighEPionPlus = new G4HEPionPlusInelastic;
    47      theHighEPionMinus = new G4HEPionMinusInelastic;
    48    }
    49    G4VParticleChange * ApplyYourself(G4Nucleus & theTarget,
    50                                      const G4Track &thePhoton);
     42public:
    5143
    52   private:
    53    G4LEPionPlusInelastic  *theLowEPionPlus;
    54    G4LEPionMinusInelastic *theLowEPionMinus;
    55    G4HEPionPlusInelastic  *theHighEPionPlus;
    56    G4HEPionMinusInelastic *theHighEPionMinus;
     44  G4ParametrizedHadronicVertex();
     45
     46  ~G4ParametrizedHadronicVertex();
     47
     48  G4VParticleChange * ApplyYourself(G4Nucleus & theTarget,
     49                                    const G4Track &thePhoton);
     50
     51private:
     52
     53  G4LEPionPlusInelastic  *theLowEPionPlus;
     54  G4LEPionMinusInelastic *theLowEPionMinus;
     55  G4HEPionPlusInelastic  *theHighEPionPlus;
     56  G4HEPionMinusInelastic *theHighEPionMinus;
    5757 
     58  G4VParticleChange theTotalResult;
    5859};
    5960#endif
  • trunk/source/processes/hadronic/models/photolepton_hadron/muon_nuclear/src/G4LeptonHadronProcess.cc

    r819 r1228  
    3333  G4LeptonHadronProcess::G4LeptonHadronProcess( const G4String &processName )
    3434//-----------------------------------------------------------------------------
    35     : G4VDiscreteProcess( processName )
     35    : G4VDiscreteProcess( processName ), theInteractionModel(0)
    3636  {
    3737  }
     
    4747//-----------------------------------------------------------------------------
    4848  G4VParticleChange*
    49   G4LeptonHadronProcess::GeneralPostStepDoIt( const G4Track &leptonTrack,
    50                                               const G4Step & )
     49  G4LeptonHadronProcess::PostStepDoIt( const G4Track &leptonTrack,
     50                                       const G4Step & )
    5151//-----------------------------------------------------------------------------
    5252  {
  • trunk/source/processes/hadronic/models/photolepton_hadron/muon_nuclear/src/G4MuNuclearInteraction.cc

    r1196 r1228  
    2424// ********************************************************************
    2525//
    26 // $Id: G4MuNuclearInteraction.cc,v 1.12 2009/01/24 11:59:37 vnivanch Exp $
    27 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     26// $Id: G4MuNuclearInteraction.cc,v 1.13 2009/03/04 19:09:20 vnivanch Exp $
     27// GEANT4 tag $Name: geant4-09-03 $
    2828//
    2929// $Id:
     
    9797}
    9898
     99
     100G4bool G4MuNuclearInteraction::IsApplicable(const G4ParticleDefinition& particle)
     101{
     102   return(   (&particle == theMuonMinus)||(&particle == theMuonPlus)) ;
     103}
     104
    99105void G4MuNuclearInteraction::PreparePhysicsTable(
    100106                                    const G4ParticleDefinition& aParticleType)
     
    522528   G4Nucleus theTarget(aMaterial);
    523529
    524    G4VParticleChange* aHadronicFS;
    525    aHadronicFS = theHadronicVertex.ApplyYourself(theTarget, gammaTrack);
    526    // delete aGamma;
     530   G4VParticleChange* aHadronicFS = theHadronicVertex.ApplyYourself(theTarget, gammaTrack);
     531   //delete aGamma;
    527532
    528533   G4int numSecondaries = aHadronicFS->GetNumberOfSecondaries();
    529534   aParticleChange.SetNumberOfSecondaries(numSecondaries);
    530535
    531    G4ParticleMomentum secondaryMomentum = G4ThreeVector(0.,0.,0.);
     536   //   G4ParticleMomentum secondaryMomentum = G4ThreeVector(0.,0.,0.);
    532537   for(G4int iSec=0; iSec<numSecondaries; iSec++)
    533538   {
    534      secondaryMomentum
    535        = secondaryMomentum + aHadronicFS->GetSecondary(iSec)->GetMomentum();
     539     //secondaryMomentum
     540     //  = secondaryMomentum + aHadronicFS->GetSecondary(iSec)->GetMomentum();
    536541     aParticleChange.AddSecondary(aHadronicFS->GetSecondary(iSec));
    537542   }
    538    aHadronicFS->Clear();
     543   //aHadronicFS->Clear();
    539544
    540545   return G4VDiscreteProcess::PostStepDoIt(trackData,stepData);
     
    574579}
    575580
     581G4double G4MuNuclearInteraction::GetMeanFreePath(const G4Track& trackData,
     582                                                 G4double,
     583                                                 G4ForceCondition* condition)
     584{
     585   const G4DynamicParticle* aDynamicParticle;
     586   G4Material* aMaterial;
     587   G4double MeanFreePath;
     588   G4bool isOutRange ;
     589 
     590   *condition = NotForced ;
     591
     592   aDynamicParticle = trackData.GetDynamicParticle();
     593   aMaterial = trackData.GetMaterial();
     594
     595   G4double KineticEnergy = aDynamicParticle->GetKineticEnergy();
     596
     597   if (KineticEnergy <  LowestKineticEnergy)
     598     MeanFreePath = DBL_MAX ;
     599   else {
     600     if (KineticEnergy > HighestKineticEnergy)
     601                                 KineticEnergy = 0.99*HighestKineticEnergy ;
     602     MeanFreePath = (*theMeanFreePathTable)(aMaterial->GetIndex())->
     603                                 GetValue( KineticEnergy, isOutRange );
     604   }
     605   return MeanFreePath;
     606}
     607
     608G4double G4MuNuclearInteraction::ComputeMeanFreePath(
     609                                     const G4ParticleDefinition* ParticleType,
     610                                     G4double KineticEnergy,
     611                                     const G4Material* aMaterial)
     612{
     613  const G4ElementVector* theElementVector = aMaterial->GetElementVector() ;
     614  const G4double* theAtomNumDensityVector =
     615                                      aMaterial->GetAtomicNumDensityVector();
     616
     617  G4double SIGMA = 0 ;
     618
     619  for ( size_t i=0 ; i < aMaterial->GetNumberOfElements() ; i++ )
     620  {             
     621    SIGMA += theAtomNumDensityVector[i] *
     622             ComputeMicroscopicCrossSection( ParticleType, KineticEnergy,
     623                                          (*theElementVector)[i]->GetZ(),
     624                                          (*theElementVector)[i]->GetA()) ;
     625  }       
     626
     627  return SIGMA<=0.0 ? DBL_MAX : 1./SIGMA ;
     628}
     629
     630
  • trunk/source/processes/hadronic/models/photolepton_hadron/muon_nuclear/src/G4MuonNucleusInteractionModel.cc

    r1196 r1228  
    2626//
    2727// $Id: G4MuonNucleusInteractionModel.cc,v 1.6 2006/06/29 20:57:36 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     28// GEANT4 tag $Name: geant4-09-03 $
    2929//
    3030// --------------------------------------------------------------
  • trunk/source/processes/hadronic/models/photolepton_hadron/muon_nuclear/src/G4MuonNucleusProcess.cc

    r819 r1228  
    3636    : G4LeptonHadronProcess( processName)
    3737  {
    38     theInteractionModel = chooseInteractionModel();
     38    theInteractionModel = new G4MuonNucleusInteractionModel;
    3939  }
    4040
     
    4646    delete theInteractionModel;
    4747  }
    48 
    49 
    50 //-----------------------------------------------------------------------------
    51   G4LeptonHadronInteractionModel*
    52   G4MuonNucleusProcess::chooseInteractionModel()
    53 //-----------------------------------------------------------------------------
    54   {
    55     G4MuonNucleusInteractionModel* aModel = new G4MuonNucleusInteractionModel;
    56     return aModel;
    57   }
    58 
    5948
    6049//-----------------------------------------------------------------------------
  • trunk/source/processes/hadronic/models/photolepton_hadron/muon_nuclear/src/G4ParametrizedHadronicVertex.cc

    r1196 r1228  
    2525//
    2626//
    27 // $Id: G4ParametrizedHadronicVertex.cc,v 1.6 2006/06/29 20:57:40 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     27// $Id: G4ParametrizedHadronicVertex.cc,v 1.7 2009/03/04 19:09:20 vnivanch Exp $
     28// GEANT4 tag $Name: geant4-09-03 $
    2929//
    3030// --------------------------------------------------------------
     31
    3132#include "G4ParametrizedHadronicVertex.hh"
    3233#include "G4HadFinalState.hh"
    33 #include "G4ParticleChange.hh"
     34#include "G4HadProjectile.hh"
     35#include "G4LEPionPlusInelastic.hh"
     36#include "G4LEPionMinusInelastic.hh"
     37#include "G4HEPionPlusInelastic.hh"
     38#include "G4HEPionMinusInelastic.hh"
    3439
    35 G4VParticleChange * G4ParametrizedHadronicVertex::
    36 ApplyYourself(G4Nucleus & theTarget, const G4Track &thePhoton)
     40G4ParametrizedHadronicVertex::G4ParametrizedHadronicVertex()
     41{
     42  theLowEPionPlus = new G4LEPionPlusInelastic;
     43  theLowEPionMinus = new G4LEPionMinusInelastic;
     44  theHighEPionPlus = new G4HEPionPlusInelastic;
     45  theHighEPionMinus = new G4HEPionMinusInelastic;
     46}
     47
     48G4ParametrizedHadronicVertex::~G4ParametrizedHadronicVertex()
     49{}
     50
     51G4VParticleChange*
     52G4ParametrizedHadronicVertex::ApplyYourself(G4Nucleus & theTarget,
     53                                            const G4Track &thePhoton)
    3754{   
    38     static G4ParticleChange theTotalResult;
     55  theTotalResult.Clear();
     56  theTotalResult.Initialize(thePhoton);
    3957
    40     theTotalResult.Clear();
    41     theTotalResult.ProposeLocalEnergyDeposit(0.);
    42     theTotalResult.Initialize(thePhoton);
    43     theTotalResult.ProposeTrackStatus(fAlive);
    44     G4double theKineticEnergy = thePhoton.GetKineticEnergy();
    45     G4HadFinalState * aR = 0;
    46     G4HadProjectile thePro(thePhoton);
    47     if(CLHEP::RandBit::shootBit())
     58  G4double theKineticEnergy = thePhoton.GetKineticEnergy();
     59  G4HadFinalState * aR = 0;
     60  G4HadProjectile thePro(thePhoton);
     61  if(G4UniformRand() > 0.5)
    4862    {
    4963      if(theKineticEnergy<20*GeV) aR = theLowEPionMinus->ApplyYourself(thePro, theTarget);
    5064      else aR = theHighEPionMinus->ApplyYourself(thePro, theTarget);
    5165    }
    52     else
     66  else
    5367    {
    5468      if(theKineticEnergy<20*GeV) aR = theLowEPionPlus->ApplyYourself(thePro, theTarget);
    5569      else aR = theHighEPionPlus->ApplyYourself(thePro, theTarget);
    5670    }
    57     aR->SetTrafoToLab(thePro.GetTrafoToLab());
    58     if(aR->GetStatusChange()==stopAndKill)
    59     {
    60       theTotalResult.ProposeTrackStatus(fStopAndKill);
    61       theTotalResult.ProposeEnergy( 0.0 );
    62     }
    63     if(aR->GetStatusChange()==suspend)
    64     {
    65       theTotalResult.ProposeTrackStatus(fSuspend);
    66     }
    67     if(aR->GetStatusChange()!=stopAndKill )
    68     {
    69       G4double newWeight = aR->GetWeightChange()*thePhoton.GetWeight();
    70       theTotalResult.ProposeParentWeight(newWeight);
    71       if(aR->GetEnergyChange()>-.5) theTotalResult.ProposeEnergy(aR->GetEnergyChange());
    72       G4LorentzVector newDirection(aR->GetMomentumChange().unit(), 1.);
    73       newDirection*=aR->GetTrafoToLab();
    74       theTotalResult.ProposeMomentumDirection(newDirection.vect());
    75     }
     71  if(!aR) return &theTotalResult;
    7672
    77     theTotalResult.ProposeLocalEnergyDeposit(aR->GetLocalEnergyDeposit());
    78     theTotalResult.SetNumberOfSecondaries(aR->GetNumberOfSecondaries());
     73  aR->SetTrafoToLab(thePro.GetTrafoToLab());
    7974
    80     G4ThreeVector it(0., 0., 1.);
    81     G4double what = 2.*pi*G4UniformRand();
    82     for(G4int i=0; i<aR->GetNumberOfSecondaries(); i++)
     75  G4int nsec = aR->GetNumberOfSecondaries();
     76  theTotalResult.SetNumberOfSecondaries(nsec);
     77
     78  G4ThreeVector it(0., 0., 1.);
     79  G4double what = twopi*G4UniformRand();
     80  for(G4int i=0; i<nsec; i++)
    8381    {
    8482      G4LorentzVector theM = aR->GetSecondary(i)->GetParticle()->Get4Momentum();
Note: See TracChangeset for help on using the changeset viewer.