Import Geant4 9.0.0 source tree
This commit is contained in:
+14
-1
@@ -1,4 +1,4 @@
|
||||
$Id: History,v 1.108 2007/03/08 23:56:12 asaim Exp $
|
||||
$Id: History,v 1.113 2007/06/12 08:49:18 gcosmo Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -17,6 +17,19 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
June 11, 2007, G.Santin (event-V08-03-02)
|
||||
- Fix to normalisation of source intensities with multiple sources:
|
||||
G4GeneralParticleSource::IntensityNormalization
|
||||
|
||||
June 4, 2007, A.Howard (event-V08-03-01)
|
||||
- Put back some classes required for scoring of biasing cells:
|
||||
G4CellScorerStore and G4CellScorer
|
||||
|
||||
May 31, 2007, A.Howard (event-V08-03-00)
|
||||
- Removal of classes from old biasing/scoring scheme:
|
||||
G4CellScorer, G4CellScorerStore, G4ScoreTable, G4Scorer
|
||||
- Files remain on the HEAD for testing purposes
|
||||
|
||||
March 8, 2007, M.Asai (event-V08-02-01)
|
||||
- Consolidation of previous tag with a new flag in G4EventManager.
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4CellScorer.hh,v 1.2 2006/06/29 18:08:19 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4CellScorer
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4CellScorerStore.hh,v 1.3 2006/06/29 18:08:21 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4CellScorerStore
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ClassificationOfNewTrack.hh,v 1.6 2006/06/29 18:08:23 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4EvManMessenger.hh,v 1.6 2006/11/03 03:11:13 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
|
||||
#ifndef G4EvManMessenger_h
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Event.hh,v 1.17 2007/03/08 23:56:12 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-03 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
|
||||
#ifndef G4Event_h
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4EventManager.hh,v 1.22 2007/03/08 23:56:12 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-03 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4HEPEvtInterface.hh,v 1.8 2006/06/29 18:08:36 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
|
||||
#ifndef G4HEPEvtInterface_h
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4HEPEvtParticle.hh,v 1.9 2006/06/29 18:08:39 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ParticleGun.hh,v 1.8 2006/06/29 18:08:42 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
|
||||
#ifndef G4ParticleGun_h
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ParticleGunMessenger.hh,v 1.8 2006/06/29 18:08:44 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4PrimaryTransformer.hh,v 1.12 2006/06/29 18:08:46 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
|
||||
#ifndef G4PromaryTransformer_h
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4RayShooter.hh,v 1.2 2006/06/29 18:08:49 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
|
||||
// class description:
|
||||
|
||||
@@ -1,91 +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: G4ScoreTable.hh,v 1.3 2006/06/29 18:08:59 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4ScoreTable
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// This class creates a table from a given G4CellScoreStore
|
||||
// and prints it to a given output stream.
|
||||
//
|
||||
|
||||
// Author: Michael Dressel (Michael.Dressel@cern.ch)
|
||||
// ----------------------------------------------------------------------
|
||||
//
|
||||
|
||||
#ifndef G4ScoreTable_hh
|
||||
#define G4ScoreTable_hh G4ScoreTable_hh
|
||||
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <vector>
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4CellScorerStore.hh"
|
||||
#include "G4CellScoreValues.hh"
|
||||
class G4VIStore;
|
||||
|
||||
|
||||
class G4ScoreTable
|
||||
{
|
||||
public: // with description
|
||||
explicit G4ScoreTable(const G4VIStore *aIStore = 0);
|
||||
|
||||
~G4ScoreTable();
|
||||
|
||||
void Print(const G4MapGeometryCellCellScorer &cs,
|
||||
std::ostream *out = 0);
|
||||
// create the table and print it to the ouput stream.
|
||||
|
||||
void PrintHeader(std::ostream *out);
|
||||
// print the table header, done by the above Print() function
|
||||
|
||||
void PrintTable(const G4MapGeometryCellCellScorer &cs,
|
||||
std::ostream *out);
|
||||
// print the table contend, done by the above Print() function
|
||||
|
||||
std::string FillString(const std::string &name,
|
||||
char c, G4int n, G4bool back = true);
|
||||
// create a string of length n, by filling up
|
||||
// name with the char c.
|
||||
|
||||
private:
|
||||
G4ScoreTable(const G4ScoreTable &);
|
||||
G4ScoreTable &operator=(const G4ScoreTable &);
|
||||
|
||||
G4String CreateName(const G4GeometryCell &gCell);
|
||||
void PrintLine(const G4String &name,
|
||||
const G4CellScoreValues &sc_scores,
|
||||
std::ostream *out);
|
||||
const G4VIStore *fIStore;
|
||||
G4int FieldName;
|
||||
G4int FieldValue;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,68 +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: G4Scorer.hh,v 1.2 2006/06/29 18:09:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4Scorer
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// This is a simple scorer using the G4CellScorerStore and
|
||||
// G4CellStoreScorer.
|
||||
//
|
||||
|
||||
// Author: Michael Dressel (Michael.Dressel@cern.ch)
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#ifndef G4Scorer_hh
|
||||
#define G4Scorer_hh G4Scorer_hh
|
||||
|
||||
#include "G4VScorer.hh"
|
||||
#include "G4CellScorerStore.hh"
|
||||
#include "G4CellStoreScorer.hh"
|
||||
|
||||
class G4Scorer : public G4VScorer {
|
||||
public: // with description
|
||||
G4Scorer();
|
||||
|
||||
virtual ~G4Scorer();
|
||||
|
||||
virtual void Score(const G4Step &aStep, const G4GeometryCellStep &aPStep);
|
||||
// called to score a track for every step
|
||||
|
||||
const G4MapGeometryCellCellScorer &GetMapGeometryCellCellScorer() const ;
|
||||
// returns a reference to the store containing the scores
|
||||
|
||||
private:
|
||||
G4Scorer(const G4Scorer &);
|
||||
G4Scorer &operator=(const G4Scorer &);
|
||||
G4CellScorerStore fCellScorerStore;
|
||||
G4CellStoreScorer fCellStoreScorer;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4StackChecker.hh,v 1.2 2006/06/29 18:09:05 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
|
||||
#ifndef G4StackChecker_h
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4StackManager.hh,v 1.12 2006/06/29 18:09:07 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4StackedTrack.hh,v 1.10 2006/06/29 18:09:09 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
//
|
||||
// Last Modification : 02/Feb/96 M.Asai
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4StackingMessenger.hh,v 1.5 2006/06/29 18:09:11 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
|
||||
#ifndef G4StackingMessenger_h
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4TrackStack.hh,v 1.6 2006/06/29 18:09:13 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
//
|
||||
// Last Modification : 09/Dec/96 M.Asai
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4TrajectoryContainer.hh,v 1.15 2006/06/29 18:09:15 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
//
|
||||
// G4TrajectoryContainer
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4UserEventAction.hh,v 1.6 2006/06/29 18:09:17 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4UserStackingAction.hh,v 1.6 2006/06/29 18:09:19 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
|
||||
#ifndef G4UserStackingAction_h
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VPrimaryGenerator.hh,v 1.8 2006/06/29 18:09:21 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
|
||||
#ifndef G4VPrimaryGenerator_h
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VUserEventInformation.hh,v 1.2 2006/06/29 18:09:23 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: eventgendefs.hh,v 1.4 2006/06/29 18:09:25 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
#ifndef EventGenerator_DEBUG
|
||||
#define EventGenerator_DEBUG
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: evmandefs.hh,v 1.4 2006/06/29 18:09:27 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
|
||||
///#define G4EVENTMANAGER_DEBUG 1
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: trajectoryControl.hh,v 1.4 2006/06/29 18:09:29 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
////#define G4_STORE_TRAJECTORY 1
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4CellScorer.cc,v 1.4 2006/06/29 18:09:31 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4CellScorerStore.cc,v 1.4 2006/06/29 18:09:33 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4EvManMessenger.cc,v 1.6 2006/11/03 03:11:13 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Event.cc,v 1.14 2007/03/07 02:44:16 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-03 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
|
||||
// G4Event
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4EventManager.cc,v 1.30 2007/03/08 23:56:12 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-08-03 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
@@ -99,19 +99,23 @@ void G4GeneralParticleSource::IntensityNormalization()
|
||||
total += sourceIntensity[i] ;
|
||||
//
|
||||
sourceProbability.clear();
|
||||
sourceIntensity[0] = sourceIntensity[0]/total;
|
||||
sourceProbability.push_back(sourceIntensity[0]);
|
||||
std::vector <G4double> sourceNormalizedIntensity;
|
||||
sourceNormalizedIntensity.clear();
|
||||
|
||||
sourceNormalizedIntensity.push_back(sourceIntensity[0]/total);
|
||||
sourceProbability.push_back(sourceNormalizedIntensity[0]);
|
||||
|
||||
for ( i = 1 ; i < sourceIntensity.size(); i++) {
|
||||
sourceIntensity[i] = sourceIntensity[i]/total;
|
||||
sourceProbability.push_back(sourceIntensity[i] + sourceProbability[i-1]);
|
||||
}
|
||||
sourceNormalizedIntensity.push_back(sourceIntensity[i]/total);
|
||||
sourceProbability.push_back(sourceNormalizedIntensity[i] + sourceProbability[i-1]);
|
||||
}
|
||||
|
||||
// set source weights here based on sampling scheme (analog/flat) and intensities
|
||||
for ( i = 0 ; i < sourceIntensity.size(); i++) {
|
||||
if (!flat_sampling) {
|
||||
sourceVector[i]->GetBiasRndm()->SetIntensityWeight(1.);
|
||||
} else {
|
||||
sourceVector[i]->GetBiasRndm()->SetIntensityWeight(sourceIntensity[i]*sourceIntensity.size());
|
||||
sourceVector[i]->GetBiasRndm()->SetIntensityWeight(sourceNormalizedIntensity[i]*sourceIntensity.size());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,8 +124,8 @@ void G4GeneralParticleSource::IntensityNormalization()
|
||||
|
||||
void G4GeneralParticleSource::ListSource()
|
||||
{
|
||||
G4cout << " The number of particle source is " << sourceIntensity.size() << G4endl;
|
||||
for (size_t i = 0 ; i < sourceIntensity.size(); i++)
|
||||
G4cout << " The number of particle sources is " << sourceIntensity.size() << G4endl;
|
||||
for (size_t i = 0 ; i < sourceIntensity.size(); i++)
|
||||
G4cout << " source " << i << " intensity is " << sourceIntensity[i] << G4endl;
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4HEPEvtInterface.cc,v 1.11 2006/06/29 18:09:48 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4HEPEvtParticle.cc,v 1.8 2006/06/29 18:09:50 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ParticleGun.cc,v 1.12 2006/06/29 18:09:53 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
|
||||
// G4ParticleGun
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ParticleGunMessenger.cc,v 1.14 2006/06/29 18:09:55 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
|
||||
#include "G4ParticleGunMessenger.hh"
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4PrimaryTransformer.cc,v 1.27 2006/06/29 18:09:58 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
|
||||
#include "G4PrimaryTransformer.hh"
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4RayShooter.cc,v 1.2 2006/06/29 18:10:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
|
||||
#include "G4RayShooter.hh"
|
||||
|
||||
@@ -1,186 +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: G4ScoreTable.cc,v 1.6 2006/06/29 18:10:11 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
//
|
||||
// G4ScoreTable.cc
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#include "G4ScoreTable.hh"
|
||||
#include <sstream>
|
||||
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
#include "G4VIStore.hh"
|
||||
#include <set>
|
||||
#include "G4CellScorer.hh"
|
||||
|
||||
|
||||
G4ScoreTable::G4ScoreTable(const G4VIStore *aIStore) :
|
||||
fIStore(aIStore),
|
||||
FieldName(25),
|
||||
FieldValue(12)
|
||||
{}
|
||||
|
||||
G4ScoreTable::~G4ScoreTable()
|
||||
{}
|
||||
void G4ScoreTable::
|
||||
Print(const G4MapGeometryCellCellScorer &cs,
|
||||
std::ostream *out){
|
||||
if (!out) {
|
||||
out = &G4cout;
|
||||
}
|
||||
PrintHeader(out);
|
||||
PrintTable(cs, out);
|
||||
}
|
||||
|
||||
void G4ScoreTable::PrintHeader(std::ostream *out)
|
||||
{
|
||||
std::vector<G4String> vecScoreName;
|
||||
vecScoreName.push_back("Importance");
|
||||
vecScoreName.push_back("Tr.Entering");
|
||||
vecScoreName.push_back("Population");
|
||||
vecScoreName.push_back("Collisions");
|
||||
vecScoreName.push_back("Coll*WGT");
|
||||
vecScoreName.push_back("NumWGTedE");
|
||||
vecScoreName.push_back("FluxWGTedE");
|
||||
vecScoreName.push_back("Av.Tr.WGT");
|
||||
|
||||
// head line
|
||||
std::string vname = FillString("Volume name", ' ', FieldName+1);
|
||||
*out << vname << '|';
|
||||
for (std::vector<G4String>::iterator it = vecScoreName.begin();
|
||||
it != vecScoreName.end(); it++) {
|
||||
vname = FillString((*it),
|
||||
' ',
|
||||
FieldValue+1,
|
||||
false);
|
||||
*out << vname << '|';
|
||||
}
|
||||
*out << G4endl;
|
||||
}
|
||||
|
||||
G4String G4ScoreTable::CreateName(const G4GeometryCell &gCell) {
|
||||
|
||||
std::ostringstream os;
|
||||
os << gCell.GetPhysicalVolume().GetName()
|
||||
<< "_rep:" << gCell.GetReplicaNumber();
|
||||
G4String name = os.str();
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
|
||||
void G4ScoreTable::PrintTable(const G4MapGeometryCellCellScorer &mcs,
|
||||
std::ostream *out) {
|
||||
|
||||
// this lines sort the ScoreValues according to the volume
|
||||
// name they belong to
|
||||
std::map<G4String , G4CellScoreComposer> MapStringSCScorer;
|
||||
for (G4MapGeometryCellCellScorer::const_iterator mit =
|
||||
mcs.begin();
|
||||
mit != mcs.end(); ++mit) {
|
||||
G4GeometryCell gCell = (*mit).first; // get a key identifying a volume
|
||||
G4String name(CreateName(gCell));
|
||||
|
||||
G4double importance = 1;
|
||||
if (fIStore) {
|
||||
if (fIStore->IsKnown(gCell)) {
|
||||
importance = fIStore->GetImportance(gCell);
|
||||
}
|
||||
}
|
||||
MapStringSCScorer[name] = (*mit).second->GetCellScoreComposer();
|
||||
MapStringSCScorer[name].SetImportnace(importance);
|
||||
}
|
||||
// now do the printing
|
||||
for ( std::map<G4String , G4CellScoreComposer>::iterator
|
||||
it = MapStringSCScorer.begin();
|
||||
it != MapStringSCScorer.end(); ++it) {
|
||||
G4String name((*it).first);
|
||||
PrintLine(name, (*it).second.GetStandardCellScoreValues(), out);
|
||||
}
|
||||
out->flush();
|
||||
}
|
||||
|
||||
void G4ScoreTable::PrintLine(const G4String &name,
|
||||
const G4CellScoreValues &sc_scores,
|
||||
std::ostream *out)
|
||||
{
|
||||
std::string fname = FillString(name, '.', FieldName);
|
||||
*out << fname << " |";
|
||||
*out << std::setw(FieldValue) << sc_scores.fImportance
|
||||
<< " |";
|
||||
*out << std::setw(FieldValue) << sc_scores.fSumTracksEntering
|
||||
<< " |";
|
||||
*out << std::setw(FieldValue) << sc_scores.fSumPopulation << " |";
|
||||
*out << std::setw(FieldValue) << sc_scores.fSumCollisions << " |";
|
||||
*out << std::setw(FieldValue) << sc_scores.fSumCollisionsWeight
|
||||
<< " |";
|
||||
*out << std::setw(FieldValue) << sc_scores.fNumberWeightedEnergy
|
||||
<< " |";
|
||||
*out << std::setw(FieldValue) << sc_scores.fFluxWeightedEnergy
|
||||
<< " |";
|
||||
*out << std::setw(FieldValue) << sc_scores.fAverageTrackWeight*
|
||||
sc_scores.fImportance
|
||||
<< " |";
|
||||
|
||||
*out << G4endl;
|
||||
}
|
||||
|
||||
|
||||
std::string G4ScoreTable::FillString(const std::string &name,
|
||||
char c, G4int n, G4bool back)
|
||||
{
|
||||
std::string fname("");
|
||||
G4int k = n - name.size();
|
||||
if (k > 0) {
|
||||
if (back) {
|
||||
fname = name;
|
||||
fname += std::string(k,c);
|
||||
}
|
||||
else {
|
||||
fname = std::string(k,c);
|
||||
fname += name;
|
||||
}
|
||||
}
|
||||
else {
|
||||
fname = name;
|
||||
}
|
||||
return fname;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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: G4Scorer.cc,v 1.2 2006/06/29 18:10:13 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
//
|
||||
// G4Scorer.cc
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#include "G4Scorer.hh"
|
||||
|
||||
G4Scorer::G4Scorer()
|
||||
:
|
||||
fCellStoreScorer(fCellScorerStore)
|
||||
{
|
||||
fCellScorerStore.SetAutoScorerCreate();
|
||||
}
|
||||
|
||||
G4Scorer::~G4Scorer()
|
||||
{
|
||||
}
|
||||
|
||||
void G4Scorer::Score(const G4Step &aStep, const G4GeometryCellStep &aPStep){
|
||||
fCellStoreScorer.Score(aStep, aPStep);
|
||||
}
|
||||
|
||||
const G4MapGeometryCellCellScorer &G4Scorer::GetMapGeometryCellCellScorer() const {
|
||||
return fCellScorerStore.GetMapGeometryCellCellScorer();
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4StackChecker.cc,v 1.2 2006/06/29 18:10:17 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
|
||||
#include "G4StackChecker.hh"
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4StackManager.cc,v 1.10 2006/06/29 18:10:19 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
//
|
||||
// Last Modification : 09/Dec/96 M.Asai
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4StackedTrack.cc,v 1.9 2006/06/29 18:10:21 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
//
|
||||
// Last Modification : 02/Feb/96 M.Asai
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4StackingMessenger.cc,v 1.5 2006/06/29 18:10:23 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4TrackStack.cc,v 1.6 2006/06/29 18:10:26 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
|
||||
#include "G4TrackStack.hh"
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4TrajectoryContainer.cc,v 1.5 2006/06/29 18:10:28 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
|
||||
#include "G4TrajectoryContainer.hh"
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4UserEventAction.cc,v 1.7 2006/06/29 18:10:31 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
|
||||
#include "G4UserEventAction.hh"
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4UserStackingAction.cc,v 1.7 2006/06/29 18:10:33 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
|
||||
#include "G4UserStackingAction.hh"
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VPrimaryGenerator.cc,v 1.5 2006/06/29 18:10:35 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
// GEANT4 tag $Name: geant4-09-00 $
|
||||
//
|
||||
|
||||
// G4VPrimaryGenerator
|
||||
|
||||
Reference in New Issue
Block a user