-
Notifications
You must be signed in to change notification settings - Fork 27
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
[Falaise/geometry] organize strip in block GeometryModel #228
[Falaise/geometry] organize strip in block GeometryModel #228
Conversation
Thanks! @pfranchini - do you have time to give this a test? What I think we want to check is that the locations and activities of the individual foils match Andrea's document http://nile.hep.utexas.edu/cgi-bin/DocDB/ut-nemo/private/ShowDocument?docid=4457 The way I would do it is to use flsimulate-configure and check you can find the new vertex generator for the realistic foils, and set the geometry to include realistic foils. Then generate (quite a lot of) really simple events (1 MeV gamma?) from that vertex generator. When I did this before, I made a 2-d plot of the y vs z vertex positions to check I could see the shapes of the pads and foils. Then I used the shapes of those (plot y only) to cut on the vertex positions corresponding to each foil. Then I made more detailed plots of the x, y and z positions to verify the (relative) dimensions match Andrea's doc. Final stage would be to count the number of events from each pad and check it's proportional to the stated amount of Se82 in the pad (volume * enrichment fraction). Does that make sense? Can anybody think of tests I'm missing? |
Sure @cherylepatrick I can test that. |
Fab, thank you Paolo! Give me a shout if you need anything. |
@lemiere, running the simulation I get
using as profile (generated with
generating with
any help is appreciated! thanks |
Hi The material plugin main config file "resources/snemo/demonstrator/geometry/GeometryPlugins/MaterialsPlugin.conf" should include the definition files for new Se materials associated to the new geometry of the source pads/strips: |
thanks @fmauger I try adding this |
Yves is checking on his side if there is some missing stuff... |
Fixed ! Let me know |
Brilliant, it has generated something. Will check the results. Thanks. |
I do not see the foils 0 and 35 being simulated (only 34 over 36 are) I guess there is something different for those 2 lateral foils in |
Are 0 & 35 the copper foils? So they wouldn't be in the vertex generator for Se82... I think? (With the old style - source_foil_internal_bulk vs source_foil_bulk, or something - the rite-of-passage common mistake every new analyser makes :) ) |
@cherylepatrick of course they are! I am very glad copper is not radioactive. Sorry haven't checked the table only the drawing... |
Please find attached a spreadsheet with the validation Foils_simulation.xlsx. Sorry for the horrible way of presenting the numbers.
To summarize, I do not see anything obviously wrong and I will wait @lemiere to check if we are on the same page. |
Great news, thank you @pfranchini ! What's the bit you're missing from Andrea's spreadsheet? |
Actually I should have got this from Yves this morning in chat, all the * ITEP * are single strips if I am not mistaken. Which corresponds to what I get. |
Hi Paolo, How did you calculate the fraction (line 5 and 6) ? Based on nb of vertexes ?If YES : Can you add uncertainties ? Is the vertexes bulk distribution OK in pads/strips ? It looks OK in YZ view. Did you look after the XZ view ? |
Thanks Yves.
Line 6 is, from Andrea's document, the fraction of Se82 in each foil. Line 5 is
Do you mean
I'll do.
I can resume some old background sensitivity analysis done in the past unless someone else has some other code ready and more up-to-date. |
Hi @pfranchini this is fantastic! Do you want to give a quick update in Thursday's analysis meeting to show what you've learned so far? Also, you could try talking to @willquinn for sensitivity code? |
Sure @cherylepatrick no problem with that. |
Fabulous, I'll pop you on the agenda! Thanks! |
What do you mean by: The geom_id should be numbered from 0 to 35 in ascending order (y- -> y+). |
Ok I've checked that in the following file: The regular numbering scheme of source strips is broken and replaced by the identifier of the "production" strip number (the model ID). I think this is a wrong approach ( a typical case of confusion between models and instances). Example in block #0: [name="source_strip_block_0.model" type="geomtools::stacked_model"] |
About :
View in XY was to start a 3D geometry validation first step. (your pict in mm ? ) @fmauger : About the labeling. Right that's messy... Foils have labels (LAPP_, LAPP_ITEP_11 or ITEP_9) That's the uniq foils label. And 2 years ago, I had to use it.... but I took the foil position as it was more systematic. I kept in mind that source_blocks.geom will have in charge the foils ordering. In Falaise, we have a foil ID accessor which do the job ? without taking care about the model name ? |
yes. we don't care the model name; it could be changed by a more refined strip model without breaking the strip numbering scheme. |
Hi all, sorry for being slow but I'm trying to understand. So there are some ID numbers to the foils that are in Andrea's document, is that right? And those are the "Model" numbers? But they don't correspond to the position in the detector (position number)? Also: I vaguely remember there being an issue about the position numberings sometimes being counted from tunnel to mountain end, and sometimes from mountain to tunnel. Is strip position 0 at the mountain end or the tunnel end? (I think mountain is more intuitive as that is where tracker cells column zero and calorimeter blocks column 0 are... yes?)
And then here... why is position number 1 called stacked.model_2? Sorry if I'm being slow to follow... Is it worth including something about this numbering and how to work it in Paolo's talk at the analysis meeting on Thursday? Or is this still a work in progress? |
Yes. from 0 to 35, one maps the Y axis from negative coordinates to positive ones. This is the standard orientation scheme in SN geom.
Ha Ha! This is another story. This piece of geometry is built through a "stacked_model" that automatically builds a "stack" (Uhh!) of several objects and automatically computes their relative positioning within a common mother envelope (also automatically computed). The "stacked.model_X" refers to the geometry volume model/logical of the instance/physical volume placed at position X in the stack. This is not related to the strip ID but just a numbering facility for the guy who designed this compound/stacked logical volume. You see here that we are in the first source strip block, where there are 5 physical objects/volumes: stacked.model_0 will be associated to strip #0 (Copper) In next block #1, there are 6 source strips and 5 gaps between them (11 physical stacked volumes along the Y-axis), so only stacked objects #0, 2, 4, 6, 8 in this local stack (Se strips) should be mapped as strip IDs (starting at #3 up to #8).
Not sure. Yves will fix this this afternoon and everything will be fine and comprehensive. |
Thanks for the explanation @fmauger - that makes much more sense to me now! |
Fixed (I hope) |
Thanks @lemiere, this is fine but can you please check (haven't checked all the other foils) |
Few problematic vertexes to start with:
|
I know what's going wrong.... the VertexGenerator... I will look after it soon.... tomorrow will be tricky... |
Thanks @lemiere, I know this is a bit of a pain and is dragging on. And thanks @pfranchini for finding the issue! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible to add the .csv
generation step to the build? If this file is absolutely required to be updated on changes to the .conf
file, then this is definitely needed!
The doxygen generation CMake scripting provides an example of this with the add_custom_command
+add_custom_target
pair that's needed to declare how to run the generator (script in this case) and its outputs (.csv
file) and inputs/dependencies (conf files).
It's slightly different in that the .csv
file must go into the source directory, but that's fine, just a change in output path.
For that we need to provide a bash script that calls the Bayeux's script named "bxextract_table_of_objects". The current version of this script in Bayeux 3.4.X should be improved for a best parsing of the vertex definition .conf files. |
@fmauger, yep, I guess this script is this change in @lemiere's last commit?: 7b98bea#diff-bcd941f2827541ca2d9ae838b86e9222999c397ceb82b264001fb46068faf6c5 That should be easy enough to wrap in the custom command/target pairing. Longer term (i.e. not now for this PR!) would Bayeux's variant system/flsimulate-configure (as appropriate) be able to forego the |
Thanks @lemiere for fixing that.
front view: |
Pretty cool ! Let's go for a merge ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Brilliant @lemiere, fine for me!
I understand your point but I have to think more deeply about it for my feeling is that it would break something in the variant concept which is basically a preprocessor on top of standard config files but could also be used as a independant configuration system. The problem here is that we will have to invent some special directives/language/protocol to allow the autogeneration of such csv files from the standard properties and multi_properties files. That would imply a first reading of all available files to pickup the informations needed to elaborate the csv variance list without taking into account some embedded variant directives. But in that case, some of the configuration blocks, systematically loaded, would be absolutely incompatible while using the standard (multi_)properties parser. Think to the CPP preprocessor ! This would be the same if we ask some parser to analyze all onboard #define/#if... directives in many C source files and propose an automated list of options for the CMake option mechanism, for example in the CMakeLists.txt main file of some project. My guess is that is could ba a nightmare to elaborate. |
Thanks for the info @fmauger, yes that does sound like it would be complex! I think as long as we could have the csv file generated as part of the build, that would address the main concern. That is, only having to edit the conf files, with the csv file being "compiled" for you by the build, so it doesn't have to be manually edited or the script run by hand (though those ways would still be available). |
ok. so we could try to implement a custom command that build the csv from the Bayeux bash script if nothing prevent fully automated procedure. anyway, during a development phase that proposes some mods in the variant system (typically adding more options, possibly conditional) we still need to manually play with the script or even manually check to consistancy of the proposed csv files. at the end we are supposed to converge to the "solution" and to be able to automate it. |
provide the flat source geometry for the second time. To Be verify