GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Bugs, Fixes, Releases » MasterToLocal transformation
MasterToLocal transformation [message #4686] Wed, 18 July 2007 11:12 Go to next message
asanchez is currently offline  asanchez
Messages: 350
Registered: March 2006
first-grade participant
From: *gsi.de
Dear all,

assuming that one has a layer, whose thickness is defined in the y direction, and the length and the width in the x-z plane:


When one goes from global to local coordinates by using
the MasterToLocal transformation, how are the xyz global coordinates modified? does x-z global plane
becomes x-y local plane?

cheers Alicia.
  • Attachment: layer.pdf
    (Size: 13.88KB, Downloaded 376 times)
Re: MasterToLocal transformation [message #4687 is a reply to message #4686] Wed, 18 July 2007 11:24 Go to previous messageGo to next message
Ralf Kliemt is currently offline  Ralf Kliemt
Messages: 507
Registered: May 2007
Location: GSI, Darmstadt
first-grade participant

From: 141.30.85*
Hi Alicia,

Just a short reply:

1. Your shape has a position in the lab frame (your geometry)
2. use the GeoManager to access the object.
3. Get the transformation matrix in your local system & transform

The local system is defined by yourself. The transformation just translates and rotates the the shape with its frame.


More comes...
Ralf.
Re: MasterToLocal transformation [message #4692 is a reply to message #4687] Wed, 18 July 2007 17:50 Go to previous messageGo to next message
Ralf Kliemt is currently offline  Ralf Kliemt
Messages: 507
Registered: May 2007
Location: GSI, Darmstadt
first-grade participant

From: 141.30.85*
Hi again,

I put here an example how to transform your geometric objects between their local frame and the laboratory system.

void MvdIdealRecoTask::smearLocal(TVector3& pos, const MvdPoint* mvdpoint)
{
/// smear a 3d vector in the local sensor plane

  gGeoManager->cd(mvdpoint->GetDetName()); 
  TGeoHMatrix* transMat = gGeoManager->GetCurrentMatrix();

  Double_t posLab[3], posSens[3];

  posLab[0]=pos.x();  posLab[1]=pos.y();  posLab[2]=pos.z();
  transMat->MasterToLocal(posLab,posSens);
  pos.SetXYZ(posSens[0],posSens[1],posSens[2]);
  

  smear(pos); // apply a gaussian

  posSens[0]=pos.x();  posSens[1]=pos.y();  posSens[2]=pos.z();
  transMat->LocalToMaster(posSens,posLab);
  pos.SetXYZ(posLab[0],posLab[1],posLab[2]);

  return;
}



If I'm not mistaken, you have your sensors (the geo objects we spaek of) defined in a *.geo file. One entry is a box:
BOX
silicon
22.5 -15 -22.5
22.5 15 -22.5
-22.5 15 -22.5
-22.5 -15 -22.5
22.5 -15 22.5
22.5 15 22.5
-22.5 15 22.5
-22.5 -15 22.5
 15 22.5 -755
1. 0. 0. 0. 1. 0. 0. 0. 1.

If I read this correctly it has a dimension of (x,y,z)=(45,30,45). This is in the local (sensor) frame.
This is translated by (15,22.5,-755) and not rotated into the lab frame. These two last lines will be in the TGeoHMatrix of your object.

I hope this helps.
Byebye, Ralf.
Re: MasterToLocal transformation [message #4697 is a reply to message #4692] Wed, 18 July 2007 18:07 Go to previous messageGo to next message
asanchez is currently offline  asanchez
Messages: 350
Registered: March 2006
first-grade participant
From: *gsi.de
Hi Ralf,
actually my question is not related how to convert
from master to local corrdinates my volumes, but is related to the fact that if you (case MVD - Mvdhitproducer class) have a sensor defined in the x-z
global coordinates (or i'm wrong ?),

then, why do you consider the xlocal and ylocal coordinates and not the xlocal and zlocal of your layer to define the pixels?


So far i have understood the strips layers( for example)
are defined in the x-z global plane.
and the pixels are in the x-y plane (case disc) and x-z plane.

actually that was my question, so if the layers are in x-z plane defined, why to consider the xlocal and the ylocal coordinates.


sorry for bother you.

best regrads and thanks
alicia.
Re: MasterToLocal transformation [message #4699 is a reply to message #4697] Wed, 18 July 2007 18:11 Go to previous message
Ralf Kliemt is currently offline  Ralf Kliemt
Messages: 507
Registered: May 2007
Location: GSI, Darmstadt
first-grade participant

From: 141.30.85*
Hi again,

As far as I know every sensor is defined locally in the x-y plane and then shifted and rotated to get its later position.

I'll have a look on it tomorrow.

Ciao, Ralf.
Previous Topic: CbmTrackPar bug?
Next Topic: Version 1.0.0 ("stable")
Goto Forum:
  


Current Time: Sun Apr 28 07:21:22 CEST 2024

Total time taken to generate the page: 0.00824 seconds