Import Geant4 10.3.0 source tree
This commit is contained in:
@@ -23,8 +23,11 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file Par01/src/Par01PionShowerModel.cc
|
||||
/// \brief Implementation of the Par01PionShowerModel class
|
||||
//
|
||||
// $Id: Par01PionShowerModel.cc 90093 2015-05-13 11:59:54Z gcosmo $
|
||||
//
|
||||
// $Id: Par01PionShowerModel.cc 101151 2016-11-08 08:06:16Z gcosmo $
|
||||
//
|
||||
#include "Par01PionShowerModel.hh"
|
||||
#include "Par01EnergySpot.hh"
|
||||
@@ -41,6 +44,8 @@
|
||||
#include "G4PhysicalConstants.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Par01PionShowerModel::Par01PionShowerModel(G4String modelName, G4Region* envelope)
|
||||
: G4VFastSimulationModel(modelName, envelope)
|
||||
{
|
||||
@@ -52,6 +57,8 @@ Par01PionShowerModel::Par01PionShowerModel(G4String modelName, G4Region* envelop
|
||||
fNaviSetup = false;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Par01PionShowerModel::Par01PionShowerModel(G4String modelName)
|
||||
: G4VFastSimulationModel(modelName)
|
||||
{
|
||||
@@ -63,12 +70,16 @@ Par01PionShowerModel::Par01PionShowerModel(G4String modelName)
|
||||
fNaviSetup = false;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Par01PionShowerModel::~Par01PionShowerModel()
|
||||
{
|
||||
delete fFakeStep;
|
||||
delete fpNavigator;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4bool Par01PionShowerModel::IsApplicable(const G4ParticleDefinition& particleType)
|
||||
{
|
||||
return
|
||||
@@ -76,6 +87,8 @@ G4bool Par01PionShowerModel::IsApplicable(const G4ParticleDefinition& particleTy
|
||||
&particleType == G4PionPlus::PionPlusDefinition();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4bool Par01PionShowerModel::ModelTrigger(const G4FastTrack&)
|
||||
{
|
||||
// Applies the parameterisation always:
|
||||
@@ -83,6 +96,8 @@ G4bool Par01PionShowerModel::ModelTrigger(const G4FastTrack&)
|
||||
return true;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void Par01PionShowerModel::DoIt(const G4FastTrack& fastTrack,
|
||||
G4FastStep& fastStep)
|
||||
{
|
||||
@@ -100,6 +115,8 @@ void Par01PionShowerModel::DoIt(const G4FastTrack& fastTrack,
|
||||
BuildDetectorResponse();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void Par01PionShowerModel::Explode(const G4FastTrack& fastTrack)
|
||||
{
|
||||
//-----------------------------------------------------
|
||||
@@ -150,6 +167,7 @@ void Par01PionShowerModel::Explode(const G4FastTrack& fastTrack)
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void Par01PionShowerModel::BuildDetectorResponse()
|
||||
{
|
||||
@@ -157,8 +175,8 @@ void Par01PionShowerModel::BuildDetectorResponse()
|
||||
for (size_t i = 0; i < feSpotList.size(); i++)
|
||||
{
|
||||
// Draw the energy spot:
|
||||
G4Colour red(1.,0.,0.);
|
||||
feSpotList[i].Draw(&red);
|
||||
// G4Colour red(1.,0.,0.);
|
||||
// feSpotList[i].Draw(&red);
|
||||
// feSpotList[i].Print();
|
||||
|
||||
// "converts" the energy spot into the fake
|
||||
@@ -167,6 +185,7 @@ void Par01PionShowerModel::BuildDetectorResponse()
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void Par01PionShowerModel::AssignSpotAndCallHit(const Par01EnergySpot &eSpot)
|
||||
{
|
||||
@@ -195,6 +214,7 @@ void Par01PionShowerModel::AssignSpotAndCallHit(const Par01EnergySpot &eSpot)
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void Par01PionShowerModel::FillFakeStep(const Par01EnergySpot &eSpot)
|
||||
{
|
||||
@@ -208,18 +228,18 @@ void Par01PionShowerModel::FillFakeStep(const Par01EnergySpot &eSpot)
|
||||
GetNavigatorForTracking()->GetWorldVolume());
|
||||
fpNavigator->
|
||||
LocateGlobalPointAndUpdateTouchableHandle(eSpot.GetPosition(),
|
||||
G4ThreeVector(0.,0.,0.),
|
||||
fTouchableHandle,
|
||||
false);
|
||||
G4ThreeVector(0.,0.,0.),
|
||||
fTouchableHandle,
|
||||
false);
|
||||
fNaviSetup = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
fpNavigator->
|
||||
LocateGlobalPointAndUpdateTouchableHandle(eSpot.GetPosition(),
|
||||
G4ThreeVector(0.,0.,0.),
|
||||
fTouchableHandle);
|
||||
}
|
||||
G4ThreeVector(0.,0.,0.),
|
||||
fTouchableHandle);
|
||||
}
|
||||
//--------------------------------------
|
||||
// Fills attribute of the G4Step needed
|
||||
// by our sensitive detector:
|
||||
|
||||
Reference in New Issue
Block a user