Changeset 961 for trunk/source/processes/decay/src/G4DecayWithSpin.cc
- Timestamp:
- Apr 6, 2009, 12:21:12 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/decay/src/G4DecayWithSpin.cc
r819 r961 29 29 // History: 30 30 // 17 August 2004 P. Gumplinger, T. MacPhail 31 // 11 April 2008 Kamil Sedlak (PSI), Toni Shiroka (PSI) 31 32 // ------------------------------------------------------------ 32 33 // … … 47 48 #include "G4Transform3D.hh" 48 49 49 G4DecayWithSpin::G4DecayWithSpin(const G4String& processName):G4Decay(processName){} 50 G4DecayWithSpin::G4DecayWithSpin(const G4String& processName):G4Decay(processName) 51 { 52 // set Process Sub Type 53 SetProcessSubType(static_cast<int>(DECAY_WithSpin)); 54 55 } 50 56 51 57 G4DecayWithSpin::~G4DecayWithSpin(){} … … 97 103 if(fieldMgr)field = fieldMgr->GetDetectorField(); 98 104 99 if (field && !(fieldMgr->DoesFieldChangeEnergy())) {105 if (field) { 100 106 101 107 G4double point[4]; … … 105 111 point[3] = aTrack.GetGlobalTime(); 106 112 107 G4double fieldValue[ 3];113 G4double fieldValue[6]; 108 114 field -> GetFieldValue(point,fieldValue); 109 115 110 116 G4ThreeVector B(fieldValue[0],fieldValue[1],fieldValue[2]); 111 117 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); 113 121 114 122 }
Note: See TracChangeset
for help on using the changeset viewer.