From 579a68712c498cbac2356247b8e56b24fdc259c1 Mon Sep 17 00:00:00 2001 From: deserevi <deserevi@nptool> Date: Fri, 4 Dec 2009 09:14:34 +0000 Subject: [PATCH] * Add support for gamma-rays in the PhysicList * Remove occurence to Gaspard in Paris files --- Inputs/EventGenerator/isotropic.source | 8 +-- NPSimulation/include/Paris.hh | 6 +- NPSimulation/include/ParisModule.hh | 6 +- NPSimulation/include/ParisPhoswitch.hh | 38 +++++------ NPSimulation/src/Paris.cc | 8 +-- NPSimulation/src/ParisModule.cc | 4 +- NPSimulation/src/ParisPhoswitch.cc | 95 ++++++++++++-------------- NPSimulation/src/PhysicsList.cc | 13 ++-- NPSimulation/vis.mac | 10 +-- 9 files changed, 93 insertions(+), 95 deletions(-) diff --git a/Inputs/EventGenerator/isotropic.source b/Inputs/EventGenerator/isotropic.source index e5247faab..58a272bd6 100644 --- a/Inputs/EventGenerator/isotropic.source +++ b/Inputs/EventGenerator/isotropic.source @@ -4,13 +4,13 @@ % Energy are given in MeV , Position in mm % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Isotropic - EnergyLow= 5 - EnergyHigh= 5 + EnergyLow= 1 + EnergyHigh= 1 HalfOpenAngleMin= 0 - HalfOpenAngleMax= 180 + HalfOpenAngleMax= 1 x0= 0 y0= 0 z0= 0 - particle= proton + particle= gamma %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Supported particle type: proton, neutron, deuton, triton, He3 , alpha diff --git a/NPSimulation/include/Paris.hh b/NPSimulation/include/Paris.hh index 079f851f1..739fc6fa8 100644 --- a/NPSimulation/include/Paris.hh +++ b/NPSimulation/include/Paris.hh @@ -8,11 +8,11 @@ /***************************************************************************** * Original Author: N. de Sereville contact address: deserevi@ipno.in2p3.fr * * * - * Creation Date : 10/06/09 * + * Creation Date : 04/12/09 * * Last update : * *---------------------------------------------------------------------------* - * Decription: This class manages different shapes of module for the Gaspard * - * tracker. It allows to have Gaspard geometries with an * + * Decription: This class manages different shapes of module for the Paris * + * detector. It allows to have Paris geometries with an * * heterogeneous set of modules * *---------------------------------------------------------------------------* * Comment: * diff --git a/NPSimulation/include/ParisModule.hh b/NPSimulation/include/ParisModule.hh index 33a200498..146afd00c 100644 --- a/NPSimulation/include/ParisModule.hh +++ b/NPSimulation/include/ParisModule.hh @@ -8,11 +8,11 @@ /***************************************************************************** * Original Author: N. de Sereville contact address: deserevi@ipno.in2p3.fr * * * - * Creation Date : 10/06/09 * + * Creation Date : 04/12/09 * * Last update : * *---------------------------------------------------------------------------* * Decription: This class is an Abstract Base Class (ABC) from which should * - * derive all different modules from the Gaspard tracker. * + * derive all different modules from the Paris detector. * *---------------------------------------------------------------------------* * Comment: * * * @@ -67,7 +67,7 @@ public: virtual void SetInterCoordPointer(TInteractionCoordinates* interCoord) = 0; virtual TInteractionCoordinates* GetInterCoordPointer() = 0; - // Initialize the Index map for the different modules of Gaspard + // Initialize the Index map for the different modules of Paris void InitializeIndex(); public: diff --git a/NPSimulation/include/ParisPhoswitch.hh b/NPSimulation/include/ParisPhoswitch.hh index 00f247ea4..da205484a 100644 --- a/NPSimulation/include/ParisPhoswitch.hh +++ b/NPSimulation/include/ParisPhoswitch.hh @@ -8,12 +8,10 @@ /***************************************************************************** * Original Author: N. de Sereville contact address: deserevi@ipno.in2p3.fr * * * - * Creation Date : 03/09/09 * + * Creation Date : 04/12/09 * * Last update : * *---------------------------------------------------------------------------* - * Decription: Define a dummy module for the Gaspard tracker * - * The goal of this class is to be a starting point to create a * - * new shape to be added to the Gaspard tracker. * + * Decription: Define a phoswitch module for the Paris detector. * * * *---------------------------------------------------------------------------* * Comment: * @@ -49,30 +47,30 @@ public: //////////////////////////////////////////////////// public: // By Position Method - void AddModule(G4ThreeVector TL , - G4ThreeVector BL , - G4ThreeVector BR , + void AddModule(G4ThreeVector TL, + G4ThreeVector BL, + G4ThreeVector BR, G4ThreeVector CT); // By Angle Method - void AddModule(G4double R , - G4double Theta , - G4double Phi , - G4double beta_u , - G4double beta_v , + void AddModule(G4double R, + G4double Theta, + G4double Phi, + G4double beta_u, + G4double beta_v, G4double beta_w); // Effectively construct Volume // Avoid to have two time same code for Angle and Point definition - void VolumeMaker(G4int TelescopeNumber , - G4ThreeVector MMpos , - G4RotationMatrix* MMrot , + void VolumeMaker(G4int DetectorNumber, + G4ThreeVector MMpos, + G4RotationMatrix* MMrot, G4LogicalVolume* world); - //////////////////////////////////////////////////// - //// Inherite from GaspardTrackerModule class ///// - //////////////////////////////////////////////////// + /////////////////////////////////////////// + //// Inherite from ParisModule class ///// + /////////////////////////////////////////// public: // Read stream at Configfile to pick-up parameters of detector (Position,...) // Called in DetecorConstruction::ReadDetextorConfiguration Method @@ -94,8 +92,8 @@ public: void ReadSensitive(const G4Event* event); // Give the static TInteractionCoordinates from VDetector to the classes - // deriving from GaspardTrackerModule - // This is mandatory since the GaspardTracker*** does not derive from VDetector + // deriving from ParisModule + // This is mandatory since the Paris*** does not derive from VDetector void SetInterCoordPointer(TInteractionCoordinates* interCoord); TInteractionCoordinates* GetInterCoordPointer() {return ms_InterCoord;}; diff --git a/NPSimulation/src/Paris.cc b/NPSimulation/src/Paris.cc index 15140a1a4..2145ae213 100644 --- a/NPSimulation/src/Paris.cc +++ b/NPSimulation/src/Paris.cc @@ -8,11 +8,11 @@ /***************************************************************************** * Original Author: N. de Sereville contact address: deserevi@ipno.in2p3.fr * * * - * Creation Date : 10/06/09 * + * Creation Date : 04/12/09 * * Last update : * *---------------------------------------------------------------------------* - * Decription: This class manages different shapes of module for the Gaspard * - * tracker. It allows to have Gaspard geometries with an * + * Decription: This class manages different shapes of module for the Paris * + * detector. It allows to have Paris geometries with an * * heterogeneous set of modules * *---------------------------------------------------------------------------* * Comment: * @@ -108,7 +108,7 @@ void Paris::ConstructDetector(G4LogicalVolume* world) -// Connect the GaspardTrackingData class to the output TTree +// Connect the ParisData class to the output TTree // of the simulation void Paris::InitializeRootOutput() { diff --git a/NPSimulation/src/ParisModule.cc b/NPSimulation/src/ParisModule.cc index d153fa108..d91207355 100644 --- a/NPSimulation/src/ParisModule.cc +++ b/NPSimulation/src/ParisModule.cc @@ -8,11 +8,11 @@ /***************************************************************************** * Original Author: N. de Sereville contact address: deserevi@ipno.in2p3.fr * * * - * Creation Date : 10/06/09 * + * Creation Date : 04/12/09 * * Last update : * *---------------------------------------------------------------------------* * Decription: This class is an Abstract Base Class (ABC) from which should * - * derive all different modules from the Gaspard tracker. * + * derive all different modules from the Paris detector. * *---------------------------------------------------------------------------* * Comment: * * * diff --git a/NPSimulation/src/ParisPhoswitch.cc b/NPSimulation/src/ParisPhoswitch.cc index ccde45c6e..50dd07c59 100644 --- a/NPSimulation/src/ParisPhoswitch.cc +++ b/NPSimulation/src/ParisPhoswitch.cc @@ -8,22 +8,18 @@ /***************************************************************************** * Original Author: N. de Sereville contact address: deserevi@ipno.in2p3.fr * * * - * Creation Date : 03/09/09 * - * Last update : 12/10/09 * + * Creation Date : 04/12/09 * + * Last update : * *---------------------------------------------------------------------------* - * Decription: Define a dummy module for the Gaspard tracker * - * The goal of this class is to be a starting point to create a * - * new shape to be added to the Gaspard tracker. * + * Decription: Define a phoswitch module for the Paris detector. * * * *---------------------------------------------------------------------------* * Comment: * - * + 07/09/09: Fix bug for placing module with (r,theta,phi) method. * - * (N. de Sereville) * - * + 12/10/09: Change scorer scheme (N. de Sereville) * * * * * *****************************************************************************/ + // C++ headers #include <sstream> #include <string> @@ -52,7 +48,6 @@ // NPTool headers #include "ParisPhoswitch.hh" #include "GeneralScorers.hh" -#include "GaspardScorers.hh" #include "RootOutput.h" // CLHEP @@ -80,66 +75,66 @@ ParisPhoswitch::~ParisPhoswitch() //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -void ParisPhoswitch::AddModule(G4ThreeVector X1_Y1 , - G4ThreeVector X128_Y1 , - G4ThreeVector X1_Y128 , +void ParisPhoswitch::AddModule(G4ThreeVector X1_Y1, + G4ThreeVector X128_Y1, + G4ThreeVector X1_Y128, G4ThreeVector X128_Y128) { - m_DefinitionType.push_back(true) ; - - m_X1_Y1.push_back(X1_Y1) ; - m_X128_Y1.push_back(X128_Y1) ; - m_X1_Y128.push_back(X1_Y128) ; - m_X128_Y128.push_back(X128_Y128) ; - - m_R.push_back(0) ; - m_Theta.push_back(0) ; - m_Phi.push_back(0) ; - m_beta_u.push_back(0) ; - m_beta_v.push_back(0) ; - m_beta_w.push_back(0) ; + m_DefinitionType.push_back(true); + + m_X1_Y1.push_back(X1_Y1); + m_X128_Y1.push_back(X128_Y1); + m_X1_Y128.push_back(X1_Y128); + m_X128_Y128.push_back(X128_Y128); + + m_R.push_back(0); + m_Theta.push_back(0); + m_Phi.push_back(0); + m_beta_u.push_back(0); + m_beta_v.push_back(0); + m_beta_w.push_back(0); } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -void ParisPhoswitch::AddModule(G4double R , - G4double Theta , - G4double Phi , - G4double beta_u , - G4double beta_v , +void ParisPhoswitch::AddModule(G4double R, + G4double Theta, + G4double Phi, + G4double beta_u, + G4double beta_v, G4double beta_w) { G4ThreeVector empty = G4ThreeVector(0, 0, 0); m_DefinitionType.push_back(false); - m_X1_Y1.push_back(empty) ; - m_X128_Y1.push_back(empty) ; - m_X1_Y128.push_back(empty) ; - m_X128_Y128.push_back(empty) ; - - m_R.push_back(R) ; - m_Theta.push_back(Theta) ; - m_Phi.push_back(Phi) ; - m_beta_u.push_back(beta_u) ; - m_beta_v.push_back(beta_v) ; - m_beta_w.push_back(beta_w) ; + m_X1_Y1.push_back(empty); + m_X128_Y1.push_back(empty); + m_X1_Y128.push_back(empty); + m_X128_Y128.push_back(empty); + + m_R.push_back(R); + m_Theta.push_back(Theta); + m_Phi.push_back(Phi); + m_beta_u.push_back(beta_u); + m_beta_v.push_back(beta_v); + m_beta_w.push_back(beta_w); } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -void ParisPhoswitch::VolumeMaker(G4int TelescopeNumber, - G4ThreeVector MMpos, +void ParisPhoswitch::VolumeMaker(G4int DetectorNumber, + G4ThreeVector MMpos, G4RotationMatrix* MMrot, - G4LogicalVolume* world) + G4LogicalVolume* world) { - G4double NbrTelescopes = TelescopeNumber ; - G4String DetectorNumber ; - ostringstream Number ; - Number << NbrTelescopes ; - DetectorNumber = Number.str() ; + G4double NbrTelescopes = DetectorNumber; + G4String DetectorNumber; + ostringstream Number; + Number << NbrTelescopes; + DetectorNumber = Number.str(); ///////////////////////////////////////////////////////////////// /////////////////Element Definition /////////////////////////// @@ -542,7 +537,7 @@ void ParisPhoswitch::ConstructDetector(G4LogicalVolume* world) -// Connect the GaspardTrackingData class to the output TTree +// Connect the ParisData class to the output TTree // of the simulation void ParisPhoswitch::InitializeRootOutput() { diff --git a/NPSimulation/src/PhysicsList.cc b/NPSimulation/src/PhysicsList.cc index 104f06739..ff560e1bf 100644 --- a/NPSimulation/src/PhysicsList.cc +++ b/NPSimulation/src/PhysicsList.cc @@ -195,10 +195,10 @@ void PhysicsList::ConstructEM() } else if (particleName == "e+") { //positron - /* pmanager->AddProcess(new G4MultipleScattering , -1, 1, 1 ) ; - pmanager->AddProcess(new G4eIonisation , -1, 2, 2 ) ; - pmanager->AddProcess(new G4eBremsstrahlung , -1, -1, 3 ) ; - // pmanager->AddProcess(new G4eplusAnnihilation , 0, -1, 4 ) ;*/ + pmanager->AddProcess(new G4MultipleScattering , -1, 1, 1 ); + pmanager->AddProcess(new G4eIonisation , -1, 2, 2 ); + pmanager->AddProcess(new G4eBremsstrahlung , -1, -1, 3 ); + pmanager->AddProcess(new G4eplusAnnihilation , 0, -1, 4 ); } else if (particleName == "mu+" || particleName == "mu-") { @@ -251,6 +251,11 @@ void PhysicsList::SetCuts() // the default cut value for all particle types SetCutsWithDefault(); + // for gamma-rays + SetCutValue(0.1*mm, "gamma"); + SetCutValue(0.1*mm, "e-"); + SetCutValue(0.1*mm, "e+"); + // Retrieve verbose level SetVerboseLevel(temp); } diff --git a/NPSimulation/vis.mac b/NPSimulation/vis.mac index e8345fb35..6082ac113 100644 --- a/NPSimulation/vis.mac +++ b/NPSimulation/vis.mac @@ -1,10 +1,10 @@ #verbose level -/control/verbose 0 -/material/verbose 0 -/tracking/verbose 0 -/process/verbose 0 +/control/verbose 1 +/material/verbose 1 +/tracking/verbose 1 +/process/verbose 1 /event/verbose 0 -/run/verbose 0 +/run/verbose 1 # choose a graphic system #/vis/open OGLIX -- GitLab