Import Geant4 3.1.0 source tree
This commit is contained in:
+33
-1
@@ -1,4 +1,4 @@
|
||||
$Id: History,v 1.16 2000/11/20 15:39:53 gcosmo Exp $
|
||||
$Id: History,v 1.21 2001/02/08 06:13:53 asaim Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -17,6 +17,38 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
Feb 8 2001, M.Asai (event-V03-00-03)
|
||||
- Migration to STL vector classes
|
||||
affected files :
|
||||
./event/include/G4HEPEvtInterface.hh
|
||||
./event/include/G4PrimaryParticle.hh
|
||||
./event/include/G4TrajectoryContainer.hh
|
||||
./event/src/G4EventManager.cc
|
||||
./event/src/G4GeneralParticleSource.cc
|
||||
./event/src/G4HEPEvtInterface.cc
|
||||
./event/src/G4PrimaryParticle.cc
|
||||
./event/src/G4PrimaryTransformer.cc
|
||||
|
||||
Feb 7 2001, M.Asai (event-V03-00-02)
|
||||
- Add proper time to G4PrimaryParticle
|
||||
|
||||
Feb 7 2001, M.Asai (event-V03-00-01)
|
||||
- Fix syntax errors in G4GeneralSourceParticle.cc
|
||||
|
||||
Feb 5 2001, M.Asai (event-V03-00-00)
|
||||
|
||||
Jan 26 2001, F. Lei
|
||||
- bug fixing in G4GeneralSourceParticle.cc
|
||||
replace:
|
||||
posphi = acos(tx/sin(posthe));
|
||||
|
||||
with:
|
||||
if (posthe != 0. && posthe != pi)
|
||||
posphi = acos(tx/sin(posthe));
|
||||
else
|
||||
posphi = 0.0;
|
||||
endif
|
||||
|
||||
Nov 20 2000, G.Cosmo (event-V02-00-04)
|
||||
- Removed data-logs from test directory.
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ClassificationOfNewTrack.hh,v 1.3 1999/12/15 14:49:38 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4EvManMessenger.hh,v 1.3 1999/12/15 14:49:38 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
|
||||
#ifndef G4EvManMessenger_h
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Event.hh,v 1.3 1999/12/15 14:49:38 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
|
||||
#ifndef G4Event_h
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4EventManager.hh,v 1.5 2000/01/12 01:29:50 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -5,15 +5,15 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4HEPEvtInterface.hh,v 1.4 1999/12/15 14:49:38 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4HEPEvtInterface.hh,v 1.5 2001/02/08 06:07:16 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
|
||||
#ifndef G4HEPEvtInterface_h
|
||||
#define G4HEPEvtInterface_h 1
|
||||
|
||||
#include "g4std/fstream"
|
||||
#include "g4rw/tpordvec.h"
|
||||
#include "g4std/vector"
|
||||
#include "globals.hh"
|
||||
#include "G4VPrimaryGenerator.hh"
|
||||
#include "G4HEPEvtParticle.hh"
|
||||
@@ -70,7 +70,7 @@ class G4HEPEvtInterface:public G4VPrimaryGenerator
|
||||
private:
|
||||
G4String fileName;
|
||||
G4std::ifstream inputFile;
|
||||
G4RWTPtrOrderedVector<G4HEPEvtParticle> HPlist;
|
||||
G4std::vector<G4HEPEvtParticle*> HPlist;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4HEPEvtParticle.hh,v 1.3 1999/12/15 14:49:38 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ParticleGun.hh,v 1.4 2000/10/18 12:41:21 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
|
||||
#ifndef G4ParticleGun_h
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ParticleGunMessenger.hh,v 1.5 2000/10/19 13:29:18 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PrimaryParticle.hh,v 1.6 2000/10/19 15:19:36 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4PrimaryParticle.hh,v 1.8 2001/02/08 06:07:16 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -88,6 +88,7 @@ class G4PrimaryParticle
|
||||
G4double polY;
|
||||
G4double polZ;
|
||||
G4double Weight0;
|
||||
G4double properTime;
|
||||
|
||||
public: // with description
|
||||
// followings are get methods available.
|
||||
@@ -124,6 +125,8 @@ class G4PrimaryParticle
|
||||
inline G4double GetPolZ() const { return polZ; }
|
||||
inline G4double GetWeight() const { return Weight0; }
|
||||
inline void SetWeight(G4double w) { Weight0 = w; }
|
||||
inline void SetProperTime(G4double t) { properTime = t; }
|
||||
inline G4double GetProperTime() const { return properTime; }
|
||||
|
||||
public: // with description
|
||||
// Followings are available Set methods.
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PrimaryTransformer.hh,v 1.4 2000/10/19 15:19:36 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
|
||||
#ifndef G4PromaryTransformer_h
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PrimaryVertex.hh,v 1.5 2000/10/19 15:19:36 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4StackManager.hh,v 1.5 2000/01/26 06:42:14 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4StackedTrack.hh,v 1.4 2000/01/26 06:42:15 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Last Modification : 02/Feb/96 M.Asai
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4StackingMessenger.hh,v 1.3 1999/12/15 14:49:39 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
|
||||
#ifndef G4StackingMessenger_h
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4TrackStack.hh,v 1.3 1999/12/15 14:49:39 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Last Modification : 09/Dec/96 M.Asai
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4TrajectoryContainer.hh,v 1.5 1999/12/15 14:49:39 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4TrajectoryContainer.hh,v 1.6 2001/02/08 06:07:16 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// G4TrajectoryContainer
|
||||
@@ -17,15 +17,31 @@
|
||||
|
||||
#include "G4VTrajectory.hh"
|
||||
// G4RWTPtrOrderedVector
|
||||
#include "g4rw/tpordvec.h"
|
||||
//#include "g4rw/tpordvec.h"
|
||||
|
||||
// class description:
|
||||
//
|
||||
// This is a container of G4VTrajectory objects and the object of this
|
||||
// container will be associated to G4Event object.
|
||||
|
||||
typedef G4RWTPtrOrderedVector<G4VTrajectory> G4TrajectoryContainer;
|
||||
//typedef G4RWTPtrOrderedVector<G4VTrajectory> G4TrajectoryContainer;
|
||||
|
||||
class G4TrajectoryContainer : public G4std::vector<G4VTrajectory*>
|
||||
{
|
||||
public:
|
||||
G4TrajectoryContainer() {;}
|
||||
~G4TrajectoryContainer() {;}
|
||||
|
||||
public:
|
||||
inline G4int entries() { return size(); }
|
||||
inline G4bool insert(G4VTrajectory* p) { push_back(p); return true; }
|
||||
inline void clearAndDestroy()
|
||||
{
|
||||
for(int i=0;i<size();i++)
|
||||
{ delete (*this)[i]; }
|
||||
clear();
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4UserEventAction.hh,v 1.4 1999/12/15 14:49:39 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4UserStackingAction.hh,v 1.4 1999/12/15 14:49:39 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
|
||||
#ifndef G4UserStackingAction_h
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VPrimaryGenerator.hh,v 1.3 1999/12/15 14:49:39 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
|
||||
#ifndef G4VPrimaryGenerator_h
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: eventgendefs.hh,v 1.2 1999/12/15 14:49:40 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
#ifndef EventGenerator_DEBUG
|
||||
#define EventGenerator_DEBUG
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: evmandefs.hh,v 1.2 1999/12/15 14:49:40 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
|
||||
///#define G4EVENTMANAGER_DEBUG 1
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: trajectoryControl.hh,v 1.2 1999/12/15 14:49:40 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
////#define G4_STORE_TRAJECTORY 1
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4EvManMessenger.cc,v 1.2 1999/12/15 14:49:40 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Event.cc,v 1.2 1999/12/15 14:49:40 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
|
||||
// G4Event
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4EventManager.cc,v 1.5 2000/01/26 06:42:15 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4EventManager.cc,v 1.6 2001/02/08 06:07:16 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
//
|
||||
@@ -184,7 +184,13 @@ void G4EventManager::ProcessOneEvent(G4Event* anEvent)
|
||||
G4cout << "Illeagal TrackStatus returned from G4TrackingManager!"
|
||||
<< G4endl;
|
||||
case fKillTrackAndSecondaries:
|
||||
if( secondaries ) secondaries->clearAndDestroy();
|
||||
//if( secondaries ) secondaries->clearAndDestroy();
|
||||
if( secondaries )
|
||||
{
|
||||
for(G4int i=0;i<secondaries->size();i++)
|
||||
{ delete (*secondaries)[i]; }
|
||||
secondaries->clear();
|
||||
}
|
||||
delete track;
|
||||
break;
|
||||
}
|
||||
@@ -217,7 +223,7 @@ void G4EventManager::StackTracks(G4TrackVector *trackVector)
|
||||
if( trackVector )
|
||||
{
|
||||
|
||||
size_t n_passedTrack = trackVector->entries();
|
||||
size_t n_passedTrack = trackVector->size();
|
||||
if( n_passedTrack == 0 ) return;
|
||||
for( size_t i = 0; i < n_passedTrack; i++ )
|
||||
{
|
||||
|
||||
@@ -21,6 +21,17 @@
|
||||
// CHANGE HISTORY
|
||||
// --------------
|
||||
//
|
||||
// 26-01-2001, F. Lei
|
||||
// replace:
|
||||
// posphi = acos(tx/sin(posthe));
|
||||
//
|
||||
// with:
|
||||
// if (posthe != 0. && posthe != pi)
|
||||
// { posphi = acos(tx/sin(posthe)); }
|
||||
// else
|
||||
// { posphi = 0.0;}
|
||||
// endif
|
||||
//
|
||||
// 10-Nov-2000, F. Lei
|
||||
// some bug fixing:
|
||||
// i) dclared ' G4int count' in all ****Interpolation functions
|
||||
@@ -28,7 +39,7 @@
|
||||
// as default.
|
||||
//
|
||||
// 09-Nov-2000, F Lei
|
||||
// Changed to a fast mplementation for generating iso and cos angular directions
|
||||
// Changed to a fast implementation for generating iso and cos angular directions
|
||||
//
|
||||
// Version 1.1, 18 October 2000, Modified to inherit from G4VPrimaryGenerator.
|
||||
// New name at the request of M. Asai.
|
||||
@@ -261,7 +272,6 @@ void G4GeneralParticleSource::ConfineSourceToVolume(G4String Vname)
|
||||
found = tempPV->GetName() == theRequiredVolumeName;
|
||||
if(verbosityLevel == 2)
|
||||
G4cout << i << " " << " " << tempPV->GetName() << " " << theRequiredVolumeName << " " << found << G4endl;
|
||||
|
||||
if (!found)
|
||||
{i++;}
|
||||
}
|
||||
@@ -298,7 +308,6 @@ void G4GeneralParticleSource::GeneratePointsInPlane()
|
||||
G4double expression;
|
||||
G4ThreeVector RandPos;
|
||||
G4double tempx, tempy, tempz;
|
||||
|
||||
z = 0.;
|
||||
|
||||
if(SourcePosType != "Plane" && verbosityLevel >= 1)
|
||||
@@ -1112,7 +1121,10 @@ void G4GeneralParticleSource::GenerateIsotropicFlux()
|
||||
tz = tz/tt;
|
||||
// G4cout << "unit position " << tx << " " << ty << " " << tz << G4endl;
|
||||
posthe = acos(tz);
|
||||
posphi = acos(tx/sin(posthe));
|
||||
if (posthe != 0. && posthe != pi)
|
||||
{ posphi = acos(tx/sin(posthe)); }
|
||||
else
|
||||
{ posphi = 0.0;}
|
||||
// G4cout << "Posthe and posphi " << posthe << " " << posphi << G4endl;
|
||||
G4double finx, finy, finz;
|
||||
finx = (px*cos(posthe)*cos(posphi)) - (py*sin(posphi)) + (pz*sin(posthe)*cos(posphi));
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4HEPEvtInterface.cc,v 1.3 1999/12/15 14:49:40 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4HEPEvtInterface.cc,v 1.4 2001/02/08 06:07:17 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
@@ -75,28 +75,28 @@ void G4HEPEvtInterface::GeneratePrimaryVertex(G4Event* evt)
|
||||
= new G4HEPEvtParticle( particle, ISTHEP, JDAHEP1, JDAHEP2 );
|
||||
|
||||
// Store
|
||||
HPlist.insert( hepParticle );
|
||||
HPlist.push_back( hepParticle );
|
||||
}
|
||||
|
||||
// check if there is at least one particle
|
||||
if( HPlist.entries() == 0 ) return;
|
||||
if( HPlist.size() == 0 ) return;
|
||||
|
||||
// make connection between daughter particles decayed from
|
||||
// the same mother
|
||||
for( int i=0; i<HPlist.entries(); i++ )
|
||||
for( int i=0; i<HPlist.size(); i++ )
|
||||
{
|
||||
if( HPlist(i)->GetJDAHEP1() > 0 ) // it has daughters
|
||||
if( HPlist[i]->GetJDAHEP1() > 0 ) // it has daughters
|
||||
{
|
||||
int jda1 = HPlist(i)->GetJDAHEP1()-1; // FORTRAN index starts from 1
|
||||
int jda2 = HPlist(i)->GetJDAHEP2()-1; // but C++ starts from 0.
|
||||
G4PrimaryParticle* mother = HPlist(i)->GetTheParticle();
|
||||
int jda1 = HPlist[i]->GetJDAHEP1()-1; // FORTRAN index starts from 1
|
||||
int jda2 = HPlist[i]->GetJDAHEP2()-1; // but C++ starts from 0.
|
||||
G4PrimaryParticle* mother = HPlist[i]->GetTheParticle();
|
||||
for( int j=jda1; j<=jda2; j++ )
|
||||
{
|
||||
G4PrimaryParticle* daughter = HPlist(j)->GetTheParticle();
|
||||
if(HPlist(j)->GetISTHEP()>0)
|
||||
G4PrimaryParticle* daughter = HPlist[j]->GetTheParticle();
|
||||
if(HPlist[j]->GetISTHEP()>0)
|
||||
{
|
||||
mother->SetDaughter( daughter );
|
||||
HPlist(j)->Done();
|
||||
HPlist[j]->Done();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -110,18 +110,21 @@ void G4HEPEvtInterface::GeneratePrimaryVertex(G4Event* evt)
|
||||
G4PrimaryVertex* vertex = new G4PrimaryVertex(x0,y0,z0,t0);
|
||||
|
||||
// put initial particles to the vertex
|
||||
for( int ii=0; ii<HPlist.entries(); ii++ )
|
||||
for( int ii=0; ii<HPlist.size(); ii++ )
|
||||
{
|
||||
if( HPlist(ii)->GetISTHEP() > 0 ) // ISTHEP of daughters had been
|
||||
if( HPlist[ii]->GetISTHEP() > 0 ) // ISTHEP of daughters had been
|
||||
// set to negative
|
||||
{
|
||||
G4PrimaryParticle* initialParticle = HPlist(ii)->GetTheParticle();
|
||||
G4PrimaryParticle* initialParticle = HPlist[ii]->GetTheParticle();
|
||||
vertex->SetPrimary( initialParticle );
|
||||
}
|
||||
}
|
||||
|
||||
// clear G4HEPEvtParticles
|
||||
HPlist.clearAndDestroy();
|
||||
//HPlist.clearAndDestroy();
|
||||
for(G4int iii=0;iii<HPlist.size();iii++)
|
||||
{ delete HPlist[iii]; }
|
||||
HPlist.clear();
|
||||
|
||||
// Put the vertex to G4Event object
|
||||
evt->AddPrimaryVertex( vertex );
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4HEPEvtParticle.cc,v 1.2 1999/12/15 14:49:40 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ParticleGun.cc,v 1.3 2000/10/18 12:41:25 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
|
||||
// G4ParticleGun
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ParticleGunMessenger.cc,v 1.4 2000/10/19 13:29:38 kurasige Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
|
||||
#include "G4ParticleGunMessenger.hh"
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PrimaryParticle.cc,v 1.3 2000/10/19 15:19:37 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4PrimaryParticle.cc,v 1.5 2001/02/08 06:07:17 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
|
||||
#include "G4PrimaryParticle.hh"
|
||||
@@ -19,33 +19,33 @@ G4Allocator<G4PrimaryParticle> aPrimaryParticleAllocator;
|
||||
G4PrimaryParticle::G4PrimaryParticle()
|
||||
:PDGcode(0),G4code(NULL),Px(0.),Py(0.),Pz(0.),
|
||||
nextParticle(NULL),daughterParticle(NULL),trackID(-1),
|
||||
mass(0.),polX(0.),polY(0.),polZ(0.),Weight0(1.0)
|
||||
mass(0.),polX(0.),polY(0.),polZ(0.),Weight0(1.0),properTime(0.0)
|
||||
{;}
|
||||
|
||||
G4PrimaryParticle::G4PrimaryParticle(G4int Pcode)
|
||||
:PDGcode(Pcode),Px(0.),Py(0.),Pz(0.),
|
||||
nextParticle(NULL),daughterParticle(NULL),trackID(-1),
|
||||
mass(0.),polX(0.),polY(0.),polZ(0.),Weight0(1.0)
|
||||
mass(0.),polX(0.),polY(0.),polZ(0.),Weight0(1.0),properTime(0.0)
|
||||
{ G4code = G4ParticleTable::GetParticleTable()->FindParticle(Pcode); }
|
||||
|
||||
G4PrimaryParticle::G4PrimaryParticle(G4int Pcode,
|
||||
G4double px,G4double py,G4double pz)
|
||||
:PDGcode(Pcode),Px(px),Py(py),Pz(pz),
|
||||
nextParticle(NULL),daughterParticle(NULL),trackID(-1),
|
||||
mass(0.),polX(0.),polY(0.),polZ(0.),Weight0(1.0)
|
||||
mass(0.),polX(0.),polY(0.),polZ(0.),Weight0(1.0),properTime(0.0)
|
||||
{ G4code = G4ParticleTable::GetParticleTable()->FindParticle(Pcode); }
|
||||
|
||||
G4PrimaryParticle::G4PrimaryParticle(G4ParticleDefinition* Gcode)
|
||||
:G4code(Gcode),Px(0.),Py(0.),Pz(0.),
|
||||
nextParticle(NULL),daughterParticle(NULL),trackID(-1),
|
||||
mass(0.),polX(0.),polY(0.),polZ(0.),Weight0(1.0)
|
||||
mass(0.),polX(0.),polY(0.),polZ(0.),Weight0(1.0),properTime(0.0)
|
||||
{ PDGcode = Gcode->GetPDGEncoding(); }
|
||||
|
||||
G4PrimaryParticle::G4PrimaryParticle(G4ParticleDefinition* Gcode,
|
||||
G4double px,G4double py,G4double pz)
|
||||
:G4code(Gcode),Px(px),Py(py),Pz(pz),
|
||||
nextParticle(NULL),daughterParticle(NULL),trackID(-1),
|
||||
mass(0.),polX(0.),polY(0.),polZ(0.),Weight0(1.0)
|
||||
mass(0.),polX(0.),polY(0.),polZ(0.),Weight0(1.0),properTime(0.0)
|
||||
{ PDGcode = Gcode->GetPDGEncoding(); }
|
||||
|
||||
G4PrimaryParticle::~G4PrimaryParticle()
|
||||
@@ -87,6 +87,8 @@ void G4PrimaryParticle::Print() const
|
||||
G4cout << " Polarization ( " << polX << ", " << polY << ", "
|
||||
<< polZ << " )" << G4endl;
|
||||
G4cout << " Weight : " << Weight0 << G4endl;
|
||||
if(properTime>0.0)
|
||||
{ G4cout << " PreAssigned proper decay time : " << properTime/ns << " (nsec)" << G4endl; }
|
||||
if(daughterParticle != NULL)
|
||||
{
|
||||
G4cout << ">>>> Daughters" << G4endl;
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PrimaryTransformer.cc,v 1.5 2000/10/19 15:19:37 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4PrimaryTransformer.cc,v 1.8 2001/02/09 00:11:31 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
|
||||
#include "G4PrimaryTransformer.hh"
|
||||
@@ -30,7 +30,10 @@ G4PrimaryTransformer::~G4PrimaryTransformer()
|
||||
|
||||
G4TrackVector* G4PrimaryTransformer::GimmePrimaries(G4Event* anEvent)
|
||||
{
|
||||
TV.clearAndDestroy();
|
||||
//TV.clearAndDestroy();
|
||||
for( int ii=0; ii<TV.size();ii++)
|
||||
{ delete TV[ii]; }
|
||||
TV.clear();
|
||||
G4int n_vertex = anEvent->GetNumberOfPrimaryVertex();
|
||||
if(n_vertex==0) return NULL;
|
||||
for( int i=0; i<n_vertex; i++ )
|
||||
@@ -105,6 +108,8 @@ void G4PrimaryTransformer::GenerateSingleTrack
|
||||
DP->SetPolarization(primaryParticle->GetPolX(),
|
||||
primaryParticle->GetPolY(),
|
||||
primaryParticle->GetPolZ());
|
||||
if(primaryParticle->GetProperTime()>0.0)
|
||||
{ DP->SetPreAssignedDecayProperTime(primaryParticle->GetProperTime()); }
|
||||
// Set Charge
|
||||
if (abs(primaryParticle->GetCharge()-DP->GetCharge())>eplus) {
|
||||
DP->SetCharge(primaryParticle->GetCharge());
|
||||
@@ -118,7 +123,7 @@ void G4PrimaryTransformer::GenerateSingleTrack
|
||||
// Set weight ( vertex weight * particle weight )
|
||||
track->SetWeight(wv*(primaryParticle->GetWeight()));
|
||||
// Store it to G4TrackVector
|
||||
TV.insert( track );
|
||||
TV.push_back( track );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PrimaryVertex.cc,v 1.3 2000/10/19 15:19:37 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
|
||||
#include "G4PrimaryVertex.hh"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4StackManager.cc,v 1.3 2000/01/26 06:42:16 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Last Modification : 09/Dec/96 M.Asai
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4StackedTrack.cc,v 1.3 2000/01/26 06:42:16 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Last Modification : 02/Feb/96 M.Asai
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4StackingMessenger.cc,v 1.2 1999/12/15 14:49:41 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4TrackStack.cc,v 1.2 1999/12/15 14:49:41 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
//
|
||||
// Last Modification : 09/Dec/96 M.Asai
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4UserEventAction.cc,v 1.3 1999/12/15 14:49:41 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
|
||||
#include "G4UserEventAction.hh"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4UserStackingAction.cc,v 1.3 1999/12/15 14:49:42 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
|
||||
#include "G4UserStackingAction.hh"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VPrimaryGenerator.cc,v 1.2 1999/12/15 14:49:42 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
|
||||
// G4VPrimaryGenerator
|
||||
|
||||
Reference in New Issue
Block a user