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/Par01CalorimeterHit.cc
|
||||
/// \brief Implementation of the Par01CalorimeterHit class
|
||||
//
|
||||
// $Id: Par01CalorimeterHit.cc 90093 2015-05-13 11:59:54Z gcosmo $
|
||||
//
|
||||
// $Id: Par01CalorimeterHit.cc 101151 2016-11-08 08:06:16Z gcosmo $
|
||||
//
|
||||
|
||||
#include "Par01CalorimeterHit.hh"
|
||||
@@ -37,16 +40,26 @@
|
||||
|
||||
G4ThreadLocal G4Allocator<Par01CalorimeterHit>* Par01CalorimeterHitAllocator=0;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Par01CalorimeterHit::Par01CalorimeterHit()
|
||||
{fLogV=NULL;}
|
||||
{
|
||||
fLogV = nullptr;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Par01CalorimeterHit::Par01CalorimeterHit(G4LogicalVolume* logVol)
|
||||
:fLogV(logVol)
|
||||
{;}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Par01CalorimeterHit::~Par01CalorimeterHit()
|
||||
{;}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Par01CalorimeterHit::Par01CalorimeterHit(const Par01CalorimeterHit &right)
|
||||
: G4VHit()
|
||||
{
|
||||
@@ -56,6 +69,8 @@ Par01CalorimeterHit::Par01CalorimeterHit(const Par01CalorimeterHit &right)
|
||||
fLogV = right.fLogV;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
const Par01CalorimeterHit& Par01CalorimeterHit::operator=(const Par01CalorimeterHit &right)
|
||||
{
|
||||
fEdep = right.fEdep;
|
||||
@@ -65,11 +80,15 @@ const Par01CalorimeterHit& Par01CalorimeterHit::operator=(const Par01Calorimeter
|
||||
return *this;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4int Par01CalorimeterHit::operator==(const Par01CalorimeterHit &right) const
|
||||
{
|
||||
return (this==&right) ? 1 : 0;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void Par01CalorimeterHit::Draw()
|
||||
{
|
||||
G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
|
||||
@@ -87,6 +106,8 @@ void Par01CalorimeterHit::Draw()
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void Par01CalorimeterHit::Print()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -23,8 +23,11 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file Par01/src/Par01CalorimeterSD.cc
|
||||
/// \brief Implementation of the Par01CalorimeterSD class
|
||||
//
|
||||
// $Id: Par01CalorimeterSD.cc 90093 2015-05-13 11:59:54Z gcosmo $
|
||||
//
|
||||
// $Id: Par01CalorimeterSD.cc 100936 2016-11-03 11:07:41Z gcosmo $
|
||||
//
|
||||
|
||||
#include "Par01CalorimeterSD.hh"
|
||||
@@ -37,6 +40,8 @@
|
||||
#include "G4SDManager.hh"
|
||||
#include "G4ios.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Par01CalorimeterSD::Par01CalorimeterSD( G4String name,
|
||||
G4int nCells,
|
||||
G4String colName )
|
||||
@@ -49,11 +54,15 @@ Par01CalorimeterSD::Par01CalorimeterSD( G4String name,
|
||||
fCellID = new G4int[fNumberOfCells];
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Par01CalorimeterSD::~Par01CalorimeterSD()
|
||||
{
|
||||
delete [] fCellID;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void Par01CalorimeterSD::Initialize(G4HCofThisEvent*)
|
||||
{
|
||||
fCalCollection = new Par01CalorimeterHitsCollection
|
||||
@@ -64,6 +73,8 @@ void Par01CalorimeterSD::Initialize(G4HCofThisEvent*)
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4bool Par01CalorimeterSD::ProcessHits(G4Step* aStep, G4TouchableHistory*)
|
||||
{
|
||||
G4double edep = aStep->GetTotalEnergyDeposit();
|
||||
@@ -97,6 +108,8 @@ G4bool Par01CalorimeterSD::ProcessHits(G4Step* aStep, G4TouchableHistory*)
|
||||
return true;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void Par01CalorimeterSD::EndOfEvent(G4HCofThisEvent*HCE)
|
||||
{
|
||||
if(fHCID<0)
|
||||
@@ -104,14 +117,20 @@ void Par01CalorimeterSD::EndOfEvent(G4HCofThisEvent*HCE)
|
||||
HCE->AddHitsCollection( fHCID, fCalCollection );
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void Par01CalorimeterSD::clear()
|
||||
{
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void Par01CalorimeterSD::DrawAll()
|
||||
{
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void Par01CalorimeterSD::PrintAll()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -23,8 +23,11 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file Par01/src/Par01DetectorConstruction.cc
|
||||
/// \brief Implementation of the Par01DetectorConstruction class
|
||||
//
|
||||
// $Id: Par01DetectorConstruction.cc 90093 2015-05-13 11:59:54Z gcosmo $
|
||||
//
|
||||
// $Id: Par01DetectorConstruction.cc 101905 2016-12-07 11:34:39Z gunter $
|
||||
//
|
||||
#include "Par01DetectorConstruction.hh"
|
||||
#include "Par01CalorimeterSD.hh"
|
||||
@@ -49,12 +52,18 @@
|
||||
|
||||
#include "G4RegionStore.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Par01DetectorConstruction::Par01DetectorConstruction()
|
||||
{;}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Par01DetectorConstruction::~Par01DetectorConstruction()
|
||||
{;}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4VPhysicalVolume* Par01DetectorConstruction::Construct()
|
||||
{
|
||||
G4cout << "\nPar01DetectorConstruction....\n" << G4endl;
|
||||
@@ -218,7 +227,7 @@ G4VPhysicalVolume* Par01DetectorConstruction::Construct()
|
||||
hadRegion->GetProductionCuts()->SetProductionCuts(cuts);
|
||||
|
||||
//--------- Visualization attributes -------------------------------
|
||||
WorldLog->SetVisAttributes(G4VisAttributes::Invisible);
|
||||
WorldLog->SetVisAttributes(G4VisAttributes::GetInvisible());
|
||||
|
||||
G4VisAttributes * driftchamberTubeVisAtt
|
||||
= new G4VisAttributes(G4Colour(0.0,1.0,0.0));
|
||||
@@ -255,6 +264,8 @@ G4VPhysicalVolume* Par01DetectorConstruction::Construct()
|
||||
return WorldPhys;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void Par01DetectorConstruction::ConstructSDandField()
|
||||
{
|
||||
//--------- Sensitive detector -------------------------------------
|
||||
|
||||
@@ -23,8 +23,11 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file Par01/src/Par01EMShowerModel.cc
|
||||
/// \brief Implementation of the Par01EMShowerModel class
|
||||
//
|
||||
// $Id: Par01EMShowerModel.cc 90093 2015-05-13 11:59:54Z gcosmo $
|
||||
//
|
||||
// $Id: Par01EMShowerModel.cc 101151 2016-11-08 08:06:16Z gcosmo $
|
||||
//
|
||||
#include "Par01EMShowerModel.hh"
|
||||
#include "Par01EnergySpot.hh"
|
||||
@@ -41,6 +44,8 @@
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4NistManager.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Par01EMShowerModel::Par01EMShowerModel(G4String modelName, G4Region* envelope)
|
||||
: G4VFastSimulationModel(modelName, envelope)
|
||||
{
|
||||
@@ -53,6 +58,8 @@ Par01EMShowerModel::Par01EMShowerModel(G4String modelName, G4Region* envelope)
|
||||
fCsI = 0;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Par01EMShowerModel::Par01EMShowerModel(G4String modelName)
|
||||
: G4VFastSimulationModel(modelName)
|
||||
{
|
||||
@@ -65,12 +72,16 @@ Par01EMShowerModel::Par01EMShowerModel(G4String modelName)
|
||||
fCsI = 0;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Par01EMShowerModel::~Par01EMShowerModel()
|
||||
{
|
||||
delete fFakeStep;
|
||||
delete fpNavigator;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4bool Par01EMShowerModel::IsApplicable(const G4ParticleDefinition& particleType)
|
||||
{
|
||||
return
|
||||
@@ -79,12 +90,16 @@ G4bool Par01EMShowerModel::IsApplicable(const G4ParticleDefinition& particleType
|
||||
&particleType == G4Gamma::GammaDefinition();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4bool Par01EMShowerModel::ModelTrigger(const G4FastTrack& fastTrack)
|
||||
{
|
||||
// Applies the parameterisation above 100 MeV:
|
||||
return fastTrack.GetPrimaryTrack()->GetKineticEnergy() > 100*MeV;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void Par01EMShowerModel::DoIt(const G4FastTrack& fastTrack,
|
||||
G4FastStep& fastStep)
|
||||
{
|
||||
@@ -101,6 +116,8 @@ void Par01EMShowerModel::DoIt(const G4FastTrack& fastTrack,
|
||||
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void Par01EMShowerModel::Explode(const G4FastTrack& fastTrack)
|
||||
{
|
||||
//-----------------------------------------------------
|
||||
@@ -174,6 +191,7 @@ void Par01EMShowerModel::Explode(const G4FastTrack& fastTrack)
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void Par01EMShowerModel::BuildDetectorResponse()
|
||||
{
|
||||
@@ -181,7 +199,7 @@ void Par01EMShowerModel::BuildDetectorResponse()
|
||||
for (size_t i = 0; i < feSpotList.size(); i++)
|
||||
{
|
||||
// Draw the energy spot:
|
||||
feSpotList[i].Draw();
|
||||
// feSpotList[i].Draw();
|
||||
// feSpotList[i].Print();
|
||||
|
||||
// "converts" the energy spot into the fake
|
||||
@@ -190,6 +208,7 @@ void Par01EMShowerModel::BuildDetectorResponse()
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void Par01EMShowerModel::AssignSpotAndCallHit(const Par01EnergySpot &eSpot)
|
||||
{
|
||||
@@ -218,6 +237,7 @@ void Par01EMShowerModel::AssignSpotAndCallHit(const Par01EnergySpot &eSpot)
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void Par01EMShowerModel::FillFakeStep(const Par01EnergySpot &eSpot)
|
||||
{
|
||||
|
||||
@@ -23,8 +23,11 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file Par01/src/Par01EnergySpot.cc
|
||||
/// \brief Implementation of the Par01EnergySpot class
|
||||
//
|
||||
// $Id: Par01EnergySpot.cc 90093 2015-05-13 11:59:54Z gcosmo $
|
||||
//
|
||||
// $Id: Par01EnergySpot.cc 100936 2016-11-03 11:07:41Z gcosmo $
|
||||
//
|
||||
#include "Par01EnergySpot.hh"
|
||||
|
||||
@@ -35,18 +38,25 @@
|
||||
#include "G4Step.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Par01EnergySpot::Par01EnergySpot()
|
||||
{;}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Par01EnergySpot::Par01EnergySpot(const G4ThreeVector& point, G4double E)
|
||||
{
|
||||
fPoint = point;
|
||||
fEnergy = E;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Par01EnergySpot::~Par01EnergySpot()
|
||||
{;}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void Par01EnergySpot::Draw(G4Colour *color)
|
||||
{
|
||||
@@ -80,12 +90,9 @@ void Par01EnergySpot::Draw(G4Colour *color)
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void Par01EnergySpot::Print()
|
||||
{
|
||||
G4cout << " Par01EnergySpot {E = " << fEnergy << "; Position = " << fPoint << " }"<< G4endl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -23,7 +23,10 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: Par01ParallelWorldForPion.cc 90093 2015-05-13 11:59:54Z gcosmo $
|
||||
/// \file Par01/src/Par01ParallelWorldForPion.cc
|
||||
/// \brief Implementation of the Par01ParallelWorldForPion class
|
||||
//
|
||||
// $Id: Par01ParallelWorldForPion.cc 100936 2016-11-03 11:07:41Z gcosmo $
|
||||
//
|
||||
#include "Par01ParallelWorldForPion.hh"
|
||||
#include "Par01PionShowerModel.hh"
|
||||
@@ -38,13 +41,19 @@
|
||||
|
||||
#include "G4RegionStore.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Par01ParallelWorldForPion::Par01ParallelWorldForPion(G4String worldName)
|
||||
: G4VUserParallelWorld(worldName)
|
||||
{;}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Par01ParallelWorldForPion::~Par01ParallelWorldForPion()
|
||||
{;}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void Par01ParallelWorldForPion::Construct()
|
||||
{
|
||||
// -- Get nist material manager
|
||||
@@ -93,6 +102,7 @@ void Par01ParallelWorldForPion::Construct()
|
||||
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void Par01ParallelWorldForPion::ConstructSD()
|
||||
{
|
||||
|
||||
@@ -23,8 +23,11 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file Par01/src/Par01PiModel.cc
|
||||
/// \brief Implementation of the Par01PiModel class
|
||||
//
|
||||
// $Id: Par01PiModel.cc 90093 2015-05-13 11:59:54Z gcosmo $
|
||||
//
|
||||
// $Id: Par01PiModel.cc 101151 2016-11-08 08:06:16Z gcosmo $
|
||||
//
|
||||
#include "Par01PiModel.hh"
|
||||
|
||||
@@ -32,13 +35,19 @@
|
||||
#include "G4PionPlus.hh"
|
||||
#include "G4Gamma.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Par01PiModel::Par01PiModel(G4Region *anEnvelope) :
|
||||
G4VFastSimulationModel("Par01PiModel",anEnvelope)
|
||||
{;}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Par01PiModel::~Par01PiModel()
|
||||
{;}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4bool Par01PiModel::IsApplicable(const G4ParticleDefinition& particleType)
|
||||
{
|
||||
return
|
||||
@@ -46,6 +55,8 @@ G4bool Par01PiModel::IsApplicable(const G4ParticleDefinition& particleType)
|
||||
&particleType == G4PionPlus::PionPlusDefinition();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4bool Par01PiModel::ModelTrigger(const G4FastTrack& fastTrack) {
|
||||
//-------------------------------------------------------------
|
||||
// UserTrigger() method: method which has to decide if
|
||||
@@ -79,14 +90,15 @@ G4bool Par01PiModel::ModelTrigger(const G4FastTrack& fastTrack) {
|
||||
return true;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void Par01PiModel::DoIt(const G4FastTrack& fastTrack,
|
||||
G4FastStep& fastStep)
|
||||
//--------------------------------------------------
|
||||
//--------------------------------------------------------
|
||||
//
|
||||
// User method to code the parameterisation properly
|
||||
// said.
|
||||
// User method to code the parameterisation properly said.
|
||||
//
|
||||
//--------------------------------------------------
|
||||
//--------------------------------------------------------
|
||||
{
|
||||
|
||||
//------------------------------------------------
|
||||
@@ -145,6 +157,5 @@ void Par01PiModel::DoIt(const G4FastTrack& fastTrack,
|
||||
//-- Creation of the secondary Track:
|
||||
//------------------------------------
|
||||
fastStep.CreateSecondaryTrack(dynamique, posi,
|
||||
fastTrack.GetPrimaryTrack()->GetGlobalTime());
|
||||
|
||||
fastTrack.GetPrimaryTrack()->GetGlobalTime());
|
||||
}
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -23,8 +23,11 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file Par01/src/Par01PrimaryGeneratorAction.cc
|
||||
/// \brief Implementation of the Par01PrimaryGeneratorAction class
|
||||
//
|
||||
// $Id: Par01PrimaryGeneratorAction.cc 90093 2015-05-13 11:59:54Z gcosmo $
|
||||
//
|
||||
// $Id: Par01PrimaryGeneratorAction.cc 100936 2016-11-03 11:07:41Z gcosmo $
|
||||
//
|
||||
|
||||
#include "Par01PrimaryGeneratorAction.hh"
|
||||
@@ -36,6 +39,8 @@
|
||||
#include "globals.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Par01PrimaryGeneratorAction::Par01PrimaryGeneratorAction()
|
||||
{
|
||||
G4int n_particle = 1;
|
||||
@@ -52,16 +57,22 @@ Par01PrimaryGeneratorAction::Par01PrimaryGeneratorAction()
|
||||
fParticleGun->SetParticlePosition(G4ThreeVector(0.*cm,-300.*cm,0.*cm));
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Par01PrimaryGeneratorAction::~Par01PrimaryGeneratorAction()
|
||||
{
|
||||
delete fParticleGun;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void Par01PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
|
||||
{
|
||||
fParticleGun->GeneratePrimaryVertex(anEvent);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4ParticleGun* Par01PrimaryGeneratorAction::GetParticleGun()
|
||||
{
|
||||
return fParticleGun;
|
||||
|
||||
Reference in New Issue
Block a user