Skip to content

Commit 34e09ae

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent c93d2fe commit 34e09ae

File tree

6 files changed

+52
-48
lines changed

6 files changed

+52
-48
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This branch has been created by Sam Henry to test a new outer barrel geometry wi
55

66
The OB stave structure has replaced the flat silicon surface with a curved surface. The carbon fibre frame has been replaced with a flat layer. The staves are no longer tilted and are positioned alternately at radii separated by 6mm.
77

8-
In this test, the curved silicon surface for each stave is modelled as a single module - a segment of a cylinder with a radius of 80mm. In the final version we will include the top and bottom layers of the stave with 4 modules for L3 and 8 for L4.
8+
In this test, the curved silicon surface for each stave is modelled as a single module - a segment of a cylinder with a radius of 80mm. In the final version we will include the top and bottom layers of the stave with 4 modules for L3 and 8 for L4.
99

1010
This is not yet working - eicrecon does not see the outer barrel hits.
1111

@@ -27,7 +27,7 @@ The test script runs a simulation shooting 1000 muons through the vertex and sil
2727

2828
**Tests**
2929

30-
Run tests in eic-shell --version 25.07.0-stable . In the latest version, eicrecon generates errors and the control test fails, presumably due to issues with a new ACTs version.
30+
Run tests in eic-shell --version 25.07.0-stable . In the latest version, eicrecon generates errors and the control test fails, presumably due to issues with a new ACTs version.
3131

3232
Control test with epic-main geometry
3333
```
@@ -45,7 +45,7 @@ Mean nMeasurements: 3
4545
```
4646
Test simple curved model
4747
```
48-
cp SimpleCurved_silicon_barrel.xml install/share/epic/compact/tracking/silicon_barrel.xml
48+
cp SimpleCurved_silicon_barrel.xml install/share/epic/compact/tracking/silicon_barrel.xml
4949
./TestOB.sh
5050
```
5151
Mean nMeasurements: 4.947

SimpleCurved_silicon_barrel.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
height="SiBarrelMod1Frame_height"
7171
length="SiBarrelMod1_length"
7272
thickness="SiBarrelMod1Frame_thickness" />
73-
73+
7474
<module_component name="Service"
7575
material="Aluminum"
7676
sensitive="false"
@@ -82,7 +82,7 @@
8282
material="Silicon"
8383
sensitive="true"
8484
radius="SiBarrelMod1_rmin+6*mm"
85-
offset="-SiBarrelMod1_rmin"
85+
offset="-SiBarrelMod1_rmin"
8686
phi0="-0.068" phi1="0.068"
8787
width="SiBarrelStave1_width"
8888
length="SiBarrelMod1_length"
@@ -151,8 +151,8 @@
151151
length="SiBarrelMod2_length"
152152
thickness="SiBarrelSensor_thickness"
153153
vis="TrackerLayerVis" />
154-
</module>
155-
154+
</module>
155+
156156
<comment> Layers composed of many arrayed modules </comment>
157157
<layer module="Module1" id="4" vis="TrackerLayerVis">
158158
<barrel_envelope
@@ -190,7 +190,7 @@
190190

191191
<readouts>
192192
<readout name="SiBarrelHits">
193-
<segmentation type="MultiSegmentation" key="layer">
193+
<segmentation type="MultiSegmentation" key="layer">
194194
<segmentation name="L3" type="CylindricalGridPhiZ" key_value="3" grid_size_phi="0.02*mm/(SiBarrelMod1_rmin+6*mm)" grid_size_z="0.02*mm" radius="SiBarrelMod1_rmin+6*mm" />
195195
<segmentation name="L4" type="CylindricalGridPhiZ" key_value="4" grid_size_phi="0.04*mm/(SiBarrelMod2_rmin+6*mm)" grid_size_z="0.04*mm" radius="SiBarrelMod2_rmin+6*mm" />
196196
</segmentation>

TestOB.C

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
void TestOB(){
1+
void TestOB() {
22
TFile* eicFile = new TFile("reconTest.edm4eic.root");
33
TTree* eicTree = (TTree*)eicFile->Get("events");
44
eicTree->Draw("CentralCKFTrajectories.nMeasurements>>nM");

compact/tracking/silicon_barrel.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@
7474
length="SiBarrelLayer1_length" />
7575
<comment>Silicon Barrel Modules</comment>
7676
<module name="Module1" vis="TrackerLayerVis">
77-
77+
7878
<module_component name="Support"
7979
material="CarbonFiber"
8080
sensitive="false"
8181
width="SiBarrelStave1_width"
8282
length="SiBarrelMod1_length"
8383
thickness="SiBarrelMod2Frame_thickness"
84-
vis="TrackerLayerVis" />
84+
vis="TrackerLayerVis" />
8585
<module_component name="Service"
8686
material="Aluminum"
8787
sensitive="false"
@@ -99,7 +99,7 @@
9999
length="SiBarrelMod1_length"
100100
thickness="SiBarrelSensor_thickness"
101101
vis="TrackerLayerVis" />
102-
102+
103103
</module>
104104
<comment> Layers composed of many arrayed modules </comment>
105105
<layer module="Module1" id="3" vis="TrackerLayerVis">
@@ -166,7 +166,7 @@
166166
length="SiBarrelMod2_length"
167167
thickness="SiBarrelSensor_thickness"
168168
vis="TrackerLayerVis" />
169-
169+
170170
</module>
171171

172172
<comment> Layers composed of many arrayed modules </comment>
@@ -203,7 +203,7 @@
203203
<argument value="layer_pattern: str=OuterSiBarrel_layer\d" />
204204
</plugin>
205205
</plugins>
206-
206+
207207
<readouts>
208208
<readout name="SiBarrelHits">
209209
<segmentation type="CylindricalGridPhiZ" grid_size_phi="0.02*mm/(80.0*mm)" grid_size_z="0.02*mm" radius="80.0*mm" />

epic_craterlake_tracking_only_cut.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
## Electric and magnetic fields
120120
</documentation>
121121
<include ref="${DETECTOR_PATH}/compact/fields/marco.xml"/>
122-
122+
123123
<documentation level="10">
124124
## Central tracking detectors
125125
</documentation>
@@ -128,7 +128,7 @@
128128
<include ref="${DETECTOR_PATH}/compact/tracking/vertex_barrel.xml"/>
129129
<include ref="${DETECTOR_PATH}/compact/tracking/silicon_barrel.xml"/>
130130
<include ref="${DETECTOR_PATH}/compact/tracking/silicon_disks.xml"/>
131-
131+
132132
<documentation level="11">
133133
## Central beam pipe
134134
</documentation>

src/BarrelTrackerWithFrame_geo.cpp

Lines changed: 36 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -173,40 +173,44 @@ static Ref_t create_BarrelTrackerWithFrame(Detector& description, xml_h e, Sensi
173173
xml_comp_t x_pos = x_comp.position(false);
174174
xml_comp_t x_rot = x_comp.rotation(false);
175175
const string c_nam = _toString(ncomponents, "component%d");
176-
176+
177177
Volume c_vol;
178-
if(x_comp.nameStr().find("CurvedSilicon") != std::string::npos){
179-
double c_rmin = x_comp.radius(); // radius of curvature in cm
180-
double c_phi0 = x_comp.phi0(); // start and stop angle of segment in rad - zero is centre of stave
181-
double c_phi1 = x_comp.phi1();
182-
double c_z0 = x_comp.offset(); // position of centre of cylinder in cm ( = radius of curvature - maximum height of curved surface above flat base)
183-
Tube c_tube(c_rmin, c_rmin + x_comp.thickness(), x_comp.length()/2, M_PI/2 + c_phi0, M_PI/2 + c_phi1);
184-
c_vol = Volume(c_nam, c_tube, description.material(x_comp.materialStr()));
185-
const double zoff = thickness_sum + x_comp.thickness() / 2.0;
186-
Position c_pos(0,0,c_z0 + zoff);
187-
RotationZYX c_rot(0,0,M_PI/2);
188-
pv = m_vol.placeVolume(c_vol, Transform3D(c_rot, c_pos));
189-
}
190-
else {
191-
Box c_box(x_comp.width() / 2, x_comp.length() / 2, x_comp.thickness() / 2);
192-
c_vol = Volume (c_nam, c_box, description.material(x_comp.materialStr()));
193-
194-
// Utility variable for the relative z-offset based off the previous components
195-
const double zoff = thickness_sum + x_comp.thickness() / 2.0;
196-
if (x_pos && x_rot) {
197-
Position c_pos(x_pos.x(0), x_pos.y(0), x_pos.z(0) + zoff);
198-
RotationZYX c_rot(x_rot.z(0), x_rot.y(0), x_rot.x(0));
199-
pv = m_vol.placeVolume(c_vol, Transform3D(c_rot, c_pos));
200-
} else if (x_rot) {
201-
Position c_pos(0, 0, zoff);
202-
pv = m_vol.placeVolume(c_vol, Transform3D(RotationZYX(x_rot.z(0), x_rot.y(0), x_rot.x(0)), c_pos));
203-
} else if (x_pos) {
204-
pv = m_vol.placeVolume(c_vol, Position(x_pos.x(0), x_pos.y(0), x_pos.z(0) + zoff));
205-
} else {
206-
pv = m_vol.placeVolume(c_vol, Position(0, 0, zoff));
207-
}
178+
if (x_comp.nameStr().find("CurvedSilicon") != std::string::npos) {
179+
double c_rmin = x_comp.radius(); // radius of curvature in cm
180+
double c_phi0 =
181+
x_comp.phi0(); // start and stop angle of segment in rad - zero is centre of stave
182+
double c_phi1 = x_comp.phi1();
183+
double c_z0 =
184+
x_comp
185+
.offset(); // position of centre of cylinder in cm ( = radius of curvature - maximum height of curved surface above flat base)
186+
Tube c_tube(c_rmin, c_rmin + x_comp.thickness(), x_comp.length() / 2, M_PI / 2 + c_phi0,
187+
M_PI / 2 + c_phi1);
188+
c_vol = Volume(c_nam, c_tube, description.material(x_comp.materialStr()));
189+
const double zoff = thickness_sum + x_comp.thickness() / 2.0;
190+
Position c_pos(0, 0, c_z0 + zoff);
191+
RotationZYX c_rot(0, 0, M_PI / 2);
192+
pv = m_vol.placeVolume(c_vol, Transform3D(c_rot, c_pos));
193+
} else {
194+
Box c_box(x_comp.width() / 2, x_comp.length() / 2, x_comp.thickness() / 2);
195+
c_vol = Volume(c_nam, c_box, description.material(x_comp.materialStr()));
196+
197+
// Utility variable for the relative z-offset based off the previous components
198+
const double zoff = thickness_sum + x_comp.thickness() / 2.0;
199+
if (x_pos && x_rot) {
200+
Position c_pos(x_pos.x(0), x_pos.y(0), x_pos.z(0) + zoff);
201+
RotationZYX c_rot(x_rot.z(0), x_rot.y(0), x_rot.x(0));
202+
pv = m_vol.placeVolume(c_vol, Transform3D(c_rot, c_pos));
203+
} else if (x_rot) {
204+
Position c_pos(0, 0, zoff);
205+
pv = m_vol.placeVolume(
206+
c_vol, Transform3D(RotationZYX(x_rot.z(0), x_rot.y(0), x_rot.x(0)), c_pos));
207+
} else if (x_pos) {
208+
pv = m_vol.placeVolume(c_vol, Position(x_pos.x(0), x_pos.y(0), x_pos.z(0) + zoff));
209+
} else {
210+
pv = m_vol.placeVolume(c_vol, Position(0, 0, zoff));
211+
}
208212
}
209-
213+
210214
c_vol.setRegion(description, x_comp.regionStr());
211215
c_vol.setLimitSet(description, x_comp.limitsStr());
212216
c_vol.setVisAttributes(description, x_comp.visStr());

0 commit comments

Comments
 (0)