Import Geant4 10.3.0 source tree
This commit is contained in:
@@ -13,7 +13,6 @@ Geometry, sensitive detector, hits, processes are defined respectively in:
|
||||
- Par01DetectorConstruction
|
||||
- Par01CalorimeterSD
|
||||
- Par01CalorimeterHit
|
||||
- Par01PhysicsList
|
||||
|
||||
The particularities are:
|
||||
|
||||
@@ -65,6 +64,12 @@ The particularities are:
|
||||
- Par01PionShowerModel is bound to a ghost volume
|
||||
which encompasses the electromagnetic and
|
||||
hadronic calorimters
|
||||
|
||||
- The Physics list used is FTFP_BERT which is augmented using the
|
||||
G4FastSimulationPhysics physics constructor to insert the
|
||||
G4FastSimulationManagerProcess that is making the interface
|
||||
between the fast simulation and the tracking.
|
||||
The configuration is shown in examlePar01.cc.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: History 90093 2015-05-13 11:59:54Z gcosmo $
|
||||
$Id: History 101151 2016-11-08 08:06:16Z gcosmo $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -15,6 +15,21 @@ track of all tags.
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
03-11-2016 M. Verderi (expar01-V10-02-03)
|
||||
- Use new G4FastSimulationPhysics physics constructor to configure
|
||||
the physics list for fast simulation
|
||||
- Suppress Par01PhysicsList.
|
||||
|
||||
02-11-2016 I. Hrivnacova (expar01-V10-02-02)
|
||||
- Added file descriptions for Doxygen documentation
|
||||
|
||||
27-10-2016 M. Verderi (expar01-V10-02-01)
|
||||
- apply coding guidelines
|
||||
|
||||
14-10-16 G.Folger (expar01-V10-02-00)
|
||||
- remove direct use of theParticleIterator, use GetParticleTableIterator().
|
||||
fix required by clang39 on Linux and MAC
|
||||
|
||||
29-11-2013 M. Verderi (expar01-V09-06-02)
|
||||
- fix of src/Par01EMShowerModel.cc of spurious remaing CLHEP:: :
|
||||
bt = CLHEP::RandGamma::shoot(a,1.0); -> bt = G4RandGamma::shoot(a,1.0);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: README 90093 2015-05-13 11:59:54Z gcosmo $
|
||||
$Id: README 101151 2016-11-08 08:06:16Z gcosmo $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -17,7 +17,6 @@ Geometry, sensitive detector, hits, processes are defined respectively in:
|
||||
Par01DetectorConstruction
|
||||
Par01CalorimeterSD
|
||||
Par01CalorimeterHit
|
||||
Par01PhysicsList
|
||||
|
||||
The particularities are:
|
||||
|
||||
@@ -54,12 +53,6 @@ The particularities are:
|
||||
o Par01PiModel: just there to show how a parameterisation
|
||||
can create secondaries, but not used.
|
||||
|
||||
o Par01PhysicsList::AddParameterisation(). A method which
|
||||
sets the G4FastSimulationManagerProcess in the process
|
||||
manager of all the particles. This process provides
|
||||
the INTERFACE between the tracking and the parameterisation
|
||||
models.
|
||||
|
||||
o Par01DetectorConstruction::Construct: in this method, the parameterisation
|
||||
models are built and bound to envelopes:
|
||||
|
||||
@@ -69,6 +62,12 @@ The particularities are:
|
||||
o Par01PionShowerModel is bound to a ghost volume
|
||||
which encompasses the electromagnetic and
|
||||
hadronic calorimters
|
||||
|
||||
o The Physics list used is FTFP_BERT which is augmented using the
|
||||
G4FastSimulationPhysics physics constructor to insert the
|
||||
G4FastSimulationManagerProcess that is making the interface
|
||||
between the fast simulation and the tracking.
|
||||
The configuration is shown in examlePar01.cc.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -23,12 +23,15 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file Par01/examplePar01.cc
|
||||
/// \brief Main program of the Par01 example
|
||||
//
|
||||
// $Id: examplePar01.cc 90093 2015-05-13 11:59:54Z gcosmo $
|
||||
//
|
||||
// $Id: examplePar01.cc 101151 2016-11-08 08:06:16Z gcosmo $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
// GEANT 4 - examplePar01
|
||||
// Geant4 - examplePar01
|
||||
// --------------------------------------------------------------
|
||||
// Comments
|
||||
//
|
||||
@@ -36,27 +39,17 @@
|
||||
// i.e. "Fast Simulation"
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
//-------------------
|
||||
// Generator action:
|
||||
//-------------------
|
||||
#include "Par01PrimaryGeneratorAction.hh"
|
||||
|
||||
//---------------------------
|
||||
// Parameterisation manager:
|
||||
//---------------------------
|
||||
#include "G4GlobalFastSimulationManager.hh"
|
||||
|
||||
//------------
|
||||
// Geometries:
|
||||
//------------
|
||||
//---------------
|
||||
// -- Geometries:
|
||||
//---------------
|
||||
#include "Par01DetectorConstruction.hh"
|
||||
#include "Par01ParallelWorldForPion.hh"
|
||||
|
||||
//-----------------------------------
|
||||
// Par01PhysicsList (makes use of the
|
||||
// G4ParameterisationManagerProcess):
|
||||
//-----------------------------------
|
||||
#include "Par01PhysicsList.hh"
|
||||
//---------------------------------------------------------------------
|
||||
// -- Physics list, and tool to modify it and activate fast simulation:
|
||||
//---------------------------------------------------------------------
|
||||
#include "FTFP_BERT.hh"
|
||||
#include "G4FastSimulationPhysics.hh"
|
||||
|
||||
#include "G4UImanager.hh"
|
||||
#ifdef G4MULTITHREADED
|
||||
@@ -64,6 +57,10 @@
|
||||
#else
|
||||
#include "G4RunManager.hh"
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
// -- Action initialization (includes the primary generator action:
|
||||
// ----------------------------------------------------------------
|
||||
#include "Par01ActionInitialization.hh"
|
||||
|
||||
#ifdef G4VIS_USE
|
||||
@@ -74,6 +71,8 @@
|
||||
#include "G4UIExecutive.hh"
|
||||
#endif
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
//-------------------------------
|
||||
@@ -92,16 +91,38 @@ int main(int argc, char** argv)
|
||||
G4cout<<"+-------------------------------------------------------+"<<G4endl;
|
||||
#endif
|
||||
|
||||
// Detector/mass geometry and parallel geometry(ies):
|
||||
// -----------------------------------------------------
|
||||
// -- Detector/mass geometry and parallel geometry(ies):
|
||||
// -----------------------------------------------------
|
||||
// -- Mass geometry (ie : standard geometry):
|
||||
G4VUserDetectorConstruction* detector = new Par01DetectorConstruction();
|
||||
// -- Parallel geometry for pion parameterisation
|
||||
detector->RegisterParallelWorld(new Par01ParallelWorldForPion("pionGhostWorld"));
|
||||
// -- The name passed must be the same passed to the
|
||||
// -- G4FastSimulationManagerProcess attached to the pions
|
||||
// -- Passed to the run manager:
|
||||
runManager->SetUserInitialization(detector);
|
||||
|
||||
// PhysicsList (including G4FastSimulationManagerProcess)
|
||||
G4VUserPhysicsList* physicsList = new Par01PhysicsList;
|
||||
|
||||
// ----------------------------------------------
|
||||
// -- PhysicsList and fast simulation activation:
|
||||
// ----------------------------------------------
|
||||
// -- Create a physics list (note : FTFP_BERT is a G4VModularPhysicsList
|
||||
// -- which allows to use the subsequent G4FastSimulationPhysics tool to
|
||||
// -- activate the fast simulation):
|
||||
FTFP_BERT* physicsList = new FTFP_BERT;
|
||||
// -- Create helper tool, used to activate the fast simulation:
|
||||
G4FastSimulationPhysics* fastSimulationPhysics = new G4FastSimulationPhysics();
|
||||
fastSimulationPhysics->BeVerbose();
|
||||
// -- activation of fast simulation for particles having fast simulation models
|
||||
// -- attached in the mass geometry:
|
||||
fastSimulationPhysics->ActivateFastSimulation("e-");
|
||||
fastSimulationPhysics->ActivateFastSimulation("e+");
|
||||
fastSimulationPhysics->ActivateFastSimulation("gamma");
|
||||
// -- activation of fast simulation for particles having fast simulation models
|
||||
// -- attached in the parallel geometry:
|
||||
fastSimulationPhysics->ActivateFastSimulation("pi+","pionGhostWorld");
|
||||
fastSimulationPhysics->ActivateFastSimulation("pi-","pionGhostWorld");
|
||||
// -- Attach the fast simulation physics constructor to the physics list:
|
||||
physicsList->RegisterPhysics( fastSimulationPhysics );
|
||||
// -- Finally passes the physics list to the run manager:
|
||||
runManager->SetUserInitialization(physicsList);
|
||||
|
||||
//-------------------------------
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -23,8 +23,11 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file Par01/include/Par01CalorimeterHit.hh
|
||||
/// \brief Definition of the Par01CalorimeterHit class
|
||||
//
|
||||
// $Id: Par01CalorimeterHit.hh 90093 2015-05-13 11:59:54Z gcosmo $
|
||||
//
|
||||
// $Id: Par01CalorimeterHit.hh 100936 2016-11-03 11:07:41Z gcosmo $
|
||||
//
|
||||
|
||||
#ifndef Par01CalorimeterHit_h
|
||||
|
||||
@@ -23,8 +23,11 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file Par01/include/Par01CalorimeterSD.hh
|
||||
/// \brief Definition of the Par01CalorimeterSD class
|
||||
//
|
||||
// $Id: Par01CalorimeterSD.hh 90093 2015-05-13 11:59:54Z gcosmo $
|
||||
//
|
||||
// $Id: Par01CalorimeterSD.hh 100936 2016-11-03 11:07:41Z gcosmo $
|
||||
//
|
||||
|
||||
#ifndef Par01CalorimeterSD_h
|
||||
|
||||
@@ -23,8 +23,11 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file Par01/include/Par01DetectorConstruction.hh
|
||||
/// \brief Definition of the Par01DetectorConstruction class
|
||||
//
|
||||
// $Id: Par01DetectorConstruction.hh 90093 2015-05-13 11:59:54Z gcosmo $
|
||||
//
|
||||
// $Id: Par01DetectorConstruction.hh 100936 2016-11-03 11:07:41Z gcosmo $
|
||||
//
|
||||
#ifndef Par01DetectorConstruction_h
|
||||
#define Par01DetectorConstruction_h 1
|
||||
|
||||
@@ -23,8 +23,11 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file Par01/include/Par01EMShowerModel.hh
|
||||
/// \brief Definition of the Par01EMShowerModel class
|
||||
//
|
||||
// $Id: Par01EMShowerModel.hh 90093 2015-05-13 11:59:54Z gcosmo $
|
||||
//
|
||||
// $Id: Par01EMShowerModel.hh 100936 2016-11-03 11:07:41Z gcosmo $
|
||||
//
|
||||
//
|
||||
//----------------------------------------------
|
||||
|
||||
@@ -23,8 +23,11 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file Par01/include/Par01EnergySpot.hh
|
||||
/// \brief Definition of the Par01EnergySpot class
|
||||
//
|
||||
// $Id: Par01EnergySpot.hh 90093 2015-05-13 11:59:54Z gcosmo $
|
||||
//
|
||||
// $Id: Par01EnergySpot.hh 100936 2016-11-03 11:07:41Z gcosmo $
|
||||
//
|
||||
#ifndef Par01EnergySpot_h
|
||||
#define Par01EnergySpot_h
|
||||
|
||||
@@ -23,8 +23,11 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file Par01/include/Par01ParallelWorldForPion.hh
|
||||
/// \brief Definition of the Par01ParallelWorldForPion class
|
||||
//
|
||||
// $Id: Par01ParallelWorldForPion.hh 90093 2015-05-13 11:59:54Z gcosmo $
|
||||
//
|
||||
// $Id: Par01ParallelWorldForPion.hh 100936 2016-11-03 11:07:41Z gcosmo $
|
||||
//
|
||||
#ifndef Par01ParallelWorldForPion_hh
|
||||
#define Par01ParallelWorldForPion_hh
|
||||
|
||||
@@ -23,8 +23,11 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file Par01/include/Par01PiModel.hh
|
||||
/// \brief Definition of the Par01PiModel class
|
||||
//
|
||||
// $Id: Par01PiModel.hh 90093 2015-05-13 11:59:54Z gcosmo $
|
||||
//
|
||||
// $Id: Par01PiModel.hh 100936 2016-11-03 11:07:41Z gcosmo $
|
||||
//
|
||||
//
|
||||
//----------------------------------------
|
||||
|
||||
@@ -23,8 +23,11 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file Par01/include/Par01PionShowerModel.hh
|
||||
/// \brief Definition of the Par01PionShowerModel class
|
||||
//
|
||||
// $Id: Par01PionShowerModel.hh 90093 2015-05-13 11:59:54Z gcosmo $
|
||||
//
|
||||
// $Id: Par01PionShowerModel.hh 100936 2016-11-03 11:07:41Z gcosmo $
|
||||
//
|
||||
//
|
||||
//----------------------------------------------
|
||||
|
||||
@@ -23,8 +23,11 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
/// \file Par01/include/Par01PrimaryGeneratorAction.hh
|
||||
/// \brief Definition of the Par01PrimaryGeneratorAction class
|
||||
//
|
||||
// $Id: Par01PrimaryGeneratorAction.hh 90093 2015-05-13 11:59:54Z gcosmo $
|
||||
//
|
||||
// $Id: Par01PrimaryGeneratorAction.hh 100936 2016-11-03 11:07:41Z gcosmo $
|
||||
//
|
||||
|
||||
#ifndef Par01PrimaryGeneratorAction_h
|
||||
|
||||
@@ -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