From 29165e24991b61d9b078e1b6de08244838cda6ff Mon Sep 17 00:00:00 2001 From: deserevi <deserevi@nptool> Date: Fri, 27 Nov 2009 16:52:50 +0000 Subject: [PATCH] * Fix minor bugs for next stable release --- NPAnalysis/Gaspard/include/ObjectManager.hh | 4 ++-- NPAnalysis/Gaspard/src/Analysis.cc | 15 +++++++++++---- NPLib/Makefile | 1 + NPSimulation/src/Target.cc | 6 +++--- VERSION | 2 +- 5 files changed, 18 insertions(+), 10 deletions(-) diff --git a/NPAnalysis/Gaspard/include/ObjectManager.hh b/NPAnalysis/Gaspard/include/ObjectManager.hh index 191fc0ab6..c9c31cab2 100644 --- a/NPAnalysis/Gaspard/include/ObjectManager.hh +++ b/NPAnalysis/Gaspard/include/ObjectManager.hh @@ -105,8 +105,8 @@ namespace ENERGYLOSS { // Declare your Energy loss here // EnergyLoss LightTargetCD2 = EnergyLoss("proton_cd2.txt", 100, 1, 1); // LISE++ - EnergyLoss LightTarget = EnergyLoss("proton_CD2.G4table", 100); // G4 -// EnergyLoss BeamTarget = EnergyLoss("proton_CD2.G4table", 100); // G4 + EnergyLoss LightTarget = EnergyLoss("proton_CD2.G4table", "G4Table", 1000); // G4 + EnergyLoss BeamTarget = EnergyLoss("Sn132[0.0]_CD2.G4table", "G4Table", 1000); // G4 } using namespace ENERGYLOSS ; diff --git a/NPAnalysis/Gaspard/src/Analysis.cc b/NPAnalysis/Gaspard/src/Analysis.cc index de68ee321..b107a6fb0 100644 --- a/NPAnalysis/Gaspard/src/Analysis.cc +++ b/NPAnalysis/Gaspard/src/Analysis.cc @@ -26,13 +26,19 @@ int main(int argc,char** argv) NPL::Reaction* myReaction = new Reaction(); myReaction->ReadConfigurationFile(reactionfileName); - // set energy beam at target middle - myReaction->SetBeamEnergy(1292); - // Initialize the detector NPA::DetectorManager* myDetector = new DetectorManager; myDetector->ReadConfigurationFile(detectorfileName); + // nominal beam energy + Double_t BeamEnergyNominal = myReaction->GetBeamEnergy() * MeV; + cout << BeamEnergyNominal << endl; + // slow beam at target middle + Double_t BeamEnergy = BeamEnergyNominal - BeamTarget.Slow(BeamEnergyNominal, myDetector->GetTargetThickness()/2 * micrometer, 0); + cout << BeamEnergy << endl; + // set energy beam at target middle + myReaction->SetBeamEnergy(BeamEnergy); + // Print target thickness cout << myDetector->GetTargetThickness() << endl; @@ -84,7 +90,8 @@ int main(int argc,char** argv) ThetaStrip = ThetaCalculation (A ,TVector3(0,0,1)); // Correct for energy loss in the target - E = LightTarget.EvaluateInitialEnergy(E, 5.15*micrometer, ThetaStrip); +// E = LightTarget.EvaluateInitialEnergy(E, 5.15*micrometer, ThetaStrip); + E = LightTarget.EvaluateInitialEnergy(E, myDetector->GetTargetThickness()/2 * micrometer, ThetaStrip); // Calculate excitation energy if (Theta/deg > 90) { diff --git a/NPLib/Makefile b/NPLib/Makefile index b9158c7b7..39b24f409 100644 --- a/NPLib/Makefile +++ b/NPLib/Makefile @@ -425,6 +425,7 @@ endif make distclean -C ./InteractionCoordinates make distclean -C ./InitialConditions make distclean -C ./DummyDetector + make distclean -C ./Plastic .SUFFIXES: .$(SrcSuf) ### diff --git a/NPSimulation/src/Target.cc b/NPSimulation/src/Target.cc index 51eba3244..baa661c43 100644 --- a/NPSimulation/src/Target.cc +++ b/NPSimulation/src/Target.cc @@ -64,7 +64,7 @@ Target::Target() m_WindowsThickness = 0 ; m_TargetTemperature = 0 ; m_TargetPressure = 0 ; - m_TargetNbLayers = 50; // Number of steps by default + m_TargetNbLayers = 50; // Number of steps by default } G4Material* Target::GetMaterialFromLibrary(G4String MaterialName, G4double Temperature, G4double Pressure) @@ -292,7 +292,7 @@ void Target::ReadConfiguration(string Path) cout << m_TargetZ / mm << " )" << endl ; } - else if (DataBuffer.compare(0, 9, "NbLayers=") == 0) { + else if (DataBuffer.compare(0, 9, "NBLAYERS=") == 0) { check_m_TargetNbLayers = true ; ConfigFile >> DataBuffer; m_TargetNbLayers = atoi(DataBuffer.c_str()); @@ -386,7 +386,7 @@ void Target::ReadConfiguration(string Path) cout << m_TargetZ / mm << " )" << endl ; } - else if (DataBuffer.compare(0, 9, "m_TargetNbLayers=") == 0) { + else if (DataBuffer.compare(0, 9, "NBLAYERS=") == 0) { check_m_TargetNbLayers = true ; ConfigFile >> DataBuffer; m_TargetNbLayers = atoi(DataBuffer.c_str()); diff --git a/VERSION b/VERSION index d3827e75a..5625e59da 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.0 +1.2 -- GitLab