Import Geant4 8.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 14:55:03 +02:00
parent 216a75eeb1
commit fe73f43734
6714 changed files with 118229 additions and 68144 deletions
+41 -2
View File
@@ -1,5 +1,5 @@
$Id: History,v 1.105 2006/06/15 15:42:45 gcosmo Exp $
$Name: geant4-08-01 $
$Id: History,v 1.117 2006/11/14 11:12:55 tsasaki Exp $
$Name: geant4-08-02 $
-------------------------------------------------------------------
=========================================================
@@ -18,6 +18,45 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
13 November 2006 T.Sasaki (tracking-V08-01-06)
- Removed G4VSteppingVerbose::TrackBanner() and add new methed
G4TrackingManager::TrackBanner() for the fix.
04 November 2006 M.Asai
- Added new method G4VSteppingVerbose::TrackBanner() and moved the
hard-coded verbosity in G4TrackingManager to this method. Also
modified G4SteppingManager to invoke this new method.
3rd November 2006 J.Allison (tracking-V08-01-05)
- Augmented /tracking/storeTrajectory. Now takes integer parameter:
0 : Don't Store trajectories.
!=0 : Store trajectories.
1 : Choose G4Trajectory as default.
2 : Choose G4SmoothTrajectory as default.
3 : Choose G4RichTrajectory as default.
16 October 2006 J.Allison
- All trajectories:
o Protect points container pointer in destructor.
o Make G4AttDef descriptions more concise.
- G4RichTrajectory:
o Bug fix: Create G4AttValues for user-defined creator process.
- G4VTrajectory: Improved ShowTrajectory.
27 September 2006 M.Asai (tracking-V08-01-04)
- Fix in G4SteppingManager for the treatment of trajectory update
- According fixes in the trajectory classes.
14 August 2006 M.Asai (tracking-V08-01-03)
- Fix "double-deletion" in the destructor of G4SteppingManager.
13 July 2006 T.sasaki (tracking-V08-01-02)
- Fix on G4StepingVerbose for ForceConditions
09 June 2006 T. Sasaki
- Secondary vector is now owned by G4Step and G4TrackVector class has
been moved in the track category
15 June 2006 G. Cosmo (tracking-V08-00-04)
- Fixed implementation of static methods in G4VSteppingVerbose to be
NOT inline. Required also to allow DLL working on Windows !
+1 -1
View File
@@ -25,7 +25,7 @@
//
//
// $Id: G4RichTrajectory.hh,v 1.4 2006/06/29 21:15:23 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// GEANT4 tag $Name: geant4-08-02 $
//
//---------------------------------------------------------------
//
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4RichTrajectoryPoint.hh,v 1.4 2006/06/29 21:15:25 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// $Id: G4RichTrajectoryPoint.hh,v 1.5 2006/09/27 20:42:52 asaim Exp $
// GEANT4 tag $Name: geant4-08-02 $
//
//---------------------------------------------------------------
//
@@ -37,8 +37,10 @@
// 1) Position (end of step).
// The extended information, only publicly accessible through AttValues,
// includes:
// 2) Total energy deposit.
// 3) Procees defining end of step.
// 2) Auxiliary points, as in G4SmoothTrajectory.
// 3) Total energy deposit.
// 4) Procees defining end of step.
// 5) Global time (from start of event) at pre- amd post-step.
//
// Contact:
// Questions and comments to this code should be sent to
@@ -56,6 +58,9 @@
#include "G4TrajectoryPoint.hh"
#include "G4ThreeVector.hh"
#include <vector>
class G4Track;
class G4Step;
class G4VProcess;
@@ -67,16 +72,20 @@ public: // without description
// Constructor/Destructor
G4RichTrajectoryPoint();
G4RichTrajectoryPoint(const G4Track*);
G4RichTrajectoryPoint(const G4Step*);
G4RichTrajectoryPoint(const G4Track*); // For first point.
G4RichTrajectoryPoint(const G4Step*); // For subsequent points.
G4RichTrajectoryPoint(const G4RichTrajectoryPoint &right);
virtual ~G4RichTrajectoryPoint();
// Get/Set functions
const std::vector<G4ThreeVector>* GetAuxiliaryPoints() const
{ return fpAuxiliaryPointVector; }
// Operators
inline void *operator new(size_t);
inline void operator delete(void *aRichTrajectoryPoint);
inline int operator==(const G4RichTrajectoryPoint& right) const
{ return (this==&right); };
{ return (this==&right); }
// Get methods for HepRep style attributes
virtual const std::map<G4String,G4AttDef>* GetAttDefs() const;
@@ -85,8 +94,11 @@ public: // without description
private:
// Extended member data
std::vector<G4ThreeVector>* fpAuxiliaryPointVector;
G4double fTotEDep;
const G4VProcess* fpProcess;
G4double fPreStepPointGlobalTime;
G4double fPostStepPointGlobalTime;
};
#if defined G4TRACKING_ALLOC_EXPORT
@@ -25,7 +25,7 @@
//
//
// $Id: G4SmoothTrajectory.hh,v 1.11 2006/06/29 21:15:27 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// GEANT4 tag $Name: geant4-08-02 $
//
//---------------------------------------------------------------
//
@@ -25,7 +25,7 @@
//
//
// $Id: G4SmoothTrajectoryPoint.hh,v 1.13 2006/06/29 21:15:29 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// GEANT4 tag $Name: geant4-08-02 $
//
//---------------------------------------------------------------
//
+4 -4
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4SteppingManager.hh,v 1.27.2.1 2006/06/29 21:15:31 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// $Id: G4SteppingManager.hh,v 1.29 2006/12/13 15:49:47 gunter Exp $
// GEANT4 tag $Name: geant4-08-02 $
//
//---------------------------------------------------------------
//
@@ -343,7 +343,7 @@ public: //without description
}
inline G4TrackVector* G4SteppingManager::GetfSecondary(){
return fSecondary;
return fStep->GetfSecondary();
}
inline G4Step* G4SteppingManager::GetfStep(){
return fStep;
@@ -457,7 +457,7 @@ public: //without description
}
inline G4TrackVector* G4SteppingManager::GetSecondary() const {
return fSecondary;
return fStep->GetSecondary();
}
inline void G4SteppingManager::SetNavigator(G4Navigator* value){
+1 -1
View File
@@ -25,7 +25,7 @@
//
//
// $Id: G4SteppingVerbose.hh,v 1.12 2006/06/29 21:15:33 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// GEANT4 tag $Name: geant4-08-02 $
//
//---------------------------------------------------------------
//
-57
View File
@@ -1,57 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// $Id: G4TrackVector.hh,v 1.11.2.1 2006/06/29 21:15:35 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
//
//---------------------------------------------------------------
//
// G4TrackVector.hh
//
// class description:
// This class keeps a List of G4Track objects. It is implemented
// as a RougeWave pointer ordered vector.
//
// Contact:
// Questions and comments to this code should be sent to
// Katsuya Amako (e-mail: Katsuya.Amako@kek.jp)
// Takashi Sasaki (e-mail: Takashi.Sasaki@kek.jp)
//
//---------------------------------------------------------------
#ifndef G4TrackVector_h
#define G4TrackVector_h 1
#include <vector>
#include "G4Track.hh" // Include form 'tracking'
///////////////////////////////////////////////////
typedef std::vector<G4Track*> G4TrackVector;
///////////////////////////////////////////////////
#endif
+10 -13
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4TrackingManager.hh,v 1.18 2006/06/29 21:15:37 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// $Id: G4TrackingManager.hh,v 1.21 2006/11/14 10:58:47 tsasaki Exp $
// GEANT4 tag $Name: geant4-08-02 $
//
//---------------------------------------------------------------
//
@@ -90,8 +90,8 @@ public: // without description
G4Track* GetTrack() const;
G4bool GetStoreTrajectory() const;
void SetStoreTrajectory(G4bool value);
G4int GetStoreTrajectory() const;
void SetStoreTrajectory(G4int value);
G4SteppingManager* GetSteppingManager() const;
@@ -133,22 +133,19 @@ public: // without description
private:
//---------
// Member functions
void Verbose(G4String select);
// Output messages according to the current value of the
// Verbose level.
// Member data
G4Track* fpTrack;
G4SteppingManager* fpSteppingManager;
G4UserTrackingAction* fpUserTrackingAction;
G4VTrajectory* fpTrajectory;
G4bool StoreTrajectory;
G4int StoreTrajectory;
G4int verboseLevel;
G4TrackingMessenger* messenger;
G4bool EventIsAborted;
// verbose
void TrackBanner();
};
@@ -162,11 +159,11 @@ public: // without description
return fpTrack;
}
inline G4bool G4TrackingManager::GetStoreTrajectory() const {
inline G4int G4TrackingManager::GetStoreTrajectory() const {
return StoreTrajectory;
}
inline void G4TrackingManager::SetStoreTrajectory(G4bool value){
inline void G4TrackingManager::SetStoreTrajectory(G4int value){
StoreTrajectory = value;
}
@@ -25,7 +25,7 @@
//
//
// $Id: G4TrackingMessenger.hh,v 1.10 2006/06/29 21:15:39 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// GEANT4 tag $Name: geant4-08-02 $
//
//---------------------------------------------------------------
//
+1 -1
View File
@@ -25,7 +25,7 @@
//
//
// $Id: G4Trajectory.hh,v 1.24 2006/06/29 21:15:41 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// GEANT4 tag $Name: geant4-08-02 $
//
//---------------------------------------------------------------
//
+1 -1
View File
@@ -25,7 +25,7 @@
//
//
// $Id: G4TrajectoryPoint.hh,v 1.17 2006/06/29 21:15:43 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// GEANT4 tag $Name: geant4-08-02 $
//
//---------------------------------------------------------------
//
@@ -25,7 +25,7 @@
//
//
// $Id: G4UserSteppingAction.hh,v 1.12 2006/06/29 21:15:45 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// GEANT4 tag $Name: geant4-08-02 $
//
//---------------------------------------------------------------
//
@@ -25,7 +25,7 @@
//
//
// $Id: G4UserTrackingAction.hh,v 1.11 2006/06/29 21:15:47 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// GEANT4 tag $Name: geant4-08-02 $
//
//
//---------------------------------------------------------------
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4VSteppingVerbose.hh,v 1.22 2006/06/29 21:15:49 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// $Id: G4VSteppingVerbose.hh,v 1.24 2006/11/14 10:58:47 tsasaki Exp $
// GEANT4 tag $Name: geant4-08-02 $
//
//---------------------------------------------------------------
//
+1 -1
View File
@@ -25,7 +25,7 @@
//
//
// $Id: G4VTrajectory.hh,v 1.17 2006/06/29 21:15:51 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// GEANT4 tag $Name: geant4-08-02 $
//
//---------------------------------------------------------------
//
@@ -25,7 +25,7 @@
//
//
// $Id: G4VTrajectoryPoint.hh,v 1.15 2006/06/29 21:15:53 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// GEANT4 tag $Name: geant4-08-02 $
//
//---------------------------------------------------------------
//
+25 -14
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4RichTrajectory.cc,v 1.4 2006/06/29 21:15:55 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// $Id: G4RichTrajectory.cc,v 1.6 2006/10/16 13:43:43 allison Exp $
// GEANT4 tag $Name: geant4-08-02 $
//
// ---------------------------------------------------------------
//
@@ -57,7 +57,12 @@
G4Allocator<G4RichTrajectory> aRichTrajectoryAllocator;
G4RichTrajectory::G4RichTrajectory() {}
G4RichTrajectory::G4RichTrajectory():
fpRichPointsContainer(0),
fpInitialVolume(0),
fpInitialNextVolume(0),
fpCreatorProcess(0)
{}
G4RichTrajectory::G4RichTrajectory(const G4Track* aTrack):
G4Trajectory(aTrack) // Note: this initialises the base class data
@@ -94,14 +99,15 @@ G4RichTrajectory::G4RichTrajectory(G4RichTrajectory & right):
G4RichTrajectory::~G4RichTrajectory()
{
// fpRichPointsContainer->clearAndDestroy();
size_t i;
for(i=0;i<fpRichPointsContainer->size();i++){
delete (*fpRichPointsContainer)[i];
if (fpRichPointsContainer) {
// fpRichPointsContainer->clearAndDestroy();
size_t i;
for(i=0;i<fpRichPointsContainer->size();i++){
delete (*fpRichPointsContainer)[i];
}
fpRichPointsContainer->clear();
delete fpRichPointsContainer;
}
fpRichPointsContainer->clear();
delete fpRichPointsContainer;
}
void G4RichTrajectory::AppendStep(const G4Step* aStep)
@@ -133,25 +139,26 @@ const std::map<G4String,G4AttDef>* G4RichTrajectory::GetAttDefs() const
= G4AttDefStore::GetInstance("G4RichTrajectory",isNew);
if (isNew) {
// Get att defs from base class...
*store = *(G4Trajectory::GetAttDefs());
G4String ID;
ID = "IVN";
(*store)[ID] = G4AttDef(ID,"Initial Volume Name",
"Bookkeeping","","G4String");
"Physics","","G4String");
ID = "INVN";
(*store)[ID] = G4AttDef(ID,"Initial Next Volume Name",
"Bookkeeping","","G4String");
"Physics","","G4String");
ID = "CPN";
(*store)[ID] = G4AttDef(ID,"Creator Process Name",
"Bookkeeping","","G4String");
"Physics","","G4String");
ID = "CPTN";
(*store)[ID] = G4AttDef(ID,"Creator Process Type Name",
"Bookkeeping","","G4String");
"Physics","","G4String");
}
@@ -160,6 +167,7 @@ const std::map<G4String,G4AttDef>* G4RichTrajectory::GetAttDefs() const
std::vector<G4AttValue>* G4RichTrajectory::CreateAttValues() const
{
// Create base class att values...
std::vector<G4AttValue>* values = G4Trajectory::CreateAttValues();
values->push_back(G4AttValue("IVN",fpInitialVolume->GetName(),""));
@@ -170,6 +178,9 @@ std::vector<G4AttValue>* G4RichTrajectory::CreateAttValues() const
values->push_back(G4AttValue("CPN",fpCreatorProcess->GetProcessName(),""));
G4ProcessType type = fpCreatorProcess->GetProcessType();
values->push_back(G4AttValue("CPTN",G4VProcess::GetProcessTypeName(type),""));
} else {
values->push_back(G4AttValue("CPN","User Defined",""));
values->push_back(G4AttValue("CPTN","User",""));
}
#ifdef G4ATTDEBUG
+90 -11
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4RichTrajectoryPoint.cc,v 1.2 2006/06/29 21:15:57 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// $Id: G4RichTrajectoryPoint.cc,v 1.3 2006/09/27 20:42:52 asaim Exp $
// GEANT4 tag $Name: geant4-08-02 $
//
//
// ---------------------------------------------------------------
@@ -63,29 +63,82 @@
G4Allocator<G4RichTrajectoryPoint> aRichTrajectoryPointAllocator;
G4RichTrajectoryPoint::G4RichTrajectoryPoint():
fpAuxiliaryPointVector(0),
fTotEDep(0.),
fpProcess(0)
fpProcess(0),
fPreStepPointGlobalTime(0),
fPostStepPointGlobalTime(0)
{}
G4RichTrajectoryPoint::G4RichTrajectoryPoint(const G4Track* aTrack):
G4TrajectoryPoint(aTrack->GetPosition()),
fpAuxiliaryPointVector(0),
fTotEDep(0.),
fpProcess(0)
fpProcess(0),
fPreStepPointGlobalTime(aTrack->GetGlobalTime()),
fPostStepPointGlobalTime(aTrack->GetGlobalTime())
{}
G4RichTrajectoryPoint::G4RichTrajectoryPoint(const G4Step* aStep):
G4TrajectoryPoint(aStep->GetPostStepPoint()->GetPosition()),
fTotEDep(aStep->GetTotalEnergyDeposit()),
fpProcess(aStep->GetPostStepPoint()->GetProcessDefinedStep())
{}
fpAuxiliaryPointVector(aStep->GetPointerToVectorOfAuxiliaryPoints()),
fTotEDep(aStep->GetTotalEnergyDeposit())
{
G4StepPoint* preStepPoint = aStep->GetPreStepPoint();
G4StepPoint* postStepPoint = aStep->GetPostStepPoint();
fpProcess = postStepPoint->GetProcessDefinedStep();
fPreStepPointGlobalTime = preStepPoint->GetGlobalTime();
fPostStepPointGlobalTime = postStepPoint->GetGlobalTime();
/*
G4cout << "fpAuxiliaryPointVector "
<< (void*) fpAuxiliaryPointVector;
G4cout << ": ";
if (fpAuxiliaryPointVector) {
G4cout << "size: " << fpAuxiliaryPointVector->size();
for (size_t i = 0; i < fpAuxiliaryPointVector->size(); ++i)
G4cout << "\n " << (*fpAuxiliaryPointVector)[i];
} else {
G4cout << "non-existent";
}
G4cout << G4endl;
static const G4Step* lastStep = 0;
if (aStep && aStep == lastStep) {
G4cout << "********* aStep is same as last" << G4endl;
}
lastStep = aStep;
static std::vector<G4ThreeVector>* lastAuxiliaryPointVector = 0;
if (fpAuxiliaryPointVector &&
fpAuxiliaryPointVector == lastAuxiliaryPointVector) {
G4cout << "********* fpAuxiliaryPointVector is same as last" << G4endl;
}
lastAuxiliaryPointVector = fpAuxiliaryPointVector;
*/
}
G4RichTrajectoryPoint::G4RichTrajectoryPoint
(const G4RichTrajectoryPoint &right):
G4TrajectoryPoint(right)
G4TrajectoryPoint(right),
fpAuxiliaryPointVector(right.fpAuxiliaryPointVector),
fTotEDep(right.fTotEDep),
fpProcess(right.fpProcess),
fPreStepPointGlobalTime(right.fPreStepPointGlobalTime),
fPostStepPointGlobalTime(right.fPostStepPointGlobalTime)
{}
G4RichTrajectoryPoint::~G4RichTrajectoryPoint()
{}
{
if(fpAuxiliaryPointVector) {
/*
G4cout << "Deleting fpAuxiliaryPointVector at "
<< (void*) fpAuxiliaryPointVector
<< G4endl;
*/
delete fpAuxiliaryPointVector;
}
}
const std::map<G4String,G4AttDef>*
G4RichTrajectoryPoint::GetAttDefs() const
@@ -94,27 +147,47 @@ G4RichTrajectoryPoint::GetAttDefs() const
std::map<G4String,G4AttDef>* store
= G4AttDefStore::GetInstance("G4RichTrajectoryPoint",isNew);
if (isNew) {
// Copy base class att defs...
*store = *(G4TrajectoryPoint::GetAttDefs());
G4String ID;
ID = "Aux";
(*store)[ID] = G4AttDef(ID, "Auxiliary Point Position",
"Physics","G4BestUnit","G4ThreeVector");
ID = "TED";
(*store)[ID] = G4AttDef(ID,"Total Energy Deposit",
"Physics","G4BestUnit","G4double");
ID = "PDS";
(*store)[ID] = G4AttDef(ID,"Process Defined Step",
"Bookkeeping","","G4String");
"Physics","","G4String");
ID = "PTDS";
(*store)[ID] = G4AttDef(ID,"Process Type Defined Step",
"Bookkeeping","","G4String");
"Physics","","G4String");
ID = "PreT";
(*store)[ID] = G4AttDef(ID,"Pre-step-point global time",
"Physics","G4BestUnit","G4double");
ID = "PostT";
(*store)[ID] = G4AttDef(ID,"Post-step-point global time",
"Physics","G4BestUnit","G4double");
}
return store;
}
std::vector<G4AttValue>* G4RichTrajectoryPoint::CreateAttValues() const
{
// Create base class att values...
std::vector<G4AttValue>* values = G4TrajectoryPoint::CreateAttValues();
if (fpAuxiliaryPointVector) {
std::vector<G4ThreeVector>::iterator iAux;
for (iAux = fpAuxiliaryPointVector->begin();
iAux != fpAuxiliaryPointVector->end(); ++iAux) {
values->push_back(G4AttValue("Aux",G4BestUnit(*iAux,"Length"),""));
}
}
values->push_back(G4AttValue("TED",G4BestUnit(fTotEDep,"Energy"),""));
if (fpProcess) {
@@ -130,6 +203,12 @@ std::vector<G4AttValue>* G4RichTrajectoryPoint::CreateAttValues() const
values->push_back(G4AttValue("PTDS","User",""));
}
values->push_back
(G4AttValue("PreT",G4BestUnit(fPreStepPointGlobalTime,"Time"),""));
values->push_back
(G4AttValue("PostT",G4BestUnit(fPostStepPointGlobalTime,"Time"),""));
#ifdef G4ATTDEBUG
G4cout << G4AttCheck(values,GetAttDefs());
#endif
+15 -14
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4SmoothTrajectory.cc,v 1.16 2006/06/29 21:15:59 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// $Id: G4SmoothTrajectory.cc,v 1.18 2006/10/16 13:37:17 allison Exp $
// GEANT4 tag $Name: geant4-08-02 $
//
//
// ---------------------------------------------------------------
@@ -99,14 +99,15 @@ G4SmoothTrajectory::G4SmoothTrajectory(G4SmoothTrajectory & right):G4VTrajectory
G4SmoothTrajectory::~G4SmoothTrajectory()
{
// positionRecord->clearAndDestroy();
size_t i;
for(i=0;i<positionRecord->size();i++){
delete (*positionRecord)[i];
if (positionRecord) {
// positionRecord->clearAndDestroy();
size_t i;
for(i=0;i<positionRecord->size();i++){
delete (*positionRecord)[i];
}
positionRecord->clear();
delete positionRecord;
}
positionRecord->clear();
delete positionRecord;
}
void G4SmoothTrajectory::ShowTrajectory(std::ostream& os) const
@@ -131,19 +132,19 @@ const std::map<G4String,G4AttDef>* G4SmoothTrajectory::GetAttDefs() const
if (isNew) {
G4String ID("ID");
(*store)[ID] = G4AttDef(ID,"Track ID","Bookkeeping","","G4int");
(*store)[ID] = G4AttDef(ID,"Track ID","Physics","","G4int");
G4String PID("PID");
(*store)[PID] = G4AttDef(PID,"Parent ID","Bookkeeping","","G4int");
(*store)[PID] = G4AttDef(PID,"Parent ID","Physics","","G4int");
G4String PN("PN");
(*store)[PN] = G4AttDef(PN,"Particle Name","Bookkeeping","","G4String");
(*store)[PN] = G4AttDef(PN,"Particle Name","Physics","","G4String");
G4String Ch("Ch");
(*store)[Ch] = G4AttDef(Ch,"Charge","Physics","e+","G4double");
G4String PDG("PDG");
(*store)[PDG] = G4AttDef(PDG,"PDG Encoding","Bookkeeping","","G4int");
(*store)[PDG] = G4AttDef(PDG,"PDG Encoding","Physics","","G4int");
G4String IMom("IMom");
(*store)[IMom] = G4AttDef(IMom, "Momentum of track at start of trajectory",
@@ -155,7 +156,7 @@ const std::map<G4String,G4AttDef>* G4SmoothTrajectory::GetAttDefs() const
"Physics","G4BestUnit","G4double");
G4String NTP("NTP");
(*store)[NTP] = G4AttDef(NTP,"No. of points","Bookkeeping","","G4int");
(*store)[NTP] = G4AttDef(NTP,"No. of points","Physics","","G4int");
}
return store;
@@ -25,7 +25,7 @@
//
//
// $Id: G4SmoothTrajectoryPoint.cc,v 1.15 2006/06/29 21:16:01 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// GEANT4 tag $Name: geant4-08-02 $
//
//
// ---------------------------------------------------------------
+9 -4
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4SteppingManager.cc,v 1.37.2.1 2006/06/29 21:16:03 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// $Id: G4SteppingManager.cc,v 1.44 2006/12/13 15:49:49 gunter Exp $
// GEANT4 tag $Name: geant4-08-02 $
//
//---------------------------------------------------------------
//
@@ -59,8 +59,8 @@ G4SteppingManager::G4SteppingManager()
{
// Construct simple 'has-a' related objects
fSecondary = new G4TrackVector();
fStep = new G4Step();
fSecondary = fStep->NewSecondaryVector();
fPreStepPoint = fStep->GetPreStepPoint();
fPostStepPoint = fStep->GetPostStepPoint();
#ifdef G4VERBOSE
@@ -99,7 +99,8 @@ G4SteppingManager::~G4SteppingManager()
{
// Destruct simple 'has-a' objects
delete fSecondary;
fStep->DeleteSecondaryVector();
/////////////////////////// delete fSecondary;
delete fStep;
delete fSelectedAtRestDoItVector;
delete fSelectedAlongStepDoItVector;
@@ -146,6 +147,9 @@ G4StepStatus G4SteppingManager::Stepping()
//JA Set the volume before it is used (in DefineStepLength() for User Limit)
fCurrentVolume = fStep->GetPreStepPoint()->GetPhysicalVolume();
// Reset the step's auxiliary points vector pointer
fStep->SetPointerToVectorOfAuxiliaryPoints(0);
//-----------------
// AtRest Processes
//-----------------
@@ -218,6 +222,7 @@ G4StepStatus G4SteppingManager::Stepping()
fPreviousStepSize = fStep->GetStepLength();
#ifdef G4VERBOSE
// !!!!! Verbose
if(verboseLevel>0) fVerbose->StepInfo();
#endif
// Send G4Step information to Hit/Dig if the volume is sensitive
+1 -1
View File
@@ -25,7 +25,7 @@
//
//
// $Id: G4SteppingManager2.cc,v 1.29 2006/06/29 21:16:05 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// GEANT4 tag $Name: geant4-08-02 $
//
//---------------------------------------------------------------
//
+5 -2
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4SteppingVerbose.cc,v 1.21 2006/06/29 21:16:07 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// $Id: G4SteppingVerbose.cc,v 1.23 2006/07/14 14:13:57 tsasaki Exp $
// GEANT4 tag $Name: geant4-08-02 $
//
//---------------------------------------------------------------
//
@@ -371,6 +371,9 @@ void G4SteppingVerbose::DPSLPostStep()
if(fCondition==ExclusivelyForced){
G4cout << "ExclusivelyForced)" << G4endl;
}
else if(fCondition==StronglyForced){
G4cout << "StronglyForced)" << G4endl;
}
else if(fCondition==Conditionally){
G4cout << "Conditionally)" << G4endl;
}
+22 -35
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4TrackingManager.cc,v 1.19 2006/06/29 21:16:09 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// $Id: G4TrackingManager.cc,v 1.22 2006/11/14 10:58:47 tsasaki Exp $
// GEANT4 tag $Name: geant4-08-02 $
//
//---------------------------------------------------------------
//
@@ -40,13 +40,16 @@
#include "G4TrackingManager.hh"
#include "G4Trajectory.hh"
#include "G4SmoothTrajectory.hh"
#include "G4RichTrajectory.hh"
#include "G4ios.hh"
class G4VSteppingVerbose;
//////////////////////////////////////
G4TrackingManager::G4TrackingManager()
//////////////////////////////////////
: fpUserTrackingAction(NULL), fpTrajectory(NULL),
StoreTrajectory(false), verboseLevel(0), EventIsAborted(false)
StoreTrajectory(0), verboseLevel(0), EventIsAborted(false)
{
fpSteppingManager = new G4SteppingManager();
messenger = new G4TrackingMessenger(this);
@@ -80,12 +83,9 @@ void G4TrackingManager::ProcessOneTrack(G4Track* apValueG4Track)
delete (*GimmeSecondaries())[itr];
}
GimmeSecondaries()->clear();
if(verboseLevel>0 && (G4VSteppingVerbose::GetSilent()!=1) ) TrackBanner();
#ifdef G4VERBOSE
// !!!!! Verbose
if(verboseLevel>0) Verbose("ProcessOneTrack");
#endif
// Give SteppingManger the pointer to the track which will be tracked
fpSteppingManager->SetInitialStep(fpTrack);
@@ -97,7 +97,13 @@ void G4TrackingManager::ProcessOneTrack(G4Track* apValueG4Track)
#ifdef G4_STORE_TRAJECTORY
// Construct a trajectory if it is requested
if(StoreTrajectory&&(!fpTrajectory)) {
fpTrajectory = new G4Trajectory(fpTrack); // default trajectory concrete class object
// default trajectory concrete class object
switch (StoreTrajectory) {
default:
case 1: fpTrajectory = new G4Trajectory(fpTrack); break;
case 2: fpTrajectory = new G4SmoothTrajectory(fpTrack); break;
case 3: fpTrajectory = new G4RichTrajectory(fpTrack); break;
}
}
#endif
@@ -160,41 +166,24 @@ void G4TrackingManager::EventAborted()
EventIsAborted = true;
}
//************************************************************************
//
// Private Member Functions
//
//************************************************************************
////////////////////////////////////////////////
void G4TrackingManager::Verbose(G4String select)
////////////////////////////////////////////////
void G4TrackingManager::TrackBanner()
{
// !!!!! Verbose
if( select == "ProcessOneTrack" ){
#ifdef G4VERBOSE
if(verboseLevel >= 1) {
G4cout << G4endl;
G4cout << "*******************************************************"
<< "**************************************************"
<< G4endl;
G4cout << "* G4Track Information: "
<< " Particle = " << fpTrack->GetDefinition()->GetParticleName()
<< ","
<< " Track ID = " << fpTrack->GetTrackID()
<< ","
<< " Parent ID = " << fpTrack->GetParentID()
G4cout << "* G4Track Information: "
<< " Particle = " << fpTrack->GetDefinition()->GetParticleName()
<< ","
<< " Track ID = " << fpTrack->GetTrackID()
<< ","
<< " Parent ID = " << fpTrack->GetParentID()
<< G4endl;
G4cout << "*******************************************************"
<< "**************************************************"
<< G4endl;
G4cout << G4endl;
}
#endif
}
}
@@ -203,5 +192,3 @@ void G4TrackingManager::Verbose(G4String select)
+9 -8
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4TrackingMessenger.cc,v 1.14 2006/06/29 21:16:11 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// $Id: G4TrackingMessenger.cc,v 1.15 2006/11/03 11:13:38 allison Exp $
// GEANT4 tag $Name: geant4-08-02 $
//
//---------------------------------------------------------------
//
@@ -73,11 +73,14 @@ G4TrackingMessenger::G4TrackingMessenger(G4TrackingManager * trMan)
StoreTrajectoryCmd = new G4UIcmdWithAnInteger("/tracking/storeTrajectory",this);
StoreTrajectoryCmd->SetGuidance("Store trajectories or not.");
StoreTrajectoryCmd->SetGuidance(" 1 : Store trajectories.");
StoreTrajectoryCmd->SetGuidance(" 0 : Don't Store trajectories.");
StoreTrajectoryCmd->SetGuidance(" !=0 : Store trajectories.");
StoreTrajectoryCmd->SetGuidance(" 1 : Choose G4Trajectory as default.");
StoreTrajectoryCmd->SetGuidance(" 2 : Choose G4SmoothTrajectory as default.");
StoreTrajectoryCmd->SetGuidance(" 3 : Choose G4RichTrajectory as default.");
StoreTrajectoryCmd->SetParameterName("Store",true);
StoreTrajectoryCmd->SetDefaultValue(0);
StoreTrajectoryCmd->SetRange("Store >=0 && Store <= 1");
StoreTrajectoryCmd->SetRange("Store >=0 && Store <= 3");
VerboseCmd = new G4UIcmdWithAnInteger("/tracking/verbose",this);
@@ -130,7 +133,7 @@ void G4TrackingMessenger::SetNewValue(G4UIcommand * command,G4String newValues)
}
if( command == StoreTrajectoryCmd ){
trackingManager->SetStoreTrajectory(StoreTrajectoryCmd->ConvertToBool(newValues));
trackingManager->SetStoreTrajectory(StoreTrajectoryCmd->ConvertToInt(newValues));
}
}
@@ -143,9 +146,7 @@ G4String G4TrackingMessenger::GetCurrentValue(G4UIcommand * command)
return VerboseCmd->ConvertToString(trackingManager->GetVerboseLevel());
}
else if( command == StoreTrajectoryCmd ){
G4String ll = "0";
if(trackingManager->GetStoreTrajectory()) ll = "1";
return ll;
return StoreTrajectoryCmd->ConvertToString(trackingManager->GetStoreTrajectory());
}
return G4String('\0');
}
+17 -16
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4Trajectory.cc,v 1.30 2006/06/29 21:16:13 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// $Id: G4Trajectory.cc,v 1.32 2006/10/16 13:39:35 allison Exp $
// GEANT4 tag $Name: geant4-08-02 $
//
// ---------------------------------------------------------------
//
@@ -94,14 +94,15 @@ G4Trajectory::G4Trajectory(G4Trajectory & right):G4VTrajectory()
G4Trajectory::~G4Trajectory()
{
// positionRecord->clearAndDestroy();
size_t i;
for(i=0;i<positionRecord->size();i++){
delete (*positionRecord)[i];
if (positionRecord) {
// positionRecord->clearAndDestroy();
size_t i;
for(i=0;i<positionRecord->size();i++){
delete (*positionRecord)[i];
}
positionRecord->clear();
delete positionRecord;
}
positionRecord->clear();
delete positionRecord;
}
void G4Trajectory::ShowTrajectory(std::ostream& os) const
@@ -126,31 +127,31 @@ const std::map<G4String,G4AttDef>* G4Trajectory::GetAttDefs() const
if (isNew) {
G4String ID("ID");
(*store)[ID] = G4AttDef(ID,"Track ID","Bookkeeping","","G4int");
(*store)[ID] = G4AttDef(ID,"Track ID","Physics","","G4int");
G4String PID("PID");
(*store)[PID] = G4AttDef(PID,"Parent ID","Bookkeeping","","G4int");
(*store)[PID] = G4AttDef(PID,"Parent ID","Physics","","G4int");
G4String PN("PN");
(*store)[PN] = G4AttDef(PN,"Particle Name","Bookkeeping","","G4String");
(*store)[PN] = G4AttDef(PN,"Particle Name","Physics","","G4String");
G4String Ch("Ch");
(*store)[Ch] = G4AttDef(Ch,"Charge","Physics","e+","G4double");
G4String PDG("PDG");
(*store)[PDG] = G4AttDef(PDG,"PDG Encoding","Bookkeeping","","G4int");
(*store)[PDG] = G4AttDef(PDG,"PDG Encoding","Physics","","G4int");
G4String IMom("IMom");
(*store)[IMom] = G4AttDef(IMom, "Momentum of track at start of trajectory",
(*store)[IMom] = G4AttDef(IMom, "Momentum at start of trajectory",
"Physics","G4BestUnit","G4ThreeVector");
G4String IMag("IMag");
(*store)[IMag] =
G4AttDef(IMag, "Magnitude of momentum of track at start of trajectory",
G4AttDef(IMag, "Magnitude of momentum at start of trajectory",
"Physics","G4BestUnit","G4double");
G4String NTP("NTP");
(*store)[NTP] = G4AttDef(NTP,"No. of points","Bookkeeping","","G4int");
(*store)[NTP] = G4AttDef(NTP,"No. of points","Physics","","G4int");
}
return store;
+1 -1
View File
@@ -25,7 +25,7 @@
//
//
// $Id: G4TrajectoryPoint.cc,v 1.19 2006/06/29 21:16:15 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// GEANT4 tag $Name: geant4-08-02 $
//
// ---------------------------------------------------------------
//
+1 -1
View File
@@ -25,7 +25,7 @@
//
//
// $Id: G4UserSteppingAction.cc,v 1.10 2006/06/29 21:16:17 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// GEANT4 tag $Name: geant4-08-02 $
//
// ---------------------------------------------------------------
//
+1 -1
View File
@@ -25,7 +25,7 @@
//
//
// $Id: G4UserTrackingAction.cc,v 1.10 2006/06/29 21:16:19 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// GEANT4 tag $Name: geant4-08-02 $
//
// ---------------------------------------------------------------
//
+4 -2
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4VSteppingVerbose.cc,v 1.16 2006/06/29 21:16:21 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// $Id: G4VSteppingVerbose.cc,v 1.18 2006/11/14 10:58:47 tsasaki Exp $
// GEANT4 tag $Name: geant4-08-02 $
//
//---------------------------------------------------------------
//
@@ -44,6 +44,8 @@
#include "G4VSteppingVerbose.hh"
#include "G4SteppingManager.hh"
#include "G4Track.hh"
#include "G4ParticleDefinition.hh"
G4VSteppingVerbose* G4VSteppingVerbose::fInstance = 0;
G4int G4VSteppingVerbose::Silent = 0;
+8 -6
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4VTrajectory.cc,v 1.11 2006/06/29 21:16:23 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// $Id: G4VTrajectory.cc,v 1.12 2006/10/16 13:45:01 allison Exp $
// GEANT4 tag $Name: geant4-08-02 $
//
// ---------------------------------------------------------------
//
@@ -80,8 +80,9 @@ void G4VTrajectory::ShowTrajectory(std::ostream& os) const
iAttVal != attValues->end(); ++iAttVal) {
std::map<G4String,G4AttDef>::const_iterator iAttDef =
attDefs->find(iAttVal->GetName());
os << "\n " << iAttDef->second.GetDesc() << ": "
<< iAttVal->GetValue();
os << "\n " << iAttDef->second.GetDesc()
<< " (" << iAttVal->GetName()
<< "): " << iAttVal->GetValue();
}
delete attValues; // AttValues must be deleted after use.
@@ -105,8 +106,9 @@ void G4VTrajectory::ShowTrajectory(std::ostream& os) const
iAttVal != attValues->end(); ++iAttVal) {
std::map<G4String,G4AttDef>::const_iterator iAttDef =
attDefs->find(iAttVal->GetName());
os << "\n " << iAttDef->second.GetDesc() << ": "
<< iAttVal->GetValue();
os << "\n " << iAttDef->second.GetDesc()
<< " (" << iAttVal->GetName()
<< "): " << iAttVal->GetValue();
}
delete attValues; // AttValues must be deleted after use.
+1 -1
View File
@@ -25,7 +25,7 @@
//
//
// $Id: G4VTrajectoryPoint.cc,v 1.4 2006/06/29 21:16:26 gunter Exp $
// GEANT4 tag $Name: geant4-08-01 $
// GEANT4 tag $Name: geant4-08-02 $
//
//---------------------------------------------------------------
//