GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » EMC » How to get the orientation of a detector element?
How to get the orientation of a detector element? [message #11486] Thu, 10 February 2011 17:16 Go to next message
HosseinMoeini is currently offline  HosseinMoeini
Messages: 10
Registered: May 2007
Location: KVI Groningen
occasional visitor

From: *KVI.nl
Dear all,

I was wondering if there's an easy way of retrieving the orientation of a crystal (say, theta and phi) in the pandaroot framework? Using PndEmcHit class, I can get the position and orientation of the center of the crystal.
In order to get the orientation of the crystal itself, I can use the position (x0,y0,z0) of the center of the crystal as well as the position of the center of the, say, front face of the crystal (x1,y1,z1) to obtain the direction of the vector (x1-x0,y1-y0,z1-z0). But then I would need to somehow get the position of the center of the front face of the crystal. And this I don't know how to do! Confused
It would be nice if somebody could help me on this matter. Surprised

cheers,
Hossein
Re: How to get the orientation of a detector element? [message #11487 is a reply to message #11486] Thu, 10 February 2011 17:37 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *to.infn.it
Hi,
the following code was used some time ago for MVD, before using the geometry handler. Maybe it could be useful in your case, remember that EMC crystals are not TGeoBBox but somehting else (TGeoTrap?)

      TVector3 mvdPos;
      mvdHit->Position(mvdPos);
      
      TGeoNode *mvdNode = (TGeoNode*)gGeoManager->FindNode(mvdHit->GetX(), mvdHit->GetY(), mvdHit->GetZ());
      TGeoVolume *mvdVol = (TGeoVolume*)mvdNode->GetVolume();
      TGeoBBox* actBox = (TGeoBBox*)(mvdVol->GetShape()); // volume of the MVD strip/pixel
      TGeoMatrix* mvdGeoRot = (TGeoMatrix*)mvdNode->GetMatrix();
      const Double_t *rotM = mvdGeoRot->GetRotationMatrix();
Re: How to get the orientation of a detector element? [message #11488 is a reply to message #11486] Thu, 10 February 2011 22:22 Go to previous messageGo to next message
Dima Melnychuk is currently offline  Dima Melnychuk
Messages: 213
Registered: April 2004
Location: National Centre for Nucle...
first-grade participant
From: *play-internet.pl
Hi Hossein,

To retrieve orientation of a crystal in pandaroot framework you can use the PndEmcStructure class which actually extract information on position and orientation of the crystals from the root geometry to provide it for reconstruction algorithm.

In this class the map is filled fTciXtalMap between the crystal index presented in the form of PndEmcTwoCoorIndex (tci) object and PndEmcXtal which provide different method to access position and orientation of the crystal. I suppose

TVector3 PndEmcXtal::normalToFrontFace()

return something you want.

You can look into PndEmcClusterProperties::LiloWhere() to see how it is actually used.

And there could be the diffrence to call it withing the task or in macro, in the PndEmcClusterProperties::LiloWhere() it is called within the task and in macro I can foresee additional complications.

If this hint does not help, let me know and will try to provide more detailed example.

Best regards,

Dima
Re: How to get the orientation of a detector element? [message #11498 is a reply to message #11488] Wed, 16 February 2011 14:15 Go to previous message
HosseinMoeini is currently offline  HosseinMoeini
Messages: 10
Registered: May 2007
Location: KVI Groningen
occasional visitor

From: *KVI.nl
Dear Dima and Stefano,
Thank you so much for your extended answers! My problem is solved for the moment.
Previous Topic: Emc target pipe hole
Next Topic: barrel geometry in vacuum hits segmentation fault!?
Goto Forum:
  


Current Time: Fri Dec 06 00:46:50 CET 2024

Total time taken to generate the page: 0.00398 seconds