diff --git a/Inputs/DetectorConfiguration/hira.detector b/Inputs/DetectorConfiguration/hira.detector index 686505e791836b63e1fce2b65546fd995582ff42..09b869fb7116a3347c0caeb8c6726a8e81ccc7b0 100755 --- a/Inputs/DetectorConfiguration/hira.detector +++ b/Inputs/DetectorConfiguration/hira.detector @@ -9,7 +9,7 @@ GeneralTarget Target THICKNESS= 45 ANGLE= 0 - RADIUS= 5 + RADIUS= 15 MATERIAL= CH2 X= 0 Y= 0 diff --git a/NPAnalysis/Hira/Analysis b/NPAnalysis/Hira/Analysis index 3e826a2d30eede3ff036491c58af90fe81c87a19..276ccdd7d66539d5c152646f617309d7e4f19c40 100755 Binary files a/NPAnalysis/Hira/Analysis and b/NPAnalysis/Hira/Analysis differ diff --git a/NPAnalysis/Hira/Analysis.o b/NPAnalysis/Hira/Analysis.o index 55263c8515d8db0c7bd1f107dd9a9b29f44cab91..3092ec6b048c0a7096d829ba14213ee9cd6d35a4 100644 Binary files a/NPAnalysis/Hira/Analysis.o and b/NPAnalysis/Hira/Analysis.o differ diff --git a/NPAnalysis/Hira/Show.C b/NPAnalysis/Hira/Show.C index 2edc5d44f3fa77fb28cafe8ec613190e059ff329..4b1106049dec09ed6b61d64df55025465fc33202 100644 --- a/NPAnalysis/Hira/Show.C +++ b/NPAnalysis/Hira/Show.C @@ -11,6 +11,7 @@ void Show() TCanvas* mainC1 = new TCanvas("PID", "PID" , 800,600); TCanvas* mainC2 = new TCanvas("Kinematics", "Kinematics" , 800,600); TCanvas* mainC3 = new TCanvas("Phi-Theta", "Phi-Theta" , 800,600); + TCanvas* mainC4 = new TCanvas("BeamSpot", "BeamSpot" , 800,600); mainC0->cd(); chain->Draw("Y:X>>h0(300,-300,300,200,-200,200)","","colz"); @@ -47,6 +48,13 @@ void Show() h3->GetXaxis()->SetTitle("#theta_{lab} (deg)"); h3->GetYaxis()->SetTitle("#phi_{lab} (MeV)"); h3->SetTitle(""); + + mainC4->cd(); + chain->Draw("fIC_Incident_Position_Y:fIC_Incident_Position_X>>h4(1000,-10,10,100,-10,10)","","colz"); + TH2F* h4 = (TH2F*)gDirectory->FindObjectAny("h4"); + h4->GetXaxis()->SetTitle("X_{beam} (mm)"); + h4->GetYaxis()->SetTitle("Y_{beam} (mm)"); + h4->SetTitle(""); return; } diff --git a/NPLib/Physics/NPBeam.cxx b/NPLib/Physics/NPBeam.cxx index ce69aa19cb7e4f2788bf444dac1778cda971ea69..93c90f27f3a8e0867d01fbc2ca6373b157c57dad 100644 --- a/NPLib/Physics/NPBeam.cxx +++ b/NPLib/Physics/NPBeam.cxx @@ -333,14 +333,14 @@ void Beam::GenerateRandomEvent(double& E, double& X, double& Y, double& Z, doubl if(fSigmaX!=-1){ // Shoot within the target unless target size is null (no limit) - while(sqrt(X*X+Y*Y>fEffectiveTargetSize) || fEffectiveTargetSize == 0){ + while(sqrt(X*X+Y*Y)>fEffectiveTargetSize || fEffectiveTargetSize == 0){ NPL::RandomGaussian2D(fMeanX, fMeanThetaX, fSigmaX, fSigmaThetaX, X, ThetaX); NPL::RandomGaussian2D(fMeanY, fMeanPhiY, fSigmaY, fSigmaPhiY, Y, PhiY); } } else{ - while(sqrt(X*X+Y*Y>fEffectiveTargetSize) || fEffectiveTargetSize == 0){ + while(sqrt(X*X+Y*Y)>fEffectiveTargetSize || fEffectiveTargetSize == 0){ fXThetaXHist->GetRandom2(X,ThetaX); fYPhiYHist->GetRandom2(Y,PhiY); }