Re: GLAD positioning [message #21219 is a reply to message #21210] |
Wed, 14 June 2017 17:32 |
lzanetti
Messages: 5 Registered: June 2017 Location: TU Darmstadt
|
occasional visitor |
From: *249-95-r.retail.telecomitalia.it
|
|
Hi Dima, thank you for your reply.
Dmytro Kresan wrote on Wed, 14 June 2017 09:46
We have introduced a new feature: possibility to move and rotate the detectors directly in the macro. The values specified in the call to standard constructor overwrite the values stored in the geometry file.
That's nice --and useful to me, since that will be needed soon around here, I think. I'll look at the code.
As a side question: where I can find this kind of information? (except bothering you here...)
Dmytro Kresan wrote on Wed, 14 June 2017 09:46
That is why you do not see the effect.
Does that mean that the detector position has to be always passed to the constructors, now?
Dmytro Kresan wrote on Wed, 14 June 2017 09:46
An exception is done for GLAD, where the position and angle (taken from the actual placement in the cave) are hard-coded in R3BGladMagnet.cxx in the standard constructor, and they are not supposed to be changed from experiment to experiment.
Ok. So GLAD cannot be moved --and I don't want to: I tried because it looked like it was in the wrong position, or more specifically not rotated by its 14 degrees.
Dmytro Kresan wrote on Wed, 14 June 2017 09:46
1. Which geometry version are you using?
2. How does the call to R3BGladMagnet(...) look like in your case (in the macro)?
3. What are the values of position and angle in the R3BGladMagnet(...) implementation in your case?
- The one included in the commit I posted above. More specifically: the new commits don't seem to update the geometry binaries (GLAD's was untouched since last December), so it's the last version of the geometry macro and the geometry file has been regenerated with that.
- It's just constructed by name. The executable I use calls the constructors just by name, as r3ball.C used to do --I see this is no longer the case and other arguments are passed to the GLAD constructor.
This is how my code calls the constructor:
R3BModule* mag = new R3BGladMagnet("GladMagnet");
- There are none I'm passing at runtime. All there is is what's in create_glad_geo.C and is used for the geometry binary. If you're asking what's in the source file for GLAD's constructor, it's exactly the one in the commit I posted before...
~~~
EDIT:
Found it: fGladAngle is not initialized in the init list of the "just by name" constructor --which has a default argument as the second constant string (ll 32-34):
R3BGladMagnet::R3BGladMagnet(const char* name, const char* Title)
: R3BModule(name, Title)
{
This can be changed to:
R3BGladMagnet::R3BGladMagnet(const char* name, const char* Title)
: R3BModule(name, Title),
fGladAngle( 14. )
{
To solve my problem (I think, didn't actually try yet). And to preserve compatibility with old code.
I'm not supposed to be working right now (holidays...) so I won't touch it, if this one liner is included in a commit on "dev" before Monday.
[Updated on: Wed, 14 June 2017 18:02] Report message to a moderator
|
|
|