@@ -132,13 +132,13 @@ public AlertDCLayer createLayer(ConstantProvider cp, int sectorId, int superlaye
132132 for (int wireId = 0 ; wireId < numWires ; wireId ++) {
133133
134134 // The point given by (wx, wy, wz) is the midpoint of the current wire.
135- double wx = R_layer * Math .cos (alphaW_layer * wireId );
136- double wy = R_layer * Math .sin (alphaW_layer * wireId );
135+ double wx = - R_layer * Math .sin (alphaW_layer * wireId );
136+ double wy = - R_layer * Math .cos (alphaW_layer * wireId );
137137
138138 // Find the interesection of the current wire with the end-plate
139139 // planes by construciting a long line that passes through the midpoint
140- double wx_end = R_layer * Math .cos (alphaW_layer * wireId + thster * (Math .pow (-1 , superlayerId )));
141- double wy_end = R_layer * Math .sin (alphaW_layer * wireId + thster * (Math .pow (-1 , superlayerId )));
140+ double wx_end = - R_layer * Math .sin (alphaW_layer * wireId + thster * (Math .pow (-1 , superlayerId )));
141+ double wy_end = - R_layer * Math .cos (alphaW_layer * wireId + thster * (Math .pow (-1 , superlayerId )));
142142 Line3D line = new Line3D (wx , wy , 0 , wx_end , wy_end , zl );
143143
144144 Point3D lPoint = new Point3D ();
@@ -150,31 +150,31 @@ public AlertDCLayer createLayer(ConstantProvider cp, int sectorId, int superlaye
150150 // Do not change the code above. It is for signal wires positioning
151151
152152 // Construct the cell around the signal wires created above top
153- double px_0 = (R_layer + 2 ) * Math .cos (alphaW_layer * wireId );
154- double py_0 = (R_layer + 2 ) * Math .sin (alphaW_layer * wireId );
155- double px_1 = (R_layer + 2 ) * Math .cos (alphaW_layer * wireId + alphaW_layer / 2 );
156- double py_1 = (R_layer + 2 ) * Math .sin (alphaW_layer * wireId + alphaW_layer / 2 );
157- double px_2 = (R_layer - 2 ) * Math .cos (alphaW_layer * wireId + alphaW_layer / 2 );
158- double py_2 = (R_layer - 2 ) * Math .sin (alphaW_layer * wireId + alphaW_layer / 2 );
159- double px_3 = (R_layer - 2 ) * Math .cos (alphaW_layer * wireId );
160- double py_3 = (R_layer - 2 ) * Math .sin (alphaW_layer * wireId );
161- double px_4 = (R_layer - 2 ) * Math .cos (alphaW_layer * wireId - alphaW_layer / 2 );
162- double py_4 = (R_layer - 2 ) * Math .sin (alphaW_layer * wireId - alphaW_layer / 2 );
163- double px_5 = (R_layer + 2 ) * Math .cos (alphaW_layer * wireId - alphaW_layer / 2 );
164- double py_5 = (R_layer + 2 ) * Math .sin (alphaW_layer * wireId - alphaW_layer / 2 );
153+ double px_0 = - (R_layer + 2 ) * Math .sin (alphaW_layer * wireId );
154+ double py_0 = - (R_layer + 2 ) * Math .cos (alphaW_layer * wireId );
155+ double px_1 = - (R_layer + 2 ) * Math .sin (alphaW_layer * wireId + alphaW_layer / 2 );
156+ double py_1 = - (R_layer + 2 ) * Math .cos (alphaW_layer * wireId + alphaW_layer / 2 );
157+ double px_2 = - (R_layer - 2 ) * Math .sin (alphaW_layer * wireId + alphaW_layer / 2 );
158+ double py_2 = - (R_layer - 2 ) * Math .cos (alphaW_layer * wireId + alphaW_layer / 2 );
159+ double px_3 = - (R_layer - 2 ) * Math .sin (alphaW_layer * wireId );
160+ double py_3 = - (R_layer - 2 ) * Math .cos (alphaW_layer * wireId );
161+ double px_4 = - (R_layer - 2 ) * Math .sin (alphaW_layer * wireId - alphaW_layer / 2 );
162+ double py_4 = - (R_layer - 2 ) * Math .cos (alphaW_layer * wireId - alphaW_layer / 2 );
163+ double px_5 = - (R_layer + 2 ) * Math .sin (alphaW_layer * wireId - alphaW_layer / 2 );
164+ double py_5 = - (R_layer + 2 ) * Math .cos (alphaW_layer * wireId - alphaW_layer / 2 );
165165 // bottom (do not forget to add the +20 deg. twist respect to the "straight" version)
166- double px_6 = (R_layer + 2 ) * Math .cos (alphaW_layer * wireId + thster * (Math .pow (-1 , superlayerId )));
167- double py_6 = (R_layer + 2 ) * Math .sin (alphaW_layer * wireId + thster * (Math .pow (-1 , superlayerId )));
168- double px_7 = (R_layer + 2 ) * Math .cos (alphaW_layer * wireId + alphaW_layer / 2 + thster * (Math .pow (-1 , superlayerId )));
169- double py_7 = (R_layer + 2 ) * Math .sin (alphaW_layer * wireId + alphaW_layer / 2 + thster * (Math .pow (-1 , superlayerId )));
170- double px_8 = (R_layer - 2 ) * Math .cos (alphaW_layer * wireId + alphaW_layer / 2 + thster * (Math .pow (-1 , superlayerId )));
171- double py_8 = (R_layer - 2 ) * Math .sin (alphaW_layer * wireId + alphaW_layer / 2 + thster * (Math .pow (-1 , superlayerId )));
172- double px_9 = (R_layer - 2 ) * Math .cos (alphaW_layer * wireId + thster * (Math .pow (-1 , superlayerId )));
173- double py_9 = (R_layer - 2 ) * Math .sin (alphaW_layer * wireId + thster * (Math .pow (-1 , superlayerId )));
174- double px_10 = (R_layer - 2 ) * Math .cos (alphaW_layer * wireId - alphaW_layer / 2 + thster * (Math .pow (-1 , superlayerId )));
175- double py_10 = (R_layer - 2 ) * Math .sin (alphaW_layer * wireId - alphaW_layer / 2 + thster * (Math .pow (-1 , superlayerId )));
176- double px_11 = (R_layer + 2 ) * Math .cos (alphaW_layer * wireId - alphaW_layer / 2 + thster * (Math .pow (-1 , superlayerId )));
177- double py_11 = (R_layer + 2 ) * Math .sin (alphaW_layer * wireId - alphaW_layer / 2 + thster * (Math .pow (-1 , superlayerId )));
166+ double px_6 = - (R_layer + 2 ) * Math .sin (alphaW_layer * wireId + thster * (Math .pow (-1 , superlayerId )));
167+ double py_6 = - (R_layer + 2 ) * Math .cos (alphaW_layer * wireId + thster * (Math .pow (-1 , superlayerId )));
168+ double px_7 = - (R_layer + 2 ) * Math .sin (alphaW_layer * wireId + alphaW_layer / 2 + thster * (Math .pow (-1 , superlayerId )));
169+ double py_7 = - (R_layer + 2 ) * Math .cos (alphaW_layer * wireId + alphaW_layer / 2 + thster * (Math .pow (-1 , superlayerId )));
170+ double px_8 = - (R_layer - 2 ) * Math .sin (alphaW_layer * wireId + alphaW_layer / 2 + thster * (Math .pow (-1 , superlayerId )));
171+ double py_8 = - (R_layer - 2 ) * Math .cos (alphaW_layer * wireId + alphaW_layer / 2 + thster * (Math .pow (-1 , superlayerId )));
172+ double px_9 = - (R_layer - 2 ) * Math .sin (alphaW_layer * wireId + thster * (Math .pow (-1 , superlayerId )));
173+ double py_9 = - (R_layer - 2 ) * Math .cos (alphaW_layer * wireId + thster * (Math .pow (-1 , superlayerId )));
174+ double px_10 = - (R_layer - 2 ) * Math .sin (alphaW_layer * wireId - alphaW_layer / 2 + thster * (Math .pow (-1 , superlayerId )));
175+ double py_10 = - (R_layer - 2 ) * Math .cos (alphaW_layer * wireId - alphaW_layer / 2 + thster * (Math .pow (-1 , superlayerId )));
176+ double px_11 = - (R_layer + 2 ) * Math .sin (alphaW_layer * wireId - alphaW_layer / 2 + thster * (Math .pow (-1 , superlayerId )));
177+ double py_11 = - (R_layer + 2 ) * Math .cos (alphaW_layer * wireId - alphaW_layer / 2 + thster * (Math .pow (-1 , superlayerId )));
178178
179179 // Group into points with (x,y,z) coordinates
180180 List <Point3D > firstF = new ArrayList <>();
0 commit comments