Ignore:
Timestamp:
Apr 6, 2009, 12:21:12 PM (15 years ago)
Author:
garnier
Message:

update processes

Location:
trunk/source/processes/decay/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/decay/src/G4Decay.cc

    r819 r961  
    2525//
    2626//
    27 // $Id: G4Decay.cc,v 1.27.2.1 2008/04/17 08:59:24 kurasige Exp $
    28 // GEANT4 tag $Name: geant4-09-01-patch-02 $
     27// $Id: G4Decay.cc,v 1.30 2008/09/19 03:19:53 kurasige Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030//
     
    6464                                pExtDecayer(0)
    6565{
     66  // set Process Sub Type
     67  SetProcessSubType(static_cast<int>(DECAY));
     68
    6669#ifdef G4VERBOSE
    6770  if (GetVerboseLevel()>1) {
     
    6972  }
    7073#endif
     74
    7175  pParticleChange = &fParticleChangeForDecay;
    7276}
     
    404408    fRemainderLifeTime = pTime - track.GetProperTime();
    405409    if (fRemainderLifeTime <= 0.0) fRemainderLifeTime = DBL_MIN;
     410   
    406411    G4double  rvalue=0.0;
    407412    // use pre-assigned Decay time to determine PIL
    408413    if (aLife>0.0) {
    409414      // ordinary particle
    410       rvalue = (fRemainderLifeTime/aLife)*GetMeanFreePath(track, previousStepSize
    411 , condition);
     415      rvalue = (fRemainderLifeTime/aLife)*GetMeanFreePath(track, previousStepSize, condition);
    412416    } else {
    413417     // shortlived particle
     
    418422    }
    419423    return rvalue;
    420  
    421424  }
    422425}
     
    440443  return fRemainderLifeTime;
    441444}
     445
     446
     447void G4Decay::SetExtDecayer(G4VExtDecayer* val)
     448{
     449  pExtDecayer = val;
     450
     451  // set Process Sub Type
     452  if ( pExtDecayer !=0 ) {
     453    SetProcessSubType(static_cast<int>(DECAY_External));
     454  }
     455}
  • trunk/source/processes/decay/src/G4DecayWithSpin.cc

    r819 r961  
    2929//      History:
    3030//      17 August 2004  P. Gumplinger, T. MacPhail
     31//      11 April  2008  Kamil Sedlak (PSI), Toni Shiroka (PSI)
    3132// ------------------------------------------------------------
    3233//
     
    4748#include "G4Transform3D.hh"
    4849
    49 G4DecayWithSpin::G4DecayWithSpin(const G4String& processName):G4Decay(processName){}
     50G4DecayWithSpin::G4DecayWithSpin(const G4String& processName):G4Decay(processName)
     51{
     52  // set Process Sub Type   
     53  SetProcessSubType(static_cast<int>(DECAY_WithSpin));
     54
     55}
    5056
    5157G4DecayWithSpin::~G4DecayWithSpin(){}
     
    97103    if(fieldMgr)field = fieldMgr->GetDetectorField();
    98104
    99     if (field && !(fieldMgr->DoesFieldChangeEnergy())) {
     105    if (field) {
    100106
    101107       G4double point[4];
     
    105111       point[3] = aTrack.GetGlobalTime();
    106112
    107        G4double fieldValue[3];
     113       G4double fieldValue[6];
    108114       field -> GetFieldValue(point,fieldValue);
    109115
    110116       G4ThreeVector B(fieldValue[0],fieldValue[1],fieldValue[2]);
    111117
    112        parent_polarization = Spin_Precession(aStep,B,fRemainderLifeTime);
     118       // Call the spin precession only for non-zero mag. field
     119       if (B.mag2() > 0.) parent_polarization =
     120                                 Spin_Precession(aStep,B,fRemainderLifeTime);
    113121
    114122    }
  • trunk/source/processes/decay/src/G4PionDecayMakeSpin.cc

    r819 r961  
    3737
    3838G4PionDecayMakeSpin::G4PionDecayMakeSpin(const G4String& processName)
    39                                : G4Decay(processName) { }
     39                               : G4Decay(processName)
     40{
     41  // set Process Sub Type
     42  SetProcessSubType(static_cast<int>(DECAY_PionMakeSpin));
     43
     44}
    4045
    4146G4PionDecayMakeSpin::~G4PionDecayMakeSpin() { }
  • trunk/source/processes/decay/src/G4UnknownDecay.cc

    r819 r961  
    2525//
    2626//
    27 // $Id: G4UnknownDecay.cc,v 1.5 2007/10/06 07:01:09 kurasige Exp $
    28 // GEANT4 tag $Name: geant4-09-01-patch-02 $
     27// $Id: G4UnknownDecay.cc,v 1.6 2007/12/15 12:29:16 kurasige Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030//
     
    4040#include "G4PhysicsLogVector.hh"
    4141#include "G4ParticleChangeForDecay.hh"
     42#include "G4DecayProcessType.hh"
     43
    4244
    4345// constructor
     
    4749                                HighestValue(20.0)
    4850{
     51  // set Process Sub Type
     52  SetProcessSubType(static_cast<int>(DECAY_Unknown));
     53
    4954#ifdef G4VERBOSE
    5055  if (GetVerboseLevel()>1) {
Note: See TracChangeset for help on using the changeset viewer.