Changeset 1228 for trunk/source/tracking/src
- Timestamp:
- Jan 8, 2010, 11:56:51 AM (15 years ago)
- Location:
- trunk/source/tracking/src
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/tracking/src/G4AdjointCrossSurfChecker.cc
r1197 r1228 25 25 // 26 26 // $Id: G4AdjointCrossSurfChecker.cc,v 1.2 2009/11/18 18:04:11 gcosmo Exp $ 27 // GEANT4 tag $Name: geant4-09-03 -cand-01$27 // GEANT4 tag $Name: geant4-09-03 $ 28 28 // 29 29 ///////////////////////////////////////////////////////////////////////////// -
trunk/source/tracking/src/G4AdjointSteppingAction.cc
r1197 r1228 25 25 // 26 26 // $Id: G4AdjointSteppingAction.cc,v 1.3 2009/11/20 14:24:34 ldesorgh Exp $ 27 // GEANT4 tag $Name: geant4-09-03 -cand-01$27 // GEANT4 tag $Name: geant4-09-03 $ 28 28 // 29 29 ///////////////////////////////////////////////////////////////////////////// -
trunk/source/tracking/src/G4RichTrajectory.cc
r1196 r1228 25 25 // 26 26 // 27 // $Id: G4RichTrajectory.cc,v 1. 7 2009/11/12 09:09:56 allisonExp $28 // GEANT4 tag $Name: geant4-09-03 -cand-01$27 // $Id: G4RichTrajectory.cc,v 1.8 2009/11/24 10:04:14 perl Exp $ 28 // GEANT4 tag $Name: geant4-09-03 $ 29 29 // 30 30 // --------------------------------------------------------------- … … 57 57 #endif 58 58 59 #include <sstream> 60 59 61 G4Allocator<G4RichTrajectory> aRichTrajectoryAllocator; 60 62 61 63 G4RichTrajectory::G4RichTrajectory(): 62 64 fpRichPointsContainer(0), 63 fpInitialVolume(0),64 fpInitialNextVolume(0),65 65 fpCreatorProcess(0), 66 fpEndingProcess(0), 66 67 fFinalKineticEnergy(0.) 67 68 {} … … 77 78 // RichTrajectoryPointsContainer 78 79 { 79 fpInitialVolume = aTrack->Get Volume();80 fpInitialNextVolume = aTrack->GetNext Volume();80 fpInitialVolume = aTrack->GetTouchableHandle(); 81 fpInitialNextVolume = aTrack->GetNextTouchableHandle(); 81 82 fpCreatorProcess = aTrack->GetCreatorProcess(); 83 // On construction, set final values to initial values. 84 // Final values are updated at the addition of every step - see AppendStep. 85 fpFinalVolume = aTrack->GetTouchableHandle(); 86 fpFinalNextVolume = aTrack->GetNextTouchableHandle(); 87 fpEndingProcess = aTrack->GetCreatorProcess(); 88 fFinalKineticEnergy = aTrack->GetKineticEnergy(); 89 // Insert the first rich trajectory point (see note above)... 82 90 fpRichPointsContainer = new RichTrajectoryPointsContainer; 83 // Insert the first rich trajectory point (see note above)...84 91 fpRichPointsContainer->push_back(new G4RichTrajectoryPoint(aTrack)); 85 // On construction, set final KE to initial KE.86 // Final KE is updated at the addition of every step - see AppendStep.87 fFinalKineticEnergy = aTrack->GetKineticEnergy();88 92 } 89 93 … … 94 98 fpInitialNextVolume = right.fpInitialNextVolume; 95 99 fpCreatorProcess = right.fpCreatorProcess; 100 fpFinalVolume = right.fpFinalVolume; 101 fpFinalNextVolume = right.fpFinalNextVolume; 102 fpEndingProcess = right.fpEndingProcess; 103 fFinalKineticEnergy = right.fFinalKineticEnergy; 96 104 fpRichPointsContainer = new RichTrajectoryPointsContainer; 97 fFinalKineticEnergy = right.fFinalKineticEnergy;98 105 for(size_t i=0;i<right.fpRichPointsContainer->size();i++) 99 106 { … … 121 128 fpRichPointsContainer->push_back(new G4RichTrajectoryPoint(aStep)); 122 129 // Except for first step, which is a sort of virtual step to start 123 // the track, compute the final energy. 124 if (aStep->GetTrack()->GetCurrentStepNumber() > 0) { 130 // the track, compute the final values... 131 const G4Track* track = aStep->GetTrack(); 132 const G4StepPoint* postStepPoint = aStep->GetPostStepPoint(); 133 if (track->GetCurrentStepNumber() > 0) { 134 fpFinalVolume = track->GetTouchableHandle(); 135 fpFinalNextVolume = track->GetNextTouchableHandle(); 136 fpEndingProcess = postStepPoint->GetProcessDefinedStep(); 125 137 fFinalKineticEnergy = 126 138 aStep->GetPreStepPoint()->GetKineticEnergy() - … … 158 170 G4String ID; 159 171 160 ID = "IV N";161 (*store)[ID] = G4AttDef(ID,"Initial Volume Name",162 "Physics","","G4String"); 163 164 ID = "INV N";165 (*store)[ID] = G4AttDef(ID,"Initial Next Volume Name",172 ID = "IVPath"; 173 (*store)[ID] = G4AttDef(ID,"Initial Volume Path", 174 "Physics","","G4String"); 175 176 ID = "INVPath"; 177 (*store)[ID] = G4AttDef(ID,"Initial Next Volume Path", 166 178 "Physics","","G4String"); 167 179 … … 172 184 ID = "CPTN"; 173 185 (*store)[ID] = G4AttDef(ID,"Creator Process Type Name", 186 "Physics","","G4String"); 187 188 ID = "FVPath"; 189 (*store)[ID] = G4AttDef(ID,"Final Volume Path", 190 "Physics","","G4String"); 191 192 ID = "FNVPath"; 193 (*store)[ID] = G4AttDef(ID,"Final Next Volume Path", 194 "Physics","","G4String"); 195 196 ID = "EPN"; 197 (*store)[ID] = G4AttDef(ID,"Ending Process Name", 198 "Physics","","G4String"); 199 200 ID = "EPTN"; 201 (*store)[ID] = G4AttDef(ID,"Ending Process Type Name", 174 202 "Physics","","G4String"); 175 203 … … 183 211 } 184 212 213 static G4String Path(const G4TouchableHandle& th) 214 { 215 std::ostringstream oss; 216 G4int depth = th->GetHistoryDepth(); 217 for (G4int i = depth; i >= 0; --i) { 218 oss << th->GetVolume(i)->GetName() 219 << ':' << th->GetCopyNumber(i); 220 if (i != 0) oss << '/'; 221 } 222 return oss.str(); 223 } 224 185 225 std::vector<G4AttValue>* G4RichTrajectory::CreateAttValues() const 186 226 { … … 188 228 std::vector<G4AttValue>* values = G4Trajectory::CreateAttValues(); 189 229 190 values->push_back(G4AttValue("IVN",fpInitialVolume->GetName(),"")); 191 192 values->push_back(G4AttValue("INVN",fpInitialNextVolume->GetName(),"")); 230 if (fpInitialVolume && fpInitialVolume->GetVolume()) { 231 values->push_back(G4AttValue("IVPath",Path(fpInitialVolume),"")); 232 } else { 233 values->push_back(G4AttValue("IVPath","None","")); 234 } 235 236 if (fpInitialNextVolume && fpInitialNextVolume->GetVolume()) { 237 values->push_back(G4AttValue("INVPath",Path(fpInitialNextVolume),"")); 238 } else { 239 values->push_back(G4AttValue("INVPath","None","")); 240 } 193 241 194 242 if (fpCreatorProcess) { … … 201 249 } 202 250 251 if (fpFinalVolume && fpFinalVolume->GetVolume()) { 252 values->push_back(G4AttValue("FVPath",Path(fpFinalVolume),"")); 253 } else { 254 values->push_back(G4AttValue("FVPath","None","")); 255 } 256 257 if (fpFinalNextVolume && fpFinalNextVolume->GetVolume()) { 258 values->push_back(G4AttValue("FNVPath",Path(fpFinalNextVolume),"")); 259 } else { 260 values->push_back(G4AttValue("FNVPath","None","")); 261 } 262 263 if (fpEndingProcess) { 264 values->push_back(G4AttValue("EPN",fpEndingProcess->GetProcessName(),"")); 265 G4ProcessType type = fpEndingProcess->GetProcessType(); 266 values->push_back(G4AttValue("EPTN",G4VProcess::GetProcessTypeName(type),"")); 267 } else { 268 values->push_back(G4AttValue("EPN","User Defined","")); 269 values->push_back(G4AttValue("EPTN","User","")); 270 } 271 203 272 values->push_back 204 273 (G4AttValue("FKE",G4BestUnit(fFinalKineticEnergy,"Energy"),"")); -
trunk/source/tracking/src/G4RichTrajectoryPoint.cc
r1196 r1228 25 25 // 26 26 // 27 // $Id: G4RichTrajectoryPoint.cc,v 1. 4 2009/11/12 09:09:56 allisonExp $28 // GEANT4 tag $Name: geant4-09-03 -cand-01$27 // $Id: G4RichTrajectoryPoint.cc,v 1.5 2009/11/24 10:04:14 perl Exp $ 28 // GEANT4 tag $Name: geant4-09-03 $ 29 29 // 30 30 // … … 61 61 #endif 62 62 63 #include <sstream> 64 63 65 G4Allocator<G4RichTrajectoryPoint> aRichTrajectoryPointAllocator; 64 66 … … 79 81 fpProcess(0), 80 82 fPreStepPointGlobalTime(aTrack->GetGlobalTime()), 81 fPostStepPointGlobalTime(aTrack->GetGlobalTime()) 83 fPostStepPointGlobalTime(aTrack->GetGlobalTime()), 84 fpPreStepPointVolume(aTrack->GetTouchableHandle()), 85 fpPostStepPointVolume(aTrack->GetNextTouchableHandle()) 82 86 {} 83 87 … … 97 101 fPreStepPointGlobalTime = preStepPoint->GetGlobalTime(); 98 102 fPostStepPointGlobalTime = postStepPoint->GetGlobalTime(); 103 fpPreStepPointVolume = preStepPoint->GetTouchableHandle(); 104 fpPostStepPointVolume = postStepPoint->GetTouchableHandle(); 99 105 100 106 /* … … 183 189 (*store)[ID] = G4AttDef(ID,"Post-step-point global time", 184 190 "Physics","G4BestUnit","G4double"); 191 ID = "PreVPath"; 192 (*store)[ID] = G4AttDef(ID,"Pre-step Volume Path", 193 "Physics","","G4String"); 194 ID = "PostVPath"; 195 (*store)[ID] = G4AttDef(ID,"Post-step Volume Path", 196 "Physics","","G4String"); 185 197 } 186 198 return store; 199 } 200 201 static G4String Path(const G4TouchableHandle& th) 202 { 203 std::ostringstream oss; 204 G4int depth = th->GetHistoryDepth(); 205 for (G4int i = depth; i >= 0; --i) { 206 oss << th->GetVolume(i)->GetName() 207 << ':' << th->GetCopyNumber(i); 208 if (i != 0) oss << '/'; 209 } 210 return oss.str(); 187 211 } 188 212 … … 223 247 (G4AttValue("PostT",G4BestUnit(fPostStepPointGlobalTime,"Time"),"")); 224 248 249 if (fpPreStepPointVolume && fpPreStepPointVolume->GetVolume()) { 250 values->push_back(G4AttValue("PreVPath",Path(fpPreStepPointVolume),"")); 251 } else { 252 values->push_back(G4AttValue("PreVPath","None","")); 253 } 254 255 if (fpPostStepPointVolume && fpPostStepPointVolume->GetVolume()) { 256 values->push_back(G4AttValue("PostVPath",Path(fpPostStepPointVolume),"")); 257 } else { 258 values->push_back(G4AttValue("PostVPath","None","")); 259 } 260 225 261 #ifdef G4ATTDEBUG 226 262 G4cout << G4AttCheck(values,GetAttDefs()); -
trunk/source/tracking/src/G4SmoothTrajectory.cc
r1196 r1228 26 26 // 27 27 // $Id: G4SmoothTrajectory.cc,v 1.19 2009/11/12 09:09:56 allison Exp $ 28 // GEANT4 tag $Name: geant4-09-03 -cand-01$28 // GEANT4 tag $Name: geant4-09-03 $ 29 29 // 30 30 // -
trunk/source/tracking/src/G4SmoothTrajectoryPoint.cc
r1196 r1228 26 26 // 27 27 // $Id: G4SmoothTrajectoryPoint.cc,v 1.15 2006/06/29 21:16:01 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-03 -cand-01$28 // GEANT4 tag $Name: geant4-09-03 $ 29 29 // 30 30 // -
trunk/source/tracking/src/G4SteppingManager.cc
r1196 r1228 26 26 // 27 27 // $Id: G4SteppingManager.cc,v 1.50 2009/02/27 08:09:50 tsasaki Exp $ 28 // GEANT4 tag $Name: geant4-09-03 -cand-01$28 // GEANT4 tag $Name: geant4-09-03 $ 29 29 // 30 30 //--------------------------------------------------------------- -
trunk/source/tracking/src/G4SteppingManager2.cc
r1196 r1228 26 26 // 27 27 // $Id: G4SteppingManager2.cc,v 1.37 2009/09/25 00:23:41 gum Exp $ 28 // GEANT4 tag $Name: geant4-09-03 -cand-01$28 // GEANT4 tag $Name: geant4-09-03 $ 29 29 // 30 30 //--------------------------------------------------------------- -
trunk/source/tracking/src/G4SteppingVerbose.cc
r1196 r1228 26 26 // 27 27 // $Id: G4SteppingVerbose.cc,v 1.23 2006/07/14 14:13:57 tsasaki Exp $ 28 // GEANT4 tag $Name: geant4-09-03 -cand-01$28 // GEANT4 tag $Name: geant4-09-03 $ 29 29 // 30 30 //--------------------------------------------------------------- -
trunk/source/tracking/src/G4TrackingManager.cc
r1196 r1228 26 26 // 27 27 // $Id: G4TrackingManager.cc,v 1.22 2006/11/14 10:58:47 tsasaki Exp $ 28 // GEANT4 tag $Name: geant4-09-03 -cand-01$28 // GEANT4 tag $Name: geant4-09-03 $ 29 29 // 30 30 //--------------------------------------------------------------- -
trunk/source/tracking/src/G4TrackingMessenger.cc
r1196 r1228 26 26 // 27 27 // $Id: G4TrackingMessenger.cc,v 1.15 2006/11/03 11:13:38 allison Exp $ 28 // GEANT4 tag $Name: geant4-09-03 -cand-01$28 // GEANT4 tag $Name: geant4-09-03 $ 29 29 // 30 30 //--------------------------------------------------------------- -
trunk/source/tracking/src/G4Trajectory.cc
r1196 r1228 26 26 // 27 27 // $Id: G4Trajectory.cc,v 1.33 2009/11/12 09:09:56 allison Exp $ 28 // GEANT4 tag $Name: geant4-09-03 -cand-01$28 // GEANT4 tag $Name: geant4-09-03 $ 29 29 // 30 30 // --------------------------------------------------------------- -
trunk/source/tracking/src/G4TrajectoryPoint.cc
r1196 r1228 26 26 // 27 27 // $Id: G4TrajectoryPoint.cc,v 1.19 2006/06/29 21:16:15 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-03 -cand-01$28 // GEANT4 tag $Name: geant4-09-03 $ 29 29 // 30 30 // --------------------------------------------------------------- -
trunk/source/tracking/src/G4UserSteppingAction.cc
r1196 r1228 26 26 // 27 27 // $Id: G4UserSteppingAction.cc,v 1.10 2006/06/29 21:16:17 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-03 -cand-01$28 // GEANT4 tag $Name: geant4-09-03 $ 29 29 // 30 30 // --------------------------------------------------------------- -
trunk/source/tracking/src/G4UserTrackingAction.cc
r1196 r1228 26 26 // 27 27 // $Id: G4UserTrackingAction.cc,v 1.10 2006/06/29 21:16:19 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-03 -cand-01$28 // GEANT4 tag $Name: geant4-09-03 $ 29 29 // 30 30 // --------------------------------------------------------------- -
trunk/source/tracking/src/G4VSteppingVerbose.cc
r1196 r1228 26 26 // 27 27 // $Id: G4VSteppingVerbose.cc,v 1.18 2006/11/14 10:58:47 tsasaki Exp $ 28 // GEANT4 tag $Name: geant4-09-03 -cand-01$28 // GEANT4 tag $Name: geant4-09-03 $ 29 29 // 30 30 //--------------------------------------------------------------- -
trunk/source/tracking/src/G4VTrajectory.cc
r1196 r1228 26 26 // 27 27 // $Id: G4VTrajectory.cc,v 1.12 2006/10/16 13:45:01 allison Exp $ 28 // GEANT4 tag $Name: geant4-09-03 -cand-01$28 // GEANT4 tag $Name: geant4-09-03 $ 29 29 // 30 30 // --------------------------------------------------------------- -
trunk/source/tracking/src/G4VTrajectoryPoint.cc
r1196 r1228 26 26 // 27 27 // $Id: G4VTrajectoryPoint.cc,v 1.4 2006/06/29 21:16:26 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-03 -cand-01$28 // GEANT4 tag $Name: geant4-09-03 $ 29 29 // 30 30 //---------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.