Import Geant4 9.4.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 16:25:56 +02:00
parent 74cad5e589
commit 89a9605df1
4440 changed files with 379508 additions and 189225 deletions
@@ -24,10 +24,14 @@
// ********************************************************************
//
//
// $Id: G4MultiFunctionalDetector.cc,v 1.5 2008/03/06 23:31:12 asaim Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4MultiFunctionalDetector.cc,v 1.6 2010/07/23 02:07:23 taso Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
// G4MultiFunctionalDetector
//
// 2010-07-23 T.Aso Call PS if the step length or energy deposit is not zero.
//
//
#include "G4MultiFunctionalDetector.hh"
#include "G4SDManager.hh"
#include "G4VPrimitiveScorer.hh"
@@ -41,9 +45,13 @@ G4MultiFunctionalDetector::~G4MultiFunctionalDetector()
G4bool G4MultiFunctionalDetector::ProcessHits(G4Step* aStep,G4TouchableHistory* aTH)
{
G4int nPrim = primitives.size();
for(G4int iPrim=0;iPrim<nPrim;iPrim++)
{ if(aStep->GetStepLength()>0.) primitives[iPrim]->HitPrimitive(aStep,aTH); }
if(aStep->GetStepLength()>0. || aStep->GetTotalEnergyDeposit()>0.){
G4int nPrim = primitives.size();
for(G4int iPrim=0;iPrim<nPrim;iPrim++)
{
primitives[iPrim]->HitPrimitive(aStep,aTH);
}
}
return true;
}
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: G4VPrimitiveScorer.cc,v 1.2 2006/06/29 18:06:03 gunter Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: G4VPrimitiveScorer.cc,v 1.5 2010/07/23 04:34:59 taso Exp $
// GEANT4 tag $Name: geant4-09-04 $
//
// G4VPrimitiveScorer
#include "G4VPrimitiveScorer.hh"
@@ -33,10 +33,11 @@
#include "G4SDManager.hh"
#include "G4Step.hh"
#include "G4TouchableHistory.hh"
#include "G4UnitsTable.hh"
G4VPrimitiveScorer::G4VPrimitiveScorer(G4String name, G4int depth)
:primitiveName(name),detector(0),filter(0),verboseLevel(0),indexDepth(depth)
:primitiveName(name),detector(0),filter(0),verboseLevel(0),indexDepth(depth),
unitName("NoUnit"),unitValue(1.0)
{;}
G4VPrimitiveScorer::~G4VPrimitiveScorer()
@@ -73,3 +74,13 @@ G4int G4VPrimitiveScorer::GetIndex(G4Step* aStep)
return th->GetReplicaNumber(indexDepth);
}
void G4VPrimitiveScorer::CheckAndSetUnit(const G4String& unit,
const G4String& category){
if ( G4UnitDefinition::GetCategory(unit) == category){
unitName = unit;
unitValue = G4UnitDefinition::GetValueOf(unit);
} else {
G4String msg = "Invalid unit ["+unit+"] (Current unit is [" +GetUnit()+"] )";
G4Exception(GetName(),"DetPS0000",JustWarning,msg);
}
}