Skip to Content.
Sympa Menu

sphenix-maps-l - [Sphenix-maps-l] Local coordinates

sphenix-maps-l AT lists.bnl.gov

Subject: sPHENIX MAPS tracker discussion

List archive

Chronological Thread  
  • From: Hugo Pereira Da Costa <hugo.pereira-da-costa AT cea.fr>
  • To: <sphenix-maps-l AT lists.bnl.gov>
  • Subject: [Sphenix-maps-l] Local coordinates
  • Date: Thu, 28 May 2020 09:55:49 -0600

Hi Yasser, others

Following up on yesterday's discussions, attach is a patch that printouts the local coordinates I mentioned yesterday, inside the PHG4MvtxHitReco module.

(for completeness, you can apply it via: patch -p1 < diff.patch in your coresoftware source checkout)

What is printed is:

- the local_in PHG4Hit coordinates (all located at y = +15 um)

- the local_out PHG4Hit coordinates (all located at y = -15 um)

- the mid point, located at y = 0;

- the local position of the corresponding "pixel", obtained via CylinderGeom_Mvtx::get_local_coords_from_pixel() which is located at y = +5um. (example output at the end of this email)

This same method is then used late on, in MvtxClusterizer, to calculate the "local" cluster positions, then converted into world coordinate. (see MvtxClusterizer.cc, line 330 or so).

My understanding is that this difference, between y = 0 for the mid-point, and y = +5um for the pixel local_coord (and then the cluster), which is propagated to world coordinate by converting all the above with the same method, namely CylinderGeom_Mvtx::get_world_from_local_coords, is why I still get a non zero offset in phi residuals even if I use identical diffusion radii R_min and R_max.

Comments welcome: is it a misunderstanding on my side ? A bug in the code ? Something expected ?

Best,

Hugo

--------------------------

/phenix/u/hpereira/sphenix/src/coresoftware/simulation/g4simulation/g4mvtx/PHG4MvtxHitReco.cc:308:  local_in:     (-0.463923,0.0015,-0.462255)
/phenix/u/hpereira/sphenix/src/coresoftware/simulation/g4simulation/g4mvtx/PHG4MvtxHitReco.cc:309:  local_out:    (-0.465142,-0.0015,-0.458722)
/phenix/u/hpereira/sphenix/src/coresoftware/simulation/g4simulation/g4mvtx/PHG4MvtxHitReco.cc:310:  midpoint:     (-0.464532,0,-0.460488)
/phenix/u/hpereira/sphenix/src/coresoftware/simulation/g4simulation/g4mvtx/PHG4MvtxHitReco.cc:313:  local pixel:  (-0.46368,0.0005,-0.46053)

On 5/26/20 11:00 AM, Ming Liu wrote:

Dear all,

A remind of MVTX Test Beam analysis and MC tuning bi-weekly meeting this Wed 5/27 evening, 8:30PM/BNL (6:30PM/LANL, 5:30PM/LBNL; 8:30AM/China)

 

Draft agenda page with BlueJeans, https://indico.bnl.gov/event/8612/

 

Cheers,

Ming

 

-- 

Ming Xiong Liu

P-25, MS H846                     TEL: 505-667-7125 

Physics Division                            631-344-7821(BNL)

LANL                                               630-840-5708(FNAL)

Los Alamos, NM 87545      FAX:  505-665-7020

 


_______________________________________________
sPHENIX-MAPS-l mailing list
sPHENIX-MAPS-l AT lists.bnl.gov
https://lists.bnl.gov/mailman/listinfo/sphenix-maps-l
diff --git a/simulation/g4simulation/g4mvtx/PHG4MvtxHitReco.cc b/simulation/g4simulation/g4mvtx/PHG4MvtxHitReco.cc
index aca59f53..eb32ae12 100644
--- a/simulation/g4simulation/g4mvtx/PHG4MvtxHitReco.cc
+++ b/simulation/g4simulation/g4mvtx/PHG4MvtxHitReco.cc
@@ -42,6 +42,18 @@
 
 using namespace std;
 
+namespace
+{
+
+  // convenient function to printout TVector3
+  inline std::ostream& operator << (std::ostream& out, const TVector3& vec )
+  {
+    out << "(" << vec.x() << "," << vec.y() << "," << vec.z() << ")";
+    return out;
+  }
+
+}
+
 PHG4MvtxHitReco::PHG4MvtxHitReco(const string &name)
   : SubsysReco(name)
   , PHParameterContainerInterface(name)
@@ -211,7 +223,6 @@ int PHG4MvtxHitReco::process_event(PHCompositeNode *topNode)
       TVector3 local_in(hiter->second->get_local_x(0), hiter->second->get_local_y(0), hiter->second->get_local_z(0));
       TVector3 local_out(hiter->second->get_local_x(1), hiter->second->get_local_y(1), hiter->second->get_local_z(1));
       TVector3 midpoint((local_in.X() + local_out.X()) / 2.0, (local_in.Y() + local_out.Y()) / 2.0, (local_in.Z() + local_out.Z()) / 2.0);
-
       if (Verbosity() > 4)
       {
         cout << endl
@@ -291,6 +302,15 @@ int PHG4MvtxHitReco::process_event(PHCompositeNode *topNode)
       // Get the pixel number of the exit location
       int pixel_number_out = layergeom->get_pixel_from_local_coords(local_out);
 
+      // print local coordinates
+      std::cout << PHWHERE << " local_in:     " << local_in << std::endl;
+      std::cout << PHWHERE << " local_out:    " << local_out << std::endl;
+      std::cout << PHWHERE << " midpoint:     " << midpoint << std::endl;
+
+      const int pixel_number = layergeom->get_pixel_from_local_coords(midpoint);
+      std::cout << PHWHERE << " local pixel:  " << layergeom->get_local_coords_from_pixel(pixel_number) << std::endl;
+      std::cout << std::endl;
+
       if (pixel_number_in < 0 || pixel_number_out < 0)
       {
         cout << "Oops!  got negative pixel number in layer " << layergeom->get_layer()



Archive powered by MHonArc 2.6.24.

Top of Page