TEve, scaling of x:y:z = 1:1:0.1

Hi,
I have in principle a simple use case: I would like to have one dimension compressed compared to the other two dimensions. I tried with the different implemented projections, camera views, but haven’t found anything which matches what I would like to do. Any recommendations how to proceed?
thanks,
Thomas

Can you illustrate your request with a small example ?

Hi,
you can find a detector picture at truf.web.cern.ch/truf/temp/eve2.png . In order to make better use of the screen, I would like to have the z coordinate (in the picture horizontal axis) compressed to the other scales.
thanks for any advice, thomas

Hi Thomas,

One could indeed implement a new TEveProjection type … the only drawback of this is that you have to deal with registration of objects to the projection manager.

Would you be interested in giving it a try? I can help … but haven’t looked at the code in a long while so I’ll need to jog my memory as well :slight_smile: It shouldn’t be too hard …

[ time passes ]

OK, there is an existing projection type 3D … and corresponding TEve3DProjection (I think I started doing this for NA-62 … but I don’t remember this actually being used so there might be surprises … i.e., things not implemented/supported to the end). You could put the z scaling into pre-scales of the base class.

projection->SetUsePreScale(true);
projection->AddPrescaleEntry(2, 1e6, 0.01);

Here two means coordinate 2 (z), 1e6 is the maximum value to which the scale should be applied (you can add several entries, e.g., to avoid scaling an intermediate region), and 0.01 is the scaling.

Best,
Matevz

Dear Matevz,
thanks for your answer. I will have a look in the coming days. I had already to add a new orthocamera projection, fOrthoZOXCamera, so, i may succeed also doing this.
best regards,
thomas