Import Geant4 5.0.0 source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# $Id: GNUmakefile,v 1.2 2000/01/31 09:36:55 gcosmo Exp $
|
||||
# $Id: GNUmakefile,v 1.3 2002/10/28 10:01:49 dressel Exp $
|
||||
# --------------------------------------------------------------
|
||||
# GNUmakefile for digits+hits library. Makoto Asai, 1/11/96.
|
||||
# --------------------------------------------------------------
|
||||
@@ -19,6 +19,7 @@ CPPFLAGS += \
|
||||
-I$(G4BASE)/particles/management/include \
|
||||
-I$(G4BASE)/materials/include \
|
||||
-I$(G4BASE)/geometry/management/include \
|
||||
-I$(G4BASE)/geometry/biasing/include \
|
||||
-I$(G4BASE)/geometry/volumes/include \
|
||||
-I$(G4BASE)/digits+hits/hits/include \
|
||||
-I$(G4BASE)/intercoms/include
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: History,v 1.1 1999/01/07 16:06:24 gunter Exp $
|
||||
$Id: History,v 1.4 2002/11/04 10:51:49 dressel Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -17,5 +17,12 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
Nov, 4th 2002 M.Dressel
|
||||
- remove G4std:: where it does not belong to
|
||||
|
||||
Oct 28th, 2002 M.Dressel
|
||||
- added G4CellScoreComposer[.hh.cc], G4CellScoreValues.hh,
|
||||
G4CellStoreScorer[.hh.cc], G4TrackLogger[.hh.cc]
|
||||
|
||||
June 6, 98 M.Asai
|
||||
- Created.
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4CellScoreComposer.hh,v 1.1 2002/10/28 10:01:50 dressel Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4CellScoreComposer
|
||||
//
|
||||
// Class description:
|
||||
// This class will be created for every cell standard
|
||||
// scoring should be applied. It does the actual scoring.
|
||||
// GetStandardCellScoreValues() delivers the struct
|
||||
// G4CellScoreValues does calculations based on the
|
||||
// sums of scores and delivers the results in
|
||||
// G4CellScoreValues.
|
||||
//
|
||||
|
||||
// Author: Michael Dressel (Michael.Dressel@cern.ch)
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#ifndef G4CellScoreComposer_hh
|
||||
#define G4CellScoreComposer_hh G4CellScoreComposer_hh
|
||||
|
||||
#include "G4CellScoreValues.hh"
|
||||
|
||||
class G4Step;
|
||||
|
||||
class G4CellScoreComposer {
|
||||
public: // with description
|
||||
|
||||
G4CellScoreComposer();
|
||||
|
||||
~G4CellScoreComposer();
|
||||
|
||||
void EstimatorCalculation(const G4Step &step);
|
||||
// get values for estimators based on
|
||||
// track length
|
||||
|
||||
void TrackEnters();
|
||||
// to be called if a track enters the cell
|
||||
|
||||
void NewTrackPopedUp();
|
||||
// to be caled if the cell popultion is increased
|
||||
|
||||
void SetCollisionWeight(G4double weight);
|
||||
// to be called for every collision
|
||||
// in the cell with the weight of the colliding particle
|
||||
|
||||
void SetImportnace(G4double importance);
|
||||
// informs G4CellScoreComposer about the importance of the cell
|
||||
|
||||
const G4CellScoreValues &GetStandardCellScoreValues() const;
|
||||
// return scores in G4CellScoreValues
|
||||
|
||||
private:
|
||||
mutable G4CellScoreValues fSCScoreValues;
|
||||
};
|
||||
|
||||
G4std::ostream& operator<<(G4std::ostream &out,
|
||||
const G4CellScoreComposer &ps);
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4CellScoreValues.hh,v 1.1 2002/10/28 10:01:50 dressel Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4CellScoreValues
|
||||
//
|
||||
// Class description:
|
||||
// This struct holds sums of scores for standard scoring.
|
||||
//
|
||||
//
|
||||
|
||||
// Author: Michael Dressel (Michael.Dressel@cern.ch)
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#ifndef G4CellScoreValues_hh
|
||||
#define G4CellScoreValues_hh G4CellScoreValues_hh
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
struct G4CellScoreValues {
|
||||
G4double fSumSL;
|
||||
G4double fSumSLW;
|
||||
G4double fSumSLW_v;
|
||||
G4double fSumSLWE;
|
||||
G4double fSumSLWE_v;
|
||||
G4int fSumTracksEntering;
|
||||
G4int fSumPopulation;
|
||||
G4int fSumCollisions;
|
||||
G4double fSumCollisionsWeight;
|
||||
G4double fNumberWeightedEnergy;
|
||||
G4double fFluxWeightedEnergy;
|
||||
G4double fAverageTrackWeight;
|
||||
G4double fImportance;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,73 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4CellStoreScorer.hh,v 1.1 2002/10/28 10:01:50 dressel Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4CellStoreScorer
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// This class invokes a G4VCellScorer according to the current
|
||||
// step:
|
||||
// - pre and post step are in a volume -> chose post gCell (cell)
|
||||
// and call ScoreInVolume
|
||||
// - cross boundary between gCells (cells)
|
||||
// call ScoreAnExtingStep on the pre cell
|
||||
// and ScoreAnEnteringStep on the post cell.
|
||||
//
|
||||
|
||||
// Author: Michael Dressel (Michael.Dressel@cern.ch)
|
||||
// ----------------------------------------------------------------------
|
||||
//
|
||||
|
||||
#ifndef G4CellStoreScorer_hh
|
||||
#define G4CellStoreScorer_hh G4CellStoreScorer_hh
|
||||
|
||||
|
||||
#include "G4VScorer.hh"
|
||||
|
||||
class G4VCellScorerStore;
|
||||
class G4Step;
|
||||
class G4GeometryCellStep;
|
||||
class G4GeometryCell;
|
||||
|
||||
class G4CellStoreScorer : public G4VScorer
|
||||
{
|
||||
public: // with description
|
||||
explicit G4CellStoreScorer(G4VCellScorerStore &csc);
|
||||
// take a G4VCellScorerStore created by the user to score
|
||||
// the cells contained in it.
|
||||
|
||||
virtual ~G4CellStoreScorer();
|
||||
virtual void Score(const G4Step &aStep, const G4GeometryCellStep &aPStep);
|
||||
// called to score a track for every step
|
||||
|
||||
private:
|
||||
G4VCellScorerStore &fCellScorerStore;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4CollectionNameVector.hh,v 1.2 2001/07/11 09:58:42 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
|
||||
#ifndef G4CollectionNameVector_H
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4HCtable.hh,v 1.6 2001/07/11 09:58:42 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
|
||||
#ifndef G4HCtable_H
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4SDManager.hh,v 1.4 2001/07/11 09:58:43 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
|
||||
#ifndef G4SDManager_h
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4SDStructure.hh,v 1.7 2001/07/13 15:00:06 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
|
||||
#ifndef G4SDStructure_h
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4SDmessenger.hh,v 1.4 2001/07/11 09:58:43 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
|
||||
#ifndef G4SDmessenger_h
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4SensitiveVolumeList.hh,v 1.6 2001/07/11 09:58:43 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file --- Copyright CERN 1996
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4SensitiveVolumeList.icc,v 1.5 2001/07/11 09:58:43 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// -----------------------------------------------------------
|
||||
// Inline functions of GEANT 4 class header file.
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4TrackLogger.hh,v 1.1 2002/10/28 10:01:50 dressel Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4TrackLogger
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// This class loggs every track via it's id. It may tell if
|
||||
// a track has been logged. The loggs are cleared when ever
|
||||
// the object has been informed about a new event.
|
||||
//
|
||||
// Author: Michael Dressel (Michael.Dressel@cern.ch)
|
||||
// ----------------------------------------------------------------------
|
||||
//
|
||||
|
||||
#ifndef G4TrackLogger_hh
|
||||
#define G4TrackLogger_hh G4TrackLogger_hh
|
||||
|
||||
#include "globals.hh"
|
||||
#include "g4std/set"
|
||||
|
||||
class G4TrackLogger {
|
||||
public:
|
||||
G4TrackLogger();
|
||||
~G4TrackLogger();
|
||||
|
||||
void SetEventID(G4int id);
|
||||
// inform the object about the event number
|
||||
// if the event number changes the loggs are cleared.
|
||||
|
||||
G4bool FirstEnterance(G4int trid);
|
||||
// returns true if the track is new to this event.
|
||||
|
||||
typedef G4std::set<G4int > TrackIDsSet;
|
||||
// log for the track ids.
|
||||
|
||||
private:
|
||||
G4int fPreviousEventID;
|
||||
TrackIDsSet fTrackIDsSet;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VReadOutGeometry.hh,v 1.3 2001/07/11 09:58:43 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VSensitiveDetector.hh,v 1.7 2001/07/13 15:00:06 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
|
||||
#ifndef G4VSensitiveDetector_h
|
||||
|
||||
@@ -0,0 +1,114 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4CellScoreComposer.cc,v 1.2 2002/11/04 10:51:49 dressel Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
//
|
||||
// G4CellSCoreComposer.cc
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#include "G4CellScoreComposer.hh"
|
||||
#include "G4Step.hh"
|
||||
|
||||
G4CellScoreComposer::G4CellScoreComposer()
|
||||
{
|
||||
G4CellScoreValues v = {0};
|
||||
fSCScoreValues = v;
|
||||
}
|
||||
G4CellScoreComposer::~G4CellScoreComposer()
|
||||
{}
|
||||
|
||||
void G4CellScoreComposer::EstimatorCalculation(const G4Step &aStep){
|
||||
|
||||
G4StepPoint *p = 0;
|
||||
p = aStep.GetPreStepPoint();
|
||||
if (!p) {
|
||||
G4Exception("G4CellScoreComposer::EstimatorCalculation: no pointer to pre PreStepPoint!");
|
||||
}
|
||||
G4double sl = aStep.GetStepLength();
|
||||
G4double slw = sl * p->GetWeight();
|
||||
G4double slwe = slw * p->GetKineticEnergy();
|
||||
|
||||
G4double v = p->GetVelocity();
|
||||
if (!(v>0.)) {
|
||||
v = 10e-9;
|
||||
}
|
||||
|
||||
fSCScoreValues.fSumSL += sl;
|
||||
fSCScoreValues.fSumSLW += slw;
|
||||
fSCScoreValues.fSumSLW_v += slw / v;
|
||||
fSCScoreValues.fSumSLWE += slwe;
|
||||
fSCScoreValues.fSumSLWE_v += slwe / v;
|
||||
|
||||
}
|
||||
void G4CellScoreComposer::TrackEnters(){
|
||||
fSCScoreValues.fSumTracksEntering++;
|
||||
}
|
||||
void G4CellScoreComposer::NewTrackPopedUp(){
|
||||
fSCScoreValues.fSumPopulation++;
|
||||
}
|
||||
|
||||
void G4CellScoreComposer::SetCollisionWeight(G4double weight){
|
||||
fSCScoreValues.fSumCollisions++;
|
||||
fSCScoreValues.fSumCollisionsWeight+=weight;
|
||||
}
|
||||
|
||||
|
||||
const G4CellScoreValues &G4CellScoreComposer::
|
||||
GetStandardCellScoreValues() const {
|
||||
if (fSCScoreValues.fSumSLW > 0.) {
|
||||
//divide by SumSLW or SumSLW_v ?
|
||||
fSCScoreValues.fNumberWeightedEnergy =
|
||||
fSCScoreValues.fSumSLWE_v / fSCScoreValues.fSumSLW_v;
|
||||
|
||||
fSCScoreValues.fFluxWeightedEnergy =
|
||||
fSCScoreValues.fSumSLWE / fSCScoreValues.fSumSLW;
|
||||
|
||||
fSCScoreValues.fAverageTrackWeight =
|
||||
fSCScoreValues.fSumSLW / fSCScoreValues.fSumSL;
|
||||
}
|
||||
return fSCScoreValues;
|
||||
}
|
||||
|
||||
void G4CellScoreComposer::SetImportnace(G4double importance){
|
||||
fSCScoreValues.fImportance = importance;
|
||||
};
|
||||
|
||||
G4std::ostream& operator<<(G4std::ostream &out,
|
||||
const G4CellScoreComposer &ps) {
|
||||
G4CellScoreValues scores = ps.GetStandardCellScoreValues();
|
||||
out << "Tracks entering: " << scores.fSumTracksEntering << G4endl;
|
||||
out << "Population: " << scores.fSumPopulation << G4endl;
|
||||
out << "Collisions: " << scores.fSumCollisions << G4endl;
|
||||
out << "Collisions*Wgt: " << scores.fSumCollisionsWeight << G4endl;
|
||||
out << "NumWGTedEnergy: " << scores.fNumberWeightedEnergy << G4endl;
|
||||
out << "FluxWGTedEnergy: " << scores.fFluxWeightedEnergy << G4endl;
|
||||
out << "Aver.TrackWGT*I: " << scores.fAverageTrackWeight*
|
||||
scores.fImportance << G4endl;
|
||||
return out;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4CellStoreScorer.cc,v 1.2 2002/11/04 10:51:49 dressel Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
//
|
||||
// G4CellStoreScorer
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#include "G4CellStoreScorer.hh"
|
||||
|
||||
#include "G4VCellScorer.hh"
|
||||
|
||||
#include "G4Track.hh"
|
||||
#include "G4GeometryCell.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4GeometryCellStep.hh"
|
||||
#include "G4VCellScorerStore.hh"
|
||||
|
||||
G4CellStoreScorer::G4CellStoreScorer(G4VCellScorerStore &csc) :
|
||||
fCellScorerStore(csc)
|
||||
{}
|
||||
|
||||
G4CellStoreScorer::~G4CellStoreScorer()
|
||||
{}
|
||||
|
||||
|
||||
void G4CellStoreScorer::
|
||||
Score(const G4Step &aStep, const G4GeometryCellStep &aPstep){
|
||||
G4Track *track = 0;
|
||||
track = aStep.GetTrack();
|
||||
|
||||
if (track->GetTrackStatus()==fStopAndKill) {
|
||||
G4cout << "G4CellStoreScorer::Score: track status is StopAndKill -> do nothing" << G4endl;
|
||||
}
|
||||
else {
|
||||
// chose the cells to be scored
|
||||
G4GeometryCell pre_gCell(aPstep.GetPreGeometryCell());
|
||||
G4GeometryCell post_gCell(aPstep.GetPostGeometryCell());
|
||||
G4VCellScorer *post_cs = 0;
|
||||
post_cs = fCellScorerStore.GetCellScore(post_gCell);
|
||||
if (aPstep.GetCrossBoundary()) {
|
||||
// entering post_gCell
|
||||
if (post_cs) {
|
||||
post_cs->ScoreAnEnteringStep(aStep, post_gCell);
|
||||
}
|
||||
// exiting pre_gCell
|
||||
G4VCellScorer *pre_cs = 0;
|
||||
pre_cs = fCellScorerStore.GetCellScore(pre_gCell);
|
||||
if (pre_cs) {
|
||||
pre_cs->ScoreAnExitingStep(aStep, pre_gCell);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// step in post_gCell
|
||||
if (post_cs) {
|
||||
post_cs->ScoreAnInVolumeStep(aStep, post_gCell);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4HCtable.cc,v 1.6 2001/07/13 15:00:08 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
|
||||
#include "G4HCtable.hh"
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4SDManager.cc,v 1.4 2001/07/13 15:00:08 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4SDManager.cc,v 1.5 2002/11/27 19:03:42 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
|
||||
#include "G4SDManager.hh"
|
||||
@@ -58,6 +58,8 @@ G4SDManager::G4SDManager():verboseLevel(0)
|
||||
G4SDManager::~G4SDManager()
|
||||
{
|
||||
delete theMessenger;
|
||||
delete HCtable;
|
||||
delete treeTop;
|
||||
}
|
||||
|
||||
void G4SDManager::AddNewDetector(G4VSensitiveDetector*aSD)
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4SDStructure.cc,v 1.6 2001/07/13 15:00:08 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// $Id: G4SDStructure.cc,v 1.7 2002/11/27 19:03:42 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
|
||||
// G4SDStructure
|
||||
@@ -45,6 +45,12 @@ G4SDStructure::G4SDStructure(G4String aPath):verboseLevel(0)
|
||||
|
||||
G4SDStructure::~G4SDStructure()
|
||||
{
|
||||
size_t nTree = structure.size();
|
||||
for(size_t iTree=0;iTree<nTree;iTree++)
|
||||
{ delete structure[iTree]; }
|
||||
size_t nDet = detector.size();
|
||||
for(size_t iDet=0;iDet<nDet;iDet++)
|
||||
{ delete detector[iDet]; }
|
||||
}
|
||||
|
||||
G4int G4SDStructure::operator==(const G4SDStructure &right) const
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4SDmessenger.cc,v 1.3 2001/07/11 09:58:44 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4SensitiveVolumeList.cc,v 1.5 2001/07/13 15:00:09 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4TrackLogger.cc,v 1.2 2002/11/04 10:51:49 dressel Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// GEANT 4 class source file
|
||||
//
|
||||
// G4TrackLogger.cc
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
#include "G4TrackLogger.hh"
|
||||
|
||||
G4TrackLogger::G4TrackLogger() :
|
||||
fPreviousEventID(-1)
|
||||
{}
|
||||
|
||||
G4TrackLogger::~G4TrackLogger(){}
|
||||
|
||||
|
||||
void G4TrackLogger::SetEventID(G4int id){
|
||||
if (id != fPreviousEventID) {
|
||||
fTrackIDsSet.clear();
|
||||
fPreviousEventID =id;
|
||||
}
|
||||
};
|
||||
|
||||
G4bool G4TrackLogger::FirstEnterance(G4int trid){
|
||||
G4bool first = true;
|
||||
G4int n = fTrackIDsSet.count(trid);
|
||||
if (n==1) {
|
||||
first=false;
|
||||
}
|
||||
else if(n==0) {
|
||||
fTrackIDsSet.insert(trid);
|
||||
}
|
||||
else if (n>1) {
|
||||
G4cout << "Error G4TrackLogger::FirstEnterance: "
|
||||
<< "more than one elm in set!" << G4endl;
|
||||
|
||||
}
|
||||
return first;
|
||||
};
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VReadOutGeometry.cc,v 1.5 2001/07/13 15:00:09 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
|
||||
#include "G4VReadOutGeometry.hh"
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VSensitiveDetector.cc,v 1.5 2001/07/13 15:00:09 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
//
|
||||
// G4VSensitiveDetector
|
||||
#include "G4VSensitiveDetector.hh"
|
||||
|
||||
Reference in New Issue
Block a user