Skip to content
Snippets Groups Projects
Commit 6f0824cf authored by Alex Jentsch's avatar Alex Jentsch
Browse files

Change units to mm, and put in detector offset to center the coordinates.

parent 6889e24d
No related branches found
No related tags found
No related merge requests found
This commit is part of merge request !195. Comments created here will be created in the context of that merge request.
......@@ -21,8 +21,8 @@ void gen_far_forward_protons(int n_events = 100,
double minMomentum = 270.0; //GeV
double maxMomentum = 275.0; //GeV
double cos_theta_min = std::cos(0.0*(M_PI/180.0)); //we need MRAD for the units - syntax is degrees*Pi/180
double cos_theta_max = std::cos(0.2864789*(M_PI/180.0)); //1.15 degrees = 20mrad FF region is 0.0 to 20.0 mrad
double cos_theta_min = std::cos(0.0); //we need MRAD for the units - syntax is degrees*Pi/180
double cos_theta_max = std::cos(0.005); //1.15 degrees = 20mrad FF region is 0.0 to 20.0 mrad
WriterAscii hepmc_output(out_fname);
int events_parsed = 0;
......
......@@ -19,6 +19,8 @@ R__LOAD_LIBRARY(libDD4pod.so)
using ROOT::RDataFrame;
using namespace ROOT::VecOps;
double local_x_offset = -833.3878326;
auto p_track = [](std::vector<eic::TrackParametersData> const& in) {
std::vector<double> result;
......@@ -93,7 +95,7 @@ auto local_position = [](const std::vector<dd4pod::TrackerHitData>& hits) {
//auto pos1 = cellid_converter.position(h.cellID);
//result.push_back({pos0.x / 10.0 - pos1.x(), pos0.y / 10.0 - pos1.y()});
result.push_back({pos0.x , pos0.y});
result.push_back({pos0.x - local_x_offset, pos0.y});
}
return result;
};
......@@ -146,7 +148,7 @@ int hits_far_forward_protons(const char* fname = "sim_far_forward_protons.root")
.Define("y_pos", y_pos, {"xy_hit_pos"})
;
auto h_local_pos = df0.Histo2D({"h_local_pos", ";x [cm]; y [cm] ", 100, -1000.0, -700.0, 100, -8.0, 8.0}, "x_pos", "y_pos");
auto h_local_pos = df0.Histo2D({"h_local_pos", ";x [mm]; y [mm] ", 100, -150.0, 150.0, 100, -100.0, 100.0}, "x_pos", "y_pos");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment