Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement curved RSU structure for the three layers of vertex barrel trackers #803

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

ShujieL
Copy link
Contributor

@ShujieL ShujieL commented Nov 11, 2024

Briefly, what does this PR introduce?

created a new vertex barrel geometry file vertex_barrel_curved.xml with a new geo plugin to support smooth cylindrical surface and build-in inactive areas.
This work is a follow-up of #759 which creates flat sensors and barrel with staves.
Screenshot 2024-11-14 at 16 51 54

What kind of change does this PR introduce?

  • Bug fix (issue #__)
  • [ x ] New feature (issue #__)
  • Documentation update
  • Other: __

Please check if this PR fulfills the following:

  • Tests for the changes have been added
  • Documentation has been added / updated
  • [ x] Changes have been communicated to collaborators

Does this PR introduce breaking changes? What changes might users need to make to their code?

Does this PR change default behavior?

The # of hits on vertex barrels will reduce by a few percent due to the inactive areas.
Didn't see a significant change in tracking efficiency. Performance study on going.

…ethod has unknown offset between tube components. Will switch to part-by-part frame construction instead
…with ACTS e.g. only half of the unit is valid when making sourcelinks
@ShujieL ShujieL self-assigned this Nov 11, 2024
@github-actions github-actions bot added topic: tracking topic: forward Positive-rapidity detectors (hadron-going side) labels Nov 11, 2024
@ShujieL ShujieL removed the topic: forward Positive-rapidity detectors (hadron-going side) label Nov 11, 2024
@github-actions github-actions bot added the topic: forward Positive-rapidity detectors (hadron-going side) label Nov 11, 2024
@ShujieL
Copy link
Contributor Author

ShujieL commented Nov 11, 2024

VertexBarrelEnvelope_length and VertexTrackingRegion_length are not used anywhere. Can we remove them from dump-parameter-table?

Also, not sure why we keep VertexCheck in the xml file.

@ShujieL
Copy link
Contributor Author

ShujieL commented Nov 11, 2024

Also, validate-material-map failed due to "Propagation reached the step count limit of 1000 (did 1000 steps)". I remember seeing this error many times in the past but they didn't interrupt the program, a material map would still be generated. Any idea on how to deal with this? @wdconinc

@wdconinc
Copy link
Contributor

Also, validate-material-map failed due to "Propagation reached the step count limit of 1000 (did 1000 steps)". I remember seeing this error many times in the past but they didn't interrupt the program, a material map would still be generated. Any idea on how to deal with this? @wdconinc

no time to look into it until next week (not even sure then)

@veprbl
Copy link
Member

veprbl commented Nov 12, 2024

Also:

MultiSegmentation ERROR Invalid sub-segmentation identifier!
VertexBarrelHandler ERROR cellID: failed to access segmentation for VolumeID: 000000000103B21F [17019423]  [MultiSegmentation: Invalid sub-segmentation identifier!]
VertexBarrelHandler ERROR ....... G4-local:   (49.820797, 1.685985, 1.892819) G4-global:   (34.036452, 36.420795, -19.331181)
VertexBarrelHandler ERROR ....... TGeo-local: (4.982080, 0.168598, 0.189282) TGeo-global: (3.403645, 3.642079, -1.933118)
VertexBarrelHandler ERROR ....... Pre-step:  AV_1555!Module2_upper_58#58!RSU_upper_3#3  SD: VertexBarrel
VertexBarrelHandler ERROR ....... Post-step: AV_11865!VertexBarrelSubAssembly_3#3!VertexBarrel_layer2_1#1  SD: 
DDSim            ERROR Simulation failed!
Geant4Kernel     FATAL +++ Exception while simulating:MultiSegmentation: Invalid sub-segmentation identifier!

vertex_barrel:
vertex_barrel_curved:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default name should be the best implementation. We should want people to be able to rely on the fact that vertex_barrel is just going to be the best possible implementation of the vertex barrel. Any suffixes should be exceptions, not what we want people to use by default. I would suggest that you rename the previous vertex_barrel to something like vertex_barrel_flat_staves or something.

grid_size_phi="0.02*mm/VertexBarrelSeg3_r" grid_size_z="0.02*mm"
radius="VertexBarrelSeg3_r" />
</segmentation>
<id>system:8,layer:4,module:12,sensor:3,phi:30:-18,z:-16</id>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does phi,z not fit in 32 bits? Based on my quick calculation, phi is still within 16 bits for L2.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, you're allocating 4 bits for layers, which allows for 16 layers. You only use 3 layers, so 3 bits would be sufficient.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, your bit fields don't add up cleanly to 64 due to sensor being 3 bits wide.

<constant name="VertexBarrelSeg3_r" value="VertexBarrelMod3_rmin+SiVertexSensor_thickness/2.0" />

<documentation>
- Currently there are 3 sensor layers: Layer 1,2,3 = L0, L1, L2.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will be confusing to have VertexBarrelSeg2_r refer to L1 under this off-by-one numbering scheme. Please use VertexBarrelSegL1_r etc to avoid this confusion.

<constant name="VertexBarrelLayer3_rmax" value="VertexBarrelLayer3_rmin + VertexBarrelLayer_thickness" />

<comment> ensure we are within the vertex envelope with some margin. </comment>
<constant name="VertexCheck" value="sqrt(VertexBarrel_rmax - VertexBarrelLayer3_rmax - .1*cm)" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unused.

<readouts>
<readout name="VertexBarrelHits">
<segmentation type="MultiSegmentation" key="layer">
<segmentation name="L0" type="CylindricalGridPhiZ" key_value="1"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, a mismatch between L0 and key_value 1. Just use key_value 0 for L0, etc. This will avoid mistakes.

src/SVTBarrelTracker_geo.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid naming the plugin to the specific detector. As far as I understand this will need to be done for other detectors too. We should try to make sure we can reuse this geometry plugin for the other detectors too. Therefore, naming this as CurvedBarrelTracker_geo or so is probably useful to consider.

* - Designed to process "vertex_barrel_curved.xml"
*
* - Derived from "BarrelTrackerWithFrame_geo.cpp".
* - Build-in RSU structure with 12 tiles and inactive areas
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Number of tiles is likely configurable parameter, not inherent to the geometry plugin.

Assembly assembly(det_name);

sens.setType("tracker");

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed you removed the support and frame sections here. Did you not want to keep the support for this plugin?

double m_rmin = x_mod.rmin();
double m_length = x_mod.length();
double m_width = x_mod.width();
module_length[m_nam].push_back(m_length);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why the module length is necessary as a map to vector. Will there be multiple modules with the same name? Do you need the length outside of this scope?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: forward Positive-rapidity detectors (hadron-going side) topic: tracking
Projects
Development

Successfully merging this pull request may close these issues.

3 participants