Skip to content

Commit

Permalink
Changed plots to draw things at the position of the hit instead at th…
Browse files Browse the repository at this point in the history
…e wire center
  • Loading branch information
Valerio Pia committed Oct 15, 2024
1 parent d071dec commit ac6788f
Show file tree
Hide file tree
Showing 4 changed files with 210 additions and 194 deletions.
4 changes: 2 additions & 2 deletions include/SANDTrackerModuleConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ namespace TrackerModuleConfiguration
std::map<std::string, double> _id_to_angle =
{
{"0", 0},
{"1", 0},
{"2", M_PI_2}
{"1", -M_PI / 36.},
{"2", M_PI / 36.}
};

std::map<std::string, double> _id_to_offset =
Expand Down
6 changes: 6 additions & 0 deletions src/SANDDigitizationEDEPSIM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,12 @@ void create_digits_from_hits(const SANDGeoManager& geo,
wire_info);

if (hit_smallest_time < wire_time) {
// Notice: this is temporary. Used to plot something useful.
// Must be removed when plots are not needed anymore
d.x = closest_point_hit_l.Vect().X();
d.y = closest_point_hit_l.Vect().Y();
d.z = closest_point_hit_l.Vect().Z();

wire_time = hit_smallest_time;
t_hit = closest_point_hit_l.T();
drift_time = closest_point_wire_l.T() - t_hit;
Expand Down
6 changes: 4 additions & 2 deletions src/SANDGeoManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,8 @@ void SANDGeoManager::set_stt_plane_info(const TGeoNode* const node,
TGeoHMatrix plane_hmatrix = matrix * (*plane_matrix);
TGeoBBox* plane_shape = (TGeoBBox*)node->GetVolume()->GetShape();
TVector3 plane_dimension;
if(angle == 0) {
// Notice: this is a workaround to the planes in the geometry being rotated sometimes
if(stt_plane_local_id() != 2) {
plane_dimension.SetX(2 * plane_shape->GetDZ());
plane_dimension.SetY(2 * plane_shape->GetDY());
} else {
Expand Down Expand Up @@ -929,7 +930,8 @@ void SANDGeoManager::set_drift_plane_info(const TGeoNode* const node,

TGeoBBox* plane_shape = (TGeoBBox*)node->GetVolume()->GetShape();
TVector3 plane_dimension;
if(angle == 0) {
// Notice: this is a workaround to the planes in the geometry being rotated sometimes
if(drift_plane_local_id() != 2) {
plane_dimension.SetX(2 * plane_shape->GetDZ());
plane_dimension.SetY(2 * plane_shape->GetDY());
} else {
Expand Down
Loading

0 comments on commit ac6788f

Please sign in to comment.