Skip to content

Commit 21c956e

Browse files
N-Plxbaltzell
authored andcommitted
style: fixed naming conventions and some cleaning
1 parent 05ac12b commit 21c956e

File tree

6 files changed

+99
-187
lines changed

6 files changed

+99
-187
lines changed

reconstruction/alert/src/main/java/org/jlab/rec/atof/Cluster/AtofCluster.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,20 +117,20 @@ public final void computeClusterProperties() {
117117
this.x = max_energy_hit.getX();
118118
this.y = max_energy_hit.getY();
119119
this.z = max_energy_hit.getZ();
120-
this.pathLength = max_energy_hit.getPath_length();
121-
this.inPathLength = max_energy_hit.getInpath_length();
120+
this.pathLength = max_energy_hit.getPathLength();
121+
this.inPathLength = max_energy_hit.getInPathLength();
122122
}
123123
else
124124
{
125125
this.time = max_energy_barhit.getTime();
126126
this.x = max_energy_barhit.getX();
127127
this.y = max_energy_barhit.getY();
128128
this.z = max_energy_barhit.getZ();
129-
this.pathLength = max_energy_barhit.getPath_length();
130-
this.inPathLength = max_energy_barhit.getInpath_length();
129+
this.pathLength = max_energy_barhit.getPathLength();
130+
this.inPathLength = max_energy_barhit.getInPathLength();
131131
}
132132
}
133-
133+
134134
public double getPhi()
135135
{
136136
return Math.atan2(this.y, this.x);

reconstruction/alert/src/main/java/org/jlab/rec/atof/Cluster/ClusterFinder.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public void makeClusters(DataEvent event, HitFinder hitfinder) {
3636
for (int i_wedge = 0; i_wedge < wedge_hits.size(); i_wedge++) {
3737
AtofHit this_wedge_hit = wedge_hits.get(i_wedge);
3838
//Make a cluster for each wedge hit that has not been previously clustered
39-
if (this_wedge_hit.getIs_in_a_cluster()) {
39+
if (this_wedge_hit.getIsInACluster()) {
4040
continue;
4141
}
4242

@@ -45,7 +45,7 @@ public void makeClusters(DataEvent event, HitFinder hitfinder) {
4545
ArrayList<BarHit> this_cluster_bar_hits = new ArrayList<>();
4646

4747
//Indicate that this hit now is in a cluster
48-
this_wedge_hit.setIs_in_a_cluster(true);
48+
this_wedge_hit.setIsInACluster(true);
4949
//And store it
5050
this_cluster_wedge_hits.add(this_wedge_hit);
5151

@@ -54,12 +54,12 @@ public void makeClusters(DataEvent event, HitFinder hitfinder) {
5454
for (int j_wedge = i_wedge + 1; j_wedge < wedge_hits.size(); j_wedge++) {
5555
AtofHit other_wedge_hit = wedge_hits.get(j_wedge);
5656
//If that other hit is already involved in a cluster, skip it
57-
if (other_wedge_hit.getIs_in_a_cluster()) {
57+
if (other_wedge_hit.getIsInACluster()) {
5858
continue;
5959
}
6060
//Check the distance between the hits
6161
//For now we use phi module and z component differences from what is observed in simu
62-
int delta_module = Math.abs(this_wedge_hit.computeModule_index() - other_wedge_hit.computeModule_index());
62+
int delta_module = Math.abs(this_wedge_hit.computeModuleIndex() - other_wedge_hit.computeModuleIndex());
6363
if (delta_module > 30) {
6464
delta_module = 60 - delta_module;
6565
}
@@ -74,7 +74,7 @@ public void makeClusters(DataEvent event, HitFinder hitfinder) {
7474
if (delta_component <= Parameters.SIGMA_COMPONENT_CLUSTERING)//delta_Z <= sigma_Z)
7575
{
7676
if (delta_T < Parameters.SIGMA_T_CLUSTERING) {
77-
other_wedge_hit.setIs_in_a_cluster(true);
77+
other_wedge_hit.setIsInACluster(true);
7878
this_cluster_wedge_hits.add(other_wedge_hit);
7979
}
8080
}
@@ -85,12 +85,12 @@ public void makeClusters(DataEvent event, HitFinder hitfinder) {
8585
for (int j_bar = 0; j_bar < bar_hits.size(); j_bar++) {
8686
BarHit other_bar_hit = bar_hits.get(j_bar);
8787
//Skip already clustered hits
88-
if (other_bar_hit.getIs_in_a_cluster()) {
88+
if (other_bar_hit.getIsInACluster()) {
8989
continue;
9090
}
9191
//Check the distance between the hits
9292
//For now we use phi module difference from what is observed in simu
93-
int delta_module = Math.abs(this_wedge_hit.computeModule_index() - other_bar_hit.computeModule_index());
93+
int delta_module = Math.abs(this_wedge_hit.computeModuleIndex() - other_bar_hit.computeModuleIndex());
9494
if (delta_module > 30) {
9595
delta_module = 60 - delta_module;
9696
}
@@ -102,7 +102,7 @@ public void makeClusters(DataEvent event, HitFinder hitfinder) {
102102
if (delta_module <= Parameters.SIGMA_MODULE_CLUSTERING) {
103103
if (delta_Z < Parameters.SIGMA_Z_CLUSTERING) {
104104
if (delta_T < Parameters.SIGMA_T_CLUSTERING) {
105-
other_bar_hit.setIs_in_a_cluster(true);
105+
other_bar_hit.setIsInACluster(true);
106106
this_cluster_bar_hits.add(other_bar_hit);
107107
}
108108
}
@@ -119,26 +119,26 @@ public void makeClusters(DataEvent event, HitFinder hitfinder) {
119119
for (int i_bar = 0; i_bar < bar_hits.size(); i_bar++) {
120120
BarHit this_bar_hit = bar_hits.get(i_bar);
121121
//Skip hits that have already been clustered
122-
if (this_bar_hit.getIs_in_a_cluster()) {
122+
if (this_bar_hit.getIsInACluster()) {
123123
continue;
124124
}
125125

126126
ArrayList<AtofHit> this_cluster_wedge_hits = new ArrayList<>();
127127
ArrayList<BarHit> this_cluster_bar_hits = new ArrayList<>();
128-
this_bar_hit.setIs_in_a_cluster(true);
128+
this_bar_hit.setIsInACluster(true);
129129
this_cluster_bar_hits.add(this_bar_hit);
130130

131131
//Loop through less energetic clusters
132132
for (int j_bar = i_bar + 1; j_bar < bar_hits.size(); j_bar++) {
133133
BarHit other_bar_hit = bar_hits.get(j_bar);
134134
//Skip already clustered hits
135-
if (other_bar_hit.getIs_in_a_cluster()) {
135+
if (other_bar_hit.getIsInACluster()) {
136136
continue;
137137
}
138138

139139
//Check the distance between the hits
140140
//For now we use phi module difference from what is observed in simu
141-
int delta_module = Math.abs(this_bar_hit.computeModule_index() - other_bar_hit.computeModule_index());
141+
int delta_module = Math.abs(this_bar_hit.computeModuleIndex() - other_bar_hit.computeModuleIndex());
142142
if (delta_module > 30) {
143143
delta_module = 60 - delta_module;
144144
}
@@ -151,7 +151,7 @@ public void makeClusters(DataEvent event, HitFinder hitfinder) {
151151
if (delta_module <= Parameters.SIGMA_MODULE_CLUSTERING) {
152152
if (delta_Z < Parameters.SIGMA_Z_CLUSTERING) {
153153
if (delta_T < Parameters.SIGMA_T_CLUSTERING) {
154-
other_bar_hit.setIs_in_a_cluster(true);
154+
other_bar_hit.setIsInACluster(true);
155155
this_cluster_bar_hits.add(other_bar_hit);
156156
}
157157
}

reconstruction/alert/src/main/java/org/jlab/rec/atof/Hit/AtofHit.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -434,13 +434,13 @@ public final void matchTrack(TrackProjector track_projector) {
434434
case "wedge" -> {
435435
sigma_phi = Parameters.SIGMA_PHI_TRACK_MATCHING_WEDGE;
436436
sigma_z = Parameters.SIGMA_Z_TRACK_MATCHING_WEDGE;
437-
projection_point = Projections.get(i_track).get_WedgeIntersect();
437+
projection_point = Projections.get(i_track).getWedgeIntersect();
438438
}
439439
case "bar up", "bar down" -> {
440440
System.out.print("WARNING : YOU ARE MATCHING A TRACK TO A SINGLE HIT IN THE BAR. \n");
441441
sigma_phi = Parameters.SIGMA_PHI_TRACK_MATCHING_BAR;
442442
sigma_z = Parameters.SIGMA_Z_TRACK_MATCHING_BAR;
443-
projection_point = Projections.get(i_track).get_BarIntersect();
443+
projection_point = Projections.get(i_track).getBarIntersect();
444444
}
445445
default ->
446446
System.out.print("Impossible to match track and hit; hit type is undefined \n");
@@ -449,9 +449,9 @@ public final void matchTrack(TrackProjector track_projector) {
449449
if (Math.abs(this.getPhi() - projection_point.toVector3D().phi()) < sigma_phi) {
450450
if (Math.abs(this.getZ() - projection_point.z()) < sigma_z) {
451451
if ("wedge".equals(this.getType())) {
452-
this.setPathLength(Projections.get(i_track).get_WedgePathLength());
452+
this.setPathLength(Projections.get(i_track).getWedgePathLength());
453453
} else {
454-
this.setPathLength(Projections.get(i_track).get_BarPathLength());
454+
this.setPathLength(Projections.get(i_track).getBarPathLength());
455455
}
456456
}
457457
}

reconstruction/alert/src/main/java/org/jlab/rec/atof/TrackMatch/TrackProjection.java

Lines changed: 36 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -13,73 +13,73 @@ public class TrackProjection {
1313
/**
1414
* Intersection point of the track with the middle surface of the bar.
1515
*/
16-
private Point3D _BarIntersect = new Point3D();
16+
private Point3D barIntersect = new Point3D();
1717

1818
/**
1919
* Intersection point of the track with the middle surface of the wedges.
2020
*/
21-
private Point3D _WedgeIntersect = new Point3D();
21+
private Point3D wedgeIntersect = new Point3D();
2222

2323
/**
2424
* Path length of the track from the DOCA to the beam line
2525
* to the entrance surface of the bar.
2626
*/
27-
Float _BarPathLength;
27+
Float barPathLength;
2828

2929
/**
3030
* Path length of the track from the DOCA to the beam line
3131
* to the entrance surface of the wedges.
3232
*/
33-
Float _WedgePathLength;
33+
Float wedgePathLength;
3434

3535
/**
3636
* Path length inside the bar.
3737
*/
38-
Float _BarInPathLength;
38+
Float barInPathLength;
3939

4040
/**
4141
* Path length inside the wedge.
4242
*/
43-
Float _WedgeInPathLength;
43+
Float wedgeInPathLength;
4444

4545

4646
/**
4747
* Default constructor that initializes the intersection points and path lengths to {@code NaN}.
4848
*/
4949
public TrackProjection() {
50-
_BarIntersect = new Point3D(Double.NaN, Double.NaN, Double.NaN);
51-
_WedgeIntersect = new Point3D(Double.NaN, Double.NaN, Double.NaN);
52-
_BarPathLength = Float.NaN;
53-
_WedgePathLength = Float.NaN;
54-
_BarInPathLength = Float.NaN;
55-
_WedgeInPathLength = Float.NaN;
50+
barIntersect = new Point3D(Double.NaN, Double.NaN, Double.NaN);
51+
wedgeIntersect = new Point3D(Double.NaN, Double.NaN, Double.NaN);
52+
barPathLength = Float.NaN;
53+
wedgePathLength = Float.NaN;
54+
barInPathLength = Float.NaN;
55+
wedgeInPathLength = Float.NaN;
5656
}
5757

5858
/**
5959
* Gets the intersection point of the track with the middle surface of the bar.
6060
*
6161
* @return {@link Point3D} bar's intersection point.
6262
*/
63-
public Point3D get_BarIntersect() {
64-
return _BarIntersect;
63+
public Point3D getBarIntersect() {
64+
return barIntersect;
6565
}
6666

6767
/**
6868
* Gets the intersection point of the track with the middle surface of the wedges.
6969
*
7070
* @return {@link Point3D} wedge's intersection point.
7171
*/
72-
public Point3D get_WedgeIntersect() {
73-
return _WedgeIntersect;
72+
public Point3D getWedgeIntersect() {
73+
return wedgeIntersect;
7474
}
7575

7676
/**
7777
* Gets the path length of the track from the DOCA to the beam line to the inner surface of the bar.
7878
*
7979
* @return {@code Float} path length to the bar's middle surface.
8080
*/
81-
public Float get_BarPathLength() {
82-
return _BarPathLength;
81+
public Float getBarPathLength() {
82+
return barPathLength;
8383
}
8484

8585
/**
@@ -88,17 +88,17 @@ public Float get_BarPathLength() {
8888
*
8989
* @return {@code Float} path length inside the bar.
9090
*/
91-
public Float get_BarInPathLength() {
92-
return _BarInPathLength;
91+
public Float getBarInPathLength() {
92+
return barInPathLength;
9393
}
9494

9595
/**
9696
* Gets the path length of the track from the DOCA to the beam line to the inner surface of the wedges.
9797
*
9898
* @return {@code Float} path length to the wedge's middle surface.
9999
*/
100-
public Float get_WedgePathLength() {
101-
return _WedgePathLength;
100+
public Float getWedgePathLength() {
101+
return wedgePathLength;
102102
}
103103

104104
/**
@@ -107,64 +107,63 @@ public Float get_WedgePathLength() {
107107
*
108108
* @return {@code Float} path length inside the wedge.
109109
*/
110-
public Float get_WedgeInPathLength() {
111-
return _WedgeInPathLength;
110+
public Float getWedgeInPathLength() {
111+
return wedgeInPathLength;
112112
}
113113

114114
/**
115115
* Sets the intersection point of the track with the middle surface of the bar.
116116
*
117117
* @param BarIntersect {@link Point3D} intersection with the bar.
118118
*/
119-
public void set_BarIntersect(Point3D BarIntersect) {
120-
this._BarIntersect = BarIntersect;
119+
public void setBarIntersect(Point3D BarIntersect) {
120+
this.barIntersect = BarIntersect;
121121
}
122122

123123
/**
124124
* Sets the intersection point of the track with the middle surface of the wedges.
125125
*
126126
* @param WedgeIntersect {@link Point3D} intersection with the wedge.
127127
*/
128-
public void set_WedgeIntersect(Point3D WedgeIntersect) {
129-
this._WedgeIntersect = WedgeIntersect;
128+
public void setWedgeIntersect(Point3D WedgeIntersect) {
129+
this.wedgeIntersect = WedgeIntersect;
130130
}
131131

132132
/**
133133
* Sets the path length of the track from the DOCA to the beam line to the inner surface of the bar.
134134
*
135135
* @param BarPathLength {@code Float} path length to the bar inner surface.
136136
*/
137-
public void set_BarPathLength(Float BarPathLength) {
138-
this._BarPathLength = BarPathLength;
137+
public void setBarPathLength(Float BarPathLength) {
138+
this.barPathLength = BarPathLength;
139139
}
140140

141141
/**
142142
* Sets the path length of the track from the DOCA to the beam line to the inner surface of the wedges.
143143
*
144144
* @param WedgePathLength {@code Float} path length to the wedge inner surface.
145145
*/
146-
public void set_WedgePathLength(Float WedgePathLength) {
147-
this._WedgePathLength = WedgePathLength;
146+
public void setWedgePathLength(Float WedgePathLength) {
147+
this.wedgePathLength = WedgePathLength;
148148
}
149149

150150
/**
151151
* Sets the path length of the track inside the bar.
152152
*
153153
* @param BarInPathLength {@code Float} path length inside the bar.
154154
*/
155-
public void set_BarInPathLength(Float BarInPathLength) {
156-
this._BarInPathLength = BarInPathLength;
155+
public void setBarInPathLength(Float BarInPathLength) {
156+
this.barInPathLength = BarInPathLength;
157157
}
158158

159159
/**
160160
* Sets the path length of the track inside the wedges.
161161
*
162162
* @param WedgeInPathLength {@code Float} path length inside the wedge.
163163
*/
164-
public void set_WedgeInPathLength(Float WedgeInPathLength) {
165-
this._WedgeInPathLength = WedgeInPathLength;
164+
public void setWedgeInPathLength(Float WedgeInPathLength) {
165+
this.wedgeInPathLength = WedgeInPathLength;
166166
}
167-
168167

169168
/**
170169
* testing purposes.

0 commit comments

Comments
 (0)