Import Geant4 7.1.0 source tree
This commit is contained in:
@@ -85,7 +85,10 @@ void GFlashHitMaker::make(GFlashEnergySpot * aSpot, const G4FastTrack * aT)
|
||||
{
|
||||
gflashSensitive->Hit(&theSpot);
|
||||
}
|
||||
else if ( (!gflashSensitive) && ( pCurrentVolume->GetLogicalVolume()->GetFastSimulationManager() ) ) // Using gflash without implementing the
|
||||
else if ( (!gflashSensitive ) &&
|
||||
( pSensitive ) &&
|
||||
( pCurrentVolume->GetLogicalVolume()->GetFastSimulationManager() )
|
||||
) // Using gflash without implementing the
|
||||
// gflashSensitive detector interface -> not allowed!
|
||||
|
||||
{
|
||||
|
||||
@@ -124,57 +124,57 @@
|
||||
// PrintMaterial();
|
||||
}
|
||||
|
||||
G4double GFlashHomoShowerParamterisation::GetEffZ(const G4Material * material )
|
||||
G4double GFlashHomoShowerParamterisation::GetEffZ(const G4Material * mat )
|
||||
{
|
||||
// Returns Z or effective Z=sum(pi*Zi) (if compound/mixture)
|
||||
// of given material.
|
||||
// ---
|
||||
G4double z = 0.;
|
||||
G4int nofElements = material->GetNumberOfElements();
|
||||
G4int nofElements = mat->GetNumberOfElements();
|
||||
if (nofElements > 1)
|
||||
{
|
||||
// G4String text = "Effective Z for material mixture (";
|
||||
// text = text + material->GetName();
|
||||
// text = text + mat->GetName();
|
||||
// text = text + ") is used.";
|
||||
// cout << text <<endl;
|
||||
for (G4int i=0; i<nofElements; i++) {
|
||||
G4double zOfElement = material->GetElement(i)->GetZ();
|
||||
G4double massFraction = material->GetFractionVector()[i];
|
||||
// cout << material->GetElement(i)->GetName() <<" Z= "<<zOfElement << " , Fraction= "<<massFraction <<endl;
|
||||
G4double zOfElement = mat->GetElement(i)->GetZ();
|
||||
G4double massFraction = mat->GetFractionVector()[i];
|
||||
// cout << mat->GetElement(i)->GetName() <<" Z= "<<zOfElement << " , Fraction= "<<massFraction <<endl;
|
||||
z += zOfElement*massFraction;
|
||||
}
|
||||
}
|
||||
else {
|
||||
z = material->GetZ();
|
||||
z = mat->GetZ();
|
||||
}
|
||||
return z;
|
||||
}
|
||||
|
||||
G4double GFlashHomoShowerParamterisation::GetEffA (const G4Material * material )
|
||||
G4double GFlashHomoShowerParamterisation::GetEffA (const G4Material * mat )
|
||||
{
|
||||
// Returns A or effective A=sum(pi*Ai) (if compound/mixture)
|
||||
// of given material.
|
||||
// ---
|
||||
|
||||
G4double a = 0.;
|
||||
G4int nofElements = material->GetNumberOfElements();
|
||||
G4int nofElements = mat->GetNumberOfElements();
|
||||
if (nofElements > 1)
|
||||
{
|
||||
// G4String text = "Effective A for material mixture (";
|
||||
// text = text + material->GetName();
|
||||
// text = text + mat->GetName();
|
||||
// text = text + ") is used."
|
||||
// cout << text <<endl;
|
||||
for (G4int i=0; i<nofElements; i++)
|
||||
{
|
||||
G4double aOfElement = material->GetElement(i)->GetA()/(g/mole);
|
||||
G4double massFraction = material->GetFractionVector()[i];
|
||||
// cout << material->GetElement(i)->GetName() <<" A= "<<aOfElement << " g/mole, Fraction= "<< massFraction <<endl;
|
||||
G4double aOfElement = mat->GetElement(i)->GetA()/(g/mole);
|
||||
G4double massFraction = mat->GetFractionVector()[i];
|
||||
// cout << mat->GetElement(i)->GetName() <<" A= "<<aOfElement << " g/mole, Fraction= "<< massFraction <<endl;
|
||||
a += aOfElement*massFraction;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
a = material->GetA()/(g/mole);
|
||||
a = mat->GetA()/(g/mole);
|
||||
}
|
||||
return a;
|
||||
}
|
||||
@@ -252,7 +252,7 @@
|
||||
return DEne;
|
||||
}
|
||||
|
||||
G4double GFlashHomoShowerParamterisation::IntegrateNspLongitudinal(const G4double LongitudinalStep)
|
||||
G4double GFlashHomoShowerParamterisation::IntegrateNspLongitudinal(G4double LongitudinalStep)
|
||||
{
|
||||
G4double LongitudinalStepInX0 = LongitudinalStep / X0;
|
||||
G4float x1 = BetaNSpot*LongitudinalStepInX0;
|
||||
|
||||
@@ -148,7 +148,7 @@ G4bool GFlashShowerModel::CheckContainment(const G4FastTrack& fastTrack)
|
||||
R*SinPhi[i]*CrossShower ;
|
||||
|
||||
if(SolidCalo->Inside(Position) != kOutside)
|
||||
NlateralInside=NlateralInside++;
|
||||
NlateralInside++;
|
||||
}
|
||||
|
||||
//chose to parametrise or flag when all inetc...
|
||||
@@ -266,7 +266,7 @@ void GFlashShowerModel::ElectronDoIt(const G4FastTrack& fastTrack, G4FastStep&
|
||||
//generate spots & hits:
|
||||
for (int i = 0; i < DNsp; i++)
|
||||
{
|
||||
NSpotDeposited=NSpotDeposited++;
|
||||
NSpotDeposited++;
|
||||
GFlashEnergySpot Spot;
|
||||
|
||||
//Spot energy: the same for all spots
|
||||
|
||||
@@ -39,11 +39,11 @@
|
||||
|
||||
|
||||
|
||||
GFlashShowerModelMessenger::GFlashShowerModelMessenger(GFlashShowerModel * myModel)
|
||||
GFlashShowerModelMessenger::GFlashShowerModelMessenger(GFlashShowerModel * aModel)
|
||||
{
|
||||
myParaDir = new G4UIdirectory("/GFlash/");
|
||||
myParaDir->SetGuidance("Parametrisation control.");
|
||||
this->myModel= myModel;
|
||||
myModel= aModel;
|
||||
|
||||
FlagCmd = new G4UIcmdWithAnInteger("/GFlash/flag",this);
|
||||
FlagCmd->SetGuidance("Defines if GFlash is activated");
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
#include <string.h>
|
||||
#include "Gamma.hh"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user