From 331de7edddc24f99fd5a6bc3e9ae500a91a6a09d Mon Sep 17 00:00:00 2001 From: adrien-matta <a.matta@surrey.ac.uk> Date: Mon, 28 Apr 2014 11:17:18 +0100 Subject: [PATCH] * Complete lifting of AnnularS1 with new type of scorer from sharc * Sharc scorer are now named SIlicon Scorer * GeneralScorer moved to ObsoleteGeneralScorer * The Obsolete Scorer are kept until all detector are move to the new * syle of scorer --- NPLib/AnnularS1/TS1Data.cxx | 90 +- NPLib/AnnularS1/TS1Data.h | 136 ++- NPSimulation/AnnularS1/AnnularS1.cc | 800 +++++++----------- NPSimulation/AnnularS1/AnnularS1.hh | 15 +- NPSimulation/AnnularS1/AnnularS1Scorers.cc | 192 ----- NPSimulation/AnnularS1/AnnularS1Scorers.hh | 82 -- .../ComptonTelescope/ComptonTelescope.cc | 12 +- .../ComptonTelescopeScorers.cc | 16 +- NPSimulation/DummyDetector/DummyDetector.cc | 4 +- NPSimulation/Eurogam/Eurogam.cc | 20 +- NPSimulation/GASPARD/GaspardScorers.cc | 24 +- NPSimulation/GASPARD/GaspardTrackerAnnular.cc | 16 +- .../GASPARD/GaspardTrackerDummyShape.cc | 16 +- NPSimulation/GASPARD/GaspardTrackerSquare.cc | 16 +- .../GASPARD/GaspardTrackerTrapezoid.cc | 16 +- NPSimulation/Helios/HeliosDetDummyShape.cc | 16 +- NPSimulation/Helios/HeliosScorers.cc | 20 +- NPSimulation/Hyde2/Hyde2Scorers.cc | 26 +- NPSimulation/Hyde2/Hyde2TrackerSquare1.cc | 16 +- NPSimulation/Hyde2/Hyde2TrackerTrapezoid1.cc | 16 +- NPSimulation/Hyde2/Hyde2TrackerTrapezoid2.cc | 16 +- NPSimulation/MUST2/MUST2Array.cc | 22 +- NPSimulation/MUST2/MUST2Scorers.cc | 8 +- NPSimulation/Paris/ParisCluster.cc | 16 +- NPSimulation/Paris/ParisPhoswich.cc | 16 +- NPSimulation/Paris/ParisScorers.cc | 16 +- NPSimulation/Plastic/Plastic.cc | 6 +- NPSimulation/SSSD/ThinSi.cc | 8 +- NPSimulation/SSSD/ThinSiScorers.cc | 4 +- NPSimulation/Sharc/Sharc.cc | 42 +- NPSimulation/Sharc/SharcScorers.cc | 241 ------ NPSimulation/Shield/ShieldClParis.cc | 16 +- NPSimulation/Shield/ShieldPhParis.cc | 16 +- NPSimulation/Shield/ShieldScorers.cc | 8 +- NPSimulation/W1/W1.cc | 18 +- NPSimulation/W1/W1Scorers.cc | 6 +- ...alScorers.hh => ObsoleteGeneralScorers.hh} | 2 +- .../SiliconScorers.hh} | 35 +- .../src/EventGeneratorParticleDecay.cc | 2 +- ...alScorers.cc => ObsoleteGeneralScorers.cc} | 6 +- NPSimulation/src/Particle.cc | 2 +- 41 files changed, 658 insertions(+), 1397 deletions(-) delete mode 100644 NPSimulation/AnnularS1/AnnularS1Scorers.cc delete mode 100644 NPSimulation/AnnularS1/AnnularS1Scorers.hh delete mode 100644 NPSimulation/Sharc/SharcScorers.cc rename NPSimulation/include/{GeneralScorers.hh => ObsoleteGeneralScorers.hh} (99%) rename NPSimulation/{Sharc/SharcScorers.hh => include/SiliconScorers.hh} (85%) rename NPSimulation/src/{GeneralScorers.cc => ObsoleteGeneralScorers.cc} (98%) diff --git a/NPLib/AnnularS1/TS1Data.cxx b/NPLib/AnnularS1/TS1Data.cxx index 3ff611d2a..a55a40d05 100644 --- a/NPLib/AnnularS1/TS1Data.cxx +++ b/NPLib/AnnularS1/TS1Data.cxx @@ -33,63 +33,59 @@ using namespace std; ClassImp(TS1Data) -TS1Data::TS1Data() -{ - // Default constructor + TS1Data::TS1Data(){ + // Default constructor - Clear(); -} + Clear(); + } -TS1Data::~TS1Data() -{ +TS1Data::~TS1Data(){ } -void TS1Data::Clear() -{ - // DSSD - // (Th,E) - fS1_Theta_E_DetNbr.clear(); - fS1_Theta_E_StripNbr.clear(); - fS1_Theta_E_Energy.clear(); - // (Th,T) - fS1_Theta_T_DetNbr.clear(); - fS1_Theta_T_StripNbr.clear(); - fS1_Theta_T_Time.clear(); - // (Ph,E) - fS1_Phi_E_DetNbr.clear(); - fS1_Phi_E_StripNbr.clear(); - fS1_Phi_E_Energy.clear(); - // (Ph,T) - fS1_Phi_T_DetNbr.clear(); - fS1_Phi_T_StripNbr.clear(); - fS1_Phi_T_Time.clear(); +void TS1Data::Clear(){ + // DSSD + // (Th,E) + fS1_Theta_E_DetNbr.clear(); + fS1_Theta_E_StripNbr.clear(); + fS1_Theta_E_Energy.clear(); + // (Th,T) + fS1_Theta_T_DetNbr.clear(); + fS1_Theta_T_StripNbr.clear(); + fS1_Theta_T_Time.clear(); + // (Ph,E) + fS1_Phi_E_DetNbr.clear(); + fS1_Phi_E_StripNbr.clear(); + fS1_Phi_E_Energy.clear(); + // (Ph,T) + fS1_Phi_T_DetNbr.clear(); + fS1_Phi_T_StripNbr.clear(); + fS1_Phi_T_Time.clear(); } -void TS1Data::Dump() const -{ - cout << "XXXXXXXXXXXXXXXXXXXXXXXX New Event XXXXXXXXXXXXXXXXX" << endl; - - // DSSD - // (Th,E) - cout << "S1_MultThE = " << fS1_Theta_E_DetNbr.size() << endl; - for (UShort_t i = 0; i < fS1_Theta_E_DetNbr.size(); i++) - cout << "DetThE: " << fS1_Theta_E_DetNbr[i] << " StripThE: " << fS1_Theta_E_StripNbr[i] << " EnergyTh: " << fS1_Theta_E_Energy[i] << endl; - // (Th,T) - cout << "S1_MultThT = " << fS1_Theta_T_DetNbr.size() << endl; - for (UShort_t i = 0; i < fS1_Theta_T_DetNbr.size(); i++) - cout << "DetThT: " << fS1_Theta_T_DetNbr[i] << " StripThT: " << fS1_Theta_T_StripNbr[i] << " TimeTh: " << fS1_Theta_T_Time[i] << endl; - // (Ph,E) - cout << "S1_MultPhE = " << fS1_Phi_E_DetNbr.size() << endl; - for (UShort_t i = 0; i < fS1_Phi_E_DetNbr.size(); i++) - cout << "DetPhE: " << fS1_Phi_E_DetNbr[i] << " StripPhE: " << fS1_Phi_E_StripNbr[i] << " EnergyPh: " << fS1_Phi_E_Energy[i] << endl; - // (Ph,T) - cout << "S1_MultThT = " << fS1_Phi_T_DetNbr.size() << endl; - for (UShort_t i = 0; i < fS1_Phi_T_DetNbr.size(); i++) - cout << "DetThT: " << fS1_Phi_T_DetNbr[i] << " StripThT: " << fS1_Phi_T_StripNbr[i] << " TimeTh: " << fS1_Phi_T_Time[i] << endl; +void TS1Data::Dump() const{ + cout << "XXXXXXXXXXXXXXXXXXXXXXXX New Event XXXXXXXXXXXXXXXXX" << endl; + + // DSSD + // (Th,E) + cout << "S1_MultThE = " << fS1_Theta_E_DetNbr.size() << endl; + for (UShort_t i = 0; i < fS1_Theta_E_DetNbr.size(); i++) + cout << "DetThE: " << fS1_Theta_E_DetNbr[i] << " StripThE: " << fS1_Theta_E_StripNbr[i] << " EnergyTh: " << fS1_Theta_E_Energy[i] << endl; + // (Th,T) + cout << "S1_MultThT = " << fS1_Theta_T_DetNbr.size() << endl; + for (UShort_t i = 0; i < fS1_Theta_T_DetNbr.size(); i++) + cout << "DetThT: " << fS1_Theta_T_DetNbr[i] << " StripThT: " << fS1_Theta_T_StripNbr[i] << " TimeTh: " << fS1_Theta_T_Time[i] << endl; + // (Ph,E) + cout << "S1_MultPhE = " << fS1_Phi_E_DetNbr.size() << endl; + for (UShort_t i = 0; i < fS1_Phi_E_DetNbr.size(); i++) + cout << "DetPhE: " << fS1_Phi_E_DetNbr[i] << " StripPhE: " << fS1_Phi_E_StripNbr[i] << " EnergyPh: " << fS1_Phi_E_Energy[i] << endl; + // (Ph,T) + cout << "S1_MultThT = " << fS1_Phi_T_DetNbr.size() << endl; + for (UShort_t i = 0; i < fS1_Phi_T_DetNbr.size(); i++) + cout << "DetThT: " << fS1_Phi_T_DetNbr[i] << " StripThT: " << fS1_Phi_T_StripNbr[i] << " TimeTh: " << fS1_Phi_T_Time[i] << endl; } diff --git a/NPLib/AnnularS1/TS1Data.h b/NPLib/AnnularS1/TS1Data.h index f0e850cc1..5317e6688 100644 --- a/NPLib/AnnularS1/TS1Data.h +++ b/NPLib/AnnularS1/TS1Data.h @@ -26,86 +26,80 @@ * * * * *****************************************************************************/ - - - #include <vector> - #include "TObject.h" class TS1Data : public TObject { - private: - // DSSD - // Theta strips - // ADC - vector<UShort_t> fS1_Theta_E_DetNbr; - vector<UShort_t> fS1_Theta_E_StripNbr; - vector<Double_t> fS1_Theta_E_Energy; - // TDC - vector<UShort_t> fS1_Theta_T_DetNbr; - vector<UShort_t> fS1_Theta_T_StripNbr; - vector<Double_t> fS1_Theta_T_Time; - // Phi strips - // ADC - vector<UShort_t> fS1_Phi_E_DetNbr; - vector<UShort_t> fS1_Phi_E_StripNbr; - vector<Double_t> fS1_Phi_E_Energy; - // TDC - vector<UShort_t> fS1_Phi_T_DetNbr; - vector<UShort_t> fS1_Phi_T_StripNbr; - vector<Double_t> fS1_Phi_T_Time; - - public: - TS1Data(); - virtual ~TS1Data(); - - void Clear(); - void Clear(const Option_t*) {}; - void Dump() const; + private: + // DSSD + // Theta strips + // ADC + vector<UShort_t> fS1_Theta_E_DetNbr; + vector<UShort_t> fS1_Theta_E_StripNbr; + vector<Double_t> fS1_Theta_E_Energy; + // TDC + vector<UShort_t> fS1_Theta_T_DetNbr; + vector<UShort_t> fS1_Theta_T_StripNbr; + vector<Double_t> fS1_Theta_T_Time; + // Phi strips + // ADC + vector<UShort_t> fS1_Phi_E_DetNbr; + vector<UShort_t> fS1_Phi_E_StripNbr; + vector<Double_t> fS1_Phi_E_Energy; + // TDC + vector<UShort_t> fS1_Phi_T_DetNbr; + vector<UShort_t> fS1_Phi_T_StripNbr; + vector<Double_t> fS1_Phi_T_Time; + public: + TS1Data(); + virtual ~TS1Data(); + void Clear(); + void Clear(const Option_t*) {}; + void Dump() const; - ///////////////////// GETTERS //////////////////////// - // (Th,E) - UShort_t GetS1ThetaEMult() {return fS1_Theta_E_DetNbr.size();} - UShort_t GetS1ThetaEDetectorNbr(Int_t i) {return fS1_Theta_E_DetNbr.at(i);} - UShort_t GetS1ThetaEStripNbr(Int_t i) {return fS1_Theta_E_StripNbr.at(i);} - Double_t GetS1ThetaEEnergy(Int_t i) {return fS1_Theta_E_Energy.at(i);} - // (Th,T) - UShort_t GetS1ThetaTMult() {return fS1_Theta_T_DetNbr.size();} - UShort_t GetS1ThetaTDetectorNbr(Int_t i) {return fS1_Theta_T_DetNbr.at(i);} - UShort_t GetS1ThetaTStripNbr(Int_t i) {return fS1_Theta_T_StripNbr.at(i);} - Double_t GetS1ThetaTTime(Int_t i) {return fS1_Theta_T_Time.at(i);} - // (Ph,E) - UShort_t GetS1PhiEMult() {return fS1_Phi_E_DetNbr.size();} - UShort_t GetS1PhiEDetectorNbr(Int_t i) {return fS1_Phi_E_DetNbr.at(i);} - UShort_t GetS1PhiEStripNbr(Int_t i) {return fS1_Phi_E_StripNbr.at(i);} - Double_t GetS1PhiEEnergy(Int_t i) {return fS1_Phi_E_Energy.at(i);} - // (Ph,T) - UShort_t GetS1PhiTMult() {return fS1_Phi_T_DetNbr.size();} - UShort_t GetS1PhiTDetectorNbr(Int_t i) {return fS1_Phi_T_DetNbr.at(i);} - UShort_t GetS1PhiTStripNbr(Int_t i) {return fS1_Phi_T_StripNbr.at(i);} - Double_t GetS1PhiTTime(Int_t i) {return fS1_Phi_T_Time.at(i);} + ///////////////////// GETTERS //////////////////////// + // (Th,E) + UShort_t GetS1ThetaEMult() {return fS1_Theta_E_DetNbr.size();} + UShort_t GetS1ThetaEDetectorNbr(Int_t i) {return fS1_Theta_E_DetNbr.at(i);} + UShort_t GetS1ThetaEStripNbr(Int_t i) {return fS1_Theta_E_StripNbr.at(i);} + Double_t GetS1ThetaEEnergy(Int_t i) {return fS1_Theta_E_Energy.at(i);} + // (Th,T) + UShort_t GetS1ThetaTMult() {return fS1_Theta_T_DetNbr.size();} + UShort_t GetS1ThetaTDetectorNbr(Int_t i) {return fS1_Theta_T_DetNbr.at(i);} + UShort_t GetS1ThetaTStripNbr(Int_t i) {return fS1_Theta_T_StripNbr.at(i);} + Double_t GetS1ThetaTTime(Int_t i) {return fS1_Theta_T_Time.at(i);} + // (Ph,E) + UShort_t GetS1PhiEMult() {return fS1_Phi_E_DetNbr.size();} + UShort_t GetS1PhiEDetectorNbr(Int_t i) {return fS1_Phi_E_DetNbr.at(i);} + UShort_t GetS1PhiEStripNbr(Int_t i) {return fS1_Phi_E_StripNbr.at(i);} + Double_t GetS1PhiEEnergy(Int_t i) {return fS1_Phi_E_Energy.at(i);} + // (Ph,T) + UShort_t GetS1PhiTMult() {return fS1_Phi_T_DetNbr.size();} + UShort_t GetS1PhiTDetectorNbr(Int_t i) {return fS1_Phi_T_DetNbr.at(i);} + UShort_t GetS1PhiTStripNbr(Int_t i) {return fS1_Phi_T_StripNbr.at(i);} + Double_t GetS1PhiTTime(Int_t i) {return fS1_Phi_T_Time.at(i);} - ///////////////////// SETTERS //////////////////////// - // (Th,E) - void SetS1ThetaEDetectorNbr(UShort_t det) {fS1_Theta_E_DetNbr.push_back(det);} - void SetS1ThetaEStripNbr(UShort_t Nr) {fS1_Theta_E_StripNbr.push_back(Nr);} - void SetS1ThetaEEnergy(Double_t E) {fS1_Theta_E_Energy.push_back(E);} - // (Th,T) - void SetS1ThetaTDetectorNbr(UShort_t det) {fS1_Theta_T_DetNbr.push_back(det);} - void SetS1ThetaTStripNbr(UShort_t Nr) {fS1_Theta_T_StripNbr.push_back(Nr);} - void SetS1ThetaTTime(Double_t T) {fS1_Theta_T_Time.push_back(T);} - // (Ph,E) - void SetS1PhiEDetectorNbr(UShort_t det) {fS1_Phi_E_DetNbr.push_back(det);} - void SetS1PhiEStripNbr(UShort_t Nr) {fS1_Phi_E_StripNbr.push_back(Nr);} - void SetS1PhiEEnergy(Double_t E) {fS1_Phi_E_Energy.push_back(E);} - // (Ph,T) - void SetS1PhiTDetectorNbr(UShort_t det) {fS1_Phi_T_DetNbr.push_back(det);} - void SetS1PhiTStripNbr(UShort_t Nr) {fS1_Phi_T_StripNbr.push_back(Nr);} - void SetS1PhiTTime(Double_t T) {fS1_Phi_T_Time.push_back(T);} + ///////////////////// SETTERS //////////////////////// + // (Th,E) + void SetS1ThetaEDetectorNbr(UShort_t det) {fS1_Theta_E_DetNbr.push_back(det);} + void SetS1ThetaEStripNbr(UShort_t Nr) {fS1_Theta_E_StripNbr.push_back(Nr);} + void SetS1ThetaEEnergy(Double_t E) {fS1_Theta_E_Energy.push_back(E);} + // (Th,T) + void SetS1ThetaTDetectorNbr(UShort_t det) {fS1_Theta_T_DetNbr.push_back(det);} + void SetS1ThetaTStripNbr(UShort_t Nr) {fS1_Theta_T_StripNbr.push_back(Nr);} + void SetS1ThetaTTime(Double_t T) {fS1_Theta_T_Time.push_back(T);} + // (Ph,E) + void SetS1PhiEDetectorNbr(UShort_t det) {fS1_Phi_E_DetNbr.push_back(det);} + void SetS1PhiEStripNbr(UShort_t Nr) {fS1_Phi_E_StripNbr.push_back(Nr);} + void SetS1PhiEEnergy(Double_t E) {fS1_Phi_E_Energy.push_back(E);} + // (Ph,T) + void SetS1PhiTDetectorNbr(UShort_t det) {fS1_Phi_T_DetNbr.push_back(det);} + void SetS1PhiTStripNbr(UShort_t Nr) {fS1_Phi_T_StripNbr.push_back(Nr);} + void SetS1PhiTTime(Double_t T) {fS1_Phi_T_Time.push_back(T);} - ClassDef(TS1Data,2) // S1Data structure + ClassDef(TS1Data,2) // S1Data structure }; #endif diff --git a/NPSimulation/AnnularS1/AnnularS1.cc b/NPSimulation/AnnularS1/AnnularS1.cc index 1bbfe1b94..f16e9fe97 100644 --- a/NPSimulation/AnnularS1/AnnularS1.cc +++ b/NPSimulation/AnnularS1/AnnularS1.cc @@ -46,9 +46,9 @@ #include "G4MultiFunctionalDetector.hh" // NPTool headers -#include "GeneralScorers.hh" +#include "ObsoleteGeneralScorers.hh" #include "AnnularS1.hh" -#include "AnnularS1Scorers.hh" +#include "SiliconScorers.hh" #include "TS1Data.h" #include "RootOutput.h" @@ -57,121 +57,107 @@ using namespace std; using namespace CLHEP; - using namespace ANNULARS1; -using namespace S1SCORERS; - - //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... AnnularS1::AnnularS1(){ - m_Event = new TS1Data(); + m_Event = new TS1Data(); } - - //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... AnnularS1::~AnnularS1(){ - delete m_Event; + delete m_Event; } - - //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... void AnnularS1::AddModule(G4double PosZ){ - m_PosZ.push_back(PosZ); + m_PosZ.push_back(PosZ); } - - //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... void AnnularS1::VolumeMaker(G4int DetecNumber, - G4ThreeVector position, - G4RotationMatrix* rotation, - G4LogicalVolume* world) + G4ThreeVector position, + G4RotationMatrix* rotation, + G4LogicalVolume* world) { - G4double NbrTelescopes = DetecNumber; - G4String DetectorNumber; - ostringstream Number; - Number << NbrTelescopes; - DetectorNumber = Number.str(); - - //////////////////////////////////////////////////////////////// - /////////////////Element Definition /////////////////////////// - //////////////////////////////////////////////////////////////// - G4String symbol ; - G4double density = 0. , a = 0, z = 0 ; - G4int ncomponents = 0, natoms = 0 ; - - //////////////////////////////////////////////////////////////// - /////////////////Material Definition /////////////////////////// - //////////////////////////////////////////////////////////////// - // Si - a = 28.0855 * g / mole; - density = 2.321 * g / cm3; - G4Material* Silicon = new G4Material("Si", z = 14., a, density); - - // Al - density = 2.702 * g / cm3; - a = 26.98 * g / mole; - G4Material* Aluminium = new G4Material("Aluminium", z = 13., a, density); - - // Vacuum - density = 0.000000001 * mg / cm3; - G4Material* Vacuum = new G4Material("Vacuum", density, ncomponents = 2); - G4Element* N = new G4Element("Nitrogen" , symbol = "N" , z = 7 , a = 14.01 * g / mole); - G4Element* O = new G4Element("Oxigen" , symbol = "O" , z = 8 , a = 16.00 * g / mole); - Vacuum->AddElement(N, .7); - Vacuum->AddElement(O, .3); - //////////////////////////////////////////////////////////////// - ////////////// Starting Volume Definition ////////////////////// - //////////////////////////////////////////////////////////////// - // Name of the module - G4String Name = "S1Annular" + DetectorNumber; - - // Building the PCB - // The PCB is a simple extruded volume from 8reference point - vector<G4TwoVector> polygon; - for(unsigned int i = 0 ; i < 8 ; i++){ + //////////////////////////////////////////////////////////////// + /////////////////Element Definition /////////////////////////// + //////////////////////////////////////////////////////////////// + G4String symbol ; + G4double density = 0. , a = 0, z = 0 ; + G4int ncomponents = 0, natoms = 0 ; + + //////////////////////////////////////////////////////////////// + /////////////////Material Definition /////////////////////////// + //////////////////////////////////////////////////////////////// + // Si + a = 28.0855 * g / mole; + density = 2.321 * g / cm3; + G4Material* Silicon = new G4Material("Si", z = 14., a, density); + + // Al + density = 2.702 * g / cm3; + a = 26.98 * g / mole; + G4Material* Aluminium = new G4Material("Aluminium", z = 13., a, density); + + // Vacuum + density = 0.000000001 * mg / cm3; + G4Material* Vacuum = new G4Material("Vacuum", density, ncomponents = 2); + G4Element* N = new G4Element("Nitrogen" , symbol = "N" , z = 7 , a = 14.01 * g / mole); + G4Element* O = new G4Element("Oxigen" , symbol = "O" , z = 8 , a = 16.00 * g / mole); + Vacuum->AddElement(N, .7); + Vacuum->AddElement(O, .3); + //////////////////////////////////////////////////////////////// + ////////////// Starting Volume Definition ////////////////////// + //////////////////////////////////////////////////////////////// + // Name of the module + G4String Name = "AnnularS1"; + + // Building the PCB + // The PCB is a simple extruded volume from 8reference point + vector<G4TwoVector> polygon; + for(unsigned int i = 0 ; i < 8 ; i++){ G4TwoVector Point(PCBPointsX[i],PCBPointsY[i]); polygon.push_back(Point); - } + } // Mast volume containing all the detector G4ExtrudedSolid* solidAnnularS1 = new G4ExtrudedSolid(Name, - polygon, - PCBThickness*0.5, - G4TwoVector(0,0),1, - G4TwoVector(0,0),1); - - // Definition of the volume containing the sensitive detector - G4LogicalVolume* logicAnnularS1 = new G4LogicalVolume(solidAnnularS1, Vacuum, Name, 0, 0, 0); - - new G4PVPlacement(G4Transform3D(*rotation, position), - logicAnnularS1, - Name, - world, - false, - 0); - - logicAnnularS1->SetVisAttributes(G4VisAttributes::Invisible); - - // PCB Base - G4ExtrudedSolid* solidPCBBase = new G4ExtrudedSolid("PCBBase", - polygon, - PCBThickness*0.5, - G4TwoVector(0,0),1, - G4TwoVector(0,0),1); - - // Wafer Shape to be substracted to the PCB - G4Tubs* solidWaferShapeBase = new G4Tubs("WaferShape", - WaferInnerRadius, - WaferOutterRadius, - PCBThickness, - 0*deg, - 360*deg); -G4RotationMatrix* norotation = new G4RotationMatrix(); - + polygon, + PCBThickness*0.5, + G4TwoVector(0,0),1, + G4TwoVector(0,0),1); + + // Definition of the volume containing the sensitive detector + G4LogicalVolume* logicAnnularS1 = new G4LogicalVolume(solidAnnularS1, Vacuum, Name, 0, 0, 0); + + new G4PVPlacement(G4Transform3D(*rotation, position), + logicAnnularS1, + Name, + world, + false, + DetecNumber); + + logicAnnularS1->SetVisAttributes(G4VisAttributes::Invisible); + + // PCB Base + G4ExtrudedSolid* solidPCBBase = new G4ExtrudedSolid("PCBBase", + polygon, + PCBThickness*0.5, + G4TwoVector(0,0),1, + G4TwoVector(0,0),1); + + // Wafer Shape to be substracted to the PCB + G4Tubs* solidWaferShapeBase = new G4Tubs("WaferShape", + WaferInnerRadius, + WaferOutterRadius, + PCBThickness, + 0*deg, + 360*deg); + + // A no rotation matrix is always handy ;) + G4RotationMatrix* norotation = new G4RotationMatrix(); + // Rotation of the box that make the Si cut G4RotationMatrix* cutrotation = new G4RotationMatrix(G4ThreeVector(0,0,1),45*deg); G4ThreeVector cutposition1(80*mm+WaferRCut,0,0); cutposition1.setPhi(45*deg); G4Transform3D transform1(*cutrotation,cutposition1); @@ -179,106 +165,105 @@ G4RotationMatrix* norotation = new G4RotationMatrix(); G4Box* solidCutout = new G4Box("cuttout",80*mm,80*mm,80*mm); G4SubtractionSolid* solidWaferShape1 = new G4SubtractionSolid("WaferShape1", - solidWaferShapeBase, - solidCutout, - transform1); + solidWaferShapeBase, + solidCutout, + transform1); + - G4ThreeVector cutposition2(-80*mm-WaferRCut,0,0); cutposition2.setPhi(-135*deg); G4Transform3D transform2(*cutrotation,cutposition2); G4SubtractionSolid* solidWaferShape = new G4SubtractionSolid("WaferShape", - solidWaferShape1, - solidCutout, - transform2); + solidWaferShape1, + solidCutout, + transform2); - // PCB final - G4SubtractionSolid* solidPCB1 = new G4SubtractionSolid("AnnularS1_PCB1", - solidPCBBase, - solidWaferShape); - - G4Tubs* solidTub = + // PCB final + G4SubtractionSolid* solidPCB1 = new G4SubtractionSolid("AnnularS1_PCB1", + solidPCBBase, + solidWaferShape); + + G4Tubs* solidTub = new G4Tubs("central_hole",0,PCBInnerRadius,PCBThickness,0,360*deg); - G4SubtractionSolid* solidPCB = new G4SubtractionSolid("AnnularS1_PCB", - solidPCB1, - solidTub); + G4SubtractionSolid* solidPCB = new G4SubtractionSolid("AnnularS1_PCB", + solidPCB1, + solidTub); - G4LogicalVolume* logicPCB = new G4LogicalVolume(solidPCB, Vacuum, "AnnularS1_PCB", 0, 0, 0); + G4LogicalVolume* logicPCB = new G4LogicalVolume(solidPCB, Vacuum, "AnnularS1_PCB", 0, 0, 0); - new G4PVPlacement(G4Transform3D(*norotation, G4ThreeVector()), - logicPCB, - "AnnularS1_PCB", - logicAnnularS1, - false, - 0); - - G4VisAttributes* PCBVisAtt = new G4VisAttributes(G4Colour(0.2, 0.5, 0.2)) ; - logicPCB->SetVisAttributes(PCBVisAtt); + new G4PVPlacement(G4Transform3D(*norotation, G4ThreeVector()), + logicPCB, + "AnnularS1_PCB", + logicAnnularS1, + false, + DetecNumber); + G4VisAttributes* PCBVisAtt = new G4VisAttributes(G4Colour(0.2, 0.5, 0.2)) ; + logicPCB->SetVisAttributes(PCBVisAtt); + + + // Wafer itself + G4Tubs* solidWaferBase = new G4Tubs("Wafer", + WaferInnerRadius, + WaferOutterRadius, + WaferThickness, + 0*deg, + 360*deg); - // Wafer itself - G4Tubs* solidWaferBase = new G4Tubs("Wafer", - WaferInnerRadius, - WaferOutterRadius, - WaferThickness, - 0*deg, - 360*deg); - G4SubtractionSolid* solidWafer1 = new G4SubtractionSolid("Wafer1", - solidWaferBase, - solidCutout, - transform1); + solidWaferBase, + solidCutout, + transform1); G4SubtractionSolid* solidWafer = new G4SubtractionSolid("Wafer", - solidWafer1, - solidCutout, - transform2); + solidWafer1, + solidCutout, + transform2); G4LogicalVolume* logicWafer = new G4LogicalVolume(solidWafer, Silicon, "AnnularS1_Wafer", 0, 0, 0); new G4PVPlacement(G4Transform3D(*norotation, G4ThreeVector()), - logicWafer, - "AnnularS1_Wafer", - logicAnnularS1, - false, - 0); - - G4VisAttributes* SiVisAtt = new G4VisAttributes(G4Colour(0.3, 0.3, 0.3)) ; - logicWafer->SetVisAttributes(SiVisAtt); - - // Active Wafer - G4Tubs* solidActiveWaferBase = new G4Tubs("ActiveWafer", - ActiveWaferInnerRadius, - ActiveWaferOutterRadius, - WaferThickness, - 0*deg, - 360*deg); - + logicWafer, + "AnnularS1_Wafer", + logicAnnularS1, + false, + DetecNumber); + + G4VisAttributes* SiVisAtt = new G4VisAttributes(G4Colour(0.3, 0.3, 0.3)) ; + logicWafer->SetVisAttributes(SiVisAtt); + + // Active Wafer + G4Tubs* solidActiveWaferBase = new G4Tubs("ActiveWafer", + ActiveWaferInnerRadius, + ActiveWaferOutterRadius, + WaferThickness, + 0*deg, + 360*deg); + G4SubtractionSolid* solidActiveWafer1 = new G4SubtractionSolid("ActiveWafer1", - solidActiveWaferBase, - solidCutout, - transform1); + solidActiveWaferBase, + solidCutout, + transform1); G4SubtractionSolid* solidActiveWafer = new G4SubtractionSolid("ActiveWafer", - solidActiveWafer1, - solidCutout, - transform2); + solidActiveWafer1, + solidCutout, + transform2); G4LogicalVolume* logicActiveWafer = new G4LogicalVolume(solidActiveWafer, Silicon, "AnnularS1_ActiveWafer", 0, 0, 0); new G4PVPlacement(G4Transform3D(*norotation, G4ThreeVector()), - logicActiveWafer, - "AnnularS1_ActiveWafer", - logicWafer, - false, - 0); + logicActiveWafer, + "AnnularS1_ActiveWafer", + logicWafer, + false, + DetecNumber); + logicActiveWafer->SetVisAttributes(SiVisAtt); - + // Set Silicon strip sensible - logicActiveWafer->SetSensitiveDetector(m_Scorer); + logicActiveWafer->SetSensitiveDetector(m_Scorer); } - - //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... @@ -287,368 +272,169 @@ G4RotationMatrix* norotation = new G4RotationMatrix(); // Read stream at Configfile to pick-up parameters of detector (Position,...) // Called in DetecorConstruction::ReadDetextorConfiguration Method void AnnularS1::ReadConfiguration(string Path){ - ifstream ConfigFile; - ConfigFile.open(Path.c_str()); - string LineBuffer, DataBuffer; - - G4double Z = 0; - bool check_Z = false; - bool check_VIS = false; - bool ReadingStatus = false; - - while (!ConfigFile.eof()) { - getline(ConfigFile, LineBuffer); - - if (LineBuffer.compare(0, 9, "AnnularS1") == 0) { - G4cout << "///" << G4endl ; - G4cout << "Annular element found: " << G4endl ; - ReadingStatus = true ; - } - else ReadingStatus = false ; - - while (ReadingStatus) { - ConfigFile >> DataBuffer; - - // Search for comment Symbol % - if (DataBuffer.compare(0, 1, "%") == 0) { - ConfigFile.ignore ( std::numeric_limits<std::streamsize>::max(), '\n' ); - } - - // Position method - else if (DataBuffer.compare(0, 2, "Z=") == 0) { - check_Z = true; - ConfigFile >> DataBuffer ; - Z = atof(DataBuffer.c_str()) ; - Z = Z * mm; - cout << "Z: " << Z / mm << endl; + ifstream ConfigFile; + ConfigFile.open(Path.c_str()); + string LineBuffer, DataBuffer; + + G4double Z = 0; + bool check_Z = false; + bool check_VIS = false; + bool ReadingStatus = false; + + while (!ConfigFile.eof()) { + getline(ConfigFile, LineBuffer); + + if (LineBuffer.compare(0, 9, "AnnularS1") == 0) { + G4cout << "///" << G4endl ; + G4cout << "Annular element found: " << G4endl ; + ReadingStatus = true ; } - else if (DataBuffer.compare(0, 4, "VIS=") == 0) { - check_VIS = true; - ConfigFile >> DataBuffer; - if (DataBuffer.compare(0, 3, "all") == 0) m_non_sensitive_part_visiualisation = true; - } - else { - /////////////////////////////////////////////////// - // If no Detector Token and no comment, toggle out - ReadingStatus = false; - G4cout << "Wrong Token Sequence: Getting out " << DataBuffer << G4endl; - } - - // Add The previously define module - if (check_Z && check_VIS) { - AddModule(Z); - check_Z = false; - check_VIS = false; - ReadingStatus = false; - cout << "///"<< endl; - } + else ReadingStatus = false ; + + while (ReadingStatus) { + ConfigFile >> DataBuffer; + + // Search for comment Symbol % + if (DataBuffer.compare(0, 1, "%") == 0) { + ConfigFile.ignore ( std::numeric_limits<std::streamsize>::max(), '\n' ); } - } -} + // Position method + else if (DataBuffer.compare(0, 2, "Z=") == 0) { + check_Z = true; + ConfigFile >> DataBuffer ; + Z = atof(DataBuffer.c_str()) ; + Z = Z * mm; + cout << "Z: " << Z / mm << endl; + } + else if (DataBuffer.compare(0, 4, "VIS=") == 0) { + check_VIS = true; + ConfigFile >> DataBuffer; + if (DataBuffer.compare(0, 3, "all") == 0) m_non_sensitive_part_visiualisation = true; + } + else { + /////////////////////////////////////////////////// + // If no Detector Token and no comment, toggle out + ReadingStatus = false; + G4cout << "Wrong Token Sequence: Getting out " << DataBuffer << G4endl; + } + // Add The previously define module + if (check_Z && check_VIS) { + AddModule(Z); + check_Z = false; + check_VIS = false; + ReadingStatus = false; + cout << "///"<< endl; + } + } + } +} // Construct detector and inialise sensitive part. // Called After DetecorConstruction::AddDetector Method -void AnnularS1::ConstructDetector(G4LogicalVolume* world) -{ - G4RotationMatrix* rotation = NULL; - G4ThreeVector position = G4ThreeVector(0, 0, 0); +void AnnularS1::ConstructDetector(G4LogicalVolume* world){ + G4RotationMatrix* rotation = NULL; + G4ThreeVector position = G4ThreeVector(0, 0, 0); - G4int NumberOfModule = m_PosZ.size() ; + G4int NumberOfModule = m_PosZ.size() ; - for (G4int i = 0; i < NumberOfModule; i++) { - // translation to position the module - position = G4ThreeVector(0, 0, m_PosZ[i]); + for (G4int i = 0; i < NumberOfModule; i++) { + // translation to position the module + position = G4ThreeVector(0, 0, m_PosZ[i]); - // Passage Matrix from Lab Referential to Module Referential - // Identity matrix by default - rotation = new G4RotationMatrix(); - if (position.z() < 0) rotation->rotateX(180*deg); + // Passage Matrix from Lab Referential to Module Referential + // Identity matrix by default + rotation = new G4RotationMatrix(); + if (position.z() < 0) rotation->rotateX(180*deg); - // Build geometry and declare scorers - VolumeMaker(i + 1, position, rotation, world); - } + // Build geometry and declare scorers + VolumeMaker(i + 1, position, rotation, world); + } - delete rotation ; + delete rotation ; } - - // Connect the GaspardTrackingData class to the output TTree // of the simulation -void AnnularS1::InitializeRootOutput() -{ - RootOutput *pAnalysis = RootOutput::getInstance(); - TTree *pTree = pAnalysis->GetTree(); - pTree->Branch("AnnularS1", "TS1Data", &m_Event); +void AnnularS1::InitializeRootOutput(){ + RootOutput *pAnalysis = RootOutput::getInstance(); + TTree *pTree = pAnalysis->GetTree(); + pTree->Branch("AnnularS1", "TS1Data", &m_Event); } - - // Read sensitive part and fill the Root tree. // Called at in the EventAction::EndOfEventAvtion -void AnnularS1::ReadSensitive(const G4Event* event) -{ - // Clear ROOT objects - m_Event->Clear(); - - ////////////////////////////////////////////////////////////////////////////////// - /////////////// Variables Used to Read Event Map of detector //////////////////// - ////////////////////////////////////////////////////////////////////////////////// - // First Stage - std::map<G4int, G4int*>::iterator DetectorNumber_itr; - std::map<G4int, G4double*>::iterator Energy_itr; - std::map<G4int, G4double*>::iterator Time_itr; - std::map<G4int, G4double*>::iterator X_itr; - std::map<G4int, G4double*>::iterator Y_itr; - std::map<G4int, G4double*>::iterator Pos_X_itr; - std::map<G4int, G4double*>::iterator Pos_Y_itr; - std::map<G4int, G4double*>::iterator Pos_Z_itr; - std::map<G4int, G4double*>::iterator Ang_Theta_itr; - std::map<G4int, G4double*>::iterator Ang_Phi_itr; - - G4THitsMap<G4int>* DetectorNumberHitMap; - G4THitsMap<G4double>* EnergyHitMap; - G4THitsMap<G4double>* TimeHitMap; - G4THitsMap<G4double>* XHitMap; - G4THitsMap<G4double>* YHitMap; - G4THitsMap<G4double>* PosXHitMap; - G4THitsMap<G4double>* PosYHitMap; - G4THitsMap<G4double>* PosZHitMap; - G4THitsMap<G4double>* AngThetaHitMap; - G4THitsMap<G4double>* AngPhiHitMap; - - ///////////////////////////////////////////////////////////////////////////////// - ////////////////// Read scorers //////////////////////////////////////////////// - ///////////////////////////////////////////////////////////////////////////////// - // Read the Scorer associated to the first Stage - //Detector Number - G4int StripDetCollectionID = G4SDManager::GetSDMpointer()->GetCollectionID("ScorerAnnularS1/DetectorNumber"); - DetectorNumberHitMap = (G4THitsMap<G4int>*)(event->GetHCofThisEvent()->GetHC(StripDetCollectionID)); - DetectorNumber_itr = DetectorNumberHitMap->GetMap()->begin(); - - //Energy - G4int StripEnergyCollectionID = G4SDManager::GetSDMpointer()->GetCollectionID("ScorerAnnularS1/StripEnergy") ; - EnergyHitMap = (G4THitsMap<G4double>*)(event->GetHCofThisEvent()->GetHC(StripEnergyCollectionID)) ; - Energy_itr = EnergyHitMap->GetMap()->begin() ; - - //Time of Flight - G4int StripTimeCollectionID = G4SDManager::GetSDMpointer()->GetCollectionID("ScorerAnnularS1/StripTime") ; - TimeHitMap = (G4THitsMap<G4double>*)(event->GetHCofThisEvent()->GetHC(StripTimeCollectionID)) ; - Time_itr = TimeHitMap->GetMap()->begin() ; - - //Strip Number X - G4int StripXCollectionID = G4SDManager::GetSDMpointer()->GetCollectionID("ScorerAnnularS1/ThetaStripNumber") ; - XHitMap = (G4THitsMap<G4double>*)(event->GetHCofThisEvent()->GetHC(StripXCollectionID)) ; - X_itr = XHitMap->GetMap()->begin() ; - - //Strip Number Y - G4int StripYCollectionID = G4SDManager::GetSDMpointer()->GetCollectionID("ScorerAnnularS1/PhiStripNumber") ; - YHitMap = (G4THitsMap<G4double>*)(event->GetHCofThisEvent()->GetHC(StripYCollectionID)) ; - Y_itr = YHitMap->GetMap()->begin() ; - - //Interaction Coordinate X - G4int InterCoordXCollectionID = G4SDManager::GetSDMpointer()->GetCollectionID("ScorerAnnularS1/InterCoordX") ; - PosXHitMap = (G4THitsMap<G4double>*)(event->GetHCofThisEvent()->GetHC(InterCoordXCollectionID)) ; - Pos_X_itr = PosXHitMap->GetMap()->begin() ; - - //Interaction Coordinate Y - G4int InterCoordYCollectionID = G4SDManager::GetSDMpointer()->GetCollectionID("ScorerAnnularS1/InterCoordY") ; - PosYHitMap = (G4THitsMap<G4double>*)(event->GetHCofThisEvent()->GetHC(InterCoordYCollectionID)) ; - Pos_Y_itr = PosYHitMap->GetMap()->begin() ; - - //Interaction Coordinate Z - G4int InterCoordZCollectionID = G4SDManager::GetSDMpointer()->GetCollectionID("ScorerAnnularS1/InterCoordZ") ; - PosZHitMap = (G4THitsMap<G4double>*)(event->GetHCofThisEvent()->GetHC(InterCoordZCollectionID)) ; - Pos_Z_itr = PosXHitMap->GetMap()->begin() ; - - //Interaction Coordinate Angle Theta - G4int InterCoordAngThetaCollectionID = G4SDManager::GetSDMpointer()->GetCollectionID("ScorerAnnularS1/InterCoordAngTheta") ; - AngThetaHitMap = (G4THitsMap<G4double>*)(event->GetHCofThisEvent()->GetHC(InterCoordAngThetaCollectionID)) ; - Ang_Theta_itr = AngThetaHitMap->GetMap()->begin() ; - - //Interaction Coordinate Angle Phi - G4int InterCoordAngPhiCollectionID = G4SDManager::GetSDMpointer()->GetCollectionID("ScorerAnnularS1/InterCoordAngPhi"); - AngPhiHitMap = (G4THitsMap<G4double>*)(event->GetHCofThisEvent()->GetHC(InterCoordAngPhiCollectionID)); - Ang_Phi_itr = AngPhiHitMap->GetMap()->begin(); - - // Check the size of different map - G4int sizeN = DetectorNumberHitMap->entries(); - G4int sizeE = EnergyHitMap->entries(); - G4int sizeT = TimeHitMap->entries(); - G4int sizeX = XHitMap->entries(); - G4int sizeY = YHitMap->entries(); - - if (sizeE != sizeT || sizeT != sizeX || sizeX != sizeY) { - G4cout << "No match size Si Event Map: sE:" - << sizeE << " sT:" << sizeT << " sX:" << sizeX << " sY:" << sizeY << endl ; - return; - } - - // Loop on AnnularS1 number - for (G4int l = 0; l < sizeN; l++) { - G4double N = *(DetectorNumber_itr->second); - G4int NTrackID = DetectorNumber_itr->first - N; - - if (N > 0) { - // Fill detector number - m_Event->SetS1ThetaEDetectorNbr(N); - m_Event->SetS1ThetaTDetectorNbr(N); - m_Event->SetS1PhiEDetectorNbr(N); - m_Event->SetS1PhiTDetectorNbr(N); - - // Energy - Energy_itr = EnergyHitMap->GetMap()->begin(); - for (G4int h = 0 ; h < sizeE ; h++) { - G4int ETrackID = Energy_itr->first - N; - G4double E = *(Energy_itr->second); - if (ETrackID == NTrackID) { - m_Event->SetS1ThetaEEnergy(RandGauss::shoot(E, ResoFirstStage)); - m_Event->SetS1PhiEEnergy(RandGauss::shoot(E, ResoFirstStage)); - } - Energy_itr++; - } - - // Time - Time_itr = TimeHitMap->GetMap()->begin(); - for (G4int h = 0 ; h < sizeT ; h++) { - G4int TTrackID = Time_itr->first - N; - G4double T = *(Time_itr->second); - if (TTrackID == NTrackID) { - T = RandGauss::shoot(T, ResoTimePPAC) ; - m_Event->SetS1ThetaTTime(RandGauss::shoot(T, ResoTimeGpd)) ; - m_Event->SetS1PhiTTime(RandGauss::shoot(T, ResoTimeGpd)) ; - } - Time_itr++; - } - - // Theta - X_itr = XHitMap->GetMap()->begin(); - for (G4int h = 0 ; h < sizeX ; h++) { - G4int XTrackID = X_itr->first - N; - G4double X = *(X_itr->second); - if (XTrackID == NTrackID) { - m_Event->SetS1ThetaEStripNbr(X) ; - m_Event->SetS1ThetaTStripNbr(X) ; - } - X_itr++; - } - - // Phi - Y_itr = YHitMap->GetMap()->begin(); - for (G4int h = 0 ; h < sizeY ; h++) { - G4int YTrackID = Y_itr->first - N; - G4double Y = *(Y_itr->second); - if (YTrackID == NTrackID) { - m_Event->SetS1PhiEStripNbr(Y); - m_Event->SetS1PhiTStripNbr(Y); - } - Y_itr++; - } - - // Pos X - Pos_X_itr = PosXHitMap->GetMap()->begin(); - for (G4int h = 0 ; h < sizeX ; h++) { - G4int PosXTrackID = Pos_X_itr->first - N; - G4double PosX = *(Pos_X_itr->second); - if (PosXTrackID == NTrackID) { - ms_InterCoord->SetDetectedPositionX(PosX); - } - Pos_X_itr++; - } - - // Pos Y - Pos_Y_itr = PosYHitMap->GetMap()->begin(); - for (G4int h = 0 ; h < sizeX ; h++) { - G4int PosYTrackID = Pos_Y_itr->first - N; - G4double PosY = *(Pos_Y_itr->second); - if (PosYTrackID == NTrackID) { - ms_InterCoord->SetDetectedPositionY(PosY); - } - Pos_Y_itr++; - } - - // Pos Z - Pos_Z_itr = PosZHitMap->GetMap()->begin(); - for (G4int h = 0 ; h < sizeX ; h++) { - G4int PosZTrackID = Pos_Z_itr->first - N; - G4double PosZ = *(Pos_Z_itr->second); - if (PosZTrackID == NTrackID) { - ms_InterCoord->SetDetectedPositionZ(PosZ); - } - Pos_Z_itr++; - } - - // Angle Theta - Ang_Theta_itr = AngThetaHitMap->GetMap()->begin(); - for (G4int h = 0 ; h < sizeX ; h++) { - G4int AngThetaTrackID = Ang_Theta_itr->first - N; - G4double AngTheta = *(Ang_Theta_itr->second); - if (AngThetaTrackID == NTrackID) { - ms_InterCoord->SetDetectedAngleTheta(AngTheta); - } - Ang_Theta_itr++; - } - - // Angle Phi - Ang_Phi_itr = AngPhiHitMap->GetMap()->begin(); - for (G4int h = 0 ; h < sizeX ; h++) { - G4int AngPhiTrackID = Ang_Phi_itr->first - N; - G4double AngPhi = *(Ang_Phi_itr->second); - if (AngPhiTrackID == NTrackID) { - ms_InterCoord->SetDetectedAnglePhi(AngPhi); - } - Ang_Phi_itr++; - } - - } // end if number of detector > 0 - - DetectorNumber_itr++; - } // end loop on detector multiplicity - - // clear map for next event - DetectorNumberHitMap -> clear(); - EnergyHitMap -> clear(); - TimeHitMap -> clear(); - XHitMap -> clear(); - YHitMap -> clear(); - PosXHitMap -> clear(); - PosYHitMap -> clear(); - PosZHitMap -> clear(); - AngThetaHitMap -> clear(); - AngPhiHitMap -> clear(); -} - +void AnnularS1::ReadSensitive(const G4Event* event){ + // Clear ROOT objects + m_Event->Clear(); + G4THitsMap<G4double*>* SiliconHitMap; + std::map<G4int, G4double**>::iterator Silicon_itr; + + G4int SiliconCollectionID = G4SDManager::GetSDMpointer()->GetCollectionID("AnnularS1_Scorer/AnnularS1_Scorer"); + SiliconHitMap = (G4THitsMap<G4double*>*)(event->GetHCofThisEvent()->GetHC(SiliconCollectionID)); + + // Loop on the Silicon map + for (Silicon_itr = SiliconHitMap->GetMap()->begin() ; Silicon_itr != SiliconHitMap->GetMap()->end() ; Silicon_itr++){ + G4double* Info = *(Silicon_itr->second); + + double Energy = Info[0]; + + if(Energy>EnergyThreshold){ + double Time = Info[1]; + int DetNbr = (int) Info[7]; + int StripTheta = (int) Info[8]; + int StripPhi = (int) Info[9]; + int StripQuadrant = (int) Info[10] - 1; + + m_Event->SetS1ThetaEDetectorNbr(DetNbr); + m_Event->SetS1ThetaEStripNbr(StripTheta+StripQuadrant*NbrRingStrips); + m_Event->SetS1ThetaEEnergy(RandGauss::shoot(Energy, ResoEnergy)); + + m_Event->SetS1ThetaTDetectorNbr(DetNbr); + m_Event->SetS1ThetaTStripNbr(StripTheta+StripQuadrant*NbrRingStrips); + m_Event->SetS1ThetaTTime(RandGauss::shoot(Time, ResoTime)); + + m_Event->SetS1PhiEDetectorNbr(DetNbr); + m_Event->SetS1PhiEStripNbr(StripPhi); + m_Event->SetS1PhiEEnergy(RandGauss::shoot(Energy, ResoEnergy)); + m_Event->SetS1PhiTDetectorNbr(DetNbr); + m_Event->SetS1PhiTStripNbr(StripPhi); + m_Event->SetS1PhiTTime(RandGauss::shoot(Time, ResoTime)); + + // Interraction Coordinates + ms_InterCoord->SetDetectedPositionX(Info[2]) ; + ms_InterCoord->SetDetectedPositionY(Info[3]) ; + ms_InterCoord->SetDetectedPositionZ(Info[4]) ; + ms_InterCoord->SetDetectedAngleTheta(Info[5]/deg) ; + ms_InterCoord->SetDetectedAnglePhi(Info[6]/deg) ; + + } + } + // clear map for next event + SiliconHitMap->clear(); +} +// Initilize the Scorer use to read out the sensitive volume void AnnularS1::InitializeScorers() { - // Associate Scorer - m_Scorer = new G4MultiFunctionalDetector("ScorerAnnularS1"); - G4VPrimitiveScorer* DetNbr = new GENERALSCORERS::PSDetectorNumber("DetectorNumber", "S1Annular", 0); - G4VPrimitiveScorer* Energy = new GENERALSCORERS::PSEnergy("StripEnergy", "S1Annular", 0); - G4VPrimitiveScorer* TOF = new GENERALSCORERS::PSTOF("StripTime", "S1Annular", 0); - G4VPrimitiveScorer* InteractionCoordinatesX = new GENERALSCORERS::PSInteractionCoordinatesX("InterCoordX","S1Annular", 0); - G4VPrimitiveScorer* InteractionCoordinatesY = new GENERALSCORERS::PSInteractionCoordinatesY("InterCoordY","S1Annular", 0); - G4VPrimitiveScorer* InteractionCoordinatesZ = new GENERALSCORERS::PSInteractionCoordinatesZ("InterCoordZ","S1Annular", 0); - G4VPrimitiveScorer* InteractionCoordinatesAngleTheta = new GENERALSCORERS::PSInteractionCoordinatesAngleTheta("InterCoordAngTheta","S1Annular", 0); - G4VPrimitiveScorer* InteractionCoordinatesAnglePhi = new GENERALSCORERS::PSInteractionCoordinatesAnglePhi("InterCoordAngPhi","S1Annular", 0); - G4VPrimitiveScorer* ThetaStripPosition = new AnnularS1ScorerThetaStripNumber("ThetaStripNumber", 0); - G4VPrimitiveScorer* PhiStripPosition = new AnnularS1ScorerPhiStripNumber("PhiStripNumber", 0); - - //and register it to the multifunctionnal detector - m_Scorer->RegisterPrimitive(DetNbr); - m_Scorer->RegisterPrimitive(Energy); - m_Scorer->RegisterPrimitive(TOF); - m_Scorer->RegisterPrimitive(ThetaStripPosition); - m_Scorer->RegisterPrimitive(PhiStripPosition); - m_Scorer->RegisterPrimitive(InteractionCoordinatesX); - m_Scorer->RegisterPrimitive(InteractionCoordinatesY); - m_Scorer->RegisterPrimitive(InteractionCoordinatesZ); - m_Scorer->RegisterPrimitive(InteractionCoordinatesAngleTheta); - m_Scorer->RegisterPrimitive(InteractionCoordinatesAnglePhi); - - // Add All Scorer to the Global Scorer Manager - G4SDManager::GetSDMpointer()->AddNewDetector(m_Scorer); + // Associate Scorer + m_Scorer = new G4MultiFunctionalDetector("AnnularS1_Scorer"); + + + G4VPrimitiveScorer* AnnularScorer = + new SILICONSCORERS::PS_Silicon_Annular("AnnularS1_Scorer", + ActiveWaferInnerRadius, + ActiveWaferOutterRadius, + -22.5*deg, + 337.5*deg, + NbrRingStrips, + NbrSectorStrips, + NbQuadrant); + + m_Scorer->RegisterPrimitive(AnnularScorer); + + // Add All Scorer to the Global Scorer Manager + G4SDManager::GetSDMpointer()->AddNewDetector(m_Scorer); } diff --git a/NPSimulation/AnnularS1/AnnularS1.hh b/NPSimulation/AnnularS1/AnnularS1.hh index 8a6898011..8d65a3405 100644 --- a/NPSimulation/AnnularS1/AnnularS1.hh +++ b/NPSimulation/AnnularS1/AnnularS1.hh @@ -114,12 +114,9 @@ private: namespace ANNULARS1 { // Energy/Time resolutions for the different layers - const G4double ResoFirstStage = 0 ;// = 52keV of Resolution // Unit is MeV/2.35 - const G4double ResoSecondStage = 0.055 ;// = 130 keV of resolution // Unit is MeV/2.35 - const G4double ResoThirdStage = 0 ;// = 100 keV of resolution // Unit is MeV/2.35 - const G4double ResoTimeGpd = 0.212765957 ;// = 500 ps // Unit is ns/2.35 - const G4double ResoTimePPAC = 0.106382979 ;// = 250 ps // Unit is ns/2.35 - + const G4double ResoEnergy = 0 ;// = 52keV of Resolution // Unit is MeV/2.35 + const G4double ResoTime = 0.106382979 ;// = 250 ps // Unit is ns/2.35 + const G4double EnergyThreshold = 0.300 ;// = 300 keV // PCB const G4double PCBPointsX[8]={-50,50,60,60,50,-50,-60,-60}; const G4double PCBPointsY[8]={60,60,50,-50,-60,-60,-50,50}; @@ -135,9 +132,9 @@ namespace ANNULARS1 const G4double AluStripThickness = 0.4*micrometer; // Characteristics - const G4int NbPhiStrips = 16; - const G4int NbThetaStrips = 16; - const G4int NbThetaQuadrant = 4; + const G4int NbrRingStrips = 16; + const G4int NbrSectorStrips = 16; + const G4int NbQuadrant = 4; // total WaferLength const G4double Length = AluStripThickness*2+WaferThickness; diff --git a/NPSimulation/AnnularS1/AnnularS1Scorers.cc b/NPSimulation/AnnularS1/AnnularS1Scorers.cc deleted file mode 100644 index 35c1a72fe..000000000 --- a/NPSimulation/AnnularS1/AnnularS1Scorers.cc +++ /dev/null @@ -1,192 +0,0 @@ -/***************************************************************************** - * Copyright (C) 2009-2013 this file is part of the NPTool Project * - * * - * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * - * For the list of contributors see $NPTOOL/Licence/Contributors * - *****************************************************************************/ - -/***************************************************************************** - * Original Author: N. de Sereville contact address: deserevi@ipno.in2p3.fr * - * * - * Creation Date : 21/07/09 * - * Last update : * - *---------------------------------------------------------------------------* - * Decription: This class holds all the scorers needed by the AnnularS1 * - * object. * - *---------------------------------------------------------------------------* - * Comment: * - * * - * * - *****************************************************************************/ - -#include "GeneralScorers.hh" -#include "AnnularS1Scorers.hh" -#include "G4UnitsTable.hh" -#include "AnnularS1.hh" -using namespace ANNULARS1; -using namespace S1SCORERS; - -//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -// Added by Adrien MATTA: -// Those Scorer use TrackID as map index. This way ones can rebuild energy deposit, -// time of flight or position,... particle by particle for each event. Because standard -// scorer provide by G4 don't work this way but using a global ID for each event you should -// not use those scorer with some G4 provided ones or being very carefull doing so. - -//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -// Strip position Scorer -// Theta -AnnularS1ScorerThetaStripNumber::AnnularS1ScorerThetaStripNumber(G4String name, G4int depth) - : G4VPrimitiveScorer(name, depth), HCID(-1) -{ -} - -AnnularS1ScorerThetaStripNumber::~AnnularS1ScorerThetaStripNumber() -{ -} - -G4bool AnnularS1ScorerThetaStripNumber::ProcessHits(G4Step* aStep, G4TouchableHistory*) -{ - // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, "S1Annular"); - - // Hit position in the world frame - G4ThreeVector POS = aStep->GetPreStepPoint()->GetPosition(); - - // Hit position in the detector frame - POS = aStep->GetPreStepPoint()->GetTouchableHandle()->GetHistory()->GetTopTransform().TransformPoint(POS); - - // Radial position in the Oxy plane - G4double r = sqrt(pow(POS(0), 2) + pow(POS(1), 2)); - - // Phi angle - G4double phi = atan2(POS(1), POS(0)) / deg; - if (phi < 0) phi += 360; - - // Phi quadrant - G4double PhiWidth = 360. / NbThetaQuadrant; - G4double PhiQuadrantNumber = floor(phi / PhiWidth); - - // Theta strip pitch - // Interstrip should be taken into account here. To be done - G4double ThetaStripPitch = (ActiveWaferOutterRadius - ActiveWaferInnerRadius) / NbThetaStrips; - G4double dummy = (r - ActiveWaferInnerRadius); - if (dummy < 0 && fabs(dummy) < 1e-6) dummy *= -1; - G4double ThetaStripNumber = floor(dummy / ThetaStripPitch); - ThetaStripNumber += PhiQuadrantNumber*NbThetaStrips; - - if (ThetaStripNumber < 1e-6) { - /* G4cout << "POS: " << POS << G4endl; - G4cout << "r, phi " << r << " " << phi << G4endl; - G4cout << "PhiWidth, PhiQuadrantNumber " << PhiWidth << " " << PhiQuadrantNumber << G4endl; - G4cout << "ThetaStripPitch, ThetaStripNumber, dummy " << ThetaStripPitch << " " << ThetaStripNumber << " " << dummy << G4endl;*/ - } - - G4double edep = aStep->GetTotalEnergyDeposit(); - if (edep < TriggerThreshold) return FALSE; - G4int index = aStep->GetTrack()->GetTrackID(); - EvtMap->set(DetNbr + index, ThetaStripNumber); - return TRUE; -} - -void AnnularS1ScorerThetaStripNumber::Initialize(G4HCofThisEvent* HCE) -{ - EvtMap = new G4THitsMap<G4double>(GetMultiFunctionalDetector()->GetName(), GetName()); - if (HCID < 0) { - HCID = GetCollectionID(0); - } - HCE->AddHitsCollection(HCID, (G4VHitsCollection*)EvtMap); -} - -void AnnularS1ScorerThetaStripNumber::EndOfEvent(G4HCofThisEvent*) -{ -} - -void AnnularS1ScorerThetaStripNumber::clear() -{ - EvtMap->clear(); -} - -void AnnularS1ScorerThetaStripNumber::DrawAll() -{ -} - -void AnnularS1ScorerThetaStripNumber::PrintAll() -{ - G4cout << " MultiFunctionalDet " << detector->GetName() << G4endl ; - G4cout << " PrimitiveScorer " << GetName() << G4endl ; - G4cout << " Number of entries " << EvtMap->entries() << G4endl ; -} - - - -//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -// Phi -AnnularS1ScorerPhiStripNumber::AnnularS1ScorerPhiStripNumber(G4String name, G4int depth) - : G4VPrimitiveScorer(name, depth), HCID(-1) -{ -} - -AnnularS1ScorerPhiStripNumber::~AnnularS1ScorerPhiStripNumber() -{ -} - -G4bool AnnularS1ScorerPhiStripNumber::ProcessHits(G4Step* aStep, G4TouchableHistory*) -{ - // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, "S1Annular"); - - // Hit position in the world frame - G4ThreeVector POS = aStep->GetPreStepPoint()->GetPosition(); - - // Hit position in the detector frame - POS = aStep->GetPreStepPoint()->GetTouchableHandle()->GetHistory()->GetTopTransform().TransformPoint(POS); - - // Phi angle - G4double phi = atan2(POS(1), POS(0)) / deg; - if (phi < 0) phi += 360; - - // Phi strip number - // Interstrip should be taken into account here. To be done - G4double PhiWidth = 360. / NbPhiStrips; - G4double PhiStripNumber = floor(phi / PhiWidth); - -// G4cout << POS << G4endl; -// G4cout << "phi " << phi << " PhiWidth " << PhiWidth << " PhiStripNumber " << PhiStripNumber << G4endl; - - G4double edep = aStep->GetTotalEnergyDeposit(); - if (edep < TriggerThreshold) return FALSE; - G4int index = aStep->GetTrack()->GetTrackID(); - EvtMap->set(DetNbr + index, PhiStripNumber); - return TRUE; -} - -void AnnularS1ScorerPhiStripNumber::Initialize(G4HCofThisEvent* HCE) -{ - EvtMap = new G4THitsMap<G4double>(GetMultiFunctionalDetector()->GetName(), GetName()); - if (HCID < 0) { - HCID = GetCollectionID(0); - } - HCE->AddHitsCollection(HCID, (G4VHitsCollection*)EvtMap); -} - -void AnnularS1ScorerPhiStripNumber::EndOfEvent(G4HCofThisEvent*) -{ -} - -void AnnularS1ScorerPhiStripNumber::clear() -{ - EvtMap->clear(); -} - -void AnnularS1ScorerPhiStripNumber::DrawAll() -{ -} - -void AnnularS1ScorerPhiStripNumber::PrintAll() -{ - G4cout << " MultiFunctionalDet " << detector->GetName() << G4endl ; - G4cout << " PrimitiveScorer " << GetName() << G4endl ; - G4cout << " Number of entries " << EvtMap->entries() << G4endl ; -} diff --git a/NPSimulation/AnnularS1/AnnularS1Scorers.hh b/NPSimulation/AnnularS1/AnnularS1Scorers.hh deleted file mode 100644 index 98f5fe161..000000000 --- a/NPSimulation/AnnularS1/AnnularS1Scorers.hh +++ /dev/null @@ -1,82 +0,0 @@ -#ifndef AnnularS1Scorers_h -#define AnnularS1Scorers_h 1 -/***************************************************************************** - * Copyright (C) 2009-2013 this file is part of the NPTool Project * - * * - * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * - * For the list of contributors see $NPTOOL/Licence/Contributors * - *****************************************************************************/ - -/***************************************************************************** - * Original Author: N. de Sereville contact address: deserevi@ipno.in2p3.fr * - * * - * Creation Date : 21/07/09 * - * Last update : * - *---------------------------------------------------------------------------* - * Decription: This class holds all the scorers needed by the AnnularS1 * - * object. * - *---------------------------------------------------------------------------* - * Comment: * - * * - * * - *****************************************************************************/ - -#include "G4VPrimitiveScorer.hh" -#include "G4THitsMap.hh" -using namespace CLHEP; -namespace S1SCORERS -{ - // This Threshold is used in all scorers - // Any energy deposit under this threshold will not create an entry - const double TriggerThreshold = 0.1 * keV; - -class AnnularS1ScorerThetaStripNumber : public G4VPrimitiveScorer -{ -public: // with description - AnnularS1ScorerThetaStripNumber(G4String name, G4int depth = 0); - virtual ~AnnularS1ScorerThetaStripNumber(); - -protected: // with description - virtual G4bool ProcessHits(G4Step*, G4TouchableHistory*); - -public: - virtual void Initialize(G4HCofThisEvent*); - virtual void EndOfEvent(G4HCofThisEvent*); - virtual void clear(); - virtual void DrawAll(); - virtual void PrintAll(); - -private: - G4double m_StripPlaneSize; - G4int m_NumberOfStrip ; - G4int HCID; - G4THitsMap<G4double>* EvtMap; -}; - - - -class AnnularS1ScorerPhiStripNumber : public G4VPrimitiveScorer -{ -public: // with description - AnnularS1ScorerPhiStripNumber(G4String name, G4int depth = 0); - virtual ~AnnularS1ScorerPhiStripNumber(); - -protected: // with description - virtual G4bool ProcessHits(G4Step*, G4TouchableHistory*); - -public: - virtual void Initialize(G4HCofThisEvent*); - virtual void EndOfEvent(G4HCofThisEvent*); - virtual void clear(); - virtual void DrawAll(); - virtual void PrintAll(); - -private: - G4double m_StripPlaneSize; - G4int m_NumberOfStrip ; - G4int HCID; - G4THitsMap<G4double>* EvtMap; -}; - -} -#endif diff --git a/NPSimulation/ComptonTelescope/ComptonTelescope.cc b/NPSimulation/ComptonTelescope/ComptonTelescope.cc index d8df3f991..5245659c4 100755 --- a/NPSimulation/ComptonTelescope/ComptonTelescope.cc +++ b/NPSimulation/ComptonTelescope/ComptonTelescope.cc @@ -51,7 +51,7 @@ // NPTool headers #include "ComptonTelescope.hh" #include "ComptonTelescopeScorers.hh" -#include "GeneralScorers.hh" +#include "ObsoleteGeneralScorers.hh" #include "RootOutput.h" // CLHEP @@ -1016,11 +1016,11 @@ void ComptonTelescope::InitializeScorers() G4VPrimitiveScorer* ProcessTypeCompt = new ComptonTelescopeScorerProcess("Process", "ComptonTelescopeTower", "compt", 0); /* G4VPrimitiveScorer* StripPositionX = new GPDScorerFirstStageFrontStripSquare("StripNumberX", 0, m_NumberOfStrips); G4VPrimitiveScorer* StripPositionY = new GPDScorerFirstStageBackStripSquare("StripNumberY", 0, m_NumberOfStrips); - G4VPrimitiveScorer* InteractionCoordinatesX = new GENERALSCORERS::PSInteractionCoordinatesX("InterCoordX","", 0); - G4VPrimitiveScorer* InteractionCoordinatesY = new GENERALSCORERS::PSInteractionCoordinatesY("InterCoordY","", 0); - G4VPrimitiveScorer* InteractionCoordinatesZ = new GENERALSCORERS::PSInteractionCoordinatesZ("InterCoordZ","", 0); - G4VPrimitiveScorer* InteractionCoordinatesAngleTheta = new GENERALSCORERS::PSInteractionCoordinatesAngleTheta("InterCoordAngTheta","", 0); - G4VPrimitiveScorer* InteractionCoordinatesAnglePhi = new GENERALSCORERS::PSInteractionCoordinatesAnglePhi("InterCoordAngPhi","", 0); + G4VPrimitiveScorer* InteractionCoordinatesX = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesX("InterCoordX","", 0); + G4VPrimitiveScorer* InteractionCoordinatesY = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesY("InterCoordY","", 0); + G4VPrimitiveScorer* InteractionCoordinatesZ = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesZ("InterCoordZ","", 0); + G4VPrimitiveScorer* InteractionCoordinatesAngleTheta = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesAngleTheta("InterCoordAngTheta","", 0); + G4VPrimitiveScorer* InteractionCoordinatesAnglePhi = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesAnglePhi("InterCoordAngPhi","", 0); */ //and register it to the multifunctionnal detector m_TrackerScorer->RegisterPrimitive(TowerNbr); diff --git a/NPSimulation/ComptonTelescope/ComptonTelescopeScorers.cc b/NPSimulation/ComptonTelescope/ComptonTelescopeScorers.cc index eadf77408..6067e9bbf 100755 --- a/NPSimulation/ComptonTelescope/ComptonTelescopeScorers.cc +++ b/NPSimulation/ComptonTelescope/ComptonTelescopeScorers.cc @@ -25,7 +25,7 @@ #include "G4VProcess.hh" // NPTool headers -#include "GeneralScorers.hh" +#include "ObsoleteGeneralScorers.hh" #include "ComptonTelescopeScorers.hh" @@ -149,7 +149,7 @@ ComptonTelescopeScorerTrackerTowerNumber::~ComptonTelescopeScorerTrackerTowerNum G4bool ComptonTelescopeScorerTrackerTowerNumber::ProcessHits(G4Step* aStep, G4TouchableHistory*) { // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); // int DetNbr = aStep->GetPreStepPoint()->GetTouchableHandle()->GetCopyNumber(0); // this line does exactly the same than the line above int DSSSDNbr = aStep->GetPreStepPoint()->GetTouchableHandle()->GetCopyNumber(0); @@ -213,7 +213,7 @@ ComptonTelescopeScorerTrackerEnergy::~ComptonTelescopeScorerTrackerEnergy() G4bool ComptonTelescopeScorerTrackerEnergy::ProcessHits(G4Step* aStep, G4TouchableHistory*) { // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); int DSSSDNbr = aStep->GetPreStepPoint()->GetTouchableHandle()->GetCopyNumber(1); // get energy @@ -279,7 +279,7 @@ ComptonTelescopeScorerTrackerDSSSDNumber::~ComptonTelescopeScorerTrackerDSSSDNum G4bool ComptonTelescopeScorerTrackerDSSSDNumber::ProcessHits(G4Step* aStep, G4TouchableHistory*) { // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); //G4int CrystalNbr = aStep->GetPreStepPoint()->GetTouchableHandle()->GetReplicaNumber(1); //Adde by Anna: @@ -358,7 +358,7 @@ ComptonTelescopeScorerTrackerTOF::~ComptonTelescopeScorerTrackerTOF() G4bool ComptonTelescopeScorerTrackerTOF::ProcessHits(G4Step* aStep, G4TouchableHistory*) { // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); int DSSSDNbr = aStep->GetPreStepPoint()->GetTouchableHandle()->GetCopyNumber(1); // get TOF @@ -420,7 +420,7 @@ ComptonTelescopeScorerCalorimeterTowerNumber::~ComptonTelescopeScorerCalorimeter G4bool ComptonTelescopeScorerCalorimeterTowerNumber::ProcessHits(G4Step* aStep, G4TouchableHistory*) { // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); // int DetNbr = aStep->GetPreStepPoint()->GetTouchableHandle()->GetCopyNumber(0); // this line does exactly the same than the line above int DSSSDNbr = aStep->GetPreStepPoint()->GetTouchableHandle()->GetCopyNumber(1); @@ -483,7 +483,7 @@ ComptonTelescopeScorerCalorimeterEnergy::~ComptonTelescopeScorerCalorimeterEnerg G4bool ComptonTelescopeScorerCalorimeterEnergy::ProcessHits(G4Step* aStep, G4TouchableHistory*) { // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); int DSSSDNbr = aStep->GetPreStepPoint()->GetTouchableHandle()->GetCopyNumber(1); // get energy @@ -551,7 +551,7 @@ ComptonTelescopeScorerCalorimeterDetectorNumber::~ComptonTelescopeScorerCalorime G4bool ComptonTelescopeScorerCalorimeterDetectorNumber::ProcessHits(G4Step* aStep, G4TouchableHistory*) { // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); // get energy G4int DetectorNbr = aStep->GetPreStepPoint()->GetTouchableHandle()->GetCopyNumber(1); diff --git a/NPSimulation/DummyDetector/DummyDetector.cc b/NPSimulation/DummyDetector/DummyDetector.cc index 8d8b505e5..5e343b33c 100644 --- a/NPSimulation/DummyDetector/DummyDetector.cc +++ b/NPSimulation/DummyDetector/DummyDetector.cc @@ -45,9 +45,9 @@ // NPTool header #include "DummyDetector.hh" -#include "GeneralScorers.hh" +#include "ObsoleteGeneralScorers.hh" #include "RootOutput.h" -using namespace GENERALSCORERS ; +using namespace OBSOLETEGENERALSCORERS ; // CLHEP header #include "CLHEP/Random/RandGauss.h" diff --git a/NPSimulation/Eurogam/Eurogam.cc b/NPSimulation/Eurogam/Eurogam.cc index 2bb690f99..d679c9112 100755 --- a/NPSimulation/Eurogam/Eurogam.cc +++ b/NPSimulation/Eurogam/Eurogam.cc @@ -47,9 +47,9 @@ // NPTool header #include "Eurogam.hh" -#include "GeneralScorers.hh" +#include "ObsoleteGeneralScorers.hh" #include "RootOutput.h" -using namespace GENERALSCORERS; +using namespace OBSOLETEGENERALSCORERS; // CLHEP header #include "CLHEP/Random/RandGauss.h" @@ -670,14 +670,14 @@ void Eurogam::InitializeScorers() { // Eurogam associated scorer m_EurogamScorer = new G4MultiFunctionalDetector("EurogamScorer"); - G4VPrimitiveScorer* DetNbr = new GENERALSCORERS::PSDetectorNumber("DetectorNumber", "Eurogam", 0); - G4VPrimitiveScorer* Energy = new GENERALSCORERS::PSEnergy("Energy","Eurogam", 0); - G4VPrimitiveScorer* TOF = new GENERALSCORERS::PSTOF("Time", "Eurogam", 0); - G4VPrimitiveScorer* InteractionCoordinatesX = new GENERALSCORERS::PSInteractionCoordinatesX("InterCoordX", "Eurogam", 0); - G4VPrimitiveScorer* InteractionCoordinatesY = new GENERALSCORERS::PSInteractionCoordinatesY("InterCoordY", "Eurogam", 0); - G4VPrimitiveScorer* InteractionCoordinatesZ = new GENERALSCORERS::PSInteractionCoordinatesZ("InterCoordZ", "Eurogam", 0); - G4VPrimitiveScorer* InteractionCoordinatesAngleTheta = new GENERALSCORERS::PSInteractionCoordinatesAngleTheta("InterCoordAngTheta", "Eurogam", 0); - G4VPrimitiveScorer* InteractionCoordinatesAnglePhi = new GENERALSCORERS::PSInteractionCoordinatesAnglePhi("InterCoordAngPhi", "Eurogam", 0); + G4VPrimitiveScorer* DetNbr = new OBSOLETEGENERALSCORERS::PSDetectorNumber("DetectorNumber", "Eurogam", 0); + G4VPrimitiveScorer* Energy = new OBSOLETEGENERALSCORERS::PSEnergy("Energy","Eurogam", 0); + G4VPrimitiveScorer* TOF = new OBSOLETEGENERALSCORERS::PSTOF("Time", "Eurogam", 0); + G4VPrimitiveScorer* InteractionCoordinatesX = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesX("InterCoordX", "Eurogam", 0); + G4VPrimitiveScorer* InteractionCoordinatesY = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesY("InterCoordY", "Eurogam", 0); + G4VPrimitiveScorer* InteractionCoordinatesZ = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesZ("InterCoordZ", "Eurogam", 0); + G4VPrimitiveScorer* InteractionCoordinatesAngleTheta = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesAngleTheta("InterCoordAngTheta", "Eurogam", 0); + G4VPrimitiveScorer* InteractionCoordinatesAnglePhi = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesAnglePhi("InterCoordAngPhi", "Eurogam", 0); //and register it to the multifunctionnal detector m_EurogamScorer->RegisterPrimitive(DetNbr); diff --git a/NPSimulation/GASPARD/GaspardScorers.cc b/NPSimulation/GASPARD/GaspardScorers.cc index 83bf734b8..5e183b0b7 100644 --- a/NPSimulation/GASPARD/GaspardScorers.cc +++ b/NPSimulation/GASPARD/GaspardScorers.cc @@ -23,7 +23,7 @@ #include "G4UnitsTable.hh" // NPTool headers -#include "GeneralScorers.hh" +#include "ObsoleteGeneralScorers.hh" #include "GaspardScorers.hh" #include "GaspardTrackerDummyShape.hh" @@ -60,7 +60,7 @@ GPDScorerFirstStageEnergy::~GPDScorerFirstStageEnergy() G4bool GPDScorerFirstStageEnergy::ProcessHits(G4Step* aStep, G4TouchableHistory*) { // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); // get energy G4ThreeVector POS = aStep->GetPreStepPoint()->GetPosition(); @@ -125,7 +125,7 @@ GPDScorerSecondStageEnergy::~GPDScorerSecondStageEnergy() G4bool GPDScorerSecondStageEnergy::ProcessHits(G4Step* aStep, G4TouchableHistory*) { // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); // get energy G4ThreeVector POS = aStep->GetPreStepPoint()->GetPosition(); @@ -190,7 +190,7 @@ GPDScorerThirdStageEnergy::~GPDScorerThirdStageEnergy() G4bool GPDScorerThirdStageEnergy::ProcessHits(G4Step* aStep, G4TouchableHistory*) { // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); // get energy G4ThreeVector POS = aStep->GetPreStepPoint()->GetPosition(); @@ -256,7 +256,7 @@ GPDScorerFirstStageFrontStripDummyShape::~GPDScorerFirstStageFrontStripDummyShap G4bool GPDScorerFirstStageFrontStripDummyShape::ProcessHits(G4Step* aStep, G4TouchableHistory*) { // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, "GPDDummyShape"); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, "GPDDummyShape"); // get front strip number G4ThreeVector POS = aStep->GetPreStepPoint()->GetPosition(); @@ -325,7 +325,7 @@ GPDScorerFirstStageBackStripDummyShape::~GPDScorerFirstStageBackStripDummyShape( G4bool GPDScorerFirstStageBackStripDummyShape::ProcessHits(G4Step* aStep, G4TouchableHistory*) { // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, "GPDDummyShape"); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, "GPDDummyShape"); // get back strip number G4ThreeVector POS = aStep->GetPreStepPoint()->GetPosition(); @@ -392,7 +392,7 @@ GPDScorerFirstStageFrontStripSquare::~GPDScorerFirstStageFrontStripSquare() G4bool GPDScorerFirstStageFrontStripSquare::ProcessHits(G4Step* aStep, G4TouchableHistory*) { // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, "GPDSquare"); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, "GPDSquare"); // get front strip G4ThreeVector POS = aStep->GetPreStepPoint()->GetPosition(); @@ -456,7 +456,7 @@ GPDScorerFirstStageBackStripSquare::~GPDScorerFirstStageBackStripSquare() G4bool GPDScorerFirstStageBackStripSquare::ProcessHits(G4Step* aStep, G4TouchableHistory*) { // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, "GPDSquare"); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, "GPDSquare"); // get back strip G4ThreeVector POS = aStep->GetPreStepPoint()->GetPosition(); @@ -522,7 +522,7 @@ GPDScorerFirstStageFrontStripTrapezoid::~GPDScorerFirstStageFrontStripTrapezoid( G4bool GPDScorerFirstStageFrontStripTrapezoid::ProcessHits(G4Step* aStep, G4TouchableHistory*) { // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, "GPDTrapezoid"); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, "GPDTrapezoid"); // get front strip G4ThreeVector POS = aStep->GetPreStepPoint()->GetPosition(); @@ -586,7 +586,7 @@ GPDScorerFirstStageBackStripTrapezoid::~GPDScorerFirstStageBackStripTrapezoid() G4bool GPDScorerFirstStageBackStripTrapezoid::ProcessHits(G4Step* aStep, G4TouchableHistory*) { // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, "GPDTrapezoid"); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, "GPDTrapezoid"); // get back strip G4ThreeVector POS = aStep->GetPreStepPoint()->GetPosition(); @@ -653,7 +653,7 @@ GPDScorerFirstStageFrontStripAnnular::~GPDScorerFirstStageFrontStripAnnular() G4bool GPDScorerFirstStageFrontStripAnnular::ProcessHits(G4Step* aStep, G4TouchableHistory*) { // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, "GPDAnnular"); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, "GPDAnnular"); // Hit position in the world frame G4ThreeVector POS = aStep->GetPreStepPoint()->GetPosition(); @@ -749,7 +749,7 @@ GPDScorerFirstStageBackStripAnnular::~GPDScorerFirstStageBackStripAnnular() G4bool GPDScorerFirstStageBackStripAnnular::ProcessHits(G4Step* aStep, G4TouchableHistory*) { // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, "GPDAnnular"); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, "GPDAnnular"); // Hit position in the world frame G4ThreeVector POS = aStep->GetPreStepPoint()->GetPosition(); diff --git a/NPSimulation/GASPARD/GaspardTrackerAnnular.cc b/NPSimulation/GASPARD/GaspardTrackerAnnular.cc index b9873ceaa..a34204fe3 100644 --- a/NPSimulation/GASPARD/GaspardTrackerAnnular.cc +++ b/NPSimulation/GASPARD/GaspardTrackerAnnular.cc @@ -48,7 +48,7 @@ // NPTool headers #include "GaspardTrackerAnnular.hh" -#include "GeneralScorers.hh" +#include "ObsoleteGeneralScorers.hh" #include "GaspardScorers.hh" #include "TGaspardTrackerData.h" #include "RootOutput.h" @@ -777,13 +777,13 @@ void GaspardTrackerAnnular::InitializeScorers() { // First stage Associate Scorer m_FirstStageScorer = new G4MultiFunctionalDetector("FirstStageScorerGPDAnnular"); - G4VPrimitiveScorer* DetNbr = new GENERALSCORERS::PSDetectorNumber("DetectorNumber", "GPDAnnular", 0); - G4VPrimitiveScorer* TOF = new GENERALSCORERS::PSTOF("StripTime","GPDAnnular", 0); - G4VPrimitiveScorer* InteractionCoordinatesX = new GENERALSCORERS::PSInteractionCoordinatesX("InterCoordX","GPDAnnular", 0); - G4VPrimitiveScorer* InteractionCoordinatesY = new GENERALSCORERS::PSInteractionCoordinatesY("InterCoordY","GPDAnnular", 0); - G4VPrimitiveScorer* InteractionCoordinatesZ = new GENERALSCORERS::PSInteractionCoordinatesZ("InterCoordZ","GPDAnnular", 0); - G4VPrimitiveScorer* InteractionCoordinatesAngleTheta = new GENERALSCORERS::PSInteractionCoordinatesAngleTheta("InterCoordAngTheta","GPDAnnular", 0); - G4VPrimitiveScorer* InteractionCoordinatesAnglePhi = new GENERALSCORERS::PSInteractionCoordinatesAnglePhi("InterCoordAngPhi","GPDAnnular", 0); + G4VPrimitiveScorer* DetNbr = new OBSOLETEGENERALSCORERS::PSDetectorNumber("DetectorNumber", "GPDAnnular", 0); + G4VPrimitiveScorer* TOF = new OBSOLETEGENERALSCORERS::PSTOF("StripTime","GPDAnnular", 0); + G4VPrimitiveScorer* InteractionCoordinatesX = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesX("InterCoordX","GPDAnnular", 0); + G4VPrimitiveScorer* InteractionCoordinatesY = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesY("InterCoordY","GPDAnnular", 0); + G4VPrimitiveScorer* InteractionCoordinatesZ = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesZ("InterCoordZ","GPDAnnular", 0); + G4VPrimitiveScorer* InteractionCoordinatesAngleTheta = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesAngleTheta("InterCoordAngTheta","GPDAnnular", 0); + G4VPrimitiveScorer* InteractionCoordinatesAnglePhi = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesAnglePhi("InterCoordAngPhi","GPDAnnular", 0); G4VPrimitiveScorer* Energy = new GPDScorerFirstStageEnergy("StripEnergy", "GPDAnnular", 0); G4VPrimitiveScorer* StripPositionX = new GPDScorerFirstStageFrontStripAnnular("StripNumberX", 0, FirstStageRmax, 128); G4VPrimitiveScorer* StripPositionY = new GPDScorerFirstStageBackStripAnnular("StripNumberY", 0, FirstStageRmax, 128); diff --git a/NPSimulation/GASPARD/GaspardTrackerDummyShape.cc b/NPSimulation/GASPARD/GaspardTrackerDummyShape.cc index 1be4accdf..6a78287b4 100644 --- a/NPSimulation/GASPARD/GaspardTrackerDummyShape.cc +++ b/NPSimulation/GASPARD/GaspardTrackerDummyShape.cc @@ -54,7 +54,7 @@ // NPTool headers #include "GaspardTrackerDummyShape.hh" -#include "GeneralScorers.hh" +#include "ObsoleteGeneralScorers.hh" #include "GaspardScorers.hh" #include "RootOutput.h" @@ -970,13 +970,13 @@ void GaspardTrackerDummyShape::InitializeScorers() { // First stage Associate Scorer m_FirstStageScorer = new G4MultiFunctionalDetector("FirstStageScorerGPDDummyShape"); - G4VPrimitiveScorer* DetNbr = new GENERALSCORERS::PSDetectorNumber("DetectorNumber", "GPDDummyShape", 0); - G4VPrimitiveScorer* TOF = new GENERALSCORERS::PSTOF("StripTime","GPDDummyShape", 0); - G4VPrimitiveScorer* InteractionCoordinatesX = new GENERALSCORERS::PSInteractionCoordinatesX("InterCoordX","GPDDummyShape", 0); - G4VPrimitiveScorer* InteractionCoordinatesY = new GENERALSCORERS::PSInteractionCoordinatesY("InterCoordY","GPDDummyShape", 0); - G4VPrimitiveScorer* InteractionCoordinatesZ = new GENERALSCORERS::PSInteractionCoordinatesZ("InterCoordZ","GPDDummyShape", 0); - G4VPrimitiveScorer* InteractionCoordinatesAngleTheta = new GENERALSCORERS::PSInteractionCoordinatesAngleTheta("InterCoordAngTheta","GPDDummyShape", 0); - G4VPrimitiveScorer* InteractionCoordinatesAnglePhi = new GENERALSCORERS::PSInteractionCoordinatesAnglePhi("InterCoordAngPhi","GPDDummyShape", 0); + G4VPrimitiveScorer* DetNbr = new OBSOLETEGENERALSCORERS::PSDetectorNumber("DetectorNumber", "GPDDummyShape", 0); + G4VPrimitiveScorer* TOF = new OBSOLETEGENERALSCORERS::PSTOF("StripTime","GPDDummyShape", 0); + G4VPrimitiveScorer* InteractionCoordinatesX = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesX("InterCoordX","GPDDummyShape", 0); + G4VPrimitiveScorer* InteractionCoordinatesY = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesY("InterCoordY","GPDDummyShape", 0); + G4VPrimitiveScorer* InteractionCoordinatesZ = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesZ("InterCoordZ","GPDDummyShape", 0); + G4VPrimitiveScorer* InteractionCoordinatesAngleTheta = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesAngleTheta("InterCoordAngTheta","GPDDummyShape", 0); + G4VPrimitiveScorer* InteractionCoordinatesAnglePhi = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesAnglePhi("InterCoordAngPhi","GPDDummyShape", 0); G4VPrimitiveScorer* Energy = new GPDScorerFirstStageEnergy("StripEnergy", "GPDDummyShape", 0); G4VPrimitiveScorer* StripPositionX = new GPDScorerFirstStageFrontStripDummyShape("StripIDFront", 0, NumberOfStrips); G4VPrimitiveScorer* StripPositionY = new GPDScorerFirstStageBackStripDummyShape("StripIDBack", 0, NumberOfStrips); diff --git a/NPSimulation/GASPARD/GaspardTrackerSquare.cc b/NPSimulation/GASPARD/GaspardTrackerSquare.cc index 9e07060a1..32d1b5126 100644 --- a/NPSimulation/GASPARD/GaspardTrackerSquare.cc +++ b/NPSimulation/GASPARD/GaspardTrackerSquare.cc @@ -51,7 +51,7 @@ // NPTool headers #include "GaspardTrackerSquare.hh" -#include "GeneralScorers.hh" +#include "ObsoleteGeneralScorers.hh" #include "GaspardScorers.hh" #include "RootOutput.h" @@ -961,13 +961,13 @@ void GaspardTrackerSquare::InitializeScorers() { // First stage Associate Scorer m_FirstStageScorer = new G4MultiFunctionalDetector("FirstStageScorerGPDSquare"); - G4VPrimitiveScorer* DetNbr = new GENERALSCORERS::PSDetectorNumber("DetectorNumber", "GPDSquare", 0); - G4VPrimitiveScorer* TOF = new GENERALSCORERS::PSTOF("StripTime","GPDSquare", 0); - G4VPrimitiveScorer* InteractionCoordinatesX = new GENERALSCORERS::PSInteractionCoordinatesX("InterCoordX","GPDSquare", 0); - G4VPrimitiveScorer* InteractionCoordinatesY = new GENERALSCORERS::PSInteractionCoordinatesY("InterCoordY","GPDSquare", 0); - G4VPrimitiveScorer* InteractionCoordinatesZ = new GENERALSCORERS::PSInteractionCoordinatesZ("InterCoordZ","GPDSquare", 0); - G4VPrimitiveScorer* InteractionCoordinatesAngleTheta = new GENERALSCORERS::PSInteractionCoordinatesAngleTheta("InterCoordAngTheta","GPDSquare", 0); - G4VPrimitiveScorer* InteractionCoordinatesAnglePhi = new GENERALSCORERS::PSInteractionCoordinatesAnglePhi("InterCoordAngPhi","GPDSquare", 0); + G4VPrimitiveScorer* DetNbr = new OBSOLETEGENERALSCORERS::PSDetectorNumber("DetectorNumber", "GPDSquare", 0); + G4VPrimitiveScorer* TOF = new OBSOLETEGENERALSCORERS::PSTOF("StripTime","GPDSquare", 0); + G4VPrimitiveScorer* InteractionCoordinatesX = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesX("InterCoordX","GPDSquare", 0); + G4VPrimitiveScorer* InteractionCoordinatesY = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesY("InterCoordY","GPDSquare", 0); + G4VPrimitiveScorer* InteractionCoordinatesZ = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesZ("InterCoordZ","GPDSquare", 0); + G4VPrimitiveScorer* InteractionCoordinatesAngleTheta = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesAngleTheta("InterCoordAngTheta","GPDSquare", 0); + G4VPrimitiveScorer* InteractionCoordinatesAnglePhi = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesAnglePhi("InterCoordAngPhi","GPDSquare", 0); G4VPrimitiveScorer* Energy = new GPDScorerFirstStageEnergy("StripEnergy", "GPDSquare", 0); G4VPrimitiveScorer* StripPositionX = new GPDScorerFirstStageFrontStripSquare("StripNumberX", 0, NumberOfStrips); G4VPrimitiveScorer* StripPositionY = new GPDScorerFirstStageBackStripSquare("StripNumberY", 0, NumberOfStrips); diff --git a/NPSimulation/GASPARD/GaspardTrackerTrapezoid.cc b/NPSimulation/GASPARD/GaspardTrackerTrapezoid.cc index 790830ce3..59340b864 100644 --- a/NPSimulation/GASPARD/GaspardTrackerTrapezoid.cc +++ b/NPSimulation/GASPARD/GaspardTrackerTrapezoid.cc @@ -48,7 +48,7 @@ // NPTool headers #include "GaspardTrackerTrapezoid.hh" -#include "GeneralScorers.hh" +#include "ObsoleteGeneralScorers.hh" #include "GaspardScorers.hh" #include "RootOutput.h" @@ -1003,13 +1003,13 @@ void GaspardTrackerTrapezoid::InitializeScorers() { // First stage Associate Scorer m_FirstStageScorer = new G4MultiFunctionalDetector("FirstStageScorerGPDTrapezoid"); - G4VPrimitiveScorer* DetNbr = new GENERALSCORERS::PSDetectorNumber("DetectorNumber", "GPDTrapezoid", 0); - G4VPrimitiveScorer* TOF = new GENERALSCORERS::PSTOF("StripTime","GPDTrapezoid", 0); - G4VPrimitiveScorer* InteractionCoordinatesX = new GENERALSCORERS::PSInteractionCoordinatesX("InterCoordX","GPDTrapezoid", 0); - G4VPrimitiveScorer* InteractionCoordinatesY = new GENERALSCORERS::PSInteractionCoordinatesY("InterCoordY","GPDTrapezoid", 0); - G4VPrimitiveScorer* InteractionCoordinatesZ = new GENERALSCORERS::PSInteractionCoordinatesZ("InterCoordZ","GPDTrapezoid", 0); - G4VPrimitiveScorer* InteractionCoordinatesAngleTheta = new GENERALSCORERS::PSInteractionCoordinatesAngleTheta("InterCoordAngTheta","GPDTrapezoid", 0); - G4VPrimitiveScorer* InteractionCoordinatesAnglePhi = new GENERALSCORERS::PSInteractionCoordinatesAnglePhi("InterCoordAngPhi","GPDTrapezoid", 0); + G4VPrimitiveScorer* DetNbr = new OBSOLETEGENERALSCORERS::PSDetectorNumber("DetectorNumber", "GPDTrapezoid", 0); + G4VPrimitiveScorer* TOF = new OBSOLETEGENERALSCORERS::PSTOF("StripTime","GPDTrapezoid", 0); + G4VPrimitiveScorer* InteractionCoordinatesX = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesX("InterCoordX","GPDTrapezoid", 0); + G4VPrimitiveScorer* InteractionCoordinatesY = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesY("InterCoordY","GPDTrapezoid", 0); + G4VPrimitiveScorer* InteractionCoordinatesZ = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesZ("InterCoordZ","GPDTrapezoid", 0); + G4VPrimitiveScorer* InteractionCoordinatesAngleTheta = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesAngleTheta("InterCoordAngTheta","GPDTrapezoid", 0); + G4VPrimitiveScorer* InteractionCoordinatesAnglePhi = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesAnglePhi("InterCoordAngPhi","GPDTrapezoid", 0); G4VPrimitiveScorer* Energy = new GPDScorerFirstStageEnergy("StripEnergy", "GPDTrapezoid", 0); G4VPrimitiveScorer* StripPositionX = new GPDScorerFirstStageFrontStripTrapezoid("StripNumberX", 0, NumberOfStripsX); G4VPrimitiveScorer* StripPositionY = new GPDScorerFirstStageBackStripTrapezoid("StripNumberY", 0, NumberOfStripsY); diff --git a/NPSimulation/Helios/HeliosDetDummyShape.cc b/NPSimulation/Helios/HeliosDetDummyShape.cc index 76708e634..91b6d0cb5 100644 --- a/NPSimulation/Helios/HeliosDetDummyShape.cc +++ b/NPSimulation/Helios/HeliosDetDummyShape.cc @@ -49,7 +49,7 @@ // NPTool headers #include "HeliosDetDummyShape.hh" -#include "GeneralScorers.hh" +#include "ObsoleteGeneralScorers.hh" #include "HeliosScorers.hh" #include "RootOutput.h" @@ -853,13 +853,13 @@ void HeliosDetDummyShape::InitializeScorers() { // First stage Associate Scorer m_FirstStageScorer = new G4MultiFunctionalDetector("FirstStageScorerHeliosDummyShape"); - G4VPrimitiveScorer* DetNbr = new GENERALSCORERS::PSDetectorNumber("DetectorNumber", "HeliosDummyShape", 0); - G4VPrimitiveScorer* TOF = new GENERALSCORERS::PSTOF("StripTime","HeliosDummyShape", 0); - G4VPrimitiveScorer* InteractionCoordinatesX = new GENERALSCORERS::PSInteractionCoordinatesX("InterCoordX","HeliosDummyShape", 0); - G4VPrimitiveScorer* InteractionCoordinatesY = new GENERALSCORERS::PSInteractionCoordinatesY("InterCoordY","HeliosDummyShape", 0); - G4VPrimitiveScorer* InteractionCoordinatesZ = new GENERALSCORERS::PSInteractionCoordinatesZ("InterCoordZ","HeliosDummyShape", 0); - G4VPrimitiveScorer* InteractionCoordinatesAngleTheta = new GENERALSCORERS::PSInteractionCoordinatesAngleTheta("InterCoordAngTheta","HeliosDummyShape", 0); - G4VPrimitiveScorer* InteractionCoordinatesAnglePhi = new GENERALSCORERS::PSInteractionCoordinatesAnglePhi("InterCoordAngPhi","HeliosDummyShape", 0); + G4VPrimitiveScorer* DetNbr = new OBSOLETEGENERALSCORERS::PSDetectorNumber("DetectorNumber", "HeliosDummyShape", 0); + G4VPrimitiveScorer* TOF = new OBSOLETEGENERALSCORERS::PSTOF("StripTime","HeliosDummyShape", 0); + G4VPrimitiveScorer* InteractionCoordinatesX = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesX("InterCoordX","HeliosDummyShape", 0); + G4VPrimitiveScorer* InteractionCoordinatesY = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesY("InterCoordY","HeliosDummyShape", 0); + G4VPrimitiveScorer* InteractionCoordinatesZ = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesZ("InterCoordZ","HeliosDummyShape", 0); + G4VPrimitiveScorer* InteractionCoordinatesAngleTheta = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesAngleTheta("InterCoordAngTheta","HeliosDummyShape", 0); + G4VPrimitiveScorer* InteractionCoordinatesAnglePhi = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesAnglePhi("InterCoordAngPhi","HeliosDummyShape", 0); G4VPrimitiveScorer* Energy = new HeliosScorerFirstStageEnergy("StripEnergy", "HeliosDummyShape", 0); G4VPrimitiveScorer* StripPositionX = new HeliosScorerFirstStageFrontStripDummyShape("StripIDFront", 0, NumberOfStrips); G4VPrimitiveScorer* StripPositionY = new HeliosScorerFirstStageBackStripDummyShape("StripIDBack", 0, NumberOfStrips); diff --git a/NPSimulation/Helios/HeliosScorers.cc b/NPSimulation/Helios/HeliosScorers.cc index e15fcf046..60fd3f9e0 100644 --- a/NPSimulation/Helios/HeliosScorers.cc +++ b/NPSimulation/Helios/HeliosScorers.cc @@ -23,7 +23,7 @@ #include "G4UnitsTable.hh" // NPTool headers -#include "GeneralScorers.hh" +#include "ObsoleteGeneralScorers.hh" #include "HeliosScorers.hh" #include "HeliosDetDummyShape.hh" @@ -58,7 +58,7 @@ HeliosScorerFirstStageEnergy::~HeliosScorerFirstStageEnergy() G4bool HeliosScorerFirstStageEnergy::ProcessHits(G4Step* aStep, G4TouchableHistory*) { // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); // get energy G4ThreeVector POS = aStep->GetPreStepPoint()->GetPosition(); @@ -124,7 +124,7 @@ HeliosScorerFirstStageFrontStripDummyShape::~HeliosScorerFirstStageFrontStripDum G4bool HeliosScorerFirstStageFrontStripDummyShape::ProcessHits(G4Step* aStep, G4TouchableHistory*) { // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, "HeliosDummyShape"); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, "HeliosDummyShape"); // get front strip number G4ThreeVector POS = aStep->GetPreStepPoint()->GetPosition(); @@ -191,7 +191,7 @@ HeliosScorerFirstStageBackStripDummyShape::~HeliosScorerFirstStageBackStripDummy G4bool HeliosScorerFirstStageBackStripDummyShape::ProcessHits(G4Step* aStep, G4TouchableHistory*) { // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, "HeliosDummyShape"); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, "HeliosDummyShape"); // get back strip number G4ThreeVector POS = aStep->GetPreStepPoint()->GetPosition(); @@ -258,7 +258,7 @@ HeliosScorerFirstStageFrontStripSquare::~HeliosScorerFirstStageFrontStripSquare( G4bool HeliosScorerFirstStageFrontStripSquare::ProcessHits(G4Step* aStep, G4TouchableHistory*) { // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, "HeliosSquare"); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, "HeliosSquare"); // get front strip G4ThreeVector POS = aStep->GetPreStepPoint()->GetPosition(); @@ -323,7 +323,7 @@ HeliosScorerFirstStageBackStripSquare::~HeliosScorerFirstStageBackStripSquare() G4bool HeliosScorerFirstStageBackStripSquare::ProcessHits(G4Step* aStep, G4TouchableHistory*) { // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, "HeliosSquare"); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, "HeliosSquare"); // get back strip G4ThreeVector POS = aStep->GetPreStepPoint()->GetPosition(); @@ -390,7 +390,7 @@ HeliosScorerFirstStageFrontStripTrapezoid::~HeliosScorerFirstStageFrontStripTrap G4bool HeliosScorerFirstStageFrontStripTrapezoid::ProcessHits(G4Step* aStep, G4TouchableHistory*) { // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, "HeliosTrapezoid"); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, "HeliosTrapezoid"); // get front strip G4ThreeVector POS = aStep->GetPreStepPoint()->GetPosition(); @@ -455,7 +455,7 @@ HeliosScorerFirstStageBackStripTrapezoid::~HeliosScorerFirstStageBackStripTrapez G4bool HeliosScorerFirstStageBackStripTrapezoid::ProcessHits(G4Step* aStep, G4TouchableHistory*) { // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, "HeliosTrapezoid"); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, "HeliosTrapezoid"); // get back strip G4ThreeVector POS = aStep->GetPreStepPoint()->GetPosition(); @@ -523,7 +523,7 @@ HeliosScorerFirstStageFrontStripAnnular::~HeliosScorerFirstStageFrontStripAnnula G4bool HeliosScorerFirstStageFrontStripAnnular::ProcessHits(G4Step* aStep, G4TouchableHistory*) { // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, "HeliosAnnular"); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, "HeliosAnnular"); // get front strip G4ThreeVector POS = aStep->GetPreStepPoint()->GetPosition(); @@ -589,7 +589,7 @@ HeliosScorerFirstStageBackStripAnnular::~HeliosScorerFirstStageBackStripAnnular( G4bool HeliosScorerFirstStageBackStripAnnular::ProcessHits(G4Step* aStep, G4TouchableHistory*) { // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, "HeliosAnnular"); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, "HeliosAnnular"); // get back strip G4ThreeVector POS = aStep->GetPreStepPoint()->GetPosition(); diff --git a/NPSimulation/Hyde2/Hyde2Scorers.cc b/NPSimulation/Hyde2/Hyde2Scorers.cc index 65e7cdb56..8e55af08e 100644 --- a/NPSimulation/Hyde2/Hyde2Scorers.cc +++ b/NPSimulation/Hyde2/Hyde2Scorers.cc @@ -23,7 +23,7 @@ #include "G4UnitsTable.hh" // NPTool headers -#include "GeneralScorers.hh" +#include "ObsoleteGeneralScorers.hh" #include "Hyde2Scorers.hh" #include "Hyde2TrackerSquare1.hh" @@ -56,7 +56,7 @@ HYD2ScorerFirstStageEnergy::~HYD2ScorerFirstStageEnergy() G4bool HYD2ScorerFirstStageEnergy::ProcessHits(G4Step* aStep, G4TouchableHistory*) { // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); // get energy G4ThreeVector POS = aStep->GetPreStepPoint()->GetPosition(); @@ -121,7 +121,7 @@ HYD2ScorerSecondStageEnergy::~HYD2ScorerSecondStageEnergy() G4bool HYD2ScorerSecondStageEnergy::ProcessHits(G4Step* aStep, G4TouchableHistory*) { // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); // get energy G4ThreeVector POS = aStep->GetPreStepPoint()->GetPosition(); @@ -186,7 +186,7 @@ HYD2ScorerThirdStageEnergy::~HYD2ScorerThirdStageEnergy() G4bool HYD2ScorerThirdStageEnergy::ProcessHits(G4Step* aStep, G4TouchableHistory*) { // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); // get energy G4ThreeVector POS = aStep->GetPreStepPoint()->GetPosition(); @@ -249,7 +249,7 @@ HYD2ScorerFourthStageEnergy::~HYD2ScorerFourthStageEnergy() G4bool HYD2ScorerFourthStageEnergy::ProcessHits(G4Step* aStep, G4TouchableHistory*) { // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); // get energy G4ThreeVector POS = aStep->GetPreStepPoint()->GetPosition(); @@ -312,7 +312,7 @@ HYD2ScorerFifthStageEnergy::~HYD2ScorerFifthStageEnergy() G4bool HYD2ScorerFifthStageEnergy::ProcessHits(G4Step* aStep, G4TouchableHistory*) { // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); // get energy G4ThreeVector POS = aStep->GetPreStepPoint()->GetPosition(); @@ -375,7 +375,7 @@ HYD2ScorerSixthStageEnergy::~HYD2ScorerSixthStageEnergy() G4bool HYD2ScorerSixthStageEnergy::ProcessHits(G4Step* aStep, G4TouchableHistory*) { // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); // get energy G4ThreeVector POS = aStep->GetPreStepPoint()->GetPosition(); @@ -439,7 +439,7 @@ HYD2ScorerFirstStageFrontStripSquare1::~HYD2ScorerFirstStageFrontStripSquare1() G4bool HYD2ScorerFirstStageFrontStripSquare1::ProcessHits(G4Step* aStep, G4TouchableHistory*) { // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, "HYD2Square1"); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, "HYD2Square1"); // get front strip G4ThreeVector POS = aStep->GetPreStepPoint()->GetPosition(); @@ -504,7 +504,7 @@ HYD2ScorerFirstStageBackStripSquare1::~HYD2ScorerFirstStageBackStripSquare1() G4bool HYD2ScorerFirstStageBackStripSquare1::ProcessHits(G4Step* aStep, G4TouchableHistory*) { // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, "HYD2Square1"); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, "HYD2Square1"); // get back strip G4ThreeVector POS = aStep->GetPreStepPoint()->GetPosition(); @@ -571,7 +571,7 @@ HYD2ScorerFirstStageFrontStripTrapezoid1::~HYD2ScorerFirstStageFrontStripTrapezo G4bool HYD2ScorerFirstStageFrontStripTrapezoid1::ProcessHits(G4Step* aStep, G4TouchableHistory*) { // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, "HYD2Trapezoid1"); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, "HYD2Trapezoid1"); // get front strip G4ThreeVector POS = aStep->GetPreStepPoint()->GetPosition(); @@ -636,7 +636,7 @@ HYD2ScorerFirstStageBackStripTrapezoid1::~HYD2ScorerFirstStageBackStripTrapezoid G4bool HYD2ScorerFirstStageBackStripTrapezoid1::ProcessHits(G4Step* aStep, G4TouchableHistory*) { // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, "HYD2Trapezoid1"); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, "HYD2Trapezoid1"); // get back strip G4ThreeVector POS = aStep->GetPreStepPoint()->GetPosition(); @@ -702,7 +702,7 @@ HYD2ScorerFirstStageFrontStripTrapezoid2::~HYD2ScorerFirstStageFrontStripTrapezo G4bool HYD2ScorerFirstStageFrontStripTrapezoid2::ProcessHits(G4Step* aStep, G4TouchableHistory*) { // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, "HYD2Trapezoid2"); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, "HYD2Trapezoid2"); // get front strip G4ThreeVector POS = aStep->GetPreStepPoint()->GetPosition(); @@ -767,7 +767,7 @@ HYD2ScorerFirstStageBackStripTrapezoid2::~HYD2ScorerFirstStageBackStripTrapezoid G4bool HYD2ScorerFirstStageBackStripTrapezoid2::ProcessHits(G4Step* aStep, G4TouchableHistory*) { // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, "HYD2Trapezoid2"); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, "HYD2Trapezoid2"); // get back strip G4ThreeVector POS = aStep->GetPreStepPoint()->GetPosition(); diff --git a/NPSimulation/Hyde2/Hyde2TrackerSquare1.cc b/NPSimulation/Hyde2/Hyde2TrackerSquare1.cc index eab359718..11b449582 100644 --- a/NPSimulation/Hyde2/Hyde2TrackerSquare1.cc +++ b/NPSimulation/Hyde2/Hyde2TrackerSquare1.cc @@ -51,7 +51,7 @@ // NPTool headers #include "Hyde2TrackerSquare1.hh" -#include "GeneralScorers.hh" +#include "ObsoleteGeneralScorers.hh" #include "Hyde2Scorers.hh" #include "RootOutput.h" @@ -1194,13 +1194,13 @@ void Hyde2TrackerSquare1::InitializeScorers() { // First stage Associate Scorer m_FirstStageScorer = new G4MultiFunctionalDetector("FirstStageScorerHYD2Square1"); - G4VPrimitiveScorer* DetNbr = new GENERALSCORERS::PSDetectorNumber("DetectorNumber", "HYD2Square1", 0); - G4VPrimitiveScorer* TOF = new GENERALSCORERS::PSTOF("StripTime","HYD2Square1", 0); - G4VPrimitiveScorer* InteractionCoordinatesX = new GENERALSCORERS::PSInteractionCoordinatesX("InterCoordX","HYD2Square1", 0); - G4VPrimitiveScorer* InteractionCoordinatesY = new GENERALSCORERS::PSInteractionCoordinatesY("InterCoordY","HYD2Square1", 0); - G4VPrimitiveScorer* InteractionCoordinatesZ = new GENERALSCORERS::PSInteractionCoordinatesZ("InterCoordZ","HYD2Square1", 0); - G4VPrimitiveScorer* InteractionCoordinatesAngleTheta = new GENERALSCORERS::PSInteractionCoordinatesAngleTheta("InterCoordAngTheta","HYD2Square1", 0); - G4VPrimitiveScorer* InteractionCoordinatesAnglePhi = new GENERALSCORERS::PSInteractionCoordinatesAnglePhi("InterCoordAngPhi","HYD2Square1", 0); + G4VPrimitiveScorer* DetNbr = new OBSOLETEGENERALSCORERS::PSDetectorNumber("DetectorNumber", "HYD2Square1", 0); + G4VPrimitiveScorer* TOF = new OBSOLETEGENERALSCORERS::PSTOF("StripTime","HYD2Square1", 0); + G4VPrimitiveScorer* InteractionCoordinatesX = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesX("InterCoordX","HYD2Square1", 0); + G4VPrimitiveScorer* InteractionCoordinatesY = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesY("InterCoordY","HYD2Square1", 0); + G4VPrimitiveScorer* InteractionCoordinatesZ = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesZ("InterCoordZ","HYD2Square1", 0); + G4VPrimitiveScorer* InteractionCoordinatesAngleTheta = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesAngleTheta("InterCoordAngTheta","HYD2Square1", 0); + G4VPrimitiveScorer* InteractionCoordinatesAnglePhi = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesAnglePhi("InterCoordAngPhi","HYD2Square1", 0); G4VPrimitiveScorer* Energy = new HYD2ScorerFirstStageEnergy("StripEnergy", "HYD2Square1", 0); G4VPrimitiveScorer* StripPositionX = new HYD2ScorerFirstStageFrontStripSquare1("StripNumberX", 0, NumberOfStrips); G4VPrimitiveScorer* StripPositionY = new HYD2ScorerFirstStageBackStripSquare1("StripNumberY", 0, NumberOfStrips); diff --git a/NPSimulation/Hyde2/Hyde2TrackerTrapezoid1.cc b/NPSimulation/Hyde2/Hyde2TrackerTrapezoid1.cc index fb8fe60d1..2a0d5961b 100644 --- a/NPSimulation/Hyde2/Hyde2TrackerTrapezoid1.cc +++ b/NPSimulation/Hyde2/Hyde2TrackerTrapezoid1.cc @@ -48,7 +48,7 @@ // NPTool headers #include "Hyde2TrackerTrapezoid1.hh" -#include "GeneralScorers.hh" +#include "ObsoleteGeneralScorers.hh" #include "Hyde2Scorers.hh" #include "RootOutput.h" @@ -1228,13 +1228,13 @@ void Hyde2TrackerTrapezoid1::InitializeScorers() { // First stage Associate Scorer m_FirstStageScorer = new G4MultiFunctionalDetector("FirstStageScorerHYD2Trapezoid1"); - G4VPrimitiveScorer* DetNbr = new GENERALSCORERS::PSDetectorNumber("DetectorNumber", "HYD2Trapezoid1", 0); - G4VPrimitiveScorer* TOF = new GENERALSCORERS::PSTOF("StripTime","HYD2Trapezoid1", 0); - G4VPrimitiveScorer* InteractionCoordinatesX = new GENERALSCORERS::PSInteractionCoordinatesX("InterCoordX","HYD2Trapezoid1", 0); - G4VPrimitiveScorer* InteractionCoordinatesY = new GENERALSCORERS::PSInteractionCoordinatesY("InterCoordY","HYD2Trapezoid1", 0); - G4VPrimitiveScorer* InteractionCoordinatesZ = new GENERALSCORERS::PSInteractionCoordinatesZ("InterCoordZ","HYD2Trapezoid1", 0); - G4VPrimitiveScorer* InteractionCoordinatesAngleTheta = new GENERALSCORERS::PSInteractionCoordinatesAngleTheta("InterCoordAngTheta","HYD2Trapezoid1", 0); - G4VPrimitiveScorer* InteractionCoordinatesAnglePhi = new GENERALSCORERS::PSInteractionCoordinatesAnglePhi("InterCoordAngPhi","HYD2Trapezoid1", 0); + G4VPrimitiveScorer* DetNbr = new OBSOLETEGENERALSCORERS::PSDetectorNumber("DetectorNumber", "HYD2Trapezoid1", 0); + G4VPrimitiveScorer* TOF = new OBSOLETEGENERALSCORERS::PSTOF("StripTime","HYD2Trapezoid1", 0); + G4VPrimitiveScorer* InteractionCoordinatesX = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesX("InterCoordX","HYD2Trapezoid1", 0); + G4VPrimitiveScorer* InteractionCoordinatesY = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesY("InterCoordY","HYD2Trapezoid1", 0); + G4VPrimitiveScorer* InteractionCoordinatesZ = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesZ("InterCoordZ","HYD2Trapezoid1", 0); + G4VPrimitiveScorer* InteractionCoordinatesAngleTheta = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesAngleTheta("InterCoordAngTheta","HYD2Trapezoid1", 0); + G4VPrimitiveScorer* InteractionCoordinatesAnglePhi = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesAnglePhi("InterCoordAngPhi","HYD2Trapezoid1", 0); G4VPrimitiveScorer* Energy = new HYD2ScorerFirstStageEnergy("StripEnergy", "HYD2Trapezoid1", 0); G4VPrimitiveScorer* StripPositionX = new HYD2ScorerFirstStageFrontStripTrapezoid1("StripNumberX", 0, NumberOfStripsX); G4VPrimitiveScorer* StripPositionY = new HYD2ScorerFirstStageBackStripTrapezoid1("StripNumberY", 0, NumberOfStripsY); diff --git a/NPSimulation/Hyde2/Hyde2TrackerTrapezoid2.cc b/NPSimulation/Hyde2/Hyde2TrackerTrapezoid2.cc index ffdecee53..935305739 100644 --- a/NPSimulation/Hyde2/Hyde2TrackerTrapezoid2.cc +++ b/NPSimulation/Hyde2/Hyde2TrackerTrapezoid2.cc @@ -48,7 +48,7 @@ // NPTool headers #include "Hyde2TrackerTrapezoid2.hh" -#include "GeneralScorers.hh" +#include "ObsoleteGeneralScorers.hh" #include "Hyde2Scorers.hh" #include "RootOutput.h" @@ -1228,13 +1228,13 @@ void Hyde2TrackerTrapezoid2::InitializeScorers() { // First stage Associate Scorer m_FirstStageScorer = new G4MultiFunctionalDetector("FirstStageScorerHYD2Trapezoid2"); - G4VPrimitiveScorer* DetNbr = new GENERALSCORERS::PSDetectorNumber("DetectorNumber", "HYD2Trapezoid2", 0); - G4VPrimitiveScorer* TOF = new GENERALSCORERS::PSTOF("StripTime","HYD2Trapezoid2", 0); - G4VPrimitiveScorer* InteractionCoordinatesX = new GENERALSCORERS::PSInteractionCoordinatesX("InterCoordX","HYD2Trapezoid2", 0); - G4VPrimitiveScorer* InteractionCoordinatesY = new GENERALSCORERS::PSInteractionCoordinatesY("InterCoordY","HYD2Trapezoid2", 0); - G4VPrimitiveScorer* InteractionCoordinatesZ = new GENERALSCORERS::PSInteractionCoordinatesZ("InterCoordZ","HYD2Trapezoid2", 0); - G4VPrimitiveScorer* InteractionCoordinatesAngleTheta = new GENERALSCORERS::PSInteractionCoordinatesAngleTheta("InterCoordAngTheta","HYD2Trapezoid2", 0); - G4VPrimitiveScorer* InteractionCoordinatesAnglePhi = new GENERALSCORERS::PSInteractionCoordinatesAnglePhi("InterCoordAngPhi","HYD2Trapezoid2", 0); + G4VPrimitiveScorer* DetNbr = new OBSOLETEGENERALSCORERS::PSDetectorNumber("DetectorNumber", "HYD2Trapezoid2", 0); + G4VPrimitiveScorer* TOF = new OBSOLETEGENERALSCORERS::PSTOF("StripTime","HYD2Trapezoid2", 0); + G4VPrimitiveScorer* InteractionCoordinatesX = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesX("InterCoordX","HYD2Trapezoid2", 0); + G4VPrimitiveScorer* InteractionCoordinatesY = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesY("InterCoordY","HYD2Trapezoid2", 0); + G4VPrimitiveScorer* InteractionCoordinatesZ = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesZ("InterCoordZ","HYD2Trapezoid2", 0); + G4VPrimitiveScorer* InteractionCoordinatesAngleTheta = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesAngleTheta("InterCoordAngTheta","HYD2Trapezoid2", 0); + G4VPrimitiveScorer* InteractionCoordinatesAnglePhi = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesAnglePhi("InterCoordAngPhi","HYD2Trapezoid2", 0); G4VPrimitiveScorer* Energy = new HYD2ScorerFirstStageEnergy("StripEnergy", "HYD2Trapezoid2", 0); G4VPrimitiveScorer* StripPositionX = new HYD2ScorerFirstStageFrontStripTrapezoid2("StripNumberX", 0, NumberOfStripsX); G4VPrimitiveScorer* StripPositionY = new HYD2ScorerFirstStageBackStripTrapezoid2("StripNumberY", 0, NumberOfStripsY); diff --git a/NPSimulation/MUST2/MUST2Array.cc b/NPSimulation/MUST2/MUST2Array.cc index 834c272d9..b8907596e 100644 --- a/NPSimulation/MUST2/MUST2Array.cc +++ b/NPSimulation/MUST2/MUST2Array.cc @@ -42,7 +42,7 @@ #include "G4PVDivision.hh" //G4 sensitive -#include "GeneralScorers.hh" +#include "ObsoleteGeneralScorers.hh" #include "MUST2Scorers.hh" //Not G4 @@ -1270,18 +1270,18 @@ void MUST2Array::InitializeScorers() { // Silicon Associate Scorer m_StripScorer = new G4MultiFunctionalDetector("MUST2_StripScorer"); - G4VPrimitiveScorer* DetNbr = new GENERALSCORERS::PSDetectorNumber("DetectorNumber","MUST2Telescope", 0); - G4VPrimitiveScorer* Energy = new GENERALSCORERS::PSEnergy("StripEnergy","MUST2Telescope", 0); - G4VPrimitiveScorer* TOF = new GENERALSCORERS::PSTOF("StripTime","MUST2Telescope", 0); + G4VPrimitiveScorer* DetNbr = new OBSOLETEGENERALSCORERS::PSDetectorNumber("DetectorNumber","MUST2Telescope", 0); + G4VPrimitiveScorer* Energy = new OBSOLETEGENERALSCORERS::PSEnergy("StripEnergy","MUST2Telescope", 0); + G4VPrimitiveScorer* TOF = new OBSOLETEGENERALSCORERS::PSTOF("StripTime","MUST2Telescope", 0); G4VPrimitiveScorer* StripPositionX = new PSStripNumberX("StripNumberX", 0, SiliconFace, 128); G4VPrimitiveScorer* StripPositionY = new PSStripNumberY("StripNumberY", 0, SiliconFace, 128); - G4VPrimitiveScorer* InteractionCoordinatesX = new GENERALSCORERS::PSInteractionCoordinatesX("InterCoordX","MUST2Telescope", 0); - G4VPrimitiveScorer* InteractionCoordinatesY = new GENERALSCORERS::PSInteractionCoordinatesY("InterCoordY","MUST2Telescope", 0); - G4VPrimitiveScorer* InteractionCoordinatesZ = new GENERALSCORERS::PSInteractionCoordinatesZ("InterCoordZ","MUST2Telescope", 0); - G4VPrimitiveScorer* InteractionCoordinatesAngleTheta = new GENERALSCORERS::PSInteractionCoordinatesAngleTheta("InterCoordAngTheta","MUST2Telescope", 0); - G4VPrimitiveScorer* InteractionCoordinatesAnglePhi = new GENERALSCORERS::PSInteractionCoordinatesAnglePhi("InterCoordAngPhi","MUST2Telescope", 0) ; + G4VPrimitiveScorer* InteractionCoordinatesX = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesX("InterCoordX","MUST2Telescope", 0); + G4VPrimitiveScorer* InteractionCoordinatesY = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesY("InterCoordY","MUST2Telescope", 0); + G4VPrimitiveScorer* InteractionCoordinatesZ = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesZ("InterCoordZ","MUST2Telescope", 0); + G4VPrimitiveScorer* InteractionCoordinatesAngleTheta = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesAngleTheta("InterCoordAngTheta","MUST2Telescope", 0); + G4VPrimitiveScorer* InteractionCoordinatesAnglePhi = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesAnglePhi("InterCoordAngPhi","MUST2Telescope", 0) ; //and register it to the multifunctionnal detector @@ -1298,14 +1298,14 @@ void MUST2Array::InitializeScorers() { // SiLi Associate Scorer m_SiLiScorer = new G4MultiFunctionalDetector("MUST2_SiLiScorer"); - G4VPrimitiveScorer* SiLiEnergy = new GENERALSCORERS::PSEnergy("SiLiEnergy","MUST2Telescope", 0) ; + G4VPrimitiveScorer* SiLiEnergy = new OBSOLETEGENERALSCORERS::PSEnergy("SiLiEnergy","MUST2Telescope", 0) ; G4VPrimitiveScorer* SiLiPadNbr = new PSPadOrCristalNumber("SiLiPadNbr",0) ; m_SiLiScorer->RegisterPrimitive(SiLiEnergy); m_SiLiScorer->RegisterPrimitive(SiLiPadNbr); // CsI Associate Scorer m_CsIScorer = new G4MultiFunctionalDetector("MUST2_CsIScorer"); - G4VPrimitiveScorer* CsIEnergy = new GENERALSCORERS::PSEnergy("CsIEnergy","MUST2Telescope", 0) ; + G4VPrimitiveScorer* CsIEnergy = new OBSOLETEGENERALSCORERS::PSEnergy("CsIEnergy","MUST2Telescope", 0) ; G4VPrimitiveScorer* CsICristalNbr = new PSPadOrCristalNumber("CsICristalNbr",0) ; m_CsIScorer->RegisterPrimitive(CsIEnergy) ; m_CsIScorer->RegisterPrimitive(CsICristalNbr) ; diff --git a/NPSimulation/MUST2/MUST2Scorers.cc b/NPSimulation/MUST2/MUST2Scorers.cc index 923b3c37e..f0ebc811e 100644 --- a/NPSimulation/MUST2/MUST2Scorers.cc +++ b/NPSimulation/MUST2/MUST2Scorers.cc @@ -24,7 +24,7 @@ *****************************************************************************/ #include "MUST2Scorers.hh" #include "G4UnitsTable.hh" -#include "GeneralScorers.hh" +#include "ObsoleteGeneralScorers.hh" #include <string> using namespace MUST2 ; @@ -47,7 +47,7 @@ PSStripNumberX::~PSStripNumberX() G4bool PSStripNumberX::ProcessHits(G4Step* aStep, G4TouchableHistory*) { - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, "MUST2Telescope"); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, "MUST2Telescope"); G4ThreeVector POS = aStep->GetPreStepPoint()->GetPosition(); POS = aStep->GetPreStepPoint()->GetTouchableHandle()->GetHistory()->GetTopTransform().TransformPoint(POS); @@ -112,7 +112,7 @@ PSStripNumberY::~PSStripNumberY() G4bool PSStripNumberY::ProcessHits(G4Step* aStep, G4TouchableHistory*) { - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, "MUST2Telescope"); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, "MUST2Telescope"); G4ThreeVector POS = aStep->GetPreStepPoint()->GetPosition(); @@ -198,7 +198,7 @@ G4bool PSPadOrCristalNumber::ProcessHits(G4Step* aStep, G4TouchableHistory*) else { nbr= name[name.length()-1] ; VolumeNumber = atoi( nbr.c_str() ) ;} - G4int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, "MUST2Telescope"); + G4int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, "MUST2Telescope"); G4double edep = aStep->GetTotalEnergyDeposit(); if (edep < TriggerThreshold) return FALSE; diff --git a/NPSimulation/Paris/ParisCluster.cc b/NPSimulation/Paris/ParisCluster.cc index 43f265315..d79fea28e 100644 --- a/NPSimulation/Paris/ParisCluster.cc +++ b/NPSimulation/Paris/ParisCluster.cc @@ -48,7 +48,7 @@ // NPTool headers #include "ParisCluster.hh" #include "ParisScorers.hh" -#include "GeneralScorers.hh" +#include "ObsoleteGeneralScorers.hh" #include "RootOutput.h" // CLHEP @@ -1193,15 +1193,15 @@ void ParisCluster::InitializeScorers() // LaBr3 Associate Scorer m_LaBr3StageScorer = new G4MultiFunctionalDetector("LaBr3StageScorerParisCluster"); /**/ - // G4VPrimitiveScorer* DetNbr = new GENERALSCORERS::PSDetectorNumber("DetectorNumber", "ParisCluster", 0); + // G4VPrimitiveScorer* DetNbr = new OBSOLETEGENERALSCORERS::PSDetectorNumber("DetectorNumber", "ParisCluster", 0); G4VPrimitiveScorer* DetNbr = new PARISScorerLaBr3StageDetectorNumber("DetectorNumber", "ParisCluster", 0); - // G4VPrimitiveScorer* TOF = new GENERALSCORERS::PSTOF("StripTime","ParisCluster", 0); + // G4VPrimitiveScorer* TOF = new OBSOLETEGENERALSCORERS::PSTOF("StripTime","ParisCluster", 0); G4VPrimitiveScorer* TOF = new PARISScorerLaBr3StageTOF("StripTime","ParisCluster", 0); - //G4VPrimitiveScorer* InteractionCoordinatesX = new GENERALSCORERS::PSInteractionCoordinatesX("InterCoordX","ParisCluster", 0); - //G4VPrimitiveScorer* InteractionCoordinatesY = new GENERALSCORERS::PSInteractionCoordinatesY("InterCoordY","ParisCluster", 0); - //G4VPrimitiveScorer* InteractionCoordinatesZ = new GENERALSCORERS::PSInteractionCoordinatesZ("InterCoordZ","ParisCluster", 0); - //G4VPrimitiveScorer* InteractionCoordinatesAngleTheta = new GENERALSCORERS::PSInteractionCoordinatesAngleTheta("InterCoordAngTheta","ParisCluster", 0); - //G4VPrimitiveScorer* InteractionCoordinatesAnglePhi = new GENERALSCORERS::PSInteractionCoordinatesAnglePhi("InterCoordAngPhi","ParisCluster", 0); + //G4VPrimitiveScorer* InteractionCoordinatesX = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesX("InterCoordX","ParisCluster", 0); + //G4VPrimitiveScorer* InteractionCoordinatesY = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesY("InterCoordY","ParisCluster", 0); + //G4VPrimitiveScorer* InteractionCoordinatesZ = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesZ("InterCoordZ","ParisCluster", 0); + //G4VPrimitiveScorer* InteractionCoordinatesAngleTheta = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesAngleTheta("InterCoordAngTheta","ParisCluster", 0); + //G4VPrimitiveScorer* InteractionCoordinatesAnglePhi = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesAnglePhi("InterCoordAngPhi","ParisCluster", 0); G4VPrimitiveScorer* Energy = new PARISScorerLaBr3StageEnergy("StripEnergy", "ParisCluster", 0); G4VPrimitiveScorer* CrystNbr = new PARISScorerLaBr3StageCrystal("CrystalNumber", "ParisCluster", 0); diff --git a/NPSimulation/Paris/ParisPhoswich.cc b/NPSimulation/Paris/ParisPhoswich.cc index 03d95be6f..8f11cdf30 100644 --- a/NPSimulation/Paris/ParisPhoswich.cc +++ b/NPSimulation/Paris/ParisPhoswich.cc @@ -47,7 +47,7 @@ // NPTool headers #include "ParisPhoswich.hh" -#include "GeneralScorers.hh" +#include "ObsoleteGeneralScorers.hh" #include "ParisScorers.hh" #include "RootOutput.h" @@ -1074,15 +1074,15 @@ void ParisPhoswich::InitializeScorers() // LaBr3 Associate Scorer m_LaBr3StageScorer = new G4MultiFunctionalDetector("LaBr3StageScorerParisPhoswich"); - // G4VPrimitiveScorer* DetNbr = new GENERALSCORERS::PSDetectorNumber("DetectorNumber", "ParisPhoswich", 0); + // G4VPrimitiveScorer* DetNbr = new OBSOLETEGENERALSCORERS::PSDetectorNumber("DetectorNumber", "ParisPhoswich", 0); G4VPrimitiveScorer* DetNbr = new PARISScorerLaBr3StageDetectorNumber("DetectorNumber", "ParisPhoswich", 0); - // G4VPrimitiveScorer* TOF = new GENERALSCORERS::PSTOF("StripTime","ParisPhoswich", 0); + // G4VPrimitiveScorer* TOF = new OBSOLETEGENERALSCORERS::PSTOF("StripTime","ParisPhoswich", 0); G4VPrimitiveScorer* TOF = new PARISScorerLaBr3StageTOF("StripTime","ParisPhoswich", 0); - //G4VPrimitiveScorer* InteractionCoordinatesX = new GENERALSCORERS::PSInteractionCoordinatesX("InterCoordX","ParisPhoswich", 0); - //G4VPrimitiveScorer* InteractionCoordinatesY = new GENERALSCORERS::PSInteractionCoordinatesY("InterCoordY","ParisPhoswich", 0); - //G4VPrimitiveScorer* InteractionCoordinatesZ = new GENERALSCORERS::PSInteractionCoordinatesZ("InterCoordZ","ParisPhoswich", 0); - //G4VPrimitiveScorer* InteractionCoordinatesAngleTheta = new GENERALSCORERS::PSInteractionCoordinatesAngleTheta("InterCoordAngTheta","ParisPhoswich", 0); - //G4VPrimitiveScorer* InteractionCoordinatesAnglePhi = new GENERALSCORERS::PSInteractionCoordinatesAnglePhi("InterCoordAngPhi","ParisPhoswich", 0); + //G4VPrimitiveScorer* InteractionCoordinatesX = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesX("InterCoordX","ParisPhoswich", 0); + //G4VPrimitiveScorer* InteractionCoordinatesY = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesY("InterCoordY","ParisPhoswich", 0); + //G4VPrimitiveScorer* InteractionCoordinatesZ = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesZ("InterCoordZ","ParisPhoswich", 0); + //G4VPrimitiveScorer* InteractionCoordinatesAngleTheta = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesAngleTheta("InterCoordAngTheta","ParisPhoswich", 0); + //G4VPrimitiveScorer* InteractionCoordinatesAnglePhi = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesAnglePhi("InterCoordAngPhi","ParisPhoswich", 0); G4VPrimitiveScorer* Energy = new PARISScorerLaBr3StageEnergy("StripEnergy", "ParisPhoswich", 0); G4VPrimitiveScorer* CrystNbr = new PARISScorerLaBr3StageCrystal("CrystalNumber", "ParisPhoswich", 0); diff --git a/NPSimulation/Paris/ParisScorers.cc b/NPSimulation/Paris/ParisScorers.cc index e8a4b699a..44a8459b9 100644 --- a/NPSimulation/Paris/ParisScorers.cc +++ b/NPSimulation/Paris/ParisScorers.cc @@ -23,7 +23,7 @@ #include "G4UnitsTable.hh" // NPTool headers -#include "GeneralScorers.hh" +#include "ObsoleteGeneralScorers.hh" #include "ParisScorers.hh" #include "ParisCluster.hh" @@ -57,7 +57,7 @@ PARISScorerLaBr3StageDetectorNumber::~PARISScorerLaBr3StageDetectorNumber() G4bool PARISScorerLaBr3StageDetectorNumber::ProcessHits(G4Step* aStep, G4TouchableHistory*) { // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); // int DetNbr = aStep->GetPreStepPoint()->GetTouchableHandle()->GetCopyNumber(0); // this line does exactly the same than the line above int CrystalNbr = aStep->GetPreStepPoint()->GetTouchableHandle()->GetCopyNumber(1); @@ -120,7 +120,7 @@ PARISScorerLaBr3StageEnergy::~PARISScorerLaBr3StageEnergy() G4bool PARISScorerLaBr3StageEnergy::ProcessHits(G4Step* aStep, G4TouchableHistory*) { // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); int CrystalNbr = aStep->GetPreStepPoint()->GetTouchableHandle()->GetCopyNumber(1); // get energy @@ -186,7 +186,7 @@ PARISScorerLaBr3StageCrystal::~PARISScorerLaBr3StageCrystal() G4bool PARISScorerLaBr3StageCrystal::ProcessHits(G4Step* aStep, G4TouchableHistory*) { // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); //G4int CrystalNbr = aStep->GetPreStepPoint()->GetTouchableHandle()->GetReplicaNumber(1); //Adde by Anna: @@ -265,7 +265,7 @@ PARISScorerLaBr3StageTOF::~PARISScorerLaBr3StageTOF() G4bool PARISScorerLaBr3StageTOF::ProcessHits(G4Step* aStep, G4TouchableHistory*) { // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); int CrystalNbr = aStep->GetPreStepPoint()->GetTouchableHandle()->GetCopyNumber(1); // get TOF @@ -327,7 +327,7 @@ PARISScorerCsIStageDetectorNumber::~PARISScorerCsIStageDetectorNumber() G4bool PARISScorerCsIStageDetectorNumber::ProcessHits(G4Step* aStep, G4TouchableHistory*) { // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); // int DetNbr = aStep->GetPreStepPoint()->GetTouchableHandle()->GetCopyNumber(0); // this line does exactly the same than the line above int CrystalNbr = aStep->GetPreStepPoint()->GetTouchableHandle()->GetCopyNumber(1); @@ -389,7 +389,7 @@ PARISScorerCsIStageEnergy::~PARISScorerCsIStageEnergy() G4bool PARISScorerCsIStageEnergy::ProcessHits(G4Step* aStep, G4TouchableHistory*) { // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); int CrystalNbr = aStep->GetPreStepPoint()->GetTouchableHandle()->GetCopyNumber(1); // get energy @@ -457,7 +457,7 @@ PARISScorerCsIStageCrystalNumber::~PARISScorerCsIStageCrystalNumber() G4bool PARISScorerCsIStageCrystalNumber::ProcessHits(G4Step* aStep, G4TouchableHistory*) { // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); // get energy G4int CrystalNbr = aStep->GetPreStepPoint()->GetTouchableHandle()->GetCopyNumber(1); diff --git a/NPSimulation/Plastic/Plastic.cc b/NPSimulation/Plastic/Plastic.cc index 1350c3832..e63535e10 100644 --- a/NPSimulation/Plastic/Plastic.cc +++ b/NPSimulation/Plastic/Plastic.cc @@ -44,9 +44,9 @@ // NPTool header #include "Plastic.hh" -#include "GeneralScorers.hh" +#include "ObsoleteGeneralScorers.hh" #include "RootOutput.h" -using namespace GENERALSCORERS ; +using namespace OBSOLETEGENERALSCORERS ; // CLHEP header #include "CLHEP/Random/RandGauss.h" @@ -725,7 +725,7 @@ void Plastic::InitializeScorers() G4VPrimitiveScorer* DetNbr = new PSDetectorNumber("PlasticNumber","Plastic", 0) ; G4VPrimitiveScorer* Energy = new PSEnergy("Energy","Plastic", 0) ; G4VPrimitiveScorer* Time = new PSTOF("Time","Plastic", 0) ; - G4VPrimitiveScorer* InteractionCoordinatesZ = new GENERALSCORERS::PSInteractionCoordinatesZ("InterCoordZ","Plastic", 0); + G4VPrimitiveScorer* InteractionCoordinatesZ = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesZ("InterCoordZ","Plastic", 0); //and register it to the multifunctionnal detector m_PlasticScorer->RegisterPrimitive(DetNbr) ; m_PlasticScorer->RegisterPrimitive(Energy) ; diff --git a/NPSimulation/SSSD/ThinSi.cc b/NPSimulation/SSSD/ThinSi.cc index 2242c699f..e73830239 100644 --- a/NPSimulation/SSSD/ThinSi.cc +++ b/NPSimulation/SSSD/ThinSi.cc @@ -45,7 +45,7 @@ // NPTool header #include "ThinSi.hh" -#include "GeneralScorers.hh" +#include "ObsoleteGeneralScorers.hh" #include "ThinSiScorers.hh" #include "RootOutput.h" using namespace THINSI; @@ -654,10 +654,10 @@ void ThinSi::InitializeScorers(){ // Silicon Associate Scorer m_StripScorer = new G4MultiFunctionalDetector("ThinSi_StripScorer"); - G4VPrimitiveScorer* DetNbr = new GENERALSCORERS::PSDetectorNumber("DetectorNumber","ThinSi_", 0); + G4VPrimitiveScorer* DetNbr = new OBSOLETEGENERALSCORERS::PSDetectorNumber("DetectorNumber","ThinSi_", 0); G4VPrimitiveScorer* StripNbr = new PSStripNumber("StripNumber",0,SiliconSize, NumberOfStrip); - G4VPrimitiveScorer* Energy = new GENERALSCORERS::PSEnergy("StripEnergy","ThinSi_", 0); - G4VPrimitiveScorer* TOF = new GENERALSCORERS::PSTOF("StripTime","ThinSi_", 0); + G4VPrimitiveScorer* Energy = new OBSOLETEGENERALSCORERS::PSEnergy("StripEnergy","ThinSi_", 0); + G4VPrimitiveScorer* TOF = new OBSOLETEGENERALSCORERS::PSTOF("StripTime","ThinSi_", 0); //and register it to the multifunctionnal detector diff --git a/NPSimulation/SSSD/ThinSiScorers.cc b/NPSimulation/SSSD/ThinSiScorers.cc index 378e10f7c..2c416d778 100644 --- a/NPSimulation/SSSD/ThinSiScorers.cc +++ b/NPSimulation/SSSD/ThinSiScorers.cc @@ -24,7 +24,7 @@ *****************************************************************************/ #include "ThinSiScorers.hh" #include "G4UnitsTable.hh" -#include "GeneralScorers.hh" +#include "ObsoleteGeneralScorers.hh" #include <string> using namespace THINSI ; @@ -47,7 +47,7 @@ PSStripNumber::~PSStripNumber() G4bool PSStripNumber::ProcessHits(G4Step* aStep, G4TouchableHistory*) { - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, "ThinSi"); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, "ThinSi"); G4ThreeVector POS = aStep->GetPreStepPoint()->GetPosition(); POS = aStep->GetPreStepPoint()->GetTouchableHandle()->GetHistory()->GetTopTransform().TransformPoint(POS); diff --git a/NPSimulation/Sharc/Sharc.cc b/NPSimulation/Sharc/Sharc.cc index 532e206a2..aef0a4232 100644 --- a/NPSimulation/Sharc/Sharc.cc +++ b/NPSimulation/Sharc/Sharc.cc @@ -42,7 +42,7 @@ // NPS #include "Sharc.hh" -#include "SharcScorers.hh" +#include "SiliconScorers.hh" // NPL #include "NPOptionManager.h" @@ -649,9 +649,9 @@ void Sharc::ReadSensitive(const G4Event* event){ if(Energy>EnergyThreshold){ double Time = Info[1]; - int DetNbr = (int) Info[2]; - int StripFront = (int) Info[3]; - int StripBack = (int) Info[4]; + int DetNbr = (int) Info[7]; + int StripFront = (int) Info[8]; + int StripBack = (int) Info[9]; m_Event->SetFront_DetectorNbr(DetNbr); m_Event->SetFront_StripNbr(StripFront); @@ -666,11 +666,11 @@ void Sharc::ReadSensitive(const G4Event* event){ m_Event->SetBack_TimeLED(RandGauss::shoot(Time, ResoTime)); // Interraction Coordinates - ms_InterCoord->SetDetectedPositionX(Info[5]) ; - ms_InterCoord->SetDetectedPositionY(Info[6]) ; - ms_InterCoord->SetDetectedPositionZ(Info[7]) ; - ms_InterCoord->SetDetectedAngleTheta(Info[8]/deg) ; - ms_InterCoord->SetDetectedAnglePhi(Info[9]/deg) ; + ms_InterCoord->SetDetectedPositionX(Info[2]) ; + ms_InterCoord->SetDetectedPositionY(Info[3]) ; + ms_InterCoord->SetDetectedPositionZ(Info[4]) ; + ms_InterCoord->SetDetectedAngleTheta(Info[5]/deg) ; + ms_InterCoord->SetDetectedAnglePhi(Info[6]/deg) ; } } @@ -721,12 +721,12 @@ void Sharc::ReadSensitive(const G4Event* event){ double Energy = Info[0]; if(Energy>EnergyThreshold){ double Time = Info[1]; - int DetNbr = (int) Info[2]; - int StripFront = (int) Info[3]; - int StripBack = (int) Info[4]; + int DetNbr = (int) Info[7]; + int StripFront = (int) Info[8]; + int StripBack = (int) Info[9]; m_Event->SetFront_DetectorNbr(DetNbr); - m_Event->SetFront_StripNbr(StripFront); + m_Event->SetFront_StripNbr(QQQ_Wafer_NumberOf_AnnularStrip-StripFront+1); // Order is reverse (1 is outtermost strip) m_Event->SetFront_Energy(RandGauss::shoot(Energy, ResoEnergy)); m_Event->SetFront_TimeCFD(RandGauss::shoot(Time, ResoTime)); m_Event->SetFront_TimeLED(RandGauss::shoot(Time, ResoTime)); @@ -738,11 +738,11 @@ void Sharc::ReadSensitive(const G4Event* event){ m_Event->SetBack_TimeLED(RandGauss::shoot(Time, ResoTime)); // Interraction Coordinates - ms_InterCoord->SetDetectedPositionX(Info[5]) ; - ms_InterCoord->SetDetectedPositionY(Info[6]) ; - ms_InterCoord->SetDetectedPositionZ(Info[7]) ; - ms_InterCoord->SetDetectedAngleTheta(Info[8]/deg) ; - ms_InterCoord->SetDetectedAnglePhi(Info[9]/deg) ; + ms_InterCoord->SetDetectedPositionX(Info[2]) ; + ms_InterCoord->SetDetectedPositionY(Info[3]) ; + ms_InterCoord->SetDetectedPositionZ(Info[4]) ; + ms_InterCoord->SetDetectedAngleTheta(Info[5]/deg) ; + ms_InterCoord->SetDetectedAnglePhi(Info[6]/deg) ; } } @@ -760,21 +760,21 @@ void Sharc::InitializeScorers(){ m_QQQScorer = new G4MultiFunctionalDetector("Sharc_QQQScorer"); G4VPrimitiveScorer* BOXScorer = - new SHARC::PS_Silicon_Rectangle("SharcBOX", + new SILICONSCORERS::PS_Silicon_Rectangle("SharcBOX", BOX_Wafer_Length, BOX_Wafer_Width, BOX_Wafer_Back_NumberOfStrip , BOX_Wafer_Front_NumberOfStrip); G4VPrimitiveScorer* PADScorer = - new SHARC::PS_Silicon_Rectangle("SharcPAD", + new SILICONSCORERS::PS_Silicon_Rectangle("SharcPAD", PAD_Wafer_Length, PAD_Wafer_Width, 1 , 1); G4VPrimitiveScorer* QQQScorer = - new SHARC::PS_Silicon_Annular("SharcQQQ", + new SILICONSCORERS::PS_Silicon_Annular("SharcQQQ", QQQ_Wafer_Inner_Radius, QQQ_Wafer_Outer_Radius, QQQ_Wafer_Starting_Phi, diff --git a/NPSimulation/Sharc/SharcScorers.cc b/NPSimulation/Sharc/SharcScorers.cc deleted file mode 100644 index 29efe7a11..000000000 --- a/NPSimulation/Sharc/SharcScorers.cc +++ /dev/null @@ -1,241 +0,0 @@ - /***************************************************************************** - * Copyright (C) 2009-2013 this file is part of the NPTool Project * - * * - * For the licensing terms see $NPTOOL/Licence/NPTool_Licence * - * For the list of contributors see $NPTOOL/Licence/Contributors * - *****************************************************************************/ - -/***************************************************************************** - * Original Author: Adrien MATTA contact address: matta@ipno.in2p3.fr * - * * - * Creation Date : February 2013 * - * Last update : * - *---------------------------------------------------------------------------* - * Decription: * - * File old the scorer specific to the Sharc Detector * - * * - *---------------------------------------------------------------------------* - * Comment: * - * This new type of scorer is aim to become the standard for DSSD,SSSD and * - * PAD detector (any thing with a rectangular shape) * - *****************************************************************************/ -#include "SharcScorers.hh" -#include "G4UnitsTable.hh" -using namespace SHARC ; - -//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -PS_Silicon_Rectangle::PS_Silicon_Rectangle(G4String name, G4double StripPlaneLength, G4double StripPlaneWidth, G4int NumberOfStripLength,G4int NumberOfStripWidth,G4int depth) -:G4VPrimitiveScorer(name, depth),HCID(-1){ - m_StripPlaneLength = StripPlaneLength; - m_StripPlaneWidth = StripPlaneWidth; - m_NumberOfStripLength = NumberOfStripLength; - m_NumberOfStripWidth = NumberOfStripWidth; - m_StripPitchLength = m_StripPlaneLength / m_NumberOfStripLength; - m_StripPitchWidth = m_StripPlaneWidth / m_NumberOfStripWidth; - - m_Position = G4ThreeVector(-1000,-1000,-1000); - m_DetectorNumber = -1; - m_StripLengthNumber = -1; - m_StripWidthNumber = -1; - m_Index = -1 ; -} - -//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -PS_Silicon_Rectangle::~PS_Silicon_Rectangle(){ -} - -//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -G4bool PS_Silicon_Rectangle::ProcessHits(G4Step* aStep, G4TouchableHistory*){ - - // contain Energy Time, DetNbr, StripFront and StripBack - G4double* EnergyAndTime = new G4double[10]; - EnergyAndTime[0] = aStep->GetTotalEnergyDeposit(); - - - - EnergyAndTime[1] = aStep->GetPreStepPoint()->GetGlobalTime(); - - m_DetectorNumber = aStep->GetPreStepPoint()->GetTouchableHandle()->GetCopyNumber(0); - m_Position = aStep->GetPreStepPoint()->GetPosition(); - - // Interaction coordinates (used to fill the InteractionCoordinates branch) - EnergyAndTime[5] = m_Position.x(); - EnergyAndTime[6] = m_Position.y(); - EnergyAndTime[7] = m_Position.z(); - EnergyAndTime[8] = m_Position.theta(); - EnergyAndTime[9] = m_Position.phi(); - - m_Position = aStep->GetPreStepPoint()->GetTouchableHandle()->GetHistory()->GetTopTransform().TransformPoint(m_Position); - - m_StripLengthNumber = (int)((m_Position.x() + m_StripPlaneLength / 2.) / m_StripPitchLength ) + 1 ; - m_StripWidthNumber = (int)((m_Position.y() + m_StripPlaneWidth / 2.) / m_StripPitchWidth ) + 1 ; - - m_StripLengthNumber = m_NumberOfStripLength - m_StripLengthNumber + 1 ; - m_StripWidthNumber = m_NumberOfStripWidth - m_StripWidthNumber + 1 ; - - - EnergyAndTime[2] = m_DetectorNumber; - EnergyAndTime[3] = m_StripLengthNumber; - EnergyAndTime[4] = m_StripWidthNumber; - - - //Rare case where particle is close to edge of silicon plan - if (m_StripLengthNumber > m_NumberOfStripLength) m_StripLengthNumber = m_StripLengthNumber; - if (m_StripWidthNumber > m_NumberOfStripWidth) m_StripWidthNumber = m_StripWidthNumber; - - m_Index = aStep->GetTrack()->GetTrackID() + m_DetectorNumber * 1e3 + m_StripLengthNumber * 1e6 + m_StripWidthNumber * 1e9; - - // Check if the particle has interact before, if yes, add up the energies. - map<G4int, G4double**>::iterator it; - it= EvtMap->GetMap()->find(m_Index); - if(it!=EvtMap->GetMap()->end()){ - G4double* dummy = *(it->second); - EnergyAndTime[0]+=dummy[0]; - } - - EvtMap->set(m_Index, EnergyAndTime); - return TRUE; -} - -//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -void PS_Silicon_Rectangle::Initialize(G4HCofThisEvent* HCE){ - EvtMap = new G4THitsMap<G4double*>(GetMultiFunctionalDetector()->GetName(), GetName()); - if (HCID < 0) { - HCID = GetCollectionID(0); - } - HCE->AddHitsCollection(HCID, (G4VHitsCollection*)EvtMap); -} - -//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -void PS_Silicon_Rectangle::EndOfEvent(G4HCofThisEvent*){ -} - -//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -void PS_Silicon_Rectangle::clear(){ - std::map<G4int, G4double**>::iterator MapIterator; - for (MapIterator = EvtMap->GetMap()->begin() ; MapIterator != EvtMap->GetMap()->end() ; MapIterator++){ - delete *(MapIterator->second); - } - - EvtMap->clear(); -} - -//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -void PS_Silicon_Rectangle::DrawAll(){ - -} - -//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -void PS_Silicon_Rectangle::PrintAll(){ - G4cout << " MultiFunctionalDet " << detector->GetName() << G4endl ; - G4cout << " PrimitiveScorer " << GetName() << G4endl ; - G4cout << " Number of entries " << EvtMap->entries() << G4endl ; -} -//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -PS_Silicon_Annular::PS_Silicon_Annular(G4String name, G4double StripPlaneInnerRadius, G4double StripPlaneOuterRadius, G4double PhiStart,G4double PhiStop, G4int NumberOfStripRadial,G4int NumberOfStripTheta,G4int depth) -:G4VPrimitiveScorer(name, depth),HCID(-1){ - - m_StripPlaneInnerRadius = StripPlaneInnerRadius; - m_StripPlaneOuterRadius = StripPlaneOuterRadius; - m_PhiStart = PhiStart; - m_PhiStop = PhiStop; - m_NumberOfStripRadial = NumberOfStripRadial; - m_NumberOfStripTheta = NumberOfStripTheta; - m_StripPitchRadial = (m_PhiStop-m_PhiStart)/m_NumberOfStripTheta; - m_StripPitchTheta = (m_StripPlaneOuterRadius-m_StripPlaneInnerRadius)/m_NumberOfStripRadial; - - m_Position = G4ThreeVector(-1000,-1000,-1000); - m_uz = G4ThreeVector(0,0,1); - m_DetectorNumber = -1; - m_StripRadialNumber = -1; - m_StripThetaNumber = -1; - m_Index = -1 ; -} - -//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -PS_Silicon_Annular::~PS_Silicon_Annular(){ -} - -//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -G4bool PS_Silicon_Annular::ProcessHits(G4Step* aStep, G4TouchableHistory*){ - // contain Energy Time, DetNbr, StripFront and StripBack - G4double* EnergyAndTime = new G4double[10]; - EnergyAndTime[0] = aStep->GetTotalEnergyDeposit(); - - EnergyAndTime[1] = aStep->GetPreStepPoint()->GetGlobalTime(); - - m_DetectorNumber = aStep->GetPreStepPoint()->GetTouchableHandle()->GetCopyNumber(0); - m_Position = aStep->GetPreStepPoint()->GetPosition(); - - // Interaction coordinates (used to fill the InteractionCoordinates branch) - EnergyAndTime[5] = m_Position.x(); - EnergyAndTime[6] = m_Position.y(); - EnergyAndTime[7] = m_Position.z(); - EnergyAndTime[8] = m_Position.theta(); - EnergyAndTime[9] = m_Position.phi(); - - m_Position = aStep->GetPreStepPoint()->GetTouchableHandle()->GetHistory()->GetTopTransform().TransformPoint(m_Position); - m_StripRadialNumber = (int) ((m_StripPlaneOuterRadius - m_Position.rho()) / m_StripPitchTheta ) + 1 ; - - m_StripThetaNumber = (int) ((m_Position.phi() - m_PhiStart*0.5) / m_StripPitchRadial ) + 1 ; - - EnergyAndTime[2] = m_DetectorNumber; - EnergyAndTime[3] = m_StripThetaNumber; - EnergyAndTime[4] = m_StripRadialNumber; - - - //Rare case where particle is close to edge of silicon plan - if (m_StripRadialNumber > m_NumberOfStripRadial) m_StripRadialNumber = m_NumberOfStripRadial; - if (m_StripThetaNumber > m_NumberOfStripTheta) m_StripThetaNumber = m_NumberOfStripTheta; - - m_Index = aStep->GetTrack()->GetTrackID() + m_DetectorNumber * 1e3 + m_StripRadialNumber * 1e6 + m_NumberOfStripTheta * 1e9; - - // Check if the particle has interact before, if yes, add up the energies. - map<G4int, G4double**>::iterator it; - it= EvtMap->GetMap()->find(m_Index); - if(it!=EvtMap->GetMap()->end()){ - G4double* dummy = *(it->second); - EnergyAndTime[0]+=dummy[0]; - } - - EvtMap->set(m_Index, EnergyAndTime); - return TRUE; -} - -//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -void PS_Silicon_Annular::Initialize(G4HCofThisEvent* HCE){ - EvtMap = new G4THitsMap<G4double*>(GetMultiFunctionalDetector()->GetName(), GetName()); - if (HCID < 0) { - HCID = GetCollectionID(0); - } - HCE->AddHitsCollection(HCID, (G4VHitsCollection*)EvtMap); -} - -//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -void PS_Silicon_Annular::EndOfEvent(G4HCofThisEvent*){ -} - -//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -void PS_Silicon_Annular::clear(){ - std::map<G4int, G4double**>::iterator MapIterator; - for (MapIterator = EvtMap->GetMap()->begin() ; MapIterator != EvtMap->GetMap()->end() ; MapIterator++){ - delete *(MapIterator->second); - } - - EvtMap->clear(); -} - -//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -void PS_Silicon_Annular::DrawAll(){ - -} - -//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -void PS_Silicon_Annular::PrintAll(){ - G4cout << " MultiFunctionalDet " << detector->GetName() << G4endl ; - G4cout << " PrimitiveScorer " << GetName() << G4endl ; - G4cout << " Number of entries " << EvtMap->entries() << G4endl ; -} \ No newline at end of file diff --git a/NPSimulation/Shield/ShieldClParis.cc b/NPSimulation/Shield/ShieldClParis.cc index fce7ad167..730759ba6 100644 --- a/NPSimulation/Shield/ShieldClParis.cc +++ b/NPSimulation/Shield/ShieldClParis.cc @@ -50,7 +50,7 @@ #include "ShieldClParis.hh" //#include "ParisScorers.hh" #include "ShieldScorers.hh" -#include "GeneralScorers.hh" +#include "ObsoleteGeneralScorers.hh" #include "RootOutput.h" // CLHEP @@ -753,15 +753,15 @@ void ShieldClParis::InitializeScorers() // CsIShield Associate Scorer m_CsIShieldScorer = new G4MultiFunctionalDetector("CsIScorerShieldClParis"); - // G4VPrimitiveScorer* DetNbr = new GENERALSCORERS::PSDetectorNumber("DetectorNumber", "ShieldClParis", 0); + // G4VPrimitiveScorer* DetNbr = new OBSOLETEGENERALSCORERS::PSDetectorNumber("DetectorNumber", "ShieldClParis", 0); G4VPrimitiveScorer* DetNbr = new SHIELDScorerCsIDetectorNumber("CsIShieldDetectorNumber", "ShieldClParis", 0); - // G4VPrimitiveScorer* TOF = new GENERALSCORERS::PSTOF("StripTime","ShieldClParis", 0); + // G4VPrimitiveScorer* TOF = new OBSOLETEGENERALSCORERS::PSTOF("StripTime","ShieldClParis", 0); G4VPrimitiveScorer* TOF = new SHIELDScorerCsITOF("CsIShieldTime","ShieldClParis", 0); - //G4VPrimitiveScorer* InteractionCoordinatesX = new GENERALSCORERS::PSInteractionCoordinatesX("InterCoordX","ShieldClParis", 0); - //G4VPrimitiveScorer* InteractionCoordinatesY = new GENERALSCORERS::PSInteractionCoordinatesY("InterCoordY","ShieldClParis", 0); - //G4VPrimitiveScorer* InteractionCoordinatesZ = new GENERALSCORERS::PSInteractionCoordinatesZ("InterCoordZ","ShieldClParis", 0); - //G4VPrimitiveScorer* InteractionCoordinatesAngleTheta = new GENERALSCORERS::PSInteractionCoordinatesAngleTheta("InterCoordAngTheta","ShieldClParis", 0); - //G4VPrimitiveScorer* InteractionCoordinatesAnglePhi = new GENERALSCORERS::PSInteractionCoordinatesAnglePhi("InterCoordAngPhi","ShieldClParis", 0); + //G4VPrimitiveScorer* InteractionCoordinatesX = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesX("InterCoordX","ShieldClParis", 0); + //G4VPrimitiveScorer* InteractionCoordinatesY = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesY("InterCoordY","ShieldClParis", 0); + //G4VPrimitiveScorer* InteractionCoordinatesZ = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesZ("InterCoordZ","ShieldClParis", 0); + //G4VPrimitiveScorer* InteractionCoordinatesAngleTheta = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesAngleTheta("InterCoordAngTheta","ShieldClParis", 0); + //G4VPrimitiveScorer* InteractionCoordinatesAnglePhi = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesAnglePhi("InterCoordAngPhi","ShieldClParis", 0); G4VPrimitiveScorer* Energy = new SHIELDScorerCsIEnergy("CsIShieldEnergy", "ShieldClParis", 0); diff --git a/NPSimulation/Shield/ShieldPhParis.cc b/NPSimulation/Shield/ShieldPhParis.cc index d1394aac8..e6fd21c90 100644 --- a/NPSimulation/Shield/ShieldPhParis.cc +++ b/NPSimulation/Shield/ShieldPhParis.cc @@ -52,7 +52,7 @@ #include "ShieldPhParis.hh" //#include "ParisScorers.hh" #include "ShieldScorers.hh" -#include "GeneralScorers.hh" +#include "ObsoleteGeneralScorers.hh" #include "RootOutput.h" // CLHEP @@ -762,15 +762,15 @@ void ShieldPhParis::InitializeScorers() // CsIShield Associate Scorer m_CsIShieldScorer = new G4MultiFunctionalDetector("CsIScorerShieldPhParis"); - // G4VPrimitiveScorer* DetNbr = new GENERALSCORERS::PSDetectorNumber("DetectorNumber", "ShieldPhParis", 0); + // G4VPrimitiveScorer* DetNbr = new OBSOLETEGENERALSCORERS::PSDetectorNumber("DetectorNumber", "ShieldPhParis", 0); G4VPrimitiveScorer* DetNbr = new SHIELDScorerCsIDetectorNumber("CsIShieldDetectorNumber", "ShieldPhParis", 0); - // G4VPrimitiveScorer* TOF = new GENERALSCORERS::PSTOF("StripTime","ShieldPhParis", 0); + // G4VPrimitiveScorer* TOF = new OBSOLETEGENERALSCORERS::PSTOF("StripTime","ShieldPhParis", 0); G4VPrimitiveScorer* TOF = new SHIELDScorerCsITOF("CsIShieldTime","ShieldPhParis", 0); - //G4VPrimitiveScorer* InteractionCoordinatesX = new GENERALSCORERS::PSInteractionCoordinatesX("InterCoordX","ShieldPhParis", 0); - //G4VPrimitiveScorer* InteractionCoordinatesY = new GENERALSCORERS::PSInteractionCoordinatesY("InterCoordY","ShieldPhParis", 0); - //G4VPrimitiveScorer* InteractionCoordinatesZ = new GENERALSCORERS::PSInteractionCoordinatesZ("InterCoordZ","ShieldPhParis", 0); - //G4VPrimitiveScorer* InteractionCoordinatesAngleTheta = new GENERALSCORERS::PSInteractionCoordinatesAngleTheta("InterCoordAngTheta","ShieldPhParis", 0); - //G4VPrimitiveScorer* InteractionCoordinatesAnglePhi = new GENERALSCORERS::PSInteractionCoordinatesAnglePhi("InterCoordAngPhi","ShieldPhParis", 0); + //G4VPrimitiveScorer* InteractionCoordinatesX = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesX("InterCoordX","ShieldPhParis", 0); + //G4VPrimitiveScorer* InteractionCoordinatesY = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesY("InterCoordY","ShieldPhParis", 0); + //G4VPrimitiveScorer* InteractionCoordinatesZ = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesZ("InterCoordZ","ShieldPhParis", 0); + //G4VPrimitiveScorer* InteractionCoordinatesAngleTheta = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesAngleTheta("InterCoordAngTheta","ShieldPhParis", 0); + //G4VPrimitiveScorer* InteractionCoordinatesAnglePhi = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesAnglePhi("InterCoordAngPhi","ShieldPhParis", 0); G4VPrimitiveScorer* Energy = new SHIELDScorerCsIEnergy("CsIShieldEnergy", "ShieldPhParis", 0); diff --git a/NPSimulation/Shield/ShieldScorers.cc b/NPSimulation/Shield/ShieldScorers.cc index e4979720a..86befeb7d 100644 --- a/NPSimulation/Shield/ShieldScorers.cc +++ b/NPSimulation/Shield/ShieldScorers.cc @@ -23,7 +23,7 @@ #include "G4UnitsTable.hh" // NPTool headers -#include "GeneralScorers.hh" +#include "ObsoleteGeneralScorers.hh" #include "ShieldScorers.hh" #include "ShieldClParis.hh" @@ -58,7 +58,7 @@ SHIELDScorerCsIDetectorNumber::~SHIELDScorerCsIDetectorNumber() G4bool SHIELDScorerCsIDetectorNumber::ProcessHits(G4Step* aStep, G4TouchableHistory*) { // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); // get energy G4double edep = aStep->GetTotalEnergyDeposit(); @@ -119,7 +119,7 @@ SHIELDScorerCsIEnergy::~SHIELDScorerCsIEnergy() G4bool SHIELDScorerCsIEnergy::ProcessHits(G4Step* aStep, G4TouchableHistory*) { // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); // get energy G4ThreeVector POS = aStep->GetPreStepPoint()->GetPosition(); @@ -184,7 +184,7 @@ SHIELDScorerCsITOF::~SHIELDScorerCsITOF() G4bool SHIELDScorerCsITOF::ProcessHits(G4Step* aStep, G4TouchableHistory*) { // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, m_VolumeName); // get TOF G4double TOF = aStep->GetPreStepPoint()->GetGlobalTime(); diff --git a/NPSimulation/W1/W1.cc b/NPSimulation/W1/W1.cc index a118ed1db..072a79648 100644 --- a/NPSimulation/W1/W1.cc +++ b/NPSimulation/W1/W1.cc @@ -44,7 +44,7 @@ #include "G4MultiFunctionalDetector.hh" // NPTool headers -#include "GeneralScorers.hh" +#include "ObsoleteGeneralScorers.hh" #include "W1.hh" #include "W1Scorers.hh" #include "TW1Data.h" @@ -742,14 +742,14 @@ void W1::InitializeScorers() { // Associate Scorer m_Scorer = new G4MultiFunctionalDetector("ScorerW1"); - G4VPrimitiveScorer* DetNbr = new GENERALSCORERS::PSDetectorNumber("DetectorNumber", "W1Square", 0); - G4VPrimitiveScorer* Energy = new GENERALSCORERS::PSEnergy("StripEnergy", "W1Square", 0); - G4VPrimitiveScorer* TOF = new GENERALSCORERS::PSTOF("StripTime", "W1Square", 0); - G4VPrimitiveScorer* InteractionCoordinatesX = new GENERALSCORERS::PSInteractionCoordinatesX("InterCoordX","W1Square", 0); - G4VPrimitiveScorer* InteractionCoordinatesY = new GENERALSCORERS::PSInteractionCoordinatesY("InterCoordY","W1Square", 0); - G4VPrimitiveScorer* InteractionCoordinatesZ = new GENERALSCORERS::PSInteractionCoordinatesZ("InterCoordZ","W1Square", 0); - G4VPrimitiveScorer* InteractionCoordinatesAngleTheta = new GENERALSCORERS::PSInteractionCoordinatesAngleTheta("InterCoordAngTheta","W1Square", 0); - G4VPrimitiveScorer* InteractionCoordinatesAnglePhi = new GENERALSCORERS::PSInteractionCoordinatesAnglePhi("InterCoordAngPhi","W1Square", 0); + G4VPrimitiveScorer* DetNbr = new OBSOLETEGENERALSCORERS::PSDetectorNumber("DetectorNumber", "W1Square", 0); + G4VPrimitiveScorer* Energy = new OBSOLETEGENERALSCORERS::PSEnergy("StripEnergy", "W1Square", 0); + G4VPrimitiveScorer* TOF = new OBSOLETEGENERALSCORERS::PSTOF("StripTime", "W1Square", 0); + G4VPrimitiveScorer* InteractionCoordinatesX = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesX("InterCoordX","W1Square", 0); + G4VPrimitiveScorer* InteractionCoordinatesY = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesY("InterCoordY","W1Square", 0); + G4VPrimitiveScorer* InteractionCoordinatesZ = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesZ("InterCoordZ","W1Square", 0); + G4VPrimitiveScorer* InteractionCoordinatesAngleTheta = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesAngleTheta("InterCoordAngTheta","W1Square", 0); + G4VPrimitiveScorer* InteractionCoordinatesAnglePhi = new OBSOLETEGENERALSCORERS::PSInteractionCoordinatesAnglePhi("InterCoordAngPhi","W1Square", 0); G4VPrimitiveScorer* ThetaStripPosition = new W1ScorerFrontStripNumber("FrontStripNumber", 0, NbStrips); G4VPrimitiveScorer* PhiStripPosition = new W1ScorerBackStripNumber("BackStripNumber", 0, NbStrips); diff --git a/NPSimulation/W1/W1Scorers.cc b/NPSimulation/W1/W1Scorers.cc index cf285017b..72e238149 100644 --- a/NPSimulation/W1/W1Scorers.cc +++ b/NPSimulation/W1/W1Scorers.cc @@ -23,7 +23,7 @@ #include "G4UnitsTable.hh" // NPTool headers -#include "GeneralScorers.hh" +#include "ObsoleteGeneralScorers.hh" #include "W1Scorers.hh" #include "W1.hh" @@ -54,7 +54,7 @@ W1ScorerFrontStripNumber::~W1ScorerFrontStripNumber() G4bool W1ScorerFrontStripNumber::ProcessHits(G4Step* aStep, G4TouchableHistory*) { // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, "W1Square"); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, "W1Square"); // get front strip number G4ThreeVector POS = aStep->GetPreStepPoint()->GetPosition(); @@ -123,7 +123,7 @@ W1ScorerBackStripNumber::~W1ScorerBackStripNumber() G4bool W1ScorerBackStripNumber::ProcessHits(G4Step* aStep, G4TouchableHistory*) { // get detector number - int DetNbr = GENERALSCORERS::PickUpDetectorNumber(aStep, "W1Square"); + int DetNbr = OBSOLETEGENERALSCORERS::PickUpDetectorNumber(aStep, "W1Square"); // get back strip number G4ThreeVector POS = aStep->GetPreStepPoint()->GetPosition(); diff --git a/NPSimulation/include/GeneralScorers.hh b/NPSimulation/include/ObsoleteGeneralScorers.hh similarity index 99% rename from NPSimulation/include/GeneralScorers.hh rename to NPSimulation/include/ObsoleteGeneralScorers.hh index 437f5f43a..24c7aae58 100644 --- a/NPSimulation/include/GeneralScorers.hh +++ b/NPSimulation/include/ObsoleteGeneralScorers.hh @@ -27,7 +27,7 @@ #include "G4VPrimitiveScorer.hh" #include "G4THitsMap.hh" using namespace CLHEP; -namespace GENERALSCORERS +namespace OBSOLETEGENERALSCORERS { //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... // This Threshold is used in the above scorer. Any energy deposit under this threshold will not create an entry. diff --git a/NPSimulation/Sharc/SharcScorers.hh b/NPSimulation/include/SiliconScorers.hh similarity index 85% rename from NPSimulation/Sharc/SharcScorers.hh rename to NPSimulation/include/SiliconScorers.hh index 54f0fee13..93eae93f1 100644 --- a/NPSimulation/Sharc/SharcScorers.hh +++ b/NPSimulation/include/SiliconScorers.hh @@ -1,5 +1,5 @@ -#ifndef SharcScorers_h -#define SharcScorers_h 1 +#ifndef SiliconScorers_h +#define SiliconScorers_h 1 /***************************************************************************** * Copyright (C) 2009-2013 this file is part of the NPTool Project * * * @@ -14,7 +14,7 @@ * Last update : * *---------------------------------------------------------------------------* * Decription: * - * File old the scorer specific to the Sharc Detector * + * File old the scorer specific to the Silicon Detector * * * *---------------------------------------------------------------------------* * Comment: * @@ -29,9 +29,9 @@ #include <map> using namespace std; - using namespace CLHEP; +using namespace CLHEP; -namespace SHARC { +namespace SILICONSCORERS { //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... class PS_Silicon_Rectangle : public G4VPrimitiveScorer{ @@ -77,7 +77,7 @@ namespace SHARC { class PS_Silicon_Annular : public G4VPrimitiveScorer{ public: // with description - PS_Silicon_Annular(G4String name, G4double StripPlaneInnerRadius, G4double StripPlaneOuterRadius, G4double PhiStart,G4double PhiStop, G4int NumberOfStripRadial,G4int NumberOfStripTheta,G4int depth=0); + PS_Silicon_Annular(G4String name, G4double StripPlaneInnerRadius, G4double StripPlaneOuterRadius, G4double PhiStart,G4double PhiStop, G4int NumberOfStripRing,G4int NumberOfStripSector=1, G4int NumberOfQuadrant=1,G4int depth=0); ~PS_Silicon_Annular(); protected: // with description @@ -98,22 +98,25 @@ namespace SHARC { G4double m_StripPlaneOuterRadius; G4double m_PhiStart; G4double m_PhiStop; - G4int m_NumberOfStripRadial; - G4int m_NumberOfStripTheta; - G4double m_StripPitchRadial; - G4double m_StripPitchTheta; + G4int m_NumberOfStripRing; + G4int m_NumberOfStripSector; + G4int m_NumberOfStripQuadrant; + G4double m_StripPitchRing; + G4double m_StripPitchSector; + G4double m_StripPitchQuadrant; private: // inherited from G4VPrimitiveScorer G4int HCID; G4THitsMap<G4double*>* EvtMap; private: // Needed for intermediate calculation (avoid multiple instantiation in Processing Hit) - G4ThreeVector m_Position ; - G4ThreeVector m_uz ; - G4int m_DetectorNumber ; - G4int m_StripRadialNumber ; - G4int m_StripThetaNumber ; - G4int m_Index ; + G4ThreeVector m_Position ; + G4ThreeVector m_uz ; + G4int m_DetectorNumber ; + G4int m_StripRingNumber ; + G4int m_StripSectorNumber ; + G4int m_StripQuadrantNumber ; + G4int m_Index ; }; } diff --git a/NPSimulation/src/EventGeneratorParticleDecay.cc b/NPSimulation/src/EventGeneratorParticleDecay.cc index 703a32044..3cd233776 100644 --- a/NPSimulation/src/EventGeneratorParticleDecay.cc +++ b/NPSimulation/src/EventGeneratorParticleDecay.cc @@ -411,4 +411,4 @@ void EventGeneratorParticleDecay::SetDecay(vector<string> DaughterName, vector<b // Change the name of the decaying nucleus to G4 standard m_MotherNucleiName = m_ParticleStack->ChangeNameToG4Standard(m_MotherNucleiName); - } \ No newline at end of file + } diff --git a/NPSimulation/src/GeneralScorers.cc b/NPSimulation/src/ObsoleteGeneralScorers.cc similarity index 98% rename from NPSimulation/src/GeneralScorers.cc rename to NPSimulation/src/ObsoleteGeneralScorers.cc index 796883071..f2dd9fe14 100644 --- a/NPSimulation/src/GeneralScorers.cc +++ b/NPSimulation/src/ObsoleteGeneralScorers.cc @@ -22,9 +22,9 @@ * a global ID for each event you should not use those scorer with some G4 * * provided ones or being very carefull doing so. * *****************************************************************************/ -#include "GeneralScorers.hh" +#include "ObsoleteGeneralScorers.hh" #include "G4UnitsTable.hh" -using namespace GENERALSCORERS ; +using namespace OBSOLETEGENERALSCORERS ; using namespace CLHEP; //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... @@ -32,7 +32,7 @@ using namespace CLHEP; // DetectorNameX_SubPart_SubPart // where X stand for the detector number. -int GENERALSCORERS::PickUpDetectorNumber(G4Step* aStep, std::string DetName) +int OBSOLETEGENERALSCORERS::PickUpDetectorNumber(G4Step* aStep, std::string DetName) { std::string name = aStep->GetTrack()->GetVolume()->GetName(); std::string nbr; diff --git a/NPSimulation/src/Particle.cc b/NPSimulation/src/Particle.cc index 82f1da484..a339f565c 100644 --- a/NPSimulation/src/Particle.cc +++ b/NPSimulation/src/Particle.cc @@ -102,4 +102,4 @@ void Particle::SetParticlePosition(G4ThreeVector Position){ //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... void Particle::SetShootStatus(bool ShootStatus){ m_ShootStatus = ShootStatus; -} \ No newline at end of file +} -- GitLab