Home » PANDA » PandaRoot » EMC » failure of QA macro of EMC reconstruction
Re: failure of QA macro of EMC reconstruction [message #9884 is a reply to message #9881] |
Sun, 06 December 2009 14:32 |
Elwin Dijck
Messages: 16 Registered: June 2009 Location: Groningen, The Netherland...
|
occasional visitor |
From: *mxp.dsl.internl.net
|
|
Hi all,
I think the macros/mapper versions etc. are alright and the shift is caused by incorrect handling of the skewed shapes of the barrel crystals.
In my changes to the PndEmcXtal class, I changed PndEmcXtal::frontCentre to properly take the skewing of crystals into account (ie. cases where the parameters phi and theta of TGeoTrap are non-zero). To show that the skewed shapes can result in the observed phi-shift, here is a plot of the phi-difference between the center of the front face and the center of the crystal as a function of theta (the normals of the front faces of the crystals all point towards the target). It looks similar to the theta-dependence of the shift.
Interesting from the QA test results is that the sign of the shift seems to have flipped around November 24 when my changes to the PndEmcXtal class were commited. I think the origin of the problem is in PndEmcDigi::depthPosition. Before my changes the result was wrong, and afterwards it was still wrong but in a different way. The main problem is that for the skewed TGeoTraps, the front face normal vector and crystal axis vector are not the same, which PndEmcDigi::depthPosition doesn't take into account. Thus PndEmcDigi::depthPosition that uses the front face normal does not return a position that lies on the central axis of the crystal.
I think the shift can be fixed by adding another parameter to PndEmcXtal that returns the unit vector in the direction of the central axis of the crystal and using that in the digi position calculation. Since my changes this vector is already calculated in the PndEmcXtal constructor anyway, it only needs to be accessable. See the attached files for changes in the code.
svn diffs
Index: PndEmcXtal.h
===================================================================
--- PndEmcXtal.h (revision 7277)
+++ PndEmcXtal.h (working copy)
@@ -52,6 +52,7 @@
const TVector3& centre() const;
const TVector3& frontCentre() const;
const TVector3& normalToFrontFace() const ;
+ const TVector3& axisVector() const;
const TGeoTrap& geometry() const;
const TGeoRotation& rotation() const;
@@ -66,6 +67,7 @@
TVector3 fCentre;
TVector3 fFrontCentre;
TVector3 fNormalToFrontFace;
+ TVector3 fAxis;
ClassDef(PndEmcXtal,1)
};
Index: PndEmcXtal.cxx
===================================================================
--- PndEmcXtal.cxx (revision 7277)
+++ PndEmcXtal.cxx (working copy)
@@ -70,12 +70,14 @@
fFrontCentre = pos + axis_vector;
fNormalToFrontFace = -1.0 * normal_vector;
+ fAxis = -1.0 * axis_vector.Unit();
} else {
//cout << "Crystal orientation in module " << id->Index() / 100000000
// << " -dz" << endl;
fFrontCentre = pos - axis_vector;
fNormalToFrontFace = +1.0 * normal_vector;
+ fAxis = +1.0 * axis_vector.Unit();
}
}
@@ -137,6 +139,12 @@
return fNormalToFrontFace;
}
+const TVector3&
+PndEmcXtal::axisVector() const
+{
+ return fAxis;
+}
+
const TGeoTrap&
PndEmcXtal::geometry() const
{
Index: ../EmcData/PndEmcDigi.cxx
===================================================================
--- ../EmcData/PndEmcDigi.cxx (revision 7277)
+++ ../EmcData/PndEmcDigi.cxx (working copy)
@@ -117,7 +117,7 @@
//cout << "depth" << endl;
TVector3 pos = xtal->frontCentre();
- TVector3 norm=xtal->normalToFrontFace();
+ TVector3 norm = xtal->axisVector();
norm*=fPositionDepth;
pos += norm;
I haven't fully tested this, but here are some results for 500 photons @ theta = 90 degrees (1 GeV) where the shift is biggest. Black - old code (negative phi shift), blue - after my changes to PndEmcXtal (positive phi shift), red - using axis vector (phi shift seems mostly gone).
Could someone properly check whether this really helps?
Best regards,
Elwin Dijck
-
Attachment: skewing.gif
(Size: 8.56KB, Downloaded 694 times)
-
Attachment: test.gif
(Size: 10.73KB, Downloaded 643 times)
-
Attachment: PndEmcXtal.h
(Size: 1.89KB, Downloaded 285 times)
-
Attachment: PndEmcXtal.cxx
(Size: 3.81KB, Downloaded 293 times)
-
Attachment: PndEmcDigi.cxx
(Size: 7.58KB, Downloaded 344 times)
[Updated on: Sun, 06 December 2009 15:14] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Tue Oct 08 23:48:20 CEST 2024
Total time taken to generate the page: 0.00686 seconds
|