-
Notifications
You must be signed in to change notification settings - Fork 4
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
Distinguish between North and South detectors by AGET ID #80
Conversation
Why would you need to add side identification at the raw processing stage? Would not be better to use the readout to generate an observable identifying the readout plane? This process is highly specific. If there is a reason to do this at raw processing stage, then I would do something that allows you to define through metadata the range ids that correspond to For example, you could create a process that defines:
Then, if the process identifies that all daq-ids belong to the same group, it creates an observable that contains "South" or even an id number, or both. |
That makes the process less specific, and you define how to use it at the RML. |
The purpose of this is precisely to avoid the use of the readout, as a way of testing other processes that make use of itto extract the same information (could be done with I agree it could be generalized with the ID ranges, I'll change it. At first thought, I prefered to set just one number but now I see it is easier to read the code (mainly in the rml) if we use ranges. |
Why no East and West :P? The process name also looks specific. We shall not include experiment names in it. |
Right, the day that TREX-DM is moved to a new hall and placed in west-east direction you will need to change the parameter names. |
You are right, I'll remove all references to TREX experiment. And I'll try to implement as you suggested @jgalan
But how should I define these "tag" sections? I don't know how write that in order to the rml understands the parameters, do we have any process that use something similar? |
You may have a look to the following example: https://github.com/rest-for-physics/geant4lib/blob/master/src/TRestGeant4Metadata.cxx where it is extracted You do a for loop to extract every line found. It would be something similar to this:
Then you have all you need inside Then, just iterate over each tagName, both lists will have the same number of elements. So you iterate over and fill a temporal string inside I would try the following strategy. If all channels fall inside your tag range, then you define the tag with the user given tag, if not I would keep a default tag, for example Then you may have another observable, which is an integer. And you define bit to bit if there are any channels inside that range definition. Lets imagine we have 4 tag definitions, south, north, east and west. You do the loop (I write in pseudo code):
That way you will create a number that identifies the ranges where we found active channels. For example, if you define "north - south - west - east" ranges. The first tag is identified with the lowest significative bit, then
|
I find the above |
Thaks for the help @jgalan. Now the process should be completely generic, it admits any number of daq Id ranges that can be named as we wish. Basically I implemented your proposed strategy and it worked really well. |
New process added to distinguish events from North and South sides using only the AGET ID. Not readout needed.