-
Notifications
You must be signed in to change notification settings - Fork 22
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
add protections for xregion configuration #349
Conversation
Hi @wenqiang-gu Good catch! Adding new The The other two, |
@brettviren I can agree with your point 1 and partially agree with your point 2. See the updated PR. For point 1, I think it's even better to throw an error when anode is not scalar. For point 2, setting wire-cell-toolkit/aux/src/DepoTools.cxx Line 118 in c138b92
Therefore, it could be easier just to set the cathode_x to be response_x +/- 0.01mm . As the energy depos after Drifter are all relocated at response_x , the slightly enlarged BoundingBox (0.01mm) can guarantee that inside(depo->pos()) returns true for the corresponding face. How do you think?
|
Sorry, I was not clear. The "extreme value" does not mean infinity but means the extreme X location of the cathode surface (and etc for anode). This will either be the |
@brettviren I see, I didn't realize that. How is the updated PR now? |
Looks good to me! Thanks for considering the alternatives. |
Fixed a bug in commit 85c8de3 The bug crashes in PDSP configuration where the faces is defined as:
For a face of value NULL (e.g. |
@brettviren I added two protections related to the new xregion:
First, sometimes "null" values in the faces would introduce a problem because
Xregion(null)
would be undefined.Second,
AnodePlane
requires scalar values (cathode, anode, response) for definition of the BoundingBox of a face's sensitive volume. In such case, we need a backup scalar input, for example: