PR following PR #326 - removed obsolete hit class [Needs testing]#332
PR following PR #326 - removed obsolete hit class [Needs testing]#332drasal wants to merge 7 commits into
Conversation
* Added missing functionality from hit class to TrackNew & HitNew classes. * Namely, added HitPassiveType which may be of BeamPipe, Service, Support or IP -> necessary for inactive hits in Hit class. * Additionally, added tracking volumes variables to Hit class. * Finally, Analyzer code adjusted to new smart pointer policy used in TrackNew class & HitNew class. * HitNew & TrackNew classes then renamed to regular Track & Hit classes. hit.cpp & hit.hh completely removed.
|
Visual testing of OT365_200_IT4024 geometry taken as a reference doesn't show any discrepancies ... |
|
Merge with Stefano's changes done -> works fine!!! |
|
Hi,
|
|
Stefano, can you, please point me out to the web-page? It's very hard to see anything from these plots... |
|
OK I am rebuilding it now and putting it online.
|
|
So, it looks like Services were lost somewhere on the way ... The rest is OK, so it should be a trivial bug. Do you have an idea/hint, where it could be? I may have overlooked something ... |
|
Do you mean that the new material budget estimate is more accurate? That
sounds like baaaaad news...
|
|
No, I mean that in my code, I may have "forgotten" or more precisely overlooked adding the services hits. That's why I'd need to get navigated to the part of the code, where it's done. Would you have hints? |
|
Did you notice that your code gives *higher* material budget than the
expected behaviour? Please check previously linked page [0] against
reference [1]
[0]
http://mersi.web.cern.ch/mersi/layouts/testing_pr326/Material%20(total).html
[1]
http://cms-tklayout.web.cern.ch/cms-tklayout/layouts/repository-git-dev_gabie/OT613_200_IT4025/Material%20(total).html
|
|
Ah, I understand what you mean. Nevertheless, if you look at MB of pixel or outer only part, everything is correct except for the services, so let's fix that first. Then we may have a look on total MB... I don't believe that your "old" SW was giving wrong results. So, don't worry! |
|
Just as another pointer to the issue: the 2D material maps of the two
branches (under "material outer") are identical.
|
|
Dear Stefano, As for the missing histogram, there was a small bug in my SW, which caused the non-existing service histograms, but that's fixed by now. To understand the details, please, have a look at Analyzer::analyzeInactiveSurfaces methods. You will find out quickly, why the results now differ compared to the older version. To be sure that everything is correct, you may want to go again through the procedure of how the Total material budget is being calculated, I haven't written that code, so it's very difficult for me to understand all the details... Please, let me know, whether this makes sense ... |
|
The MB results aforementioned mentioned in [0] http://mersi.web.cern.ch/mersi/layouts/testing_pr326/Material%20(total).html do not physically make sense :
|
|
I am 100% sure on the results obtained with tkLayout present code for the following reasons :
|
|
First : I think there is an error in the makefile. Though, it is true that there are different results for the categories 'Services and Supports under Pixel Tracking Volume' and 'Services and Supports between Pixel and Outer Tracking Volumes' between Zbynek's code VERSUS our official code. Results with Zbynek's code : |
|
After some investigation, it turns out the issue is in Zbynek's code indeed. Relevant boundaries for a track at eta = 2.00067 : In the 'Services and Supports between Pixel and Outer Tracking Volumes' category, whatever is summed up at this eta is : eta = 2.00067 RL = 0.013162 eta = 2.00067 RL = 0.013162 eta = 2.00067 RL = 0.0131477 eta = 2.00067 RL = 0.0131477 eta = 2.00067 RL = 0.00440801 eta = 2.00067 RL = 0.0170539 eta = 2.00067 RL = 0.0150763 eta = 2.00067 RL = 0.0166015 eta = 2.00067 RL = 0.0333028 eta = 2.00067 RL = 0.0167358 One can cleary see that materials that do not belong to the 'Services and Supports between Pixel and Outer Tracking Volumes' category are wrongly added. |
|
The error comes from the fact that in Hit constructor, the tracking volumes bools are not initialized, and hence the default value for a bool = true in C++ is taken. |
| m_isPixel = false; | ||
| m_resolutionRPhi = 0; | ||
| m_resolutionZ = 0; | ||
|
|
There was a problem hiding this comment.
ERROR !
Should add here :
- m_isPixelIntersticeVol= false;
- m_isPixelTrackingVol = false;
- m_isIntersticeVol = false;
- m_isOuterTrackingVol = false;
- m_isTotalTrackingVol = false;
There was a problem hiding this comment.
Than, I have to apologize for this bug ...
|
With the proposed fix ahead, I get the exact same Material Budget results in this branch as the official tkLayout's results. |
|
Gabi, thanks very much for the full cross-check and finding the bug. It was very difficult for me to spot such a discrepancy, as I don't work with the CMS Ph2 geometry at all... |
|
You're welcome :) Also, very small thing this time, but let's do it : should update the Makefile as well (there is no TrackNew Hitnew) |
|
Gabi, Makefile is not my cup of tee, can you, please do it? |
Pico PR : removed HitNew and TrackNew classes from Makefile
|
Gabi, Stefano, |
|
Hmm the Tracking Material Budget matches exactly the official layouts after the bug fix. |
|
Gabi, can you, please have a look and let me know? |
|
Hi all, 'S |
|
Hi Stefano, I'm afraid it's still relevant. It removed completely the old hit class and changed it to Hit & Track classes, without need for HitNew & TrackNew. But I couldn't test that everything is in shape with CMS layout, that's why I relied on that on Gabi... |
|
Yep I had had a look at that time, but from what I remember did not fully check against all regressions. |
|
Hi Gabi, that would be great! Let me know, if you find some issues, so that I can fix it. FCC week is over, so I'm a little more relaxed now ... |
|
Thanks Zbynek for this PR!
There is now no regression with this PR anymore (fully cross-checked). I have solved all merging conflicts and reopened the PR at #409 , on top of the latest changes from April until now. |




Code made fully compatible with new Track & Hit classes -> needs testing on CMS Ph2 layouts!