removed playing god
This commit is contained in:
parent
f2c53940f6
commit
172594a90a
|
|
@ -50,7 +50,7 @@ public:
|
||||||
return E_beam*(m_d/(m_A+m_d));
|
return E_beam*(m_d/(m_A+m_d));
|
||||||
}
|
}
|
||||||
|
|
||||||
double getEbeam_givenQ(double e3, double Ex, double angle3_deg) {
|
double getEbeam_givenQ(double e3, double Ex, double angle3_deg) { // e3 is detected particle energy, Ex is excitation energy, angle3_deg is detected particle angle in degrees
|
||||||
double angle = angle3_deg*TMath::Pi()/180.0;
|
double angle = angle3_deg*TMath::Pi()/180.0;
|
||||||
double m1 = m_A * u_MeV;
|
double m1 = m_A * u_MeV;
|
||||||
//double m2 = m_d * u_MeV;
|
//double m2 = m_d * u_MeV;
|
||||||
|
|
@ -64,7 +64,7 @@ public:
|
||||||
|
|
||||||
double result_sq1 = (BB - TMath::Sqrt(BB*BB-AA*CC))/(AA);
|
double result_sq1 = (BB - TMath::Sqrt(BB*BB-AA*CC))/(AA);
|
||||||
return result_sq1*result_sq1;
|
return result_sq1*result_sq1;
|
||||||
}
|
} // to use in anasenMS.cpp, call like: apkin_27Al.getEbeam_givenQ(Esx3, 0.0, thetab);
|
||||||
|
|
||||||
void setValues(double m1, double m2, double m3, double m4, double ebeam) {
|
void setValues(double m1, double m2, double m3, double m4, double ebeam) {
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -168,7 +168,8 @@ int main(int argc, char **argv){
|
||||||
|
|
||||||
// Excited state lists (projectile and heavy-product excitation states)
|
// Excited state lists (projectile and heavy-product excitation states)
|
||||||
std::vector<float> ExAList = {0}; // Beam excited energy
|
std::vector<float> ExAList = {0}; // Beam excited energy
|
||||||
std::vector<float> ExList = {0, 2.235, 3.498, 4.809, 5.614, 6.550}; // Heavy product excited energy
|
//std::vector<float> ExList = {0, 2.235, 3.498, 3.774, 4.831, 4.809, 5.279, 5.614, 5.951, 6.550}; // Heavy product excited energy
|
||||||
|
std::vector<float> ExList = {2.235};
|
||||||
|
|
||||||
const int kMBeam = reactionConfig.beamA; // mass number of beam
|
const int kMBeam = reactionConfig.beamA; // mass number of beam
|
||||||
const int kMTarget = reactionConfig.targetA; // mass number of target
|
const int kMTarget = reactionConfig.targetA; // mass number of target
|
||||||
|
|
@ -725,7 +726,7 @@ int main(int argc, char **argv){
|
||||||
AutoHist2D::Fill("EPC x sin(theta) vs Esx3", Esx3, EPC * sin(thetab * TMath::DegToRad()), "Esx3 (MeV)", "EPC x sin(theta) (MeV)");
|
AutoHist2D::Fill("EPC x sin(theta) vs Esx3", Esx3, EPC * sin(thetab * TMath::DegToRad()), "Esx3 (MeV)", "EPC x sin(theta) (MeV)");
|
||||||
//tree1->Fill();
|
//tree1->Fill();
|
||||||
|
|
||||||
Kinematics apkin_27Al(26.981538408,4.00260325413,1.00782503224,29.973770136,beamEnergy/26.981538408); //m3 is proton
|
|
||||||
if (!std::isnan(aX) && !std::isnan(aY) && !std::isnan(aZ) && aZ != 54321 && (aX != 0 || aY != 0 || aZ != 0)) {
|
if (!std::isnan(aX) && !std::isnan(aY) && !std::isnan(aZ) && aZ != 54321 && (aX != 0 || aY != 0 || aZ != 0)) {
|
||||||
//reconstruct theta using anode and sx3 positions, apply a sigma to the anode locations
|
//reconstruct theta using anode and sx3 positions, apply a sigma to the anode locations
|
||||||
//calulate vertex like in experiment
|
//calulate vertex like in experiment
|
||||||
|
|
@ -739,7 +740,7 @@ int main(int argc, char **argv){
|
||||||
vY_track = r_rhoMin_fix.Y();
|
vY_track = r_rhoMin_fix.Y();
|
||||||
vZ_track = r_rhoMin_fix.Z();
|
vZ_track = r_rhoMin_fix.Z();
|
||||||
|
|
||||||
EBeam_track = elossBeam->Eval((vZ_track + 450) / 10);
|
EBeam_track = elossBeam->Eval((vZ_track + 454.3) / 10);
|
||||||
|
|
||||||
Tb_recon = CalculateOriginalEnergy(hitX, hitY, hitZ,
|
Tb_recon = CalculateOriginalEnergy(hitX, hitY, hitZ,
|
||||||
vX_track, vY_track, vZ_track,
|
vX_track, vY_track, vZ_track,
|
||||||
|
|
@ -747,13 +748,15 @@ int main(int argc, char **argv){
|
||||||
//0, 0, vertexZ,
|
//0, 0, vertexZ,
|
||||||
b, "He", Esx3,
|
b, "He", Esx3,
|
||||||
distance_sx3);
|
distance_sx3);
|
||||||
|
|
||||||
|
Kinematics apkin_27Al(26.981538408,4.00260325413,1.00782503224,29.973770136,EBeam_track/26.981538408); //m3 is proton
|
||||||
|
|
||||||
//kinematic reconstruction
|
//kinematic reconstruction
|
||||||
theta_recon = TVector3(hitX - aX_sigma, hitY - aY_sigma, hitZ - aZ_sigma).Theta() * 180.0 / TMath::Pi();
|
theta_recon = TVector3(hitX - aX_sigma, hitY - aY_sigma, hitZ - aZ_sigma).Theta() * 180.0 / TMath::Pi();
|
||||||
Ex_kin = apkin_27Al.getExc(Tb_recon, theta_recon);
|
|
||||||
EBeam_kin = apkin_27Al.getEbeam_givenQ(Tb_recon, Ex, theta_recon); //args are (reaction energy, Ex, thetab) still tracking
|
EBeam_kin = apkin_27Al.getEbeam_givenQ(Tb_recon, Ex, theta_recon); //args are (reaction energy, Ex, thetab) still tracking
|
||||||
vZ_kin = elossBeamInverse->Eval(EBeam_kin) * 10 - 450;
|
vZ_kin = elossBeamInverse->Eval(EBeam_kin) * 10 - 454.3;
|
||||||
|
|
||||||
|
Ex_kin = apkin_27Al.getExc(Tb_recon, theta_recon);
|
||||||
/*Checklist: anode smudge, sx3 smudge, beam position off axis, beam angle*/
|
/*Checklist: anode smudge, sx3 smudge, beam position off axis, beam angle*/
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,14 +33,15 @@
|
||||||
tree1->Draw("Ex_recon:vZ >> hExReconVsVZ", "sx3ID >= 0", "colz");
|
tree1->Draw("Ex_recon:vZ >> hExReconVsVZ", "sx3ID >= 0", "colz");
|
||||||
tree1->Draw("Ex:vZ >> h5", "sx3ID >= 0 && EPC >= 0.03", "same");
|
tree1->Draw("Ex:vZ >> h5", "sx3ID >= 0 && EPC >= 0.03", "same");
|
||||||
*/
|
*/
|
||||||
|
|
||||||
new TCanvas("c1", "Canvas", 900, 600);
|
new TCanvas("c1", "Canvas", 900, 600);
|
||||||
tree1->Draw("Ex_kin:vZ_kin>>h2(800,-500,300,110,-1,10)", "sx3ID >=0 && !TMath::IsNaN(vZ_kin)", "colz");
|
tree1->Draw("Ex_kin:vZ_kin>>h2(800,-500,300,110,-1,10)", "sx3ID >=0 && !TMath::IsNaN(vZ_kin)", "colz");
|
||||||
tree1->Draw("Ex:vZ", "sx3ID >=0 && !TMath::IsNaN(vZ)", "same");
|
tree1->Draw("Ex:vZ", "sx3ID >=0 && !TMath::IsNaN(vZ)", "same");
|
||||||
c1->SaveAs("Ex_kin.png");
|
c1->SaveAs("Ex_kin_vz.png");
|
||||||
/*
|
/*
|
||||||
new TCanvas("c2", "Canvas", 900, 600);
|
new TCanvas("c2", "Canvas", 900, 600);
|
||||||
tree1->Draw("theta_recon:thetab", "sx3ID >=0 && Esx3 > 0", "");
|
tree1->Draw("theta_recon:thetab", "sx3ID >=0 && Esx3 > 0", "");
|
||||||
c2->SaveAs("theta_recon_vs_thetab.png");*/
|
c2->SaveAs("theta_recon_vs_thetab.png");
|
||||||
|
|
||||||
new TCanvas("c3", "Canvas", 900, 600);
|
new TCanvas("c3", "Canvas", 900, 600);
|
||||||
tree1->Draw("vZ_track:vZ", "sx3ID >=0 && !TMath::IsNaN(vZ_track)", "");
|
tree1->Draw("vZ_track:vZ", "sx3ID >=0 && !TMath::IsNaN(vZ_track)", "");
|
||||||
|
|
@ -65,6 +66,13 @@
|
||||||
TF1 *line_kin_kin = new TF1("line_beam_kin", "x", gPad->GetUxmin(), gPad->GetUxmax());
|
TF1 *line_kin_kin = new TF1("line_beam_kin", "x", gPad->GetUxmin(), gPad->GetUxmax());
|
||||||
line_kin_kin->SetLineColor(kRed); line_kin_kin->Draw("SAME");
|
line_kin_kin->SetLineColor(kRed); line_kin_kin->Draw("SAME");
|
||||||
c6->SaveAs("Ebeam_kin_vs_beamEnergy.png");
|
c6->SaveAs("Ebeam_kin_vs_beamEnergy.png");
|
||||||
|
*/
|
||||||
|
new TCanvas("c7", "Canvas", 900, 600);
|
||||||
|
//c7->SetLogy();
|
||||||
|
tree1->Draw("Ex_kin", "sx3ID >= 0");
|
||||||
|
tree1->Draw("Ex", "sx3ID >= 0", "same");
|
||||||
|
tree1->GetHistogram()->SetLineColor(kRed);
|
||||||
|
c7->SaveAs("Ex_kin.png");
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user