Skip to content
Snippets Groups Projects
Commit 06a696f0 authored by Zhenyu Ye's avatar Zhenyu Ye
Browse files

Add pion/kaon/proton

parent b959c02a
Branches
No related tags found
1 merge request!92Draft: Resolve "Add TOF benchmark"
...@@ -41,7 +41,7 @@ void gen_tof_hits(int n_events = 100, ...@@ -41,7 +41,7 @@ void gen_tof_hits(int n_events = 100,
// Define momentum // Define momentum
Double_t p = 0.5; //r1->Uniform(1, 10); Double_t p = 0.5; //r1->Uniform(1, 10);
Double_t phi = r1->Uniform(0.0, 2.0 * M_PI); Double_t phi = r1->Uniform(0.0, 2.0 * M_PI);
Double_t costh = r1->Uniform(-0.707, 0.707); //r1->Uniform(cos_theta_min, cos_theta_max); Double_t costh = r1->Uniform(-0.05, 0.05); //r1->Uniform(cos_theta_min, cos_theta_max);
Double_t th = std::acos(costh); Double_t th = std::acos(costh);
Double_t px = p * std::cos(phi) * std::sin(th); Double_t px = p * std::cos(phi) * std::sin(th);
Double_t py = p * std::sin(phi) * std::sin(th); Double_t py = p * std::sin(phi) * std::sin(th);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment