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

update processes

Location:
trunk/source/processes/decay
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/decay/History

    r819 r961  
    1 $Id: History,v 1.28.2.1 2008/04/17 08:59:24 kurasige Exp $
     1$Id: History,v 1.34 2008/11/14 15:55:47 kurasige Exp $
    22-------------------------------------------------------------------
    33
     
    1717     * Reverse chronological order (last date on top), please *
    1818     ----------------------------------------------------------
    19 - Apr. 16,  08 H.Kurashige  (decay-V09-00-03)
     19-Sep. 19 2008   H.Kurashige (decay-V09-01-04)
     20- modify process sub type enumeration
     21
     22- Aug. 22,  08 P.Gumplinger (decay-V09-01-03)
     23- fix a bug in G4DecayWithSpin.cc: there is a memory overwrite when the
     24  GetFieldValue being called initializes a fieldValue array of size 6
     25  when the array is only defined of size 3 in the calling program.
     26  Thanks to Kamil Sedlak (PSI) for pointing this out and suggesting this
     27  fix.
     28 
     29- Apr. 16,  08 H.Kurashige  (decay-V09-01-02)
    2030- fix a bug when shortlived particles has finite  pre-assigned proper time
    2131 
     32- Apr. 11,  08 P.Gumplinger (decay-V09-01-01)
     33- modify G4DecayWithSpin::DecayIt to allow spin precession also for EM Fields;
     34  e.g. fields that do "DoesFieldChangeEnergy()" but only if the B-field
     35  component is > 0. (thanks to Kamil Sedlak, Toni Shiroka from PSI)
     36
     37- Dec. 15,  07 H.Kurashige (decay-V09-01-00)
     38- add G4DecayProcessType
     39- define process sub type
    2240
    2341- Oct. 29,  07 P.Gumplinger (decay-V09-00-02)
  • trunk/source/processes/decay/include/G4Decay.hh

    r819 r961  
    2525//
    2626//
    27 // $Id: G4Decay.hh,v 1.18 2007/07/23 23:13:04 kurasige Exp $
    28 // GEANT4 tag $Name: geant4-09-01-patch-02 $
     27// $Id: G4Decay.hh,v 1.20 2008/09/19 03:19:53 kurasige Exp $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030//
     
    5858#include "G4VRestDiscreteProcess.hh"
    5959#include "G4ParticleChangeForDecay.hh"
     60#include "G4DecayProcessType.hh"
     61
    6062class G4VExtDecayer;
    6163
     
    206208
    207209inline
    208  void G4Decay::SetExtDecayer(G4VExtDecayer* val)
    209 {
    210   pExtDecayer = val;
    211 }
    212 
    213 inline
    214210 const G4VExtDecayer* G4Decay::GetExtDecayer() const
    215211{
  • trunk/source/processes/decay/include/G4UnknownDecay.hh

    r819 r961  
    2626//
    2727// $Id: G4UnknownDecay.hh,v 1.3 2006/06/29 19:30:56 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030//
  • trunk/source/processes/decay/include/G4VExtDecayer.hh

    r819 r961  
    2626//
    2727// $Id: G4VExtDecayer.hh,v 1.4 2006/06/29 19:31:11 gunter Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: geant4-09-02-ref-02 $
    2929//
    3030//
  • 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.