diff --git a/Inputs/EventGenerator/34Si.reaction b/Inputs/EventGenerator/34Si.reaction index 4df486e8f54aad1f9c43dac805d7bd7fb73cb911..edecfe2aa56337481e8871aedf2e9e364b0ce9cc 100644 --- a/Inputs/EventGenerator/34Si.reaction +++ b/Inputs/EventGenerator/34Si.reaction @@ -10,8 +10,10 @@ Transfert ExcitationEnergy= 2.0 BeamEnergy= 748 BeamEnergySpread= 0 - BeamFWHMX= 0.5 - BeamFWHMY= 0.5 + SigmaX= 0.5 + SigmaY= 0.5 + SigmaThetaX= 0 + SigmaPhiY= 0 BeamSpreadX= 0 CrossSectionPath= ni69_g7_01.n ShootLight= 1 diff --git a/Inputs/EventGenerator/60Fe.reaction b/Inputs/EventGenerator/60Fe.reaction index 24ad16495a31473e7834bce73a9580995111e626..9b4d370f9925ef9755a3fd12c434514026a0a97b 100644 --- a/Inputs/EventGenerator/60Fe.reaction +++ b/Inputs/EventGenerator/60Fe.reaction @@ -10,10 +10,10 @@ Transfert ExcitationEnergy= 2.0 BeamEnergy= 1200 BeamEnergySpread= 0 - BeamFWHMX= 1 - BeamFWHMY= 1 - BeamEmmitanceTheta= 0.034 - BeamEmmitancePhi= 0.01 + SigmaX= 1 + SigmaY= 1 + SigmaThetaX= 0.034 + SigmaPhiY= 0.01 CrossSectionPath= ni69_g7_01.n ShootLight= 1 ShootHeavy= 0 diff --git a/Inputs/EventGenerator/69Ni.reaction b/Inputs/EventGenerator/69Ni.reaction index f4c435c68147197bf79e9ec23e0f101bf9b5c9ca..76d9893d208d6550f08f8965d29bca51e9392fc5 100644 --- a/Inputs/EventGenerator/69Ni.reaction +++ b/Inputs/EventGenerator/69Ni.reaction @@ -10,10 +10,10 @@ Transfert ExcitationEnergy= 2.0 BeamEnergy= 1904 BeamEnergySpread= 0 - BeamFWHMX= 1.5 - BeamFWHMY= 1.5 - BeamSpreadX= 0.005 - BeamSpreadY= 0.005 + SigmaX= 1.5 + SigmaY= 1.5 + SigmaThetaX= 0.005 + SigmaPhiY= 0.005 CrossSectionPath= ./Data/CrossSection/ni69_d5_01.n ShootLight= 1 ShootHeavy= 0 diff --git a/Inputs/EventGenerator/e569.reaction b/Inputs/EventGenerator/e569.reaction index 0221149c192a2324d937723ed03c4b70d3e3395b..c7f8df64e2f11705d0bcb0dfd171f77467d212af 100644 --- a/Inputs/EventGenerator/e569.reaction +++ b/Inputs/EventGenerator/e569.reaction @@ -10,9 +10,10 @@ Transfert ExcitationEnergy= 0.0 BeamEnergy= 252 BeamEnergySpread= 0 - BeamFWHMX= 2 - BeamFWHMY= 1.5 - BeamSpreadX= 0 + SigmaX= 2 + SigmaY= 1.5 + SigmaThetaX= 0 + SigmaPhiY= 0 CrossSectionPath= ../Data/CrossSection/flat.txt ShootLight= 1 ShootHeavy= 0 diff --git a/NPSimulation/include/EventGeneratorTransfert.hh b/NPSimulation/include/EventGeneratorTransfert.hh index 2380f0dc960382a93ad076a4a0cd9cfc451d242f..f66562a6f5b39af8a53e8aab96e2a233597da910 100644 --- a/NPSimulation/include/EventGeneratorTransfert.hh +++ b/NPSimulation/include/EventGeneratorTransfert.hh @@ -54,8 +54,8 @@ class EventGeneratorTransfert : public VEventGenerator double BeamEnergySpread , double BeamFWHMX , double BeamFWHMY , - double BeamEmmitanceTheta , - double BeamEmmitancePhi , + double SigmaThetaX , + double SigmaPhiY , bool ShootLight , bool ShootHeavy , string Path); // Path of the differentiel Cross Section @@ -92,10 +92,10 @@ class EventGeneratorTransfert : public VEventGenerator private: // Beam Parameter double m_BeamEnergy ; double m_BeamEnergySpread ; - double m_BeamFWHMX ; - double m_BeamFWHMY ; - double m_BeamEmmitanceTheta ; - double m_BeamEmmitancePhi ; + double m_SigmaX ; + double m_SigmaY ; + double m_SigmaThetaX ; + double m_SigmaPhiY ; private: // Target Parameter double m_TargetThickness ; @@ -120,8 +120,8 @@ class EventGeneratorTransfert : public VEventGenerator double BeamEnergySpread , double BeamFWHMX , double BeamFWHMY , - double BeamEmmitanceTheta , - double BeamEmmitancePhi , + double SigmaThetaX , + double SigmaPhiY , bool ShootLight , bool ShootHeavy , string Path); // Path of the differentiel Cross Section diff --git a/NPSimulation/src/EventGeneratorTransfert.cc b/NPSimulation/src/EventGeneratorTransfert.cc index 41fd69c427f1ae59b9e4592c09d022b89921edb3..867236553890cb68d12da54c3cd0f42fd706a29a 100644 --- a/NPSimulation/src/EventGeneratorTransfert.cc +++ b/NPSimulation/src/EventGeneratorTransfert.cc @@ -53,10 +53,10 @@ EventGeneratorTransfert::EventGeneratorTransfert() m_BeamEnergy = 0; m_BeamEnergySpread = 0; - m_BeamFWHMX = 0; - m_BeamFWHMY = 0; - m_BeamEmmitanceTheta = 0; - m_BeamEmmitancePhi=0 ; + m_SigmaX = 0; + m_SigmaY = 0; + m_SigmaThetaX = 0; + m_SigmaPhiY=0 ; m_ShootLight = 0; m_ShootHeavy = 0; } @@ -77,10 +77,10 @@ EventGeneratorTransfert::EventGeneratorTransfert(string name1 , double BeamEnergy , // Beam Energy double ExcitationEnergy , // Excitation of Heavy Nuclei double BeamEnergySpread , - double BeamFWHMX , - double BeamFWHMY , - double BeamEmmitanceTheta , - double BeamEmmitancePhi , + double SigmaX , + double SigmaY , + double SigmaThetaX , + double SigmaPhiY , bool ShootLight , bool ShootHeavy , string Path) // Path of the differentiel Cross Section @@ -92,10 +92,10 @@ EventGeneratorTransfert::EventGeneratorTransfert(string name1 , BeamEnergy , // Beam Energy ExcitationEnergy , // Excitation of Heavy Nuclei BeamEnergySpread , - BeamFWHMX , - BeamFWHMY , - BeamEmmitanceTheta , - BeamEmmitancePhi , + SigmaX , + SigmaY , + SigmaThetaX , + SigmaPhiY , ShootLight , ShootHeavy , Path); @@ -131,7 +131,7 @@ void EventGeneratorTransfert::ReadConfiguration(string Path) ////////Reaction Setting needs/////// string Beam, Target, Heavy, Light, CrossSectionPath ; - G4double BeamEnergy = 0 , ExcitationEnergy = 0 , BeamEnergySpread = 0 , BeamFWHMX = 0 , BeamFWHMY = 0 , BeamEmmitanceTheta = 0 , BeamEmmitancePhi=0; + G4double BeamEnergy = 0 , ExcitationEnergy = 0 , BeamEnergySpread = 0 , SigmaX = 0 , SigmaY = 0 , SigmaThetaX = 0 , SigmaPhiY=0; bool ShootLight = false ; bool ShootHeavy = false ; @@ -224,32 +224,32 @@ while(ReadingStatus){ G4cout << "Beam Energy Spread " << BeamEnergySpread / MeV << " MeV" << G4endl; } - else if (DataBuffer.compare(0, 11, "BeamFWHMX=") == 0) { + else if (DataBuffer.compare(0, 7, "SigmaX=") == 0) { check_FWHMX = true ; ReactionFile >> DataBuffer; - BeamFWHMX = atof(DataBuffer.c_str()) * mm; - G4cout << "Beam FWHM X " << BeamFWHMX << " mm" << G4endl; + SigmaX = atof(DataBuffer.c_str()) * mm; + G4cout << "Beam FWHM X " << SigmaX << " mm" << G4endl; } - else if (DataBuffer.compare(0, 11, "BeamFWHMY=") == 0) { + else if (DataBuffer.compare(0, 7, "SigmaY=") == 0) { check_FWHMY = true ; ReactionFile >> DataBuffer; - BeamFWHMY = atof(DataBuffer.c_str()) * mm; - G4cout << "Beam FWHM Y " << BeamFWHMX << " mm" << G4endl; + SigmaY = atof(DataBuffer.c_str()) * mm; + G4cout << "Beam FWHM Y " << SigmaX << " mm" << G4endl; } - else if (DataBuffer.compare(0, 19, "BeamEmmitanceTheta=") == 0) { + else if (DataBuffer.compare(0, 12, "SigmaThetaX=") == 0) { check_EmmitanceTheta = true ; ReactionFile >> DataBuffer; - BeamEmmitanceTheta = atof(DataBuffer.c_str()) * rad; - G4cout << "Beam Emmitance Theta " << BeamEmmitanceTheta / deg << " deg" << G4endl; + SigmaThetaX = atof(DataBuffer.c_str()) * deg; + G4cout << "Beam Emmitance Theta " << SigmaThetaX / deg << " deg" << G4endl; } - else if (DataBuffer.compare(0, 17, "BeamEmmitancePhi=") == 0) { + else if (DataBuffer.compare(0, 10, "SigmaPhiY=") == 0) { check_EmmitancePhi = true ; ReactionFile >> DataBuffer; - BeamEmmitancePhi = atof(DataBuffer.c_str()) * rad; - G4cout << "Beam Emmitance Phi " << BeamEmmitancePhi / deg << " deg" << G4endl; + SigmaPhiY = atof(DataBuffer.c_str()) * deg; + G4cout << "Beam Emmitance Phi " << SigmaPhiY / deg << " deg" << G4endl; } else if (DataBuffer.compare(0, 17, "CrossSectionPath=") == 0) { @@ -299,10 +299,10 @@ while(ReadingStatus){ BeamEnergy , ExcitationEnergy , BeamEnergySpread , - BeamFWHMX , - BeamFWHMY , - BeamEmmitanceTheta , - BeamEmmitancePhi , + SigmaX , + SigmaY , + SigmaThetaX , + SigmaPhiY , ShootLight , ShootHeavy , CrossSectionPath); @@ -340,13 +340,13 @@ void EventGeneratorTransfert::GenerateEvent(G4Event* anEvent , G4ParticleGun* pa //shoot inside the target with correlated angle if (m_TargetRadius != 0) { while (sqrt(x0*x0 + y0*y0) > m_TargetRadius) { - RandomGaussian2D(0,0,m_BeamFWHMX / 2.35,m_BeamEmmitanceTheta,x0,Beam_thetaX); - RandomGaussian2D(0,0,m_BeamFWHMY / 2.35,m_BeamEmmitancePhi ,y0,Beam_phiY ); + RandomGaussian2D(0,0,m_SigmaX / 2.35,m_SigmaThetaX,x0,Beam_thetaX); + RandomGaussian2D(0,0,m_SigmaY / 2.35,m_SigmaPhiY ,y0,Beam_phiY ); } } else { - RandomGaussian2D(0,0,0,m_BeamEmmitanceTheta,x0,Beam_thetaX); - RandomGaussian2D(0,0,0,m_BeamEmmitancePhi ,y0,Beam_phiY ); + RandomGaussian2D(0,0,0,m_SigmaThetaX,x0,Beam_thetaX); + RandomGaussian2D(0,0,0,m_SigmaPhiY ,y0,Beam_phiY ); } // write emittance angles to ROOT file @@ -503,10 +503,10 @@ void EventGeneratorTransfert::SetEverything(string name1 , // double BeamEnergy , // Beam Energy double ExcitationEnergy , // Excitation of Heavy Nuclei double BeamEnergySpread , - double BeamFWHMX , - double BeamFWHMY , - double BeamEmmitanceTheta , - double BeamEmmitancePhi , + double SigmaX , + double SigmaY , + double SigmaThetaX , + double SigmaPhiY , bool ShootLight , bool ShootHeavy , string Path) @@ -521,10 +521,10 @@ void EventGeneratorTransfert::SetEverything(string name1 , // m_BeamEnergy = BeamEnergy ; m_BeamEnergySpread = BeamEnergySpread ; - m_BeamFWHMX = BeamFWHMX ; - m_BeamFWHMY = BeamFWHMY ; - m_BeamEmmitanceTheta = BeamEmmitanceTheta ; - m_BeamEmmitancePhi = BeamEmmitancePhi ; + m_SigmaX = SigmaX ; + m_SigmaY = SigmaY ; + m_SigmaThetaX = SigmaThetaX ; + m_SigmaPhiY = SigmaPhiY ; m_ShootLight = ShootLight ; m_ShootHeavy = ShootHeavy ; } diff --git a/NPSimulation/src/VEventGenerator.cc b/NPSimulation/src/VEventGenerator.cc index a59fcaca6151f189b13f879696914128e96191d2..3149269f1a462740b8dd0359c98e51a1bcbfc9d7 100644 --- a/NPSimulation/src/VEventGenerator.cc +++ b/NPSimulation/src/VEventGenerator.cc @@ -62,28 +62,5 @@ void VEventGenerator::RandomGaussian2D(double MeanX,double MeanY,double SigmaX,d X= MeanX; Y = m_RandomEngine.Gaus( MeanY , SigmaY) ; } - -// if(SigmaX!=0) -// { -// X = m_RandomEngine.Gaus( MeanX , SigmaX) ; -// -// double NumberOfSigma ; -// -// NumberOfSigma = ( 2*X / SigmaX ) ; -// NumberOfSigma = TMath::Floor( sqrt(NumberOfSigma*NumberOfSigma) + 1) ; -// -// double SigmaYPrim = sqrt( NumberOfSigma*SigmaY/2 *NumberOfSigma*SigmaY/2 * ( 1 - 2*X*X / (SigmaX*NumberOfSigma*SigmaX*NumberOfSigma)) ) ; -// SigmaYPrim = SigmaYPrim / NumberOfSigma ; -// -// Y = m_RandomEngine.Gaus( MeanY , SigmaYPrim) ; -// -// } -// -// else -// { -// X= MeanX; -// Y = m_RandomEngine.Gaus( MeanY , SigmaY) ; -// } - }