diff --git a/Inputs/EventGenerator/132Sndp.reaction b/Inputs/EventGenerator/132Sndp.reaction index 0618fe3f65da9d9d159a7c3048501c51ca10bf01..0ff5e1462fc0390a7e3c5e73f62dc6c39c91404f 100644 --- a/Inputs/EventGenerator/132Sndp.reaction +++ b/Inputs/EventGenerator/132Sndp.reaction @@ -12,8 +12,8 @@ Transfert BeamEnergySpread= 0 SigmaX= 0.851 SigmaY= 0.851 - SigmaThetaX= 1 - SigmaPhiY= 1 + SigmaThetaX= 0 + SigmaPhiY= 0 CrossSectionPath= sn132dp_gs_10AMeV.txt ShootLight= 1 ShootHeavy= 0 diff --git a/NPAnalysis/Gaspard/include/ObjectManager.hh b/NPAnalysis/Gaspard/include/ObjectManager.hh index 87249677afccc0f2904ba9a871236176453ee7af..49ee8e46c54b88087f434cbcdddaa5cfe9ddd589 100644 --- a/NPAnalysis/Gaspard/include/ObjectManager.hh +++ b/NPAnalysis/Gaspard/include/ObjectManager.hh @@ -102,15 +102,11 @@ using namespace CUT ; #include "NPEnergyLoss.h" using namespace NPL ; namespace ENERGYLOSS - { - - // Declare your Energy loss here : - /* EnergyLoss ProtonTarget = EnergyLoss ( "CD2.txt" , - 100 , - 1 ); - */ - } - +{ + // Declare your Energy loss here + EnergyLoss DeutonTargetCD2 = EnergyLoss("deuton_cd2.txt", 100, 1, 2); +} + using namespace ENERGYLOSS ; // ---------------------------------------------------------------------------------------------- ///////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/NPAnalysis/Gaspard/src/Analysis.cc b/NPAnalysis/Gaspard/src/Analysis.cc index 8e4125f0c3da2b5d3ee6dfb94cbf727d318edf8f..f7c83fdf944fd876200cfbdcd132f4dd587959a0 100644 --- a/NPAnalysis/Gaspard/src/Analysis.cc +++ b/NPAnalysis/Gaspard/src/Analysis.cc @@ -31,8 +31,9 @@ int main(int argc,char** argv) myDetector->ReadConfigurationFile(detectorfileName); // Attach more branch to the output - double Ex = 0 ; double EE = 0 ; double TT = 0 ; double X = 0 ; double Y = 0 ; int det ; + double Ex = 0 ; double ExNoStrips = 0 ; double EE = 0 ; double TT = 0 ; double X = 0 ; double Y = 0 ; int det ; RootOutput::getInstance()->GetTree()->Branch("ExcitationEnergy",&Ex,"Ex/D") ; + RootOutput::getInstance()->GetTree()->Branch("ExcitationEnergyNoStrips",&ExNoStrips,"ExNoStrips/D") ; RootOutput::getInstance()->GetTree()->Branch("E",&EE,"EE/D") ; RootOutput::getInstance()->GetTree()->Branch("A",&TT,"TT/D") ; RootOutput::getInstance()->GetTree()->Branch("X",&X,"X/D") ; @@ -76,10 +77,13 @@ int main(int argc,char** argv) // Calculate scattering angle ThetaStrip = ThetaCalculation (A ,TVector3(0,0,1)); + // Correct for energy loss in the target + E = DeutonTargetCD2.EvaluateInitialEnergy(E, 4.85*micrometer, ThetaStrip); + // Calculate excitation energy if (Theta/deg > 90) { -// Ex = myReaction->ReconstructRelativistic(E, Theta / rad); - Ex = myReaction->ReconstructRelativistic(E, ThetaStrip); + ExNoStrips = myReaction->ReconstructRelativistic(E, Theta / rad); + Ex = myReaction->ReconstructRelativistic(E, ThetaStrip); } else Ex = -200; } diff --git a/NPAnalysis/Gaspard/src/GNUmakefile b/NPAnalysis/Gaspard/src/GNUmakefile index c18b108aaeff1d074e76e615e2f38d050e4cfedc..ee550bf803157a516ec56215da44d876d99bbe28 100644 --- a/NPAnalysis/Gaspard/src/GNUmakefile +++ b/NPAnalysis/Gaspard/src/GNUmakefile @@ -24,12 +24,13 @@ LDFLAGS+= -L$(NPLIB)/lib -lVDetector -lIORoot -lReaction -lEnergyLoss \ LDFLAGS+= -L$(CLHEP_LIB_DIR) -l$(CLHEP_LIB) SRC= $(wildcard *.cc) +INC= $(wildcard $(NPAINCLUDES)/*.hh) OBJ=$(SRC:.cc=.o) #all:$(EXEC) # @$(CPP) -o $@ -c $< $(CXXFLAGS) -Analysis:$(OBJ) +Analysis:$(OBJ) $(INC) @$(CPP) $(CXXFLAGS) -o $@ $^ $(LDFLAGS) mv Analysis ../Analysis diff --git a/NPLib/GASPARD/GaspardTracker.cxx b/NPLib/GASPARD/GaspardTracker.cxx index 32874e9e3ea4f80e697d04737eb4733bbd68110e..ee430b6cd09f6f03198c8e9429eff559047ded2f 100644 --- a/NPLib/GASPARD/GaspardTracker.cxx +++ b/NPLib/GASPARD/GaspardTracker.cxx @@ -536,6 +536,9 @@ void GaspardTracker::AddModuleSquare(TVector3 C_X1_Y1, { m_NumberOfModule++; + // remove warning using C_X128_Y128 + C_X128_Y128.Unit(); + // Vector U on Module Face (paralelle to Y Strip) (NB: remember that Y strip are allong X axis) TVector3 U = C_X128_Y1 - C_X1_Y1; U = U.Unit(); @@ -692,6 +695,9 @@ void GaspardTracker::AddModuleDummyShape(TVector3 C_X1_Y1, { m_NumberOfModule++; + // remove warning using C_X128_Y128 + C_X128_Y128.Unit(); + // Vector U on Module Face (paralelle to Y Strip) (NB: remember that Y strip are allong X axis) TVector3 U = C_X128_Y1 - C_X1_Y1; U = U.Unit(); diff --git a/NPLib/GASPARD/GaspardTracker.h b/NPLib/GASPARD/GaspardTracker.h index e0d25a08bab1e7316a715f67c2a9dba4fd9df4d3..5de55bd49c53f3840d85969093c612f39452aa8c 100644 --- a/NPLib/GASPARD/GaspardTracker.h +++ b/NPLib/GASPARD/GaspardTracker.h @@ -37,7 +37,7 @@ class GaspardTracker : public NPA::VDetector { public: GaspardTracker(); - ~GaspardTracker(); + virtual ~GaspardTracker(); public: ///////////////////////////////////// diff --git a/NPLib/GASPARD/TGaspardTrackerPhysics.cxx b/NPLib/GASPARD/TGaspardTrackerPhysics.cxx index 921d309472482a8956561905ab4ae80bfdf59c60..ae48b30d5ba143676f34cf54d419075ae340eac1 100644 --- a/NPLib/GASPARD/TGaspardTrackerPhysics.cxx +++ b/NPLib/GASPARD/TGaspardTrackerPhysics.cxx @@ -65,11 +65,12 @@ void TGaspardTrackerPhysics::BuildPhysicalEvent(TGaspardTrackerData* Data) 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 = Data->GetGPDTrkFirstStageFrontEMult(); int multYE = Data->GetGPDTrkFirstStageBackEMult(); @@ -133,8 +134,8 @@ void TGaspardTrackerPhysics::BuildPhysicalEvent(TGaspardTrackerData* Data) // get time from strips and store it double TimeStripFront = Data->GetGPDTrkFirstStageFrontEEnergy(0); double TimeStripBack = Data->GetGPDTrkFirstStageBackEEnergy(0); - double TimeStrip = 0.5 * (EnergyStripFront + EnergyStripBack); -// double TimeStrip = EnergyStripFront; + double TimeStrip = 0.5 * (TimeStripFront + TimeStripBack); +// double TimeStrip = TimeStripFront; // if (TimeStripBack > TimeStrip) TimeStrip = TimeStripBack; FirstStage_T.push_back(TimeStrip); diff --git a/NPLib/VDetector/VDetector.h b/NPLib/VDetector/VDetector.h index c10a4f39c77954e97c11474a8ed2fba0adefab11..20fd8d3f933a49aa75ecfd55a9bcb9a25152ca08 100644 --- a/NPLib/VDetector/VDetector.h +++ b/NPLib/VDetector/VDetector.h @@ -38,7 +38,7 @@ namespace NPA // Default Constructor and destructor VDetector() ; - ~VDetector() ; + virtual ~VDetector() ; // Read stream at ConfigFile to pick-up parameters of detector (Position,...) using Token diff --git a/NPSimulation/include/GaspardTrackerDummyShape.hh b/NPSimulation/include/GaspardTrackerDummyShape.hh index 8285639eb29a9718eab3378eab2d23694e3d83f6..49eb5e54ca1868d9272328ea8c480caed7dfa5f3 100644 --- a/NPSimulation/include/GaspardTrackerDummyShape.hh +++ b/NPSimulation/include/GaspardTrackerDummyShape.hh @@ -142,30 +142,26 @@ private: namespace GPDDUMMYSHAPE { // Resolution -// const G4double ResoFirstStage = 0 ;// = 52keV of Resolution // Unit is MeV/2.35 - const G4double ResoFirstStage = 0.022 ;// = 52keV of Resolution // Unit is MeV/2.35 - const G4double ResoSecondStage = 0 ;// = 130 keV 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 ResoThirdStage = 0.043 ;// = 100 kev of resolution // Unit is MeV/2.35 - const G4double ResoTimeGpd = 0.212765957 ;// = 500ps // Unit is ns/2.35 + const G4double ResoFirstStage = 0.0213; // = 50 keV of Resolution // Unit is MeV/2.35 + const G4double ResoSecondStage = 0.0213; // = 50 keV of resolution // Unit is MeV/2.35 + const G4double ResoThirdStage = 0.0213; // = 50 keV of resolution // Unit is MeV/2.35 + const G4double ResoTimeGpd = 0.212765957;// = 500ps // Unit is ns/2.35 // Geometry for the mother volume containing the different layers of your dummy shape module const G4double FaceFront = 5.1*cm; const G4double FaceBack = 5.1*cm; -// const G4double Length = 1.5*cm; -// const G4double InterStageDistance = 5*mm; + const G4double Length = 1.5*cm; + const G4double InterStageDistance = 5*mm; // for testing the excitation energy reconstruction - const G4double Length = 4*cm; - const G4double InterStageDistance = 15*mm; +// const G4double Length = 4*cm; +// const G4double InterStageDistance = 15*mm; // First stage const G4double FirstStageFace = 5.0*cm; -// const G4double FirstStageThickness = 300*micrometer ; + const G4double FirstStageThickness = 300*micrometer; // for testing the excitation energy reconstruction - const G4double FirstStageThickness = 1.3*cm; -// const G4int NumberOfStrips = 128; - const G4int NumberOfStrips = 25; +// const G4double FirstStageThickness = 1.3*cm; + const G4int NumberOfStrips = 25; // 2mm strip pitch // Second stage const G4double SecondStageFace = FirstStageFace; diff --git a/NPSimulation/include/Target.hh b/NPSimulation/include/Target.hh index dea5c2a469c7dae11c22c31da9002b1fcbd1fe9d..5fcee069b67b69476d59c52eb7ca5af51fde514e 100644 --- a/NPSimulation/include/Target.hh +++ b/NPSimulation/include/Target.hh @@ -67,6 +67,13 @@ public: void ReadSensitive(const G4Event* event); +public: + // method for debug purpose (still to be implemented) + // This method should check if the results of the beam interaction within the target + // (interaction coordinates) are well located inside the target volume + bool IsInsideTarget() {return false;}; + + public: G4Material* GetMaterialFromLibrary(G4String MaterialName, G4double Temperature = 0, G4double Pressure = 0); diff --git a/NPSimulation/src/AnnularS1.cc b/NPSimulation/src/AnnularS1.cc index e24141ea2755ec3161cbf7037e05a32f604737ee..e99912dd503b88a2b8ede1508726ef2ceecee2e3 100644 --- a/NPSimulation/src/AnnularS1.cc +++ b/NPSimulation/src/AnnularS1.cc @@ -128,14 +128,14 @@ void AnnularS1::VolumeMaker(G4int TelescopeNumber , 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); +// density = 2.702 * g / cm3; +// a = 26.98 * g / mole; +// G4Material* Aluminium = new G4Material("Aluminium", z = 13., a, density); // Iron - density = 7.874 * g / cm3; - a = 55.847 * g / mole; - G4Material* Iron = new G4Material("Iron", z = 26., a, density); +// density = 7.874 * g / cm3; +// a = 55.847 * g / mole; +// G4Material* Iron = new G4Material("Iron", z = 26., a, density); // CsI density = 4.51 * g / cm3; diff --git a/NPSimulation/src/GaspardTrackerAnnular.cc b/NPSimulation/src/GaspardTrackerAnnular.cc index 9432cb7dc048a06679f6cb2f9c6fdf1b79095589..ba566a4c2acd398beca6705f92daeed1bb61daa7 100644 --- a/NPSimulation/src/GaspardTrackerAnnular.cc +++ b/NPSimulation/src/GaspardTrackerAnnular.cc @@ -135,14 +135,14 @@ void GaspardTrackerAnnular::VolumeMaker(G4int TelescopeNumber , 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); +// density = 2.702 * g / cm3; +// a = 26.98 * g / mole; +// G4Material* Aluminium = new G4Material("Aluminium", z = 13., a, density); // Iron - density = 7.874 * g / cm3; - a = 55.847 * g / mole; - G4Material* Iron = new G4Material("Iron", z = 26., a, density); +// density = 7.874 * g / cm3; +// a = 55.847 * g / mole; +// G4Material* Iron = new G4Material("Iron", z = 26., a, density); // CsI density = 4.51 * g / cm3; diff --git a/NPSimulation/src/GaspardTrackerSquare.cc b/NPSimulation/src/GaspardTrackerSquare.cc index 307c3ce244231f39c30b5e67dd1144d787da51bb..39c2f6bde8186e7a9eefaa4e6c3c68fec6b90935 100644 --- a/NPSimulation/src/GaspardTrackerSquare.cc +++ b/NPSimulation/src/GaspardTrackerSquare.cc @@ -188,9 +188,9 @@ void GaspardTrackerSquare::VolumeMaker(G4int TelescopeNumber, G4Material* Aluminium = new G4Material("Aluminium", z = 13., a, density); // Iron - density = 7.874 * g / cm3; - a = 55.847 * g / mole; - G4Material* Iron = new G4Material("Iron", z = 26., a, density); +// density = 7.874 * g / cm3; +// a = 55.847 * g / mole; +// G4Material* Iron = new G4Material("Iron", z = 26., a, density); // CsI density = 4.51 * g / cm3; diff --git a/NPSimulation/src/GaspardTrackerTrapezoid.cc b/NPSimulation/src/GaspardTrackerTrapezoid.cc index 714a28c9d23a8980ab38c04e540f7b11bc0f16ea..b5f91d1f6e0c3b10dfe6db1c6c8b738f73147974 100644 --- a/NPSimulation/src/GaspardTrackerTrapezoid.cc +++ b/NPSimulation/src/GaspardTrackerTrapezoid.cc @@ -179,14 +179,14 @@ void GaspardTrackerTrapezoid::VolumeMaker(G4int TelescopeNumber , 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); +// density = 2.702 * g / cm3; +// a = 26.98 * g / mole; +// G4Material* Aluminium = new G4Material("Aluminium", z = 13., a, density); // Iron - density = 7.874 * g / cm3; - a = 55.847 * g / mole; - G4Material* Iron = new G4Material("Iron", z = 26., a, density); +// density = 7.874 * g / cm3; +// a = 55.847 * g / mole; +// G4Material* Iron = new G4Material("Iron", z = 26., a, density); // CsI density = 4.51 * g / cm3; diff --git a/NPSimulation/src/GeneralScorers.cc b/NPSimulation/src/GeneralScorers.cc index 9fe510c3b9a76f788af8ae39d89c410e63764fff..f532c4495eed51466aeebf4dfc251be0173c9c90 100644 --- a/NPSimulation/src/GeneralScorers.cc +++ b/NPSimulation/src/GeneralScorers.cc @@ -429,7 +429,7 @@ G4bool PSDetectorNumber::ProcessHits(G4Step* aStep, G4TouchableHistory*) int numberOfCharacterInDetectorNumber = name.length() - (int)found ; - for( int i = found ; i < found + numberOfCharacterInDetectorNumber ; i++ ) + for(unsigned int i = found ; i < found + numberOfCharacterInDetectorNumber ; i++ ) nbr += name[i] ; G4int DetNbr = atoi( nbr.c_str() ) ; diff --git a/NPSimulation/src/MUST2Array.cc b/NPSimulation/src/MUST2Array.cc index 3040dec99e7980a88ec584555e587fcab00a2aa1..5b854ff9077c388db806141054977407fa464c96 100644 --- a/NPSimulation/src/MUST2Array.cc +++ b/NPSimulation/src/MUST2Array.cc @@ -192,7 +192,6 @@ void MUST2Array::VolumeMaker(G4int TelescopeNumber , PVPBuffer = new G4PVPlacement(0,G4ThreeVector(0,0,0),logicDegrader,"Degrader",logicVacBox,false,0) ; - /* //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 //Uncomment to help debugging or if you want to understand the way the code work. diff --git a/NPSimulation/src/PlasticScorer.cc b/NPSimulation/src/PlasticScorer.cc index 4cf0904c27753c54b33660127cab23fffdd5f5ec..ba2ca272ba0a4727e93e0c8e89d6d388e17f54b6 100644 --- a/NPSimulation/src/PlasticScorer.cc +++ b/NPSimulation/src/PlasticScorer.cc @@ -45,7 +45,7 @@ G4bool PSEnergy::ProcessHits(G4Step* aStep, G4TouchableHistory*) int numberOfCharacterInDetectorNumber = name.length() - (int)found ; - for( int i = found ; i < found + numberOfCharacterInDetectorNumber ; i++ ) + for(unsigned int i = found ; i < found + numberOfCharacterInDetectorNumber ; i++ ) nbr += name[i] ; G4int DetNbr = atoi( nbr.c_str() ) ; @@ -119,7 +119,7 @@ G4bool PSDetectorNumber::ProcessHits(G4Step* aStep, G4TouchableHistory*) int numberOfCharacterInDetectorNumber = name.length() - (int)found ; - for( int i = found ; i < found + numberOfCharacterInDetectorNumber ; i++ ) + for(unsigned int i = found ; i < found + numberOfCharacterInDetectorNumber ; i++ ) nbr += name[i] ; G4int DetNbr = atoi( nbr.c_str() ) ; @@ -193,7 +193,7 @@ G4bool PSTOF::ProcessHits(G4Step* aStep, G4TouchableHistory*) int numberOfCharacterInDetectorNumber = name.length() - (int)found ; - for( int i = found ; i < found + numberOfCharacterInDetectorNumber ; i++ ) + for(unsigned int i = found ; i < found + numberOfCharacterInDetectorNumber ; i++ ) nbr += name[i] ; G4int DetNbr = atoi( nbr.c_str() ) ; diff --git a/TODO b/TODO index f675b8725c11b46866be51696a9547e4b28ef2df..3bf175015821ffc9f53d75957316c50bae3e0ea0 100644 --- a/TODO +++ b/TODO @@ -31,7 +31,6 @@ TODO for NPTool: (Adrien) + Possibility to tilt the target with a given angle and to deal with the emittance - + Shooting in the target within a dedicated method in VEventGenerator + IsInsideTarget method for debugging purposes + Add a dedicated class to deal with materials (see example from G4 tutorial) (still under debate) @@ -43,7 +42,6 @@ TODO for NPTool: TODO for NPAnalysis: -------------------- + Add comment support for RunToTreat.txt (Adrien) - + Check Makefiles dependency (mostly for Gaspard) (Nicolas) + Add calibration manager class from Julien (Adrien) + Use only one class for the analysis per detector instead of two currently (ROOT feature in private member definition ( //!)) @@ -51,6 +49,7 @@ TODO for NPAnalysis: TODO for AnnularS1 detector: ---------------------------- + Update the way the scorers are dealt to the new way (no more loop in ReadSensitive) + (Nicolas) TODO for Gaspard: -----------------