Import Geant4 8.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 14:36:02 +02:00
parent d93e1e39a9
commit 8a51e0bc40
5471 changed files with 99628 additions and 55248 deletions
+3 -2
View File
@@ -1,4 +1,4 @@
# $Id: GNUmakefile,v 1.7 2004/06/11 14:11:15 gcosmo Exp $
# $Id: GNUmakefile,v 1.8 2005/10/17 21:21:53 tinslay Exp $
# ------------------------------------------------------------
# GNUmakefile for events library. Makoto Asai, 5/9/95.
# ------------------------------------------------------------
@@ -41,7 +41,8 @@ CPPFLAGS += \
-I$(G4BASE)/digits_hits/detector/include \
-I$(G4BASE)/digits_hits/hits/include \
-I$(G4BASE)/digits_hits/digits/include \
-I$(G4BASE)/intercoms/include
-I$(G4BASE)/intercoms/include \
-I$(G4BASE)/graphics_reps/include
ifdef G4_STORE_TRAJECTORY
CPPFLAGS += -DG4_STORE_TRAJECTORY
+29 -1
View File
@@ -1,4 +1,4 @@
$Id: History,v 1.90 2005/06/13 14:05:05 gcosmo Exp $
$Id: History,v 1.97 2005/11/30 15:23:49 gcosmo Exp $
-------------------------------------------------------------------
=========================================================
@@ -17,6 +17,34 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
November 30, 2005, G.Cosmo (event-V07-01-05)
- Trivial fixes to G4SPSAngDistribution and G4SPSPosDistribution for
support of CLHEP-2.0.X series.
November 22, 2005, M.Asai (event-V07-01-04)
- Put G4Exception to the constructors of G4UserEventAction and
G4UserStackingAction to protect against their instantiation before
G4VUserPhysicsList is instantiated and set to G4RunManager.
- Put protection against null pointer to
G4ParticleGun::SetParticleDefinition().
November 21, 2005, M.Asai (event-V07-01-03)
- Fix a bug in the previous tag.
November 18, 2005, M.Asai (event-V07-01-02)
- Migration to sstream.
- Move G4HepMC classes to examples/extended/eventgenerator/HepMC.
October 20, 2005, Joseph Perl (event-V07-01-01)
- Tag to co-work with vis-V07-01-05.
Oct 17, 2005 Jane Tinslay
- Modify GNUmakefile to follow intercoms->graphics_reps migration for
G4VGraphicsScene and G4VVisManager
Sep 05, 2005, F.Lei (event-V07-01-00)
- Corrected typo in printout in G4GeneralParticleMessenger.cc (bug #786)
Jun 13, 2005, G.Cosmo (event-V07-00-05)
- Corrected typo in printout in G4GeneralParticleMessenger.cc.
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4CellScorer.hh,v 1.1 2002/10/28 10:06:00 dressel Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
// ----------------------------------------------------------------------
// Class G4CellScorer
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4CellScorerStore.hh,v 1.2 2003/06/16 16:50:26 gunter Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
// ----------------------------------------------------------------------
// Class G4CellScorerStore
@@ -22,7 +22,7 @@
//
//
// $Id: G4ClassificationOfNewTrack.hh,v 1.5 2001/07/19 00:14:15 asaim Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4EvManMessenger.hh,v 1.4 2001/07/11 09:58:47 gunter Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
#ifndef G4EvManMessenger_h
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4Event.hh,v 1.10 2004/06/11 14:11:15 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
#ifndef G4Event_h
+4 -5
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4EventManager.hh,v 1.15 2004/08/10 23:59:37 asaim Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4EventManager.hh,v 1.16 2005/11/21 23:45:48 asaim Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
@@ -48,8 +48,7 @@ class G4SDManager;
#include "globals.hh"
class G4VUserEventInformation;
#ifndef WIN32 // Temporarly disabled on Windows, until CLHEP
// will support the HepMC module
#ifdef CLHEP_HepMC // Temporarly disabled
#include "CLHEP/HepMC/GenEvent.h"
#endif
@@ -80,7 +79,7 @@ class G4EventManager
void ProcessOneEvent(G4Event* anEvent);
// This method is the main entry to this class for simulating an event.
#ifndef WIN32 // Temporarly disabled on Windows, until CLHEP
#ifdef CLHEP_HepMC // Temporarly disabled on Windows, until CLHEP
// will support the HepMC module
void ProcessOneEvent(const HepMC::GenEvent* hepmcevt,G4Event* anEvent=0);
// This is an alternative entry for large HEP experiments which use
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4HEPEvtInterface.hh,v 1.7 2003/06/16 16:50:27 gunter Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
#ifndef G4HEPEvtInterface_h
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4HEPEvtParticle.hh,v 1.8 2004/06/11 14:11:15 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
@@ -1,87 +0,0 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// ====================================================================
//
// G4HepMCAsciiReader.hh
// $Id: G4HepMCAsciiReader.hh,v 1.3 2003/12/09 15:35:01 gunter Exp $
//
// ====================================================================
#ifndef G4_HEPMC_ASCII_READER_H
#define G4_HEPMC_ASCII_READER_H
#include <fstream>
#include "G4HepMCInterface.hh"
#include "CLHEP/HepMC/ReadHepMC.h"
class G4HepMCAsciiReaderMessenger;
class G4HepMCAsciiReader : public G4HepMCInterface {
protected:
G4String filename;
std::ifstream from;
G4int verbose;
G4HepMCAsciiReaderMessenger* messenger;
virtual HepMC::GenEvent* GenerateHepMCEvent();
public:
G4HepMCAsciiReader();
~G4HepMCAsciiReader();
// set/get methods
void SetFileName(G4String name);
G4String GetFileName() const;
void SetVerboseLevel(G4int i);
G4int GetVerboseLevel() const;
// methods...
void Initialize();
};
// ====================================================================
// inline functions
// ====================================================================
inline void G4HepMCAsciiReader::SetFileName(G4String name)
{
filename= name;
}
inline G4String G4HepMCAsciiReader::GetFileName() const
{
return filename;
}
inline void G4HepMCAsciiReader::SetVerboseLevel(G4int i)
{
verbose= i;
}
inline G4int G4HepMCAsciiReader::GetVerboseLevel() const
{
return verbose;
}
#endif
@@ -1,56 +0,0 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// ====================================================================
//
// G4HepMCAsciiReaderMessenger.hh
// $Id: G4HepMCAsciiReaderMessenger.hh,v 1.2 2003/12/09 15:35:02 gunter Exp $
//
// ====================================================================
#ifndef G4_HEPMC_ASCII_READER_MESSENGER_H
#define G4_HEPMC_ASCII_READER_MESSENGER_H
#include "G4UImessenger.hh"
class G4HepMCAsciiReader;
class G4UIdirectory;
class G4UIcmdWithoutParameter;
class G4UIcmdWithAString;
class G4UIcmdWithAnInteger;
class G4HepMCAsciiReaderMessenger : public G4UImessenger {
private:
G4HepMCAsciiReader* gen;
G4UIdirectory* dir;
G4UIcmdWithAnInteger* verbose;
G4UIcmdWithAString* open;
public:
G4HepMCAsciiReaderMessenger(G4HepMCAsciiReader* agen);
~G4HepMCAsciiReaderMessenger();
void SetNewValue(G4UIcommand* command, G4String newValues);
G4String GetCurrentValue(G4UIcommand* command);
};
#endif
-78
View File
@@ -1,78 +0,0 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// ====================================================================
//
// G4HepMCInterface.hh
// $Id: G4HepMCInterface.hh,v 1.3 2003/12/09 15:35:03 gunter Exp $
//
// A base class for primary generation via HepMC object.
// This class is derived from G4VPrimaryGenerator.
//
// ====================================================================
#ifndef G4_HEPMC_INTERFACE_H
#define G4_HEPMC_INTERFACE_H
#include "G4VPrimaryGenerator.hh"
#include "CLHEP/HepMC/GenEvent.h"
class G4HepMCInterface : public G4VPrimaryGenerator {
public:
// static service method for conversion from HepMC::GenEvent to G4Event
static void HepMC2G4(const HepMC::GenEvent* hepmcevt, G4Event* g4event);
// static service method for checking a point is included in the (current) world
// static G4bool CheckVertexInsideWorld(const G4ThreeVector& pos);
// ------------> This method has been moved to the base class
protected:
// Note that the life of HepMC event object must be handled by users.
// In the default implementation, a current HepMC event will be
// deleted at GeneratePrimaryVertex() in the next event.
HepMC::GenEvent* hepmcEvent; // (care for single event case only)
// Implement this method in his/her own concrete class.
// An empty event will be created in default.
virtual HepMC::GenEvent* GenerateHepMCEvent();
public:
G4HepMCInterface();
virtual ~G4HepMCInterface();
// set/get methods
HepMC::GenEvent* GetHepMCGenEvent() const;
// The default behavior is that a single HepMC event generated by
// GenerateHepMCEvent() will be converted to G4Event through HepMC2G4().
virtual void GeneratePrimaryVertex(G4Event* anEvent);
};
// ====================================================================
// inline functions
// ====================================================================
inline HepMC::GenEvent* G4HepMCInterface::GetHepMCGenEvent() const
{
return hepmcEvent;
}
#endif
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4ParticleGun.hh,v 1.7 2001/11/20 23:21:41 asaim Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
#ifndef G4ParticleGun_h
@@ -22,7 +22,7 @@
//
//
// $Id: G4ParticleGunMessenger.hh,v 1.7 2002/02/26 16:34:04 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4PrimaryTransformer.hh,v 1.10 2005/04/27 01:32:46 asaim Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
#ifndef G4PromaryTransformer_h
+1 -1
View File
@@ -21,7 +21,7 @@
// ********************************************************************
//
// $Id: G4ScoreTable.hh,v 1.2 2003/06/16 16:50:29 gunter Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
// ----------------------------------------------------------------------
// Class G4ScoreTable
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4Scorer.hh,v 1.1 2002/10/28 10:06:01 dressel Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
// ----------------------------------------------------------------------
// Class G4Scorer
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4StackChecker.hh,v 1.1 2003/06/12 15:14:43 vnivanch Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
#ifndef G4StackChecker_h
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4StackManager.hh,v 1.11 2003/06/16 16:50:30 gunter Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4StackedTrack.hh,v 1.9 2004/06/11 14:11:17 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// Last Modification : 02/Feb/96 M.Asai
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4StackingMessenger.hh,v 1.4 2001/07/11 09:58:49 gunter Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
#ifndef G4StackingMessenger_h
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4TrackStack.hh,v 1.5 2001/07/13 15:01:47 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// Last Modification : 09/Dec/96 M.Asai
@@ -22,7 +22,7 @@
//
//
// $Id: G4TrajectoryContainer.hh,v 1.14 2004/06/11 14:11:17 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// G4TrajectoryContainer
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4UserEventAction.hh,v 1.5 2001/07/11 09:58:50 gunter Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
//
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4UserStackingAction.hh,v 1.5 2001/07/11 09:58:50 gunter Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
#ifndef G4UserStackingAction_h
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4VPrimaryGenerator.hh,v 1.7 2003/08/02 00:18:30 asaim Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
#ifndef G4VPrimaryGenerator_h
@@ -22,7 +22,7 @@
//
//
// $Id: G4VUserEventInformation.hh,v 1.1 2003/09/09 20:09:17 asaim Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
//---------------------------------------------------------------
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: eventgendefs.hh,v 1.3 2001/07/11 09:58:50 gunter Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
#ifndef EventGenerator_DEBUG
#define EventGenerator_DEBUG
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: evmandefs.hh,v 1.3 2001/07/11 09:58:50 gunter Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
///#define G4EVENTMANAGER_DEBUG 1
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: trajectoryControl.hh,v 1.3 2001/07/11 09:58:51 gunter Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
////#define G4_STORE_TRAJECTORY 1
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4CellScorer.cc,v 1.3 2003/04/29 07:05:38 dressel Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4CellScorerStore.cc,v 1.3 2004/07/01 10:05:40 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4EvManMessenger.cc,v 1.4 2002/12/04 18:43:15 asaim Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
// --------------------------------------------------------------------
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4Event.cc,v 1.8 2004/06/11 14:11:18 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
// G4Event
+3 -4
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4EventManager.cc,v 1.21 2004/08/10 23:59:37 asaim Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4EventManager.cc,v 1.22 2005/11/21 23:45:48 asaim Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
//
@@ -324,8 +324,7 @@ void G4EventManager::ProcessOneEvent(G4Event* anEvent)
DoProcessing(anEvent);
}
#ifndef WIN32 // Temporarly disabled on Windows, until CLHEP
// will support the HepMC module
#ifdef CLHEP_HepMC // Temporarly disabled
#include "G4HepMCInterface.hh"
void G4EventManager::ProcessOneEvent(const HepMC::GenEvent* hepmcevt,G4Event* anEvent)
{
@@ -58,12 +58,6 @@
#include "G4UIcmdWithABool.hh"
#include "G4ios.hh"
//#include <iostream.h>
#include <fstream>
#include <iomanip>
#include <strstream>
#include "G4Tokenizer.hh"
#include "G4GeneralParticleSourceMessenger.hh"
#include "G4SingleParticleSource.hh"
@@ -166,7 +160,7 @@ G4GeneralParticleSourceMessenger::G4GeneralParticleSourceMessenger
ionCmd = new G4UIcommand("/gps/ion",this);
ionCmd->SetGuidance("Set properties of ion to be generated.");
ionCmd->SetGuidance("[usage] /gun/ion Z A Q E");
ionCmd->SetGuidance("[usage] /gps/ion Z A Q E");
ionCmd->SetGuidance(" Z:(int) AtomicNumber");
ionCmd->SetGuidance(" A:(int) AtomicMass");
ionCmd->SetGuidance(" Q:(int) Charge of Ion (in unit of e)");
+2 -3
View File
@@ -21,14 +21,13 @@
// ********************************************************************
//
//
// $Id: G4HEPEvtInterface.cc,v 1.9 2003/06/16 16:50:33 gunter Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4HEPEvtInterface.cc,v 1.10 2005/11/18 21:46:24 asaim Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// --------------------------------------------------------------------
#include "G4Types.hh"
#include <strstream>
#include "G4ios.hh"
#include "G4HEPEvtInterface.hh"
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4HEPEvtParticle.cc,v 1.7 2004/06/11 14:11:19 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
-76
View File
@@ -1,76 +0,0 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// ====================================================================
//
// G4HepMCAsciiReader.cc
// $Id: G4HepMCAsciiReader.cc,v 1.4 2003/12/09 15:35:04 gunter Exp $
//
// ====================================================================
#ifndef WIN32 // Temporarly disabled on Windows, until CLHEP
// will support the HepMC module
#include "G4HepMCAsciiReader.hh"
#include "G4HepMCAsciiReaderMessenger.hh"
//#include "g4std/iostream"
////////////////////////////////////////
G4HepMCAsciiReader::G4HepMCAsciiReader()
: filename("xxx.dat"), verbose(0)
////////////////////////////////////////
{
messenger= new G4HepMCAsciiReaderMessenger(this);
}
/////////////////////////////////////////
G4HepMCAsciiReader::~G4HepMCAsciiReader()
/////////////////////////////////////////
{
delete messenger;
}
/////////////////////////////////////
void G4HepMCAsciiReader::Initialize()
/////////////////////////////////////
{
from.close();
from.open(filename.c_str(), std::ios::in);
}
/////////////////////////////////////////////////////////
HepMC::GenEvent* G4HepMCAsciiReader::GenerateHepMCEvent()
/////////////////////////////////////////////////////////
{
HepMC::GenEvent* evt= HepMC::readGenEvent(from);
if(evt==0) {
return 0; // no more event
from.close();
}
if(verbose>0) evt-> print();
return evt;
}
#endif
@@ -1,102 +0,0 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// ====================================================================
//
// G4HepMCAsciiReaderMessenger.cc
// $Id: G4HepMCAsciiReaderMessenger.cc,v 1.3 2003/12/09 15:35:05 gunter Exp $
//
// ====================================================================
#ifndef WIN32 // Temporarly disabled on Windows, until CLHEP
// will support the HepMC module
#include "G4HepMCAsciiReaderMessenger.hh"
#include "G4HepMCAsciiReader.hh"
#include "G4UIdirectory.hh"
#include "G4UIcmdWithoutParameter.hh"
#include "G4UIcmdWithAString.hh"
#include "G4UIcmdWithAnInteger.hh"
////////////////////////////////////////////////////////
G4HepMCAsciiReaderMessenger::G4HepMCAsciiReaderMessenger
(G4HepMCAsciiReader* agen)
: gen(agen)
////////////////////////////////////////////////////////
{
dir= new G4UIdirectory("/generator/hepmcAscii/");
dir-> SetGuidance("Reading HepMC event from an Ascii file");
verbose=
new G4UIcmdWithAnInteger("/generator/hepmcAscii/verbose", this);
verbose-> SetGuidance("Set verbose level");
verbose-> SetParameterName("verboseLevel", false, false);
verbose-> SetRange("verboseLevel>=0 && verboseLevel<=1");
open= new G4UIcmdWithAString("/generator/hepmcAscii/open", this);
open-> SetGuidance("(re)open data file (HepMC Ascii format)");
open-> SetParameterName("input ascii file", true, true);
}
///////////////////////////////////////////////////////////
G4HepMCAsciiReaderMessenger::~G4HepMCAsciiReaderMessenger()
///////////////////////////////////////////////////////////
{
delete verbose;
delete open;
delete dir;
}
///////////////////////////////////////////////////////////////////
void G4HepMCAsciiReaderMessenger::SetNewValue(G4UIcommand* command,
G4String newValues)
///////////////////////////////////////////////////////////////////
{
if (command==verbose) {
int level= verbose-> GetNewIntValue(newValues);
gen-> SetVerboseLevel(level);
} else if (command==open) {
gen-> SetFileName(newValues);
G4cout << "HepMC Ascii inputfile: "
<< gen-> GetFileName() << G4endl;
gen-> Initialize();
}
}
///////////////////////////////////////////////////////////////////////////
G4String G4HepMCAsciiReaderMessenger::GetCurrentValue(G4UIcommand* command)
///////////////////////////////////////////////////////////////////////////
{
G4String cv;
if (command == verbose) {
cv= verbose-> ConvertToString(gen-> GetVerboseLevel());
} else if (command == open) {
cv= gen-> GetFileName();
}
return cv;
}
#endif
-128
View File
@@ -1,128 +0,0 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// ====================================================================
//
// G4HepMCInterface.cc
// $Id: G4HepMCInterface.cc,v 1.4 2003/12/09 15:35:06 gunter Exp $
//
// ====================================================================
#ifndef WIN32 // Temporarly disabled on Windows, until CLHEP
// will support the HepMC module
#include "G4HepMCInterface.hh"
#include "globals.hh"
#include "G4LorentzVector.hh"
#include "G4Event.hh"
#include "G4PrimaryParticle.hh"
#include "G4PrimaryVertex.hh"
////////////////////////////////////
G4HepMCInterface::G4HepMCInterface()
: hepmcEvent(0)
////////////////////////////////////
{
}
/////////////////////////////////////
G4HepMCInterface::~G4HepMCInterface()
/////////////////////////////////////
{
delete hepmcEvent;
}
////////////////////////////////////////////////////////////////
void G4HepMCInterface::HepMC2G4(const HepMC::GenEvent* hepmcevt,
G4Event* g4event)
////////////////////////////////////////////////////////////////
{
for(HepMC::GenEvent::vertex_const_iterator vitr= hepmcevt->vertices_begin();
vitr != hepmcevt->vertices_end(); ++vitr ) { // loop for vertex ...
// real vertex?
G4bool qvtx=false;
for (HepMC::GenVertex::particle_iterator
pitr= (*vitr)->particles_begin(HepMC::children);
pitr != (*vitr)->particles_end(HepMC::children); ++pitr) {
if (!(*pitr)->end_vertex() && (*pitr)->status()==1) {
qvtx=true;
break;
}
}
if (!qvtx) continue;
// check world boundary
G4LorentzVector xvtx= (*vitr)-> position();
if (! CheckVertexInsideWorld(xvtx.vect()*mm)) continue;
// create G4PrimaryVertex and associated G4PrimaryParticles
G4PrimaryVertex* g4vtx=
new G4PrimaryVertex(xvtx.x()*mm, xvtx.y()*mm, xvtx.z()*mm,
xvtx.t()*mm/c_light);
for (HepMC::GenVertex::particle_iterator
vpitr= (*vitr)->particles_begin(HepMC::children);
vpitr != (*vitr)->particles_end(HepMC::children); ++vpitr) {
if( (*vpitr)->status() != 1 ) continue;
G4int pdgcode= (*vpitr)-> pdg_id();
G4LorentzVector p= (*vpitr)-> momentum();
G4PrimaryParticle* g4prim=
new G4PrimaryParticle(pdgcode, p.x()*GeV, p.y()*GeV, p.z()*GeV);
g4vtx-> SetPrimary(g4prim);
}
g4event-> AddPrimaryVertex(g4vtx);
}
}
///////////////////////////////////////////////////////
HepMC::GenEvent* G4HepMCInterface::GenerateHepMCEvent()
///////////////////////////////////////////////////////
{
HepMC::GenEvent* aevent= new HepMC::GenEvent();
return aevent;
}
//////////////////////////////////////////////////////////////
void G4HepMCInterface::GeneratePrimaryVertex(G4Event* anEvent)
//////////////////////////////////////////////////////////////
{
// delete previous event object
delete hepmcEvent;
// generate next event
hepmcEvent= GenerateHepMCEvent();
if(! hepmcEvent) {
G4Exception("G4HepMCInterface","GeneratePrimaryVertex",RunMustBeAborted,
"HepMCInterface: no generated particles. run terminated..." );
return;
}
HepMC2G4(hepmcEvent, anEvent);
}
#endif
+7 -2
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4ParticleGun.cc,v 1.9 2005/04/27 01:32:46 asaim Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4ParticleGun.cc,v 1.10 2005/11/22 21:06:29 asaim Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
// G4ParticleGun
@@ -73,6 +73,11 @@ G4ParticleGun::~G4ParticleGun()
void G4ParticleGun::SetParticleDefinition
(G4ParticleDefinition * aParticleDefinition)
{
if(!aParticleDefinition)
{
G4Exception("G4ParticleGun::SetParticleDefinition()","Event00003",FatalException,
"Null pointer is given.");
}
if(aParticleDefinition->IsShortLived())
{
if(!(aParticleDefinition->GetDecayTable()))
+2 -5
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4ParticleGunMessenger.cc,v 1.12 2005/04/27 01:32:46 asaim Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4ParticleGunMessenger.cc,v 1.13 2005/11/18 21:46:24 asaim Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
#include "G4ParticleGunMessenger.hh"
@@ -41,9 +41,6 @@
#include "G4ios.hh"
#include "G4Tokenizer.hh"
#include <iomanip>
#include <strstream>
G4ParticleGunMessenger::G4ParticleGunMessenger(G4ParticleGun * fPtclGun)
:fParticleGun(fPtclGun),fShootIon(false)
{
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4PrimaryTransformer.cc,v 1.23 2005/05/30 07:05:47 asaim Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
#include "G4PrimaryTransformer.hh"
+3 -5
View File
@@ -43,8 +43,6 @@
///////////////////////////////////////////////////////////////////////////////
//
#include "Randomize.hh"
//#include <cmath>
#include "G4SPSAngDistribution.hh"
G4SPSAngDistribution::G4SPSAngDistribution()
@@ -54,9 +52,9 @@ G4SPSAngDistribution::G4SPSAngDistribution()
particle_momentum_direction = G4ParticleMomentum(0,0,-1);
AngDistType = "planar";
AngRef1 = HepXHat;
AngRef2 = HepYHat;
AngRef3 = HepZHat;
AngRef1 = CLHEP::HepXHat;
AngRef2 = CLHEP::HepYHat;
AngRef3 = CLHEP::HepZHat;
MinTheta = 0.;
MaxTheta = pi;
MinPhi = 0.;
+6 -7
View File
@@ -42,7 +42,6 @@
///////////////////////////////////////////////////////////////////////////////
//
#include "Randomize.hh"
//#include <cmath>
#include "G4TransportationManager.hh"
#include "G4VPhysicalVolume.hh"
#include "G4PhysicalVolumeStore.hh"
@@ -69,14 +68,14 @@ G4SPSPosDistribution::G4SPSPosDistribution()
ParTheta = 0.;
ParPhi = 0.;
CentreCoords = G4ThreeVector(0., 0., 0.);
Rotx = HepXHat;
Roty = HepYHat;
Rotz = HepZHat;
Rotx = CLHEP::HepXHat;
Roty = CLHEP::HepYHat;
Rotz = CLHEP::HepZHat;
Confine = false; //If true confines source distribution to VolName
VolName = "NULL";
SideRefVec1 = HepXHat; // x-axis
SideRefVec2 = HepYHat; // y-axis
SideRefVec3 = HepZHat; // z-axis
SideRefVec1 = CLHEP::HepXHat; // x-axis
SideRefVec2 = CLHEP::HepYHat; // y-axis
SideRefVec3 = CLHEP::HepZHat; // z-axis
verbosityLevel = 0 ;
gNavigator = G4TransportationManager::GetTransportationManager()
->GetNavigatorForTracking();
+6 -9
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4ScoreTable.cc,v 1.3 2003/06/16 16:50:36 gunter Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4ScoreTable.cc,v 1.5 2005/12/09 17:23:19 ahoward Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
@@ -32,7 +32,7 @@
// ----------------------------------------------------------------------
#include "G4ScoreTable.hh"
#include <strstream>
#include <sstream>
#include "G4VPhysicalVolume.hh"
#include "G4VIStore.hh"
@@ -86,12 +86,10 @@ void G4ScoreTable::PrintHeader(std::ostream *out)
G4String G4ScoreTable::CreateName(const G4GeometryCell &gCell) {
char st[200];
std::ostrstream os(st,200);
std::ostringstream os;
os << gCell.GetPhysicalVolume().GetName()
<< "_rep:" << gCell.GetReplicaNumber()
<< '\0';
G4String name(st);
<< "_rep:" << gCell.GetReplicaNumber();
G4String name = os.str();
return name;
}
@@ -125,7 +123,6 @@ void G4ScoreTable::PrintTable(const G4MapGeometryCellCellScorer &mcs,
G4String name((*it).first);
PrintLine(name, (*it).second.GetStandardCellScoreValues(), out);
}
*out << '\0';
out->flush();
}
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4Scorer.cc,v 1.1 2002/10/28 10:06:01 dressel Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
// ----------------------------------------------------------------------
// GEANT 4 class source file
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4StackChecker.cc,v 1.1 2003/06/12 15:14:44 vnivanch Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
#include "G4StackChecker.hh"
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4StackManager.cc,v 1.9 2003/08/13 23:44:39 asaim Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// Last Modification : 09/Dec/96 M.Asai
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4StackedTrack.cc,v 1.8 2004/06/11 14:11:20 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// Last Modification : 02/Feb/96 M.Asai
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4StackingMessenger.cc,v 1.4 2002/12/04 18:43:15 asaim Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
// --------------------------------------------------------------------
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4TrackStack.cc,v 1.5 2002/12/03 17:04:22 asaim Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
#include "G4TrackStack.hh"
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4TrajectoryContainer.cc,v 1.4 2004/06/11 14:11:21 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
#include "G4TrajectoryContainer.hh"
+20 -3
View File
@@ -21,16 +21,33 @@
// ********************************************************************
//
//
// $Id: G4UserEventAction.cc,v 1.5 2003/05/21 20:52:54 asaim Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4UserEventAction.cc,v 1.6 2005/11/22 21:06:29 asaim Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
#include "G4UserEventAction.hh"
#include "G4Event.hh"
#include "G4EventManager.hh"
#include "G4ParticleTable.hh"
#include "globals.hh"
void G4UserEventAction::BeginOfEventAction(const G4Event*)
{;}
{
if(!(G4ParticleTable::GetParticleTable()->GetReadiness()))
{
G4String msg;
msg = " You are instantiating G4UserEventAction BEFORE your\n";
msg += "G4VUserPhysicsList is instantiated and assigned to G4RunManager.\n";
msg += " Such an instantiation is prohibited by Geant4 version 8.0. To fix this problem,\n";
msg += "please make sure that your main() instantiates G4VUserPhysicsList AND\n";
msg += "set it to G4RunManager before instantiating other user action classes\n";
msg += "such as G4UserEventAction.";
G4Exception("G4UserEventAction::G4UserEventAction()",
"Event0001",FatalException,msg);
}
}
void G4UserEventAction::EndOfEventAction(const G4Event*)
{;}
+20 -3
View File
@@ -21,16 +21,33 @@
// ********************************************************************
//
//
// $Id: G4UserStackingAction.cc,v 1.5 2003/05/21 20:52:54 asaim Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4UserStackingAction.cc,v 1.6 2005/11/22 21:06:29 asaim Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
#include "G4UserStackingAction.hh"
#include "G4Track.hh"
#include "G4ios.hh"
#include "G4ParticleTable.hh"
#include "globals.hh"
G4UserStackingAction::G4UserStackingAction()
{;}
{
if(!(G4ParticleTable::GetParticleTable()->GetReadiness()))
{
G4String msg;
msg = " You are instantiating G4UserStackingAction BEFORE your\n";
msg += "G4VUserPhysicsList is instantiated and assigned to G4RunManager.\n";
msg += " Such an instantiation is prohibited by Geant4 version 8.0. To fix this problem,\n";
msg += "please make sure that your main() instantiates G4VUserPhysicsList AND\n";
msg += "set it to G4RunManager before instantiating other user action classes\n";
msg += "such as G4UserStackingAction.";
G4Exception("G4UserStackingAction::G4UserStackingAction()",
"Event0002",FatalException,msg);
}
}
G4UserStackingAction::~G4UserStackingAction()
{;}
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4VPrimaryGenerator.cc,v 1.4 2003/08/02 00:18:30 asaim Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
// G4VPrimaryGenerator