diff --git a/Inputs/DetectorConfiguration/gaspHyde.detector b/Inputs/DetectorConfiguration/gaspHyde.detector new file mode 100644 index 0000000000000000000000000000000000000000..c84478229bddbce7553c0af7f74b47a43aa10b3c --- /dev/null +++ b/Inputs/DetectorConfiguration/gaspHyde.detector @@ -0,0 +1,287 @@ +%%%%%%%%%%Detector%%%%%%%%%%%%%%%%%%% +%%Position and distance given in mm +%%Angle given in degree +%% using the data from the experimental mesurement +%% special care is given for the X Y direction +%% NOTATTION USED IN THE FOLLOWING: +%% +%% X1_Y1 --> X:1 Y:1 +%% X128_Y1 --> X:128 Y:1 +%% X1_Y128 --> X:1 Y:128 +%% X128_Y128 --> X:128 Y:128 +%%Option: 0,1 for Si SiLi and CSI +%%Option: all or sensible for VISualisation +% 1.2 12.371134021 +% 2 20.618556701 +% 30 309.278350515 + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1 +GeneralTarget +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1 +Target + THICKNESS= 0.001 + RADIUS= 7.5 + MATERIAL= CD2 + X= 0 + Y= 0 + Z= 0 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +GaspardTracker +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1 Annular Back +GPDAnnular + Z= -156.5 + RMIN= 16 + RMAX= 52 + FIRSTSTAGE= 1 + SECONDSTAGE= 0 + THIRDSTAGE= 1 + VIS= all +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1 Annular Front +GPDAnnular + Z= 156.5 + RMIN= 16 + RMAX= 52 + FIRSTSTAGE= 1 + SECONDSTAGE= 0 + THIRDSTAGE= 1 + VIS= all +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1 End-Cap Back +GPDTrapezoid + X1_Y1= 55.338 14.346 -146.501 + X128_Y1= 138.518 48.726 -69.237 + X1_Y128= 138.519 -48.717 -69.236 + X128_Y128= 55.338 -14.346 -146.501 + FIRSTSTAGE= 1 + SECONDSTAGE= 0 + THIRDSTAGE= 1 + VIS= all +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%2 +GPDTrapezoid + X1_Y1= 28.986 49.274 -146.501 + X128_Y1= 63.492 132.401 -69.237 + X1_Y128= 132.395 63.500 -69.236 + X128_Y128= 49.215 29.045 -146.501 + FIRSTSTAGE= 1 + SECONDSTAGE= 0 + THIRDSTAGE= 1 + VIS= all +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%3 +GPDTrapezoid + X1_Y1= -14.346 55.338 -146.501 + X128_Y1= -48.726 138.518 -69.237 + X1_Y128= 48.717 138.519 -69.236 + X128_Y128= 14.263 55.338 -146.501 + FIRSTSTAGE= 1 + SECONDSTAGE= 0 + THIRDSTAGE= 1 + VIS= all +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%4 +GPDTrapezoid + X1_Y1= -49.274 28.986 -146.501 + X128_Y1= -132.401 63.492 -69.237 + X1_Y128= -63.500 132.395 -69.236 + X128_Y128= -29.045 49.215 -146.501 + FIRSTSTAGE= 1 + SECONDSTAGE= 0 + THIRDSTAGE= 1 + VIS= all +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5 +GPDTrapezoid + X1_Y1= -55.338 -14.346 -146.501 + X128_Y1= -138.518 -48.726 -69.237 + X1_Y128= -138.519 48.717 -69.236 + X128_Y128= -55.338 14.346 -146.501 + FIRSTSTAGE= 1 + SECONDSTAGE= 0 + THIRDSTAGE= 1 + VIS= all +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%6 +GPDTrapezoid + X1_Y1= -28.986 -49.274 -146.501 + X128_Y1= -63.492 -132.401 -69.237 + X1_Y128= -132.395 -63.500 -69.236 + X128_Y128= -49.215 -29.045 -146.501 + FIRSTSTAGE= 1 + SECONDSTAGE= 0 + THIRDSTAGE= 1 + VIS= all +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%7 +GPDTrapezoid + X1_Y1= 14.346 -55.338 -146.501 + X128_Y1= 48.726 -138.518 -69.237 + X1_Y128= -48.717 -138.519 -69.236 + X128_Y128= -14.263 -55.338 -146.501 + FIRSTSTAGE= 1 + SECONDSTAGE= 0 + THIRDSTAGE= 1 + VIS= all +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%8 +GPDTrapezoid + X1_Y1= 49.274 -28.986 -146.501 + X128_Y1= 132.401 -63.492 -69.237 + X1_Y128= 63.500 -132.395 -69.236 + X128_Y128= 29.045 -49.215 -146.501 + FIRSTSTAGE= 1 + SECONDSTAGE= 0 + THIRDSTAGE= 1 + VIS= all +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1 Barrel +GPDSquare + X1_Y1= 142.516 49.00 -49.00 + X128_Y1= 142.516 49.00 49.00 + X1_Y128= 142.516 -49.00 49.00 + X128_Y128= 142.516 -49.00 -49.00 + FIRSTSTAGE= 1 + SECONDSTAGE= 1 + THIRDSTAGE= 1 + VIS= all +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%2 +GPDSquare + X1_Y1= 66.125 135.422 -49.00 + X128_Y1= 66.125 135.422 49.00 + X1_Y128= 135.422 66.126 49.00 + X128_Y128= 135.422 66.126 -49.00 + FIRSTSTAGE= 1 + SECONDSTAGE= 1 + THIRDSTAGE= 1 + VIS= all +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%3 +GPDSquare + X1_Y1= -49.00 142.516 -49.00 + X128_Y1= -49.00 142.516 49.00 + X1_Y128= 49.00 142.516 49.00 + X128_Y128= 49.00 142.516 -49.00 + FIRSTSTAGE= 1 + SECONDSTAGE= 1 + THIRDSTAGE= 1 + VIS= all +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%4 +GPDSquare + X1_Y1= -135.422 66.125 -49.00 + X128_Y1= -135.422 66.125 49.00 + X1_Y128= -66.126 135.422 49.00 + X128_Y128= -66.126 135.422 -49.00 + FIRSTSTAGE= 1 + SECONDSTAGE= 1 + THIRDSTAGE= 1 + VIS= all +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5 +GPDSquare + X1_Y1= -142.516 -49.00 -49.00 + X128_Y1= -142.516 -49.00 49.00 + X1_Y128= -142.516 49.00 49.00 + X128_Y128= -142.516 49.00 -49.00 + FIRSTSTAGE= 1 + SECONDSTAGE= 1 + THIRDSTAGE= 1 + VIS= all +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%6 +GPDSquare + X1_Y1= -66.125 -135.422 -49.00 + X128_Y1= -66.125 -135.422 49.00 + X1_Y128= -135.422 -66.126 49.00 + X128_Y128= -135.422 -66.126 -49.00 + FIRSTSTAGE= 1 + SECONDSTAGE= 1 + THIRDSTAGE= 1 + VIS= all +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%7 +GPDSquare + X1_Y1= 49.00 -142.516 -49.00 + X128_Y1= 49.00 -142.516 49.00 + X1_Y128= -49.00 -142.516 49.00 + X128_Y128= -49.00 -142.516 -49.00 + FIRSTSTAGE= 1 + SECONDSTAGE= 1 + THIRDSTAGE= 1 + VIS= all +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%8 +GPDSquare + X1_Y1= 135.422 -66.125 -49.00 + X128_Y1= 135.422 -66.125 49.00 + X1_Y128= 66.126 -135.422 49.00 + X128_Y128= 66.126 -135.422 -49.00 + FIRSTSTAGE= 1 + SECONDSTAGE= 1 + THIRDSTAGE= 1 + VIS= all +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1 Front-Cap Back +GPDTrapezoid + X1_Y1= 55.338 14.346 146.501 + X128_Y1= 138.518 48.726 69.237 + X1_Y128= 138.519 -48.717 69.236 + X128_Y128= 55.338 -14.346 146.501 + FIRSTSTAGE= 1 + SECONDSTAGE= 0 + THIRDSTAGE= 1 + VIS= all +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%2 +GPDTrapezoid + X1_Y1= 28.986 49.274 146.501 + X128_Y1= 63.492 132.401 69.237 + X1_Y128= 132.395 63.500 69.236 + X128_Y128= 49.215 29.045 146.501 + FIRSTSTAGE= 1 + SECONDSTAGE= 0 + THIRDSTAGE= 1 + VIS= all +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%3 +GPDTrapezoid + X1_Y1= -14.346 55.338 146.501 + X128_Y1= -48.726 138.518 69.237 + X1_Y128= 48.717 138.519 69.236 + X128_Y128= 14.263 55.338 146.501 + FIRSTSTAGE= 1 + SECONDSTAGE= 0 + THIRDSTAGE= 1 + VIS= all +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%4 +GPDTrapezoid + X1_Y1= -49.274 28.986 146.501 + X128_Y1= -132.401 63.492 69.237 + X1_Y128= -63.500 132.395 69.236 + X128_Y128= -29.045 49.215 146.501 + FIRSTSTAGE= 1 + SECONDSTAGE= 0 + THIRDSTAGE= 1 + VIS= all +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5 +GPDTrapezoid + X1_Y1= -55.338 -14.346 146.501 + X128_Y1= -138.518 -48.726 69.237 + X1_Y128= -138.519 48.717 69.236 + X128_Y128= -55.338 14.346 146.501 + FIRSTSTAGE= 1 + SECONDSTAGE= 0 + THIRDSTAGE= 1 + VIS= all +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%6 +GPDTrapezoid + X1_Y1= -28.986 -49.274 146.501 + X128_Y1= -63.492 -132.401 69.237 + X1_Y128= -132.395 -63.500 69.236 + X128_Y128= -49.215 -29.045 146.501 + FIRSTSTAGE= 1 + SECONDSTAGE= 0 + THIRDSTAGE= 1 + VIS= all +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%7 +GPDTrapezoid + X1_Y1= 14.346 -55.338 146.501 + X128_Y1= 48.726 -138.518 69.237 + X1_Y128= -48.717 -138.519 69.236 + X128_Y128= -14.263 -55.338 146.501 + FIRSTSTAGE= 1 + SECONDSTAGE= 0 + THIRDSTAGE= 1 + VIS= all +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%8 +GPDTrapezoid + X1_Y1= 49.274 -28.986 146.501 + X128_Y1= 132.401 -63.492 69.237 + X1_Y128= 63.500 -132.395 69.236 + X128_Y128= 29.045 -49.215 146.501 + FIRSTSTAGE= 1 + SECONDSTAGE= 0 + THIRDSTAGE= 1 + VIS= all diff --git a/Inputs/DetectorConfiguration/gaspardV1Barrel.detector b/Inputs/DetectorConfiguration/gaspardV1Barrel.detector index 6f4a16ba6028110018da6f5d0822875074a5099c..bc9d3a26ebfc61fd393def3bbfe151a160302527 100644 --- a/Inputs/DetectorConfiguration/gaspardV1Barrel.detector +++ b/Inputs/DetectorConfiguration/gaspardV1Barrel.detector @@ -26,7 +26,7 @@ Target Y= 0 Z= 0 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -Gaspard +GaspardTracker %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1 GPDSquare X1_Y1= 49.1 66.08 -135.41 diff --git a/NPLib/GASPARD/GaspardTracker.cxx b/NPLib/GASPARD/GaspardTracker.cxx index b43e899f317ddd4535482fa5076b8b85929bdece..055ad78fff3c759c17999665354eca90edbac9d6 100644 --- a/NPLib/GASPARD/GaspardTracker.cxx +++ b/NPLib/GASPARD/GaspardTracker.cxx @@ -44,10 +44,10 @@ using namespace std ; // Default Constructor GaspardTracker::GaspardTracker() + : m_NumberOfModule(0), + m_EventData(new TGaspardTrackerData), + m_EventPhysics(new TGaspardTrackerPhysics) { - m_NumberOfModule = 0; - m_EventData = new TGaspardTrackerData(); - m_EventPhysics = new TGaspardTrackerPhysics(); } diff --git a/NPLib/GASPARD/GaspardTrackerDummyShape.cxx b/NPLib/GASPARD/GaspardTrackerDummyShape.cxx index 7b61d0e5b4e7dba466a2d75bbf01c15e35d19397..0ab7db8587c52d649c12b66064bd73c7d2843255 100644 --- a/NPLib/GASPARD/GaspardTrackerDummyShape.cxx +++ b/NPLib/GASPARD/GaspardTrackerDummyShape.cxx @@ -11,7 +11,7 @@ GaspardTrackerDummyShape::GaspardTrackerDummyShape(map<int, GaspardTrackerModule*> &Module, - TGaspardTrackerPhysicsNew* &EventPhysics) + TGaspardTrackerPhysicsNew* &EventPhysics) : m_ModuleTest(Module), m_EventPhysics(EventPhysics), m_EventData(0), @@ -216,6 +216,7 @@ void GaspardTrackerDummyShape::ReadConfiguration(string Path) } + void GaspardTrackerDummyShape::PreTreat() { } @@ -346,7 +347,6 @@ void GaspardTrackerDummyShape::BuildSimplePhysicalEvent() - void GaspardTrackerDummyShape::AddModule(TVector3 C_X1_Y1, TVector3 C_X128_Y1, TVector3 C_X1_Y128, diff --git a/NPLib/GASPARD/GaspardTrackerDummyShape.h b/NPLib/GASPARD/GaspardTrackerDummyShape.h index 05ad2134554ad7bdfefbddb7bf66e5d30a50c82f..7b96063113fb3362d112dcdc5a99bbdb28997652 100644 --- a/NPLib/GASPARD/GaspardTrackerDummyShape.h +++ b/NPLib/GASPARD/GaspardTrackerDummyShape.h @@ -2,7 +2,6 @@ #define GaspardTrackerDummyShape_h 1 // C++ headers -#include <iostream> #include <string> #include <map> #include <vector> diff --git a/NPLib/GASPARD/GaspardTrackerNew.cxx b/NPLib/GASPARD/GaspardTrackerNew.cxx index fb319dbbb7d64debe9a540e3dd841b49154eb58f..f1a5a0171bda6a0b0784f7d7cd04518831b5265d 100644 --- a/NPLib/GASPARD/GaspardTrackerNew.cxx +++ b/NPLib/GASPARD/GaspardTrackerNew.cxx @@ -104,7 +104,7 @@ void GaspardTrackerNew::ReadConfiguration(string Path) GPDTrkTrapezoid = true; // instantiate a new "detector" corresponding to the Trapezoid elements - GaspardTrackerModule* myDetector = new GaspardTrackerTrapezoid(m_ModulesMap); + GaspardTrackerModule* myDetector = new GaspardTrackerTrapezoid(m_ModulesMap, m_EventPhysics); // Pass the data object to the GaspardTracker*** object myDetector->SetGaspardDataPointer(m_EventData); diff --git a/NPLib/GASPARD/GaspardTrackerTrapezoid.cxx b/NPLib/GASPARD/GaspardTrackerTrapezoid.cxx index 3746ca78738426e96fe3c531e975c9a42c6e126c..df58451729aef65f3c101472247b80d4a7992ef5 100644 --- a/NPLib/GASPARD/GaspardTrackerTrapezoid.cxx +++ b/NPLib/GASPARD/GaspardTrackerTrapezoid.cxx @@ -6,11 +6,17 @@ #include <string> #include <cmath> +// Gaspard +#include "TGaspardTrackerPhysicsNew.h" -GaspardTrackerTrapezoid::GaspardTrackerTrapezoid(map<int, GaspardTrackerModule*> &Module) + +GaspardTrackerTrapezoid::GaspardTrackerTrapezoid(map<int, GaspardTrackerModule*> &Module, + TGaspardTrackerPhysicsNew* &EventPhysics) : m_ModuleTest(Module), - m_EventData(0), - m_NumberOfModule(0) + m_EventPhysics(EventPhysics), + m_EventData(0), + m_PreTreatData(new TGaspardTrackerData), + m_NumberOfModule(0) { } @@ -18,6 +24,7 @@ GaspardTrackerTrapezoid::GaspardTrackerTrapezoid(map<int, GaspardTrackerModule*> GaspardTrackerTrapezoid::~GaspardTrackerTrapezoid() { + delete m_PreTreatData; } @@ -210,8 +217,126 @@ void GaspardTrackerTrapezoid::ReadConfiguration(string Path) +void GaspardTrackerTrapezoid::PreTreat() +{ +} + + + void GaspardTrackerTrapezoid::BuildPhysicalEvent() { + // Check flags + bool Check_FirstStage = false; + bool Check_SecondStage = false; + bool Check_ThirdStage = false; + + // Thresholds +/* + double FirstStage_Front_E_Threshold = 0; double FirstStage_Front_T_Threshold = 0; + double FirstStage_Back_E_Threshold = 0; double FirstStage_Back_T_Threshold = 0; + double SecondStage_E_Threshold = 0; double SecondStage_T_Threshold = 0; + double ThirdStage_E_Threshold = 0; double ThirdStage_T_Threshold = 0; +*/ + // calculate multipicity in the first stage + int multXE = m_EventData->GetGPDTrkFirstStageFrontEMult(); + int multYE = m_EventData->GetGPDTrkFirstStageBackEMult(); + int multXT = m_EventData->GetGPDTrkFirstStageFrontTMult(); + int multYT = m_EventData->GetGPDTrkFirstStageBackTMult(); + // calculate multiplicity of 2nd and third stages + int mult2E = m_EventData->GetGPDTrkSecondStageEMult(); + int mult2T = m_EventData->GetGPDTrkSecondStageTMult(); + int mult3E = m_EventData->GetGPDTrkThirdStageEMult(); + int mult3T = m_EventData->GetGPDTrkThirdStageTMult(); + + // Deal with multiplicity 1 for the first layer + if (multXE==1 && multYE==1 && multXT==1 && multYT==1) { + // calculate detector number + int det_ref = m_EventData->GetGPDTrkFirstStageFrontEDetectorNbr(0); + int detecXE = m_EventData->GetGPDTrkFirstStageFrontEDetectorNbr(0) / det_ref; + int detecXT = m_EventData->GetGPDTrkFirstStageFrontTDetectorNbr(0) / det_ref; + int detecYE = m_EventData->GetGPDTrkFirstStageBackEDetectorNbr(0) / det_ref; + int detecYT = m_EventData->GetGPDTrkFirstStageBackTDetectorNbr(0) / det_ref; + + // module number starting from 0 + det_ref -= m_index["DummyShape"]; + + // case of same detector + if (detecXE*detecXT*detecYE*detecYT == 1) { + // store module number + m_EventPhysics->SetModuleNumber(det_ref + m_index["DummyShape"]); + // calculate strip number + int stripXE = m_EventData->GetGPDTrkFirstStageFrontEStripNbr(0); + int stripXT = m_EventData->GetGPDTrkFirstStageFrontTStripNbr(0); + int stripYE = m_EventData->GetGPDTrkFirstStageBackEStripNbr(0); + int stripYT = m_EventData->GetGPDTrkFirstStageBackTStripNbr(0); + + // case of same strips on X and Y + if (stripXE == stripXT && stripYE == stripYT) { // here we have a good strip event + // various + Check_FirstStage = true; + // store strip ID + m_EventPhysics->SetFirstStageFrontPosition(stripXE); + m_EventPhysics->SetFirstStageBackPosition(stripYE); + // get energy from strips and store it + double EnergyStripFront = m_EventData->GetGPDTrkFirstStageFrontEEnergy(0); + m_EventPhysics->SetFirstStageEnergy(EnergyStripFront); + double EnergyTot = EnergyStripFront; + // get time from strips and store it + double TimeStripBack = m_EventData->GetGPDTrkFirstStageBackEEnergy(0); + m_EventPhysics->SetFirstStageTime(TimeStripBack); + + // check if we have a 2nd stage event + if (mult2E==1 && mult2T==1) { + Check_SecondStage = true; + double EnergySecond = m_EventData->GetGPDTrkSecondStageEEnergy(0); + m_EventPhysics->SetSecondStageEnergy(EnergySecond); + EnergyTot += EnergySecond; + } + else if (mult2E>1 || mult2T>1) { + cout << "Warning: multiplicity in second stage greater than in firststage" << endl; + } + + // check if we have a third stage event + if (mult3E==1 && mult3T==1) { + Check_ThirdStage = true; + double EnergyThird = m_EventData->GetGPDTrkThirdStageEEnergy(0); + m_EventPhysics->SetThirdStageEnergy(EnergyThird); + EnergyTot += EnergyThird; + } + else if (mult3E>1 || mult3T>1) { + cout << "Warning: multiplicity in third stage greater than in firststage" << endl; + } + + // Fill total energy + m_EventPhysics->SetTotalEnergy(EnergyTot); + + // Fill default values for second an third stages + if (!Check_SecondStage) { + m_EventPhysics->SetSecondStageEnergy(-1000); + m_EventPhysics->SetSecondStageTime(-1000); + m_EventPhysics->SetSecondStagePosition(-1000); + } + if (!Check_ThirdStage) { + m_EventPhysics->SetThirdStageEnergy(-1000); + m_EventPhysics->SetThirdStageTime(-1000); + m_EventPhysics->SetThirdStagePosition(-1000); + } + } + else { + cout << "Not same strips" << endl; + } + } + else { + cout << "Not same detector" << endl; + } + } + else { +/* cout << "Multiplicity is not one, it is: " << endl; + cout << "\tmultXE: " << multXE << endl; + cout << "\tmultXT: " << multXT << endl; + cout << "\tmultYE: " << multYE << endl; + cout << "\tmultYT: " << multYT << endl;*/ + } } diff --git a/NPLib/GASPARD/GaspardTrackerTrapezoid.h b/NPLib/GASPARD/GaspardTrackerTrapezoid.h index 57382d447892a35e7ee629556425de01b8343b80..23dabc56b10bc7f6ac04fdfceac4b17cdda3ca85 100644 --- a/NPLib/GASPARD/GaspardTrackerTrapezoid.h +++ b/NPLib/GASPARD/GaspardTrackerTrapezoid.h @@ -6,12 +6,12 @@ #include <map> #include <vector> -// NPTool - ROOT headers -#include "TInteractionCoordinates.h" -#include "TGaspardTrackerData.h" +// ROOT headers #include "TVector3.h" // Gaspard headers +#include "TGaspardTrackerData.h" +#include "TGaspardTrackerPhysicsNew.h" #include "GaspardTrackerModule.h" using namespace std; @@ -24,7 +24,7 @@ public: //////////////////////////////////////////////////// /////// Default Constructor and Destructor ///////// //////////////////////////////////////////////////// - GaspardTrackerTrapezoid(map<int, GaspardTrackerModule*> &Module); + GaspardTrackerTrapezoid(map<int, GaspardTrackerModule*> &Module, TGaspardTrackerPhysicsNew* &EventPhysics); virtual ~GaspardTrackerTrapezoid(); public: @@ -43,14 +43,17 @@ public: private: map<int, GaspardTrackerModule*> &m_ModuleTest; + TGaspardTrackerPhysicsNew* &m_EventPhysics; public: void SetGaspardDataPointer(TGaspardTrackerData* gaspardData) {m_EventData = gaspardData;}; + void PreTreat(); private: // Gaspard data coming from TGaspardTrackerPhysics through the // SetGaspardDataPointer method TGaspardTrackerData* m_EventData; + TGaspardTrackerData* m_PreTreatData; public: //////////////////////////////// @@ -71,9 +74,9 @@ public: double beta_w); // Getters to retrieve the (X,Y,Z) coordinates of a pixel defined by strips (X,Y) - double GetStripPositionX(int N ,int X ,int Y) { return m_StripPositionX[N-1][X-1][Y-1]; } - double GetStripPositionY(int N ,int X ,int Y) { return m_StripPositionY[N-1][X-1][Y-1]; } - double GetStripPositionZ(int N ,int X ,int Y) { return m_StripPositionZ[N-1][X-1][Y-1]; } + double GetStripPositionX(int N ,int X ,int Y) { return m_StripPositionX[N-1-m_index["Trapezoid"]][X-1][Y-1]; } + double GetStripPositionY(int N ,int X ,int Y) { return m_StripPositionY[N-1-m_index["Trapezoid"]][X-1][Y-1]; } + double GetStripPositionZ(int N ,int X ,int Y) { return m_StripPositionZ[N-1-m_index["Trapezoid"]][X-1][Y-1]; } double GetNumberOfModule() { return m_NumberOfModule; } private: diff --git a/NPSimulation/include/GaspardTrackerSquare.hh b/NPSimulation/include/GaspardTrackerSquare.hh index 2e2f64978574fc2cd85647aeaf9fcc8d064bf586..02e97477a6674190ef4cab0beeb1c7cfdd0efb75 100644 --- a/NPSimulation/include/GaspardTrackerSquare.hh +++ b/NPSimulation/include/GaspardTrackerSquare.hh @@ -132,13 +132,6 @@ private: vector<G4double> m_beta_u ; // | vector<G4double> m_beta_v ; // > Tilt angle of the Telescope vector<G4double> m_beta_w ; // | - - // for debugging purpose - G4ThreeVector MMpos; - G4ThreeVector MMu; - G4ThreeVector MMv; - G4ThreeVector MMw; - G4ThreeVector CT; }; @@ -155,38 +148,35 @@ namespace GPDSQUARE const G4double ResoTimePPAC = 0.106382979 ;// = 250ps // Unit is ns/2.35 // Geometry - const G4double FaceFront = 5*cm; // = for 5x5cm det //11.*cm for 10x10 cm det. ; - const G4double FaceBack = 5*cm; //16.5*cm ; -// const G4double Length = 7.2*cm ; - const G4double Length = 2.0*cm ; + const G4double FaceFront = 11*cm; + const G4double FaceBack = 11*cm; + const G4double Length = 1.6*cm; + const G4double InterStageDistance = 7*mm; // First stage -// const G4double AluStripThickness = 0.00000001*micrometer; - const G4double AluStripThickness = 0.4*micrometer ; - const G4double SiliconThickness = 300*micrometer ; - const G4double SiliconFace = 48.25*mm; //98*mm ; -// const G4double VacBoxThickness = 3*cm ; - const G4double VacBoxThickness = 0.5*cm ; - const G4int NumberOfStrips = 128; + const G4double FirstStageFace = 98*mm; + const G4double FirstStageThickness = 300*micrometer; + const G4int NumberOfStrips = 128; + const G4double AluStripThickness = 0.4*micrometer; // Second stage - const G4double SiLiThickness = 5.1*mm ; // Must be checked - const G4double SiLiFaceX = 48.25*mm ; - const G4double SiLiFaceY = 48.25*mm ; // 92*mm ; + const G4double SecondStageFace = FirstStageFace; + const G4double SecondStageThickness = 1.5*mm; // Third stage - const G4double MylarCsIThickness = 3*micrometer; -// const G4double ThirdStageThickness = 1.5*mm; - const G4double ThirdStageThickness = 8.5*mm; - const G4double ThirdStageFaceFront = FaceFront; - const G4double ThirdStageFaceBack = FaceBack; - - // Starting at the front and going to CsI - const G4double AluStripFront_PosZ = Length* -0.5 + 0.5*AluStripThickness ; - const G4double Silicon_PosZ = AluStripFront_PosZ + 0.5*AluStripThickness + 0.5*SiliconThickness ; - const G4double AluStripBack_PosZ = Silicon_PosZ + 0.5*SiliconThickness + 0.5*AluStripThickness ; - const G4double VacBox_PosZ = AluStripBack_PosZ + 0.5*AluStripThickness + 0.5* VacBoxThickness ; - const G4double ThirdStage_PosZ = VacBox_PosZ + 0.5*VacBoxThickness + 0.5*ThirdStageThickness ; + const G4double ThirdStageFace = FirstStageFace; + const G4double ThirdStageThickness = 1.5*mm; + + // Starting at the front of the first stage and pointing to the third stage + const G4double FirstStage_PosZ = Length* -0.5 + 0.5*FirstStageThickness; + const G4double SecondStage_PosZ = Length* -0.5 + 0.5*SecondStageThickness + 1*InterStageDistance; + const G4double ThirdStage_PosZ = Length* -0.5 + 0.5*ThirdStageThickness + 2*InterStageDistance; + +// const G4double AluStripFront_PosZ = Length* -0.5 + 0.5*AluStripThickness ; +// const G4double Silicon_PosZ = AluStripFront_PosZ + 0.5*AluStripThickness + 0.5*SiliconThickness ; +// const G4double AluStripBack_PosZ = Silicon_PosZ + 0.5*SiliconThickness + 0.5*AluStripThickness ; +// const G4double VacBox_PosZ = AluStripBack_PosZ + 0.5*AluStripThickness + 0.5* VacBoxThickness ; +// const G4double ThirdStage_PosZ = VacBox_PosZ + 0.5*VacBoxThickness + 0.5*ThirdStageThickness ; } #endif diff --git a/NPSimulation/include/GaspardTrackerTrapezoid.hh b/NPSimulation/include/GaspardTrackerTrapezoid.hh index ac0c728ca17de05491e96f08e4921253f7afe114..95829084e9d80fd59c9de42352b3afa4ca32a0b4 100644 --- a/NPSimulation/include/GaspardTrackerTrapezoid.hh +++ b/NPSimulation/include/GaspardTrackerTrapezoid.hh @@ -156,51 +156,46 @@ namespace GPDTRAP // Geometry // gaspard Trapezoid -/* const G4double Height = 90*mm; - const G4double BaseLarge = 85*mm; - const G4double BaseSmall = 35*mm; - const G4double Length = 20*mm;*/ +// const G4double Height = 90*mm; +// const G4double BaseLarge = 85*mm; +// const G4double BaseSmall = 35*mm; +// const G4double Length = 20*mm; // gaspHyde const G4double Height = 115*mm; const G4double BaseLarge = 98*mm; const G4double BaseSmall = 30*mm; const G4double Length = 20*mm; + const G4double InterStageDistance = 7*mm; // First stage -// const G4double AluStripThickness = 0.00000001*micrometer; - const G4double AluStripThickness = 0.4*micrometer; const G4double FirstStageThickness = 300*micrometer; + const G4int NumberOfStripsX = 128; + const G4int NumberOfStripsY = 128; // gaspard Trapezoid -/* const G4double FirstStageHeight = 81*mm; - const G4double FirstStageBaseLarge = 78*mm; - const G4double FirstStageBaseSmall = 29*mm;*/ +// const G4double FirstStageHeight = 81*mm; +// const G4double FirstStageBaseLarge = 78*mm; +// const G4double FirstStageBaseSmall = 29*mm; // gaspHyde const G4double FirstStageHeight = 113.5*mm; const G4double FirstStageBaseLarge = 97.5*mm; const G4double FirstStageBaseSmall = 28.5*mm; -// const G4double VacBoxThickness = 3*cm ; - const G4double VacBoxThickness = 0.5*cm; - const G4int NumberOfStripsX = 128; - const G4int NumberOfStripsY = 128; // Second stage - const G4double SiLiThickness = 5.1*mm ; // Must be checked - const G4double SiLiFaceX = 48.25*mm ; - const G4double SiLiFaceY = 92*mm ; + const G4double SecondStageHeight = FirstStageHeight; + const G4double SecondStageBaseLarge = FirstStageBaseLarge; + const G4double SecondStageBaseSmall = FirstStageBaseSmall; + const G4double SecondStageThickness = 1.5*mm; // Third stage - const G4double MylarCsIThickness = 3*micrometer; -// const G4double ThirdStageThickness = 1.5*mm; - const G4double ThirdStageThickness = 8.5*mm; -// const G4double ThirdStageFaceFront = FaceFront; -// const G4double ThirdStageFaceBack = FaceBack; - - // Starting at the front and going to CsI - const G4double AluStripFront_PosZ = Length* -0.5 + 0.5*AluStripThickness ; - const G4double Silicon_PosZ = AluStripFront_PosZ + 0.5*AluStripThickness + 0.5*FirstStageThickness ; - const G4double AluStripBack_PosZ = Silicon_PosZ + 0.5*FirstStageThickness + 0.5*AluStripThickness ; - const G4double VacBox_PosZ = AluStripBack_PosZ + 0.5*AluStripThickness + 0.5* VacBoxThickness ; - const G4double ThirdStage_PosZ = VacBox_PosZ + 0.5*VacBoxThickness + 0.5*ThirdStageThickness ; + const G4double ThirdStageHeight = FirstStageHeight; + const G4double ThirdStageBaseLarge = FirstStageBaseLarge; + const G4double ThirdStageBaseSmall = FirstStageBaseSmall; + const G4double ThirdStageThickness = 1.5*mm; + + // Starting at the front of the first stage and pointing to the third stage + const G4double FirstStage_PosZ = Length* -0.5 + 0.5*FirstStageThickness; + const G4double SecondStage_PosZ = Length* -0.5 + 0.5*SecondStageThickness + 1*InterStageDistance; + const G4double ThirdStage_PosZ = Length* -0.5 + 0.5*ThirdStageThickness + 2*InterStageDistance; } #endif diff --git a/NPSimulation/src/GaspardScorers.cc b/NPSimulation/src/GaspardScorers.cc index c920187fc729ed71855bf509f65aa2e98f352ee0..7cde5739ef4ac33fd2ce3951b326a9822c9af6eb 100644 --- a/NPSimulation/src/GaspardScorers.cc +++ b/NPSimulation/src/GaspardScorers.cc @@ -391,9 +391,9 @@ G4bool GPDScorerFirstStageFrontStripSquare::ProcessHits(G4Step* aStep, G4Touchab G4ThreeVector POS = aStep->GetPreStepPoint()->GetPosition(); POS = aStep->GetPreStepPoint()->GetTouchableHandle()->GetHistory()->GetTopTransform().TransformPoint(POS); - G4double StripPitch = GPDSQUARE::SiliconFace / m_NumberOfStrip; + G4double StripPitch = GPDSQUARE::FirstStageFace / m_NumberOfStrip; - G4double temp = (POS(0) + GPDSQUARE::SiliconFace / 2.) / StripPitch ; + G4double temp = (POS(0) + GPDSQUARE::FirstStageFace / 2.) / StripPitch ; G4double X = int(temp) + 1 ; //Rare case where particle is close to edge of silicon plan if (X == 129) X = 128; @@ -455,9 +455,9 @@ G4bool GPDScorerFirstStageBackStripSquare::ProcessHits(G4Step* aStep, G4Touchabl G4ThreeVector POS = aStep->GetPreStepPoint()->GetPosition(); POS = aStep->GetPreStepPoint()->GetTouchableHandle()->GetHistory()->GetTopTransform().TransformPoint(POS); - G4double StripPitch = GPDSQUARE::SiliconFace / m_NumberOfStrip; + G4double StripPitch = GPDSQUARE::FirstStageFace / m_NumberOfStrip; - G4double temp = (POS(1) + GPDSQUARE::SiliconFace / 2.) / StripPitch ; + G4double temp = (POS(1) + GPDSQUARE::FirstStageFace / 2.) / StripPitch ; G4int temp2 = temp ; G4double Y = temp2 + 1 ; //Rare case where particle is close to edge of silicon plan diff --git a/NPSimulation/src/GaspardTrackerDummyShape.cc b/NPSimulation/src/GaspardTrackerDummyShape.cc index 1867e685e4793e3754e509def0597614f2514212..072dc73ab72d186b87c6d375df46d0ab9eb0af34 100644 --- a/NPSimulation/src/GaspardTrackerDummyShape.cc +++ b/NPSimulation/src/GaspardTrackerDummyShape.cc @@ -243,7 +243,6 @@ void GaspardTrackerDummyShape::VolumeMaker(G4int TelescopeNumber, PVPBuffer = new G4PVPlacement(0, positionFirstStage, logicFirstStage, -// "G" + DetectorNumber + "FirstStage", Name + "_FirstStage", logicGPDDummyShape, false, @@ -270,7 +269,6 @@ void GaspardTrackerDummyShape::VolumeMaker(G4int TelescopeNumber, PVPBuffer = new G4PVPlacement(0, positionSecondStage, logicSecondStage, -// "G" + DetectorNumber + "SecondStage", Name + "_SecondStage", logicGPDDummyShape, false, @@ -297,7 +295,6 @@ void GaspardTrackerDummyShape::VolumeMaker(G4int TelescopeNumber, PVPBuffer = new G4PVPlacement(0, positionThirdStage, logicThirdStage, -// "G" + DetectorNumber + "ThirdStage", Name + "_ThirdStage", logicGPDDummyShape, false, diff --git a/NPSimulation/src/GaspardTrackerSquare.cc b/NPSimulation/src/GaspardTrackerSquare.cc index 71e021a8e7654bc974534bc8036ef05129d243cb..1666396be4dcabf08657ad73bd25a69222c704e0 100644 --- a/NPSimulation/src/GaspardTrackerSquare.cc +++ b/NPSimulation/src/GaspardTrackerSquare.cc @@ -82,12 +82,12 @@ GaspardTrackerSquare::~GaspardTrackerSquare() //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... void GaspardTrackerSquare::AddModule(G4ThreeVector X1_Y1 , - G4ThreeVector X128_Y1 , - G4ThreeVector X1_Y128 , - G4ThreeVector X128_Y128 , - bool wFirstStage , - bool wSecondStage , - bool wThirdStage) + G4ThreeVector X128_Y1 , + G4ThreeVector X1_Y128 , + G4ThreeVector X128_Y128 , + bool wFirstStage , + bool wSecondStage , + bool wThirdStage) { m_DefinitionType.push_back(true) ; @@ -111,14 +111,14 @@ void GaspardTrackerSquare::AddModule(G4ThreeVector X1_Y1 , //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... void GaspardTrackerSquare::AddModule(G4double R , - G4double Theta , - G4double Phi , - G4double beta_u , - G4double beta_v , - G4double beta_w , - bool wFirstStage , - bool wSecondStage , - bool wThirdStage) + G4double Theta , + G4double Phi , + G4double beta_u , + G4double beta_v , + G4double beta_w , + bool wFirstStage , + bool wSecondStage , + bool wThirdStage) { G4ThreeVector empty = G4ThreeVector(0, 0, 0); @@ -188,7 +188,7 @@ void GaspardTrackerSquare::VolumeMaker(G4int TelescopeNumber, // Al density = 2.702 * g / cm3; a = 26.98 * g / mole; - G4Material* Aluminium = new G4Material("Aluminium", z = 13., a, density); +// G4Material* Aluminium = new G4Material("Aluminium", z = 13., a, density); // Iron // density = 7.874 * g / cm3; @@ -228,37 +228,15 @@ void GaspardTrackerSquare::VolumeMaker(G4int TelescopeNumber, // Little trick to avoid warning in compilation: Use a PVPlacement "buffer". // If don't you will have a Warning unused variable 'myPVP' G4PVPlacement* PVPBuffer ; + G4String Name = "GPDSquare" + DetectorNumber; - G4Trd* solidMM = new G4Trd("GPDSquare" + DetectorNumber, 0.5*FaceFront, 0.5*FaceFront, 0.5*FaceFront, 0.5*FaceFront, 0.5*Length); -// G4LogicalVolume* logicMM = new G4LogicalVolume(solidMM, Iron, "GPDSquare" + DetectorNumber, 0, 0, 0) ; - G4LogicalVolume* logicMM = new G4LogicalVolume(solidMM, Vacuum, "GPDSquare" + DetectorNumber, 0, 0, 0) ; + G4Box* solidGPDSquare = new G4Box(Name, 0.5*FaceFront, 0.5*FaceFront, 0.5*Length); + G4LogicalVolume* logicGPDSquare = new G4LogicalVolume(solidGPDSquare, Vacuum, Name, 0, 0, 0); - G4String Name = "GPDSquare" + DetectorNumber ; - PVPBuffer = new G4PVPlacement(G4Transform3D(*MMrot, MMpos) , - logicMM , - Name , - world , - false , - 0); + PVPBuffer = new G4PVPlacement(G4Transform3D(*MMrot, MMpos), logicGPDSquare, Name, world, false, 0); - logicMM->SetVisAttributes(G4VisAttributes::Invisible); - if (m_non_sensitive_part_visiualisation) logicMM->SetVisAttributes(G4VisAttributes(G4Colour(0.90, 0.90, 0.90))); - - G4ThreeVector positionVacBox = G4ThreeVector(0, 0, VacBox_PosZ); - - G4Trd* solidVacBox = new G4Trd("solidVacBox", 0.5*SiliconFace, 0.5*SiliconFace, 0.5*SiliconFace, 0.5*SiliconFace, 0.5*VacBoxThickness); - G4LogicalVolume* logicVacBox = new G4LogicalVolume(solidVacBox, Vacuum, "logicVacBox", 0, 0, 0); - - PVPBuffer = new G4PVPlacement(0, positionVacBox, logicVacBox, "G" + DetectorNumber + "VacBox", logicMM, false, 0); - - logicVacBox->SetVisAttributes(G4VisAttributes::Invisible); - - // Add a degrader plate between Si and CsI: - /* - G4Box* Degrader = new G4Box("Degrader" , 50*mm , 50*mm , 0.1*mm ); - G4LogicalVolume* logicDegrader = new G4LogicalVolume( Degrader , Harvar, "logicDegrader",0,0,0); - PVPBuffer = new G4PVPlacement(0,G4ThreeVector(0,0,0),logicDegrader,"Degrader",logicVacBox,false,0) ; - */ + logicGPDSquare->SetVisAttributes(G4VisAttributes::Invisible); + if (m_non_sensitive_part_visiualisation) logicGPDSquare->SetVisAttributes(G4VisAttributes(G4Colour(0.90, 0.90, 0.90))); //Place two marker to identify the u and v axis on silicon face: //marker are placed a bit before the silicon itself so they don't perturbate simulation @@ -284,166 +262,55 @@ void GaspardTrackerSquare::VolumeMaker(G4int TelescopeNumber, */ //////////////////////////////////////////////////////////////// - /////////////////Si Strip Construction////////////////////////// + //////////////// First Stage Construction ////////////////////// //////////////////////////////////////////////////////////////// if (wFirstStage) { - // Aluminium dead layers - G4ThreeVector positionAluStripFront = G4ThreeVector(0, 0, AluStripFront_PosZ); - G4ThreeVector positionAluStripBack = G4ThreeVector(0, 0, AluStripBack_PosZ); - - G4Box* solidAluStrip = new G4Box("AluBox", 0.5*SiliconFace, 0.5*SiliconFace, 0.5*AluStripThickness); -// G4LogicalVolume* logicAluStrip = new G4LogicalVolume(solidAluStrip, Aluminium, "logicAluStrip", 0, 0, 0); - G4LogicalVolume* logicAluStrip = new G4LogicalVolume(solidAluStrip, Vacuum, "logicAluStrip", 0, 0, 0); - - PVPBuffer = new G4PVPlacement(0, positionAluStripFront, logicAluStrip, "G" + DetectorNumber + "AluStripFront", logicMM, false, 0); - PVPBuffer = new G4PVPlacement(0, positionAluStripBack, logicAluStrip, "G" + DetectorNumber + "AluStripBack", logicMM, false, 0); - - logicAluStrip->SetVisAttributes(G4VisAttributes::Invisible); - // Silicon detector itself - G4ThreeVector positionSilicon = G4ThreeVector(0, 0, Silicon_PosZ); - - G4Box* solidSilicon = new G4Box("solidSilicon", 0.5*SiliconFace, 0.5*SiliconFace, 0.5*SiliconThickness); - G4LogicalVolume* logicSilicon = new G4LogicalVolume(solidSilicon, Silicon, "logicSilicon", 0, 0, 0); + G4ThreeVector positionFirstStage = G4ThreeVector(0, 0, FirstStage_PosZ); - PVPBuffer = new G4PVPlacement(0, positionSilicon, logicSilicon, Name + "_Silicon", logicMM, false, 0); + G4Box* solidFirstStage = new G4Box("solidFirstStage", 0.5*FirstStageFace, 0.5*FirstStageFace, 0.5*FirstStageThickness); + G4LogicalVolume* logicFirstStage = new G4LogicalVolume(solidFirstStage, Silicon, "logicFirstStage", 0, 0, 0); + PVPBuffer = new G4PVPlacement(0, + positionFirstStage, + logicFirstStage, + Name + "_FirstStage", + logicGPDSquare, + false, + 0); // Set First Stage sensible - logicSilicon->SetSensitiveDetector(m_FirstStageScorer); + logicFirstStage->SetSensitiveDetector(m_FirstStageScorer); - ///Visualisation of Silicon Strip - G4VisAttributes* SiliconVisAtt = new G4VisAttributes(G4Colour(0.5, 0.5, 0.5)) ; - logicSilicon->SetVisAttributes(SiliconVisAtt) ; + ///Visualisation of FirstStage Strip + G4VisAttributes* FirstStageVisAtt = new G4VisAttributes(G4Colour(0.2, 0.2, 0.2)); + logicFirstStage->SetVisAttributes(FirstStageVisAtt); } //////////////////////////////////////////////////////////////// - //////////////////// SiLi Construction //////////////////////// + //////////////////// Second Stage Construction //////////////// //////////////////////////////////////////////////////////////// if (wSecondStage) { - G4double SiLiSpace = 8 * mm; - - G4RotationMatrix* rotSiLi = Rotation(0., 0., 0.); - - G4ThreeVector positionSiLi = G4ThreeVector(-0.25 * SiliconFace - 0.5 * SiLiSpace, 0, 0); - G4ThreeVector positionSiLi2 = G4ThreeVector(0.25 * SiliconFace + 0.5 * SiLiSpace, 0, 0); - - G4Box* solidSiLi = new G4Box("SiLi", 0.5*SiLiFaceX, 0.5*SiLiFaceY, 0.5*SiLiThickness); - - G4LogicalVolume* logicSiLi = new G4LogicalVolume(solidSiLi, Aluminium, "SiLi" + DetectorNumber, 0, 0, 0); - - // First Si(Li) 2 time 4 detectore - PVPBuffer = new G4PVPlacement(G4Transform3D(*rotSiLi, positionSiLi) , - logicSiLi , - "SiLi" + DetectorNumber , - logicVacBox , - false , - 0); - - // Second Si(Li) 2 time 4 detectore - PVPBuffer = new G4PVPlacement(G4Transform3D(*rotSiLi, positionSiLi2) , - logicSiLi , - "SiLi" + DetectorNumber , - logicVacBox , - false , - 1); - - // SiLi are placed inside of the VacBox... - // Left/Right define when looking to detector from Si to CsI - G4double SiLi_HighY_Upper = 19.86 * mm; - G4double SiLi_HighY_Center = 25.39 * mm ; - G4double SiLi_WidthX_Left = 22.85 * mm; - G4double SiLi_WidthX_Right = 24.9 * mm ; - G4double SiLi_ShiftX = 0.775 * mm ; - - // SiLi : left side of SiLi detector - G4Box* solidSiLi_LT = new G4Box("SiLi_LT" , 0.5*SiLi_WidthX_Left , 0.5*SiLi_HighY_Upper , 0.5*SiLiThickness); - G4Box* solidSiLi_RT = new G4Box("SiLi_RT" , 0.5*SiLi_WidthX_Right , 0.5*SiLi_HighY_Upper , 0.5*SiLiThickness); - G4Box* solidSiLi_LC1 = new G4Box("SiLi_LC1" , 0.5*SiLi_WidthX_Left , 0.5*SiLi_HighY_Center , 0.5*SiLiThickness); - G4Box* solidSiLi_RC1 = new G4Box("SiLi_RC1" , 0.5*SiLi_WidthX_Right , 0.5*SiLi_HighY_Center , 0.5*SiLiThickness); - G4Box* solidSiLi_LB = new G4Box("SiLi_LB" , 0.5*SiLi_WidthX_Left , 0.5*SiLi_HighY_Upper , 0.5*SiLiThickness); - G4Box* solidSiLi_RB = new G4Box("SiLi_RB" , 0.5*SiLi_WidthX_Right , 0.5*SiLi_HighY_Upper , 0.5*SiLiThickness); - G4Box* solidSiLi_LC2 = new G4Box("SiLi_LC2" , 0.5*SiLi_WidthX_Left , 0.5*SiLi_HighY_Center , 0.5*SiLiThickness); - G4Box* solidSiLi_RC2 = new G4Box("SiLi_RC2" , 0.5*SiLi_WidthX_Right , 0.5*SiLi_HighY_Center , 0.5*SiLiThickness); - - G4LogicalVolume* logicSiLi_LT = new G4LogicalVolume(solidSiLi_LT , Silicon , "SiLi_LT" , 0 , 0 , 0); - G4LogicalVolume* logicSiLi_RT = new G4LogicalVolume(solidSiLi_RT , Silicon , "SiLi_RT" , 0 , 0 , 0); - G4LogicalVolume* logicSiLi_LC1 = new G4LogicalVolume(solidSiLi_LC1 , Silicon , "SiLi_LC1" , 0 , 0 , 0); - G4LogicalVolume* logicSiLi_RC1 = new G4LogicalVolume(solidSiLi_RC1 , Silicon , "SiLi_RC1" , 0 , 0 , 0); - G4LogicalVolume* logicSiLi_LB = new G4LogicalVolume(solidSiLi_LB , Silicon , "SiLi_LB" , 0 , 0 , 0); - G4LogicalVolume* logicSiLi_RB = new G4LogicalVolume(solidSiLi_RB , Silicon , "SiLi_RB" , 0 , 0 , 0); - G4LogicalVolume* logicSiLi_LC2 = new G4LogicalVolume(solidSiLi_LC2 , Silicon , "SiLi_LC2" , 0 , 0 , 0); - G4LogicalVolume* logicSiLi_RC2 = new G4LogicalVolume(solidSiLi_RC2 , Silicon , "SiLi_RC2" , 0 , 0 , 0); - - G4double interSiLi = 0.5 * mm; - - // Top - G4ThreeVector positionSiLi_LT = G4ThreeVector(-0.5 * SiLi_WidthX_Left - interSiLi - SiLi_ShiftX , - 0.5 * SiLi_HighY_Upper + SiLi_HighY_Center + 1.5 * interSiLi , - 0); - - G4ThreeVector positionSiLi_RT = G4ThreeVector(0.5 * SiLi_WidthX_Right - SiLi_ShiftX , - 0.5 * SiLi_HighY_Upper + SiLi_HighY_Center + 1.5 * interSiLi , - 0); - - G4ThreeVector positionSiLi_LC1 = G4ThreeVector(-0.5 * SiLi_WidthX_Left - interSiLi - SiLi_ShiftX , - 0.5 * SiLi_HighY_Center + 0.5 * interSiLi , - 0); - - G4ThreeVector positionSiLi_RC1 = G4ThreeVector(0.5 * SiLi_WidthX_Right - SiLi_ShiftX , - 0.5 * SiLi_HighY_Center + 0.5 * interSiLi , - 0); - - // Bottom - G4ThreeVector positionSiLi_LB = G4ThreeVector(-0.5 * SiLi_WidthX_Left - interSiLi - SiLi_ShiftX , - -0.5 * SiLi_HighY_Upper - SiLi_HighY_Center - 1.5 * interSiLi , - 0); - - G4ThreeVector positionSiLi_RB = G4ThreeVector(0.5 * SiLi_WidthX_Right - SiLi_ShiftX , - -0.5 * SiLi_HighY_Upper - SiLi_HighY_Center - 1.5 * interSiLi , - 0); - - G4ThreeVector positionSiLi_LC2 = G4ThreeVector(-0.5 * SiLi_WidthX_Left - interSiLi - SiLi_ShiftX , - -0.5 * SiLi_HighY_Center - 0.5 * interSiLi , - 0); - - G4ThreeVector positionSiLi_RC2 = G4ThreeVector(0.5 * SiLi_WidthX_Right - SiLi_ShiftX , - -0.5 * SiLi_HighY_Center - 0.5 * interSiLi , - 0); - - PVPBuffer = new G4PVPlacement(0 , positionSiLi_LT , logicSiLi_LT , Name + "_SiLi_LT" , logicSiLi , false , 0) ; - PVPBuffer = new G4PVPlacement(0 , positionSiLi_RT , logicSiLi_RT , Name + "_SiLi_RT" , logicSiLi , false , 0) ; - PVPBuffer = new G4PVPlacement(0 , positionSiLi_LC1 , logicSiLi_LC1 , Name + "_SiLi_LC1" , logicSiLi , false , 0) ; - PVPBuffer = new G4PVPlacement(0 , positionSiLi_RC1 , logicSiLi_RC1 , Name + "_SiLi_RC1" , logicSiLi , false , 0) ; - - PVPBuffer = new G4PVPlacement(0 , positionSiLi_LB , logicSiLi_LB , Name + "_SiLi_LB" , logicSiLi , false , 0) ; - PVPBuffer = new G4PVPlacement(0 , positionSiLi_RB , logicSiLi_RB , Name + "_SiLi_RB" , logicSiLi , false , 0) ; - PVPBuffer = new G4PVPlacement(0 , positionSiLi_LC2 , logicSiLi_LC2 , Name + "_SiLi_LC2" , logicSiLi , false , 0) ; - PVPBuffer = new G4PVPlacement(0 , positionSiLi_RC2 , logicSiLi_RC2 , Name + "_SiLi_RC2" , logicSiLi , false , 0) ; - - logicSiLi->SetVisAttributes(G4VisAttributes(G4Colour(1, 1., 1.))); + // Second stage silicon detector + G4ThreeVector positionSecondStage = G4ThreeVector(0, 0, SecondStage_PosZ); + + G4Box* solidSecondStage = new G4Box("solidSecondStage", 0.5*SecondStageFace, 0.5*SecondStageFace, 0.5*SecondStageThickness); + G4LogicalVolume* logicSecondStage = new G4LogicalVolume(solidSecondStage, Silicon, "logicSecondStage", 0, 0, 0); + + PVPBuffer = new G4PVPlacement(0, + positionSecondStage, + logicSecondStage, + Name + "_SecondStage", + logicGPDSquare, + false, + 0); // Set Second Stage sensible - logicSiLi_LT->SetSensitiveDetector(m_SecondStageScorer); - logicSiLi_RT->SetSensitiveDetector(m_SecondStageScorer); - logicSiLi_LC1->SetSensitiveDetector(m_SecondStageScorer); - logicSiLi_RC1->SetSensitiveDetector(m_SecondStageScorer); - - logicSiLi_LB->SetSensitiveDetector(m_SecondStageScorer); - logicSiLi_RB->SetSensitiveDetector(m_SecondStageScorer); - logicSiLi_LC2->SetSensitiveDetector(m_SecondStageScorer); - logicSiLi_RC2->SetSensitiveDetector(m_SecondStageScorer); - - // Mark blue a SiLi to see telescope orientation - logicSiLi_LT->SetVisAttributes(G4VisAttributes(G4Colour(0, 0., 1.))); - logicSiLi_RT->SetVisAttributes(G4VisAttributes(G4Colour(0, 1., 0))); - logicSiLi_LC1->SetVisAttributes(G4VisAttributes(G4Colour(0, 1., 0))); - logicSiLi_RC1->SetVisAttributes(G4VisAttributes(G4Colour(0, 1., 0))); - - logicSiLi_LB->SetVisAttributes(G4VisAttributes(G4Colour(0, 1., 0))); - logicSiLi_RB->SetVisAttributes(G4VisAttributes(G4Colour(0, 1., 0))); - logicSiLi_LC2->SetVisAttributes(G4VisAttributes(G4Colour(0, 1., 0))); - logicSiLi_RC2->SetVisAttributes(G4VisAttributes(G4Colour(0, 1., 0))); + logicSecondStage->SetSensitiveDetector(m_SecondStageScorer); + + ///Visualisation of SecondStage Strip + G4VisAttributes* SecondStageVisAtt = new G4VisAttributes(G4Colour(0.5, 0.5, 0.5)) ; + logicSecondStage->SetVisAttributes(SecondStageVisAtt) ; } //////////////////////////////////////////////////////////////// @@ -453,19 +320,23 @@ void GaspardTrackerSquare::VolumeMaker(G4int TelescopeNumber, // Third stage silicon detector G4ThreeVector positionThirdStage = G4ThreeVector(0, 0, ThirdStage_PosZ); -// G4Box* solidThirdStage = new G4Box("solidThirdStage", 0.5*SiliconFace, 0.5*SiliconFace, 0.5*ThirdStageThickness); - G4Box* solidThirdStage = new G4Box("solidThirdStage", 0.5*FaceFront, 0.5*FaceFront, 0.5*ThirdStageThickness); + G4Box* solidThirdStage = new G4Box("solidThirdStage", 0.5*ThirdStageFace, 0.5*ThirdStageFace, 0.5*ThirdStageThickness); G4LogicalVolume* logicThirdStage = new G4LogicalVolume(solidThirdStage, Silicon, "logicThirdStage", 0, 0, 0); - PVPBuffer = new G4PVPlacement(0, positionThirdStage, logicThirdStage, Name + "_ThirdStage", logicMM, false, 0); - - ///Visualisation of Third Stage - G4VisAttributes* ThirdStageVisAtt = new G4VisAttributes(G4Colour(0.7, 0.7, 0.7)) ; - logicThirdStage->SetVisAttributes(ThirdStageVisAtt) ; -// logicThirdStage->SetVisAttributes(G4VisAttributes::Invisible); + PVPBuffer = new G4PVPlacement(0, + positionThirdStage, + logicThirdStage, + Name + "_ThirdStage", + logicGPDSquare, + false, + 0); // Set Third Stage sensible logicThirdStage->SetSensitiveDetector(m_ThirdStageScorer); + + ///Visualisation of Third Stage + G4VisAttributes* ThirdStageVisAtt = new G4VisAttributes(G4Colour(0.7, 0.7, 0.7)); + logicThirdStage->SetVisAttributes(ThirdStageVisAtt); } } @@ -711,14 +582,10 @@ void GaspardTrackerSquare::ReadConfiguration(string Path) void GaspardTrackerSquare::ConstructDetector(G4LogicalVolume* world) { G4RotationMatrix* MMrot = NULL ; -/* G4ThreeVector MMpos = G4ThreeVector(0, 0, 0) ; + G4ThreeVector MMpos = G4ThreeVector(0, 0, 0) ; G4ThreeVector MMu = G4ThreeVector(0, 0, 0) ; G4ThreeVector MMv = G4ThreeVector(0, 0, 0) ; - G4ThreeVector MMw = G4ThreeVector(0, 0, 0) ;*/ - MMpos = G4ThreeVector(0, 0, 0) ; - MMu = G4ThreeVector(0, 0, 0) ; - MMv = G4ThreeVector(0, 0, 0) ; - MMw = G4ThreeVector(0, 0, 0) ; + G4ThreeVector MMw = G4ThreeVector(0, 0, 0) ; G4ThreeVector MMCenter = G4ThreeVector(0, 0, 0) ; bool FirstStage = true ; bool SecondStage = true ; @@ -732,19 +599,13 @@ void GaspardTrackerSquare::ConstructDetector(G4LogicalVolume* world) // (u,v,w) unitary vector associated to telescope referencial // (u,v) // to silicon plan // w perpendicular to (u,v) plan and pointing ThirdStage - G4cout << "############ Gaspard " << i << " #############" << G4endl; MMu = m_X128_Y1[i] - m_X1_Y1[i] ; - G4cout << "MMu: X = " << MMu(0) << " , Y = " << MMu(1) << " , Z = " << MMu(2) << G4endl; MMu = MMu.unit() ; - G4cout << "Norm MMu: X = " << MMu(0) << " , Y = " << MMu(1) << " , Z = " << MMu(2) << G4endl; MMv = m_X1_Y128[i] - m_X1_Y1[i] ; - G4cout << "MMv X = " << MMv(0) << " , Y = " << MMv(1) << " , Z = " << MMv(2) << G4endl; MMv = MMv.unit() ; - G4cout << "Norm MMv X = " << MMv(0) << " , Y = " << MMv(1) << " , Z = " << MMv(2) << G4endl; G4ThreeVector MMscal = MMu.dot(MMv); - G4cout << "Norm MMu.MMv X = " << MMv(0) << " , Y = " << MMv(1) << " , Z = " << MMv(2) << G4endl; MMw = MMu.cross(MMv) ; // if (MMw.z() > 0) MMw = MMv.cross(MMu) ; @@ -775,7 +636,7 @@ void GaspardTrackerSquare::ConstructDetector(G4LogicalVolume* world) MMw = G4ThreeVector(wX, wY, wZ) ; // vector corresponding to the center of the module - CT = MMw; + G4ThreeVector CT = MMw; // vector parallel to one axis of silicon plane G4double ii = cos(Theta / rad) * cos(Phi / rad); diff --git a/NPSimulation/src/GaspardTrackerTrapezoid.cc b/NPSimulation/src/GaspardTrackerTrapezoid.cc index 1a501934aee355b17b4a2ea32127491e28cef858..72f269badfaaff77ec22c17a0526f3da1d894456 100644 --- a/NPSimulation/src/GaspardTrackerTrapezoid.cc +++ b/NPSimulation/src/GaspardTrackerTrapezoid.cc @@ -224,47 +224,19 @@ void GaspardTrackerTrapezoid::VolumeMaker(G4int TelescopeNumber , // Little trick to avoid warning in compilation: Use a PVPlacement "buffer". // If don't you will have a Warning unused variable 'myPVP' G4PVPlacement* PVPBuffer ; - - // Definition of the volume containing the sensitive detector - G4Trap* solidMM = new G4Trap("GPDTrapezoid" + DetectorNumber, - Length/2, 0*deg, 0*deg, - Height/2, BaseSmall/2, BaseLarge/2, 0*deg, - Height/2, BaseSmall/2, BaseLarge/2, 0*deg); - -// G4LogicalVolume* logicMM = new G4LogicalVolume(solidMM, Iron, "GPDTrapezoid" + DetectorNumber, 0, 0, 0) ; - G4LogicalVolume* logicMM = new G4LogicalVolume(solidMM, Vacuum, "GPDTrapezoid" + DetectorNumber, 0, 0, 0) ; - G4String Name = "GPDTrapezoid" + DetectorNumber ; - PVPBuffer = new G4PVPlacement(G4Transform3D(*MMrot, MMpos) , - logicMM , - Name , - world , - false , - 0); - - logicMM->SetVisAttributes(G4VisAttributes::Invisible); - if (m_non_sensitive_part_visiualisation) logicMM->SetVisAttributes(G4VisAttributes(G4Colour(0.90, 0.90, 0.90))); - // Definition of a vaccuum volume - G4ThreeVector positionVacBox = G4ThreeVector(0, 0, VacBox_PosZ); - - G4Trap* solidVacBox = new G4Trap("solidVacBox", - VacBoxThickness/2, 0*deg, 0*deg, - FirstStageHeight/2, FirstStageBaseSmall/2, FirstStageBaseLarge/2, 0*deg, - FirstStageHeight/2, FirstStageBaseSmall/2, FirstStageBaseLarge/2, 0*deg); - - G4LogicalVolume* logicVacBox = new G4LogicalVolume(solidVacBox, Vacuum, "logicVacBox", 0, 0, 0); - - PVPBuffer = new G4PVPlacement(0, positionVacBox, logicVacBox, "G" + DetectorNumber + "VacBox", logicMM, false, 0); + // Definition of the volume containing the sensitive detector + G4Trap* solidGPDTrapezoid = new G4Trap(Name, + Length/2, 0*deg, 0*deg, + Height/2, BaseSmall/2, BaseLarge/2, 0*deg, + Height/2, BaseSmall/2, BaseLarge/2, 0*deg); + G4LogicalVolume* logicGPDTrapezoid = new G4LogicalVolume(solidGPDTrapezoid, Vacuum, Name, 0, 0, 0); - logicVacBox->SetVisAttributes(G4VisAttributes::Invisible); + PVPBuffer = new G4PVPlacement(G4Transform3D(*MMrot, MMpos), logicGPDTrapezoid, Name, world, false, 0); - // Add a degrader plate between Si and CsI: - /* - G4Box* Degrader = new G4Box("Degrader" , 50*mm , 50*mm , 0.1*mm ); - G4LogicalVolume* logicDegrader = new G4LogicalVolume( Degrader , Harvar, "logicDegrader",0,0,0); - PVPBuffer = new G4PVPlacement(0,G4ThreeVector(0,0,0),logicDegrader,"Degrader",logicVacBox,false,0) ; - */ + logicGPDTrapezoid->SetVisAttributes(G4VisAttributes::Invisible); + if (m_non_sensitive_part_visiualisation) logicGPDTrapezoid->SetVisAttributes(G4VisAttributes(G4Colour(0.90, 0.90, 0.90))); //Place two marker to identify the u and v axis on silicon face: //marker are placed a bit before the silicon itself so they don't perturbate simulation @@ -293,46 +265,58 @@ void GaspardTrackerTrapezoid::VolumeMaker(G4int TelescopeNumber , /////////////////// First Stage Construction//////////////////// //////////////////////////////////////////////////////////////// if (wFirstStage) { - // Aluminium dead layers - G4ThreeVector positionAluStripFront = G4ThreeVector(0, 0, AluStripFront_PosZ); - G4ThreeVector positionAluStripBack = G4ThreeVector(0, 0, AluStripBack_PosZ); - - G4Trap* solidAluStrip = new G4Trap("AluBox", - AluStripThickness/2, 0*deg, 0*deg, - FirstStageHeight/2, FirstStageBaseSmall/2, FirstStageBaseLarge/2, 0*deg, - FirstStageHeight/2, FirstStageBaseSmall/2, FirstStageBaseLarge/2, 0*deg); - -// G4LogicalVolume* logicAluStrip = new G4LogicalVolume(solidAluStrip, Aluminium, "logicAluStrip", 0, 0, 0); - G4LogicalVolume* logicAluStrip = new G4LogicalVolume(solidAluStrip, Vacuum, "logicAluStrip", 0, 0, 0); - - PVPBuffer = new G4PVPlacement(0, positionAluStripFront, logicAluStrip, "G" + DetectorNumber + "AluStripFront", logicMM, false, 0); - PVPBuffer = new G4PVPlacement(0, positionAluStripBack, logicAluStrip, "G" + DetectorNumber + "AluStripBack", logicMM, false, 0); - - logicAluStrip->SetVisAttributes(G4VisAttributes::Invisible); - // Silicon detector itself - G4ThreeVector positionSilicon = G4ThreeVector(0, 0, Silicon_PosZ); - - G4Trap* solidSilicon = new G4Trap("solidSilicon", - FirstStageThickness/2, 0*deg, 0*deg, - FirstStageHeight/2, FirstStageBaseSmall/2, FirstStageBaseLarge/2, 0*deg, - FirstStageHeight/2, FirstStageBaseSmall/2, FirstStageBaseLarge/2, 0*deg); - G4LogicalVolume* logicSilicon = new G4LogicalVolume(solidSilicon, Silicon, "logicSilicon", 0, 0, 0); - - PVPBuffer = new G4PVPlacement(0, positionSilicon, logicSilicon, Name + "_Silicon", logicMM, false, 0); + G4ThreeVector positionFirstStage = G4ThreeVector(0, 0, FirstStage_PosZ); + + G4Trap* solidFirstStage = new G4Trap("solidFirstStage", + FirstStageThickness/2, 0*deg, 0*deg, + FirstStageHeight/2, FirstStageBaseSmall/2, FirstStageBaseLarge/2, 0*deg, + FirstStageHeight/2, FirstStageBaseSmall/2, FirstStageBaseLarge/2, 0*deg); + G4LogicalVolume* logicFirstStage = new G4LogicalVolume(solidFirstStage, Silicon, "logicFirstStage", 0, 0, 0); + + PVPBuffer = new G4PVPlacement(0, + positionFirstStage, + logicFirstStage, + Name + "_FirstStage", + logicGPDTrapezoid, + false, + 0); // Set First Stage sensible - logicSilicon->SetSensitiveDetector(m_FirstStageScorer); + logicFirstStage->SetSensitiveDetector(m_FirstStageScorer); - // Visualisation of Silicon Strip - G4VisAttributes* SiliconVisAtt = new G4VisAttributes(G4Colour(0.5, 0.5, 0.5)) ; - logicSilicon->SetVisAttributes(SiliconVisAtt) ; + ///Visualisation of FirstStage Strip + G4VisAttributes* FirstStageVisAtt = new G4VisAttributes(G4Colour(0.2, 0.2, 0.2)); + logicFirstStage->SetVisAttributes(FirstStageVisAtt); } //////////////////////////////////////////////////////////////// //////////////// Second Stage Construction //////////////////// //////////////////////////////////////////////////////////////// if (wSecondStage) { + // Second stage silicon detector + G4ThreeVector positionSecondStage = G4ThreeVector(0, 0, SecondStage_PosZ); + + G4Trap* solidSecondStage = new G4Trap("solidSecondStage", + SecondStageThickness/2, 0*deg, 0*deg, + SecondStageHeight/2, SecondStageBaseSmall/2, SecondStageBaseLarge/2, 0*deg, + SecondStageHeight/2, SecondStageBaseSmall/2, SecondStageBaseLarge/2, 0*deg); + G4LogicalVolume* logicSecondStage = new G4LogicalVolume(solidSecondStage, Silicon, "logicSecondStage", 0, 0, 0); + + PVPBuffer = new G4PVPlacement(0, + positionSecondStage, + logicSecondStage, + Name + "_SecondStage", + logicGPDTrapezoid, + false, + 0); + + // Set Second Stage sensible + logicSecondStage->SetSensitiveDetector(m_SecondStageScorer); + + ///Visualisation of SecondStage Strip + G4VisAttributes* SecondStageVisAtt = new G4VisAttributes(G4Colour(0.5, 0.5, 0.5)) ; + logicSecondStage->SetVisAttributes(SecondStageVisAtt) ; } //////////////////////////////////////////////////////////////// @@ -344,20 +328,24 @@ void GaspardTrackerTrapezoid::VolumeMaker(G4int TelescopeNumber , G4Trap* solidThirdStage = new G4Trap("solidThirdStage", ThirdStageThickness/2, 0*deg, 0*deg, - Height/2, BaseSmall/2, BaseLarge/2, 0*deg, - Height/2, BaseSmall/2, BaseLarge/2, 0*deg); - + ThirdStageHeight/2, ThirdStageBaseSmall/2, ThirdStageBaseLarge/2, 0*deg, + ThirdStageHeight/2, ThirdStageBaseSmall/2, ThirdStageBaseLarge/2, 0*deg); G4LogicalVolume* logicThirdStage = new G4LogicalVolume(solidThirdStage, Silicon, "logicThirdStage", 0, 0, 0); - PVPBuffer = new G4PVPlacement(0, positionThirdStage, logicThirdStage, Name + "_ThirdStage", logicMM, false, 0); - - // Visualisation of Third Stage - G4VisAttributes* ThirdStageVisAtt = new G4VisAttributes(G4Colour(0.7, 0.7, 0.7)) ; - logicThirdStage->SetVisAttributes(ThirdStageVisAtt) ; -// logicThirdStage->SetVisAttributes(G4VisAttributes::Invisible); + PVPBuffer = new G4PVPlacement(0, + positionThirdStage, + logicThirdStage, + Name + "_ThirdStage", + logicGPDTrapezoid, + false, + 0); // Set Third Stage sensible logicThirdStage->SetSensitiveDetector(m_ThirdStageScorer); + + ///Visualisation of Third Stage + G4VisAttributes* ThirdStageVisAtt = new G4VisAttributes(G4Colour(0.7, 0.7, 0.7)); + logicThirdStage->SetVisAttributes(ThirdStageVisAtt); } } diff --git a/NPSimulation/src/ParisPhoswich.cc b/NPSimulation/src/ParisPhoswich.cc index cd7a6a4f4342f650dab49819f8af4c21ee3ff4ab..b32609a0ad86d1fcef427efab9edd55fcaecb48f 100644 --- a/NPSimulation/src/ParisPhoswich.cc +++ b/NPSimulation/src/ParisPhoswich.cc @@ -686,6 +686,8 @@ void ParisPhoswich::ReadSensitive(const G4Event* event) G4int sizeNCsI= CsIDetectorNumberHitMap->entries(); G4int sizeECsI= CsIStageEnergyHitMap->entries(); + sizeC *= 1; // remove warning at compilation + sizeECsI *= 1; // remove warning at compilation //G4cout <<"SizeN=" << sizeN << endl; //G4cout <<"SizeC=" << sizeC << endl; //G4cout <<"SizeN CsI =" << sizeNCsI << endl; @@ -717,6 +719,7 @@ void ParisPhoswich::ReadSensitive(const G4Event* event) G4double E = *(Energy_itr->second); G4double T = *(Time_itr->second); G4int NCryst= *(CrystalNumber_itr->second); + NCryst *= 1; // remove warning at compilation //G4cout <<"NTrackID=" << NTrackID << G4endl; diff --git a/NPSimulation/vis.mac b/NPSimulation/vis.mac index a42fdb8de3c89788d47f48d8f55812954380745d..b669de374d7b62d08014921c88814d68cef673ad 100644 --- a/NPSimulation/vis.mac +++ b/NPSimulation/vis.mac @@ -9,7 +9,7 @@ # choose a graphic system ##/vis/open OGLIX ##/vis/open OGLSX -#/vis/open VRML2FILE +/vis/open VRML2FILE /vis/scene/create /vis/drawVolume /vis/viewer/set/viewpointThetaPhi 0 0 deg