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

Fix event display for tracker endcap in CEDViewer #333

Merged
merged 5 commits into from
Jun 10, 2024

Conversation

gaede
Copy link
Contributor

@gaede gaede commented Apr 22, 2024

BEGINRELEASENOTES

  • fix CED event display for CLIC like detectors using TrackerEndcap_o2_v0x_geo
    - fix nPetals in ZDiskPetalsData (for CEDViewer) to use nmodules (e.g. 48 ) rather than nrings
    - store the number of rings in ZDiskPetalsData::sensorsPerPetal

ENDRELEASENOTES

@tmadlener
Copy link
Contributor

tmadlener commented Apr 23, 2024

As we have figured out ConformalTracking will most likely not be affected by these changes, but there are other geometries where a similar issue is probably present:

  • SiTrackerEndcap_o2_v02ext_geo.cpp: thisLayer.petalNumber=ring_num; // number of rings in petalNumber, needed for tracking
  • SiTrackerEndcap_o2_v01ext_geo.cpp: thisLayer.petalNumber = ring_num; // number of rings in petalNumber, needed for tracking
  • rackerEndcap_o2_v05_geo.cpp: thisLayer.petalNumber = ring_no ; //Store the number of rings in petalNumber needed for tracking
  • TrackerEndcap_o1_v05_geo.cpp: thisLayer.petalNumber = ring_no ; //Store the number of rings in petalNumber needed for tracking
  • TrackerEndcap_o1_v04_geo.cpp: thisLayer.petalNumber = ring_no ; //Store the number of rings in petalNumber needed for tracking
  • TrackerEndcap_o2_v04_geo.cpp: thisLayer.petalNumber = ring_no ; //Store the number of rings in petalNumber needed for tracking
  • TrackerEndcap_o2_v06_geo.cpp: thisLayer.petalNumber = ring_no ; //Store the number of rings in petalNumber needed for tracking this one is fixed by this PR

@tmadlener
Copy link
Contributor

tmadlener commented Apr 29, 2024

@andresailer any insights on where we should look for usages of this? We didn't find anything in ConformalTracking, but this has the potential to break in a few places and some of these models might not be in too much use.

@tmadlener
Copy link
Contributor

This is the list of hits I get with grep -r petalNumber on a (pretty much) complete checkout of all of iLCSoft (sans the ones from the comment above)

MarlinTrkProcessors/source/Digitisers/src/DDSpacePointBuilder.cc:    //int Nsensors = ft->layers.at(layer).petalNumber ; 
MarlinUtil/source/src/DDMarlinCED.cc:  int petalNumber = thisLayer->petalNumber;
MarlinUtil/source/src/DDMarlinCED.cc:  returnParams.Rmax = returnParams.Rmax/cos(M_PI/petalNumber);
MarlinUtil/source/src/DDMarlinCED.cc:  returnParams.Rmin = returnParams.Rmin/cos(M_PI/petalNumber);
MarlinUtil/source/src/DDMarlinCED.cc:  returnParams.inner_symmetry = petalNumber;
MarlinUtil/source/src/DDMarlinCED.cc:  returnParams.outer_symmetry = petalNumber;
MarlinUtil/source/src/DDMarlinCED.cc:  returnParams.phi0 = phi0 + 270. - 180./petalNumber - (360./petalNumber)*(int ((270.-180./petalNumber)/(360./petalNumber)));
ILDPerformance/trackerHitCtr/src/TrackerHitCounter.cc:                int nModules = layer.petalNumber;
ForwardTracking/src/ForwardTracking/ForwardTracking.cc:     if( l.petalNumber > nModules ) nModules = l.petalNumber ;
ForwardTracking/src/FTDNoise/FTDBackgroundProcessor.cc:      unsigned nModules = ftd->layers[layer].petalNumber ;
ForwardTracking/src/Analysis/TrueTrackCritAnalyser.cc:     if( l.petalNumber > nModules ) nModules = l.petalNumber ;

This looks like the main things that could break are forward tracking and potentially ILDPerformance. The ones in DDMarlinCED are the ones that we try to fix with this here. The others would need to be checked.

In the end we would probably need to fix all the drivers in the same way, I think.

@tmadlener
Copy link
Contributor

I have ported the changes to the drivers mentioned in the comment above.

We (as ILD) think this should be transparent and fix some visualization issues.

@tmadlener tmadlener changed the title WIP: fix event display for tracker endcap in CEDViewer Fix event display for tracker endcap in CEDViewer May 30, 2024
@andresailer
Copy link
Contributor

Do you have a before and after picture?

Otherwise, I agree that we are not using those parameters in ConformalTracking, so it shouldn't have an impact.

@tmadlener
Copy link
Contributor

The following screenshots are done via

ced2go -d $K4GEO/ILD/compact/ILD_l5_v11/ILD_l5_v11.xml <some-slcio-input-that-doesnot-matter>

Before fix:
Screenshot from 2024-06-03 16-08-51

After fix:
Screenshot from 2024-06-03 16-10-50

@tmadlener
Copy link
Contributor

@andresailer anything speaking against merging this?

@andresailer
Copy link
Contributor

Sorry, I missed the picture update! Thanks!

@@ -173,7 +175,8 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
thisLayer.zPosition = sumZ/ring_num; // average z
thisLayer.distanceSensitive = innerR;
thisLayer.lengthSensitive = outerR - innerR;
thisLayer.petalNumber = ring_num; // number of rings in petalNumber, needed for tracking
thisLayer.petalNumber = petal_num;
Copy link
Member

@jmcarcell jmcarcell Jun 6, 2024

Choose a reason for hiding this comment

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

Why not set this to nmodules that is fixed? petal_num is being set to nmodules nmodules times. Then petal_num shouldn't be needed?

Copy link
Contributor

Choose a reason for hiding this comment

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

nmodules is no longer in scope for using it when thisLayer.petalNumber is set. However, I can setting it nmodules times is unnecessary, and I can lift it out of the loop.

@tmadlener tmadlener merged commit 3042e58 into key4hep:main Jun 10, 2024
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants