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

Debug TOF

parent 14830aa0
Branches
Tags
1 merge request!92Draft: Resolve "Add TOF benchmark"
...@@ -39,9 +39,9 @@ void gen_tof_hits(int n_events = 100, ...@@ -39,9 +39,9 @@ void gen_tof_hits(int n_events = 100,
GenParticlePtr p2 = std::make_shared<GenParticle>(FourVector(0.0, 0.0, 0.0, 0.938), 2212, 4); GenParticlePtr p2 = std::make_shared<GenParticle>(FourVector(0.0, 0.0, 0.0, 0.938), 2212, 4);
// Define momentum // Define momentum
Double_t p = r1->Uniform(0.5, 2); Double_t p = r1->Uniform(0.2, 2);
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.05, 0.05); //r1->Uniform(cos_theta_min, cos_theta_max); Double_t costh = 0; //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);
......
...@@ -147,8 +147,8 @@ int sim_tof_hits(const char* fname = "sim_tof_hits.root") ...@@ -147,8 +147,8 @@ int sim_tof_hits(const char* fname = "sim_tof_hits.root")
auto hVertexEndcap_N_vs_theta = df0.Histo1D({"hVertexEndcap_N_vs_theta", "; #theta [deg.]", 20, 0, 180 }, "theta0", "N_VertexEndcapHits"); auto hVertexEndcap_N_vs_theta = df0.Histo1D({"hVertexEndcap_N_vs_theta", "; #theta [deg.]", 20, 0, 180 }, "theta0", "N_VertexEndcapHits");
auto hBarrelTof_time_vs_length = df0.Histo2D( auto hBarrelTof_time_vs_p = df0.Histo2D(
{"hBarrelTof_time_vs_length", "; time ; length ", 100, 0, 10, 100, 0, 1}, {"hBarrelTof_time_vs_length", "; time ; p ", 100, 0, 10, 100, 0, 2},
"BarrelTOFHits.truth.time", "BarrelTOFHits.length"); "BarrelTOFHits.truth.time", "BarrelTOFHits.length");
auto hBarrelTof_x_vs_y = df0.Histo2D( auto hBarrelTof_x_vs_y = df0.Histo2D(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment