GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Analysis » Bug fixed in PndKinFitter read-in covariance matrix
Bug fixed in PndKinFitter read-in covariance matrix [message #19588] Thu, 29 September 2016 16:33 Go to previous message
Lu Cao is currently offline  Lu Cao
Messages: 77
Registered: February 2013
continuous participant
From: *ext.kfa-juelich.de
Dear all,

I just found a bug in RhoKinFitter::ReadMatrix(), when the original cov matrix is re-arranged from (X, Y, Z, Px, Py, Pz, E) basis to (Px, Py, Pz, E, X, Y, Z).
For example, the origianal cov matrix of a photon in (X, Y, Z, Px, Py, Pz, E) is
     |      0    |      1    |      2    |      3    |      4    |       5    |      6    |
---------------------------------------------------------------------------------------------
   0 |     0.2111    0.008221    -0.02881   0.0002914   1.135e-05   -3.977e-05           0 
   1 |   0.008221      0.2217     0.02912   1.135e-05   0.0003061     4.02e-05           0 
   2 |   -0.02881     0.02912    0.008063  -3.977e-05    4.02e-05    1.113e-05           0 
   3 |  0.0002914   1.135e-05  -3.977e-05   3.203e-06  -2.683e-06     1.97e-05   2.013e-05 
   4 |  1.135e-05   0.0003061    4.02e-05  -2.683e-06   3.022e-06   -1.897e-05  -1.939e-05 
   5 | -3.977e-05    4.02e-05   1.113e-05    1.97e-05  -1.897e-05    0.0001393    0.000142 
   6 |          0           0           0   2.013e-05  -1.939e-05     0.000142   0.0001447 


but the re-arranged one in (Px, Py, Pz, E, X, Y, Z) is
     |      0    |      1    |      2    |      3    |      4    |       5    |      6    |
----------------------------------------------------------------------------------------------
   0 |  3.203e-06  -2.683e-06    1.97e-05   2.013e-05   1.135e-05    -3.977e-05           0 
   1 | -2.683e-06   3.022e-06  -1.897e-05  -1.939e-05   0.0003061      4.02e-05           0 
   2 |   1.97e-05  -1.897e-05   0.0001393    0.000142    4.02e-05     1.113e-05           0 
   3 |  2.013e-05  -1.939e-05    0.000142   0.0001447           0             0           0 
   4 |  0.0002914   1.135e-05  -3.977e-05           0      0.2111      0.008221    -0.02881
   5 |  1.135e-05   0.0003061    4.02e-05           0    0.008221        0.2217     0.02912 
   6 | -3.977e-05    4.02e-05   1.113e-05           0    -0.02881       0.02912    0.008063
.

One can notice that some elements in the new cov matrix are wrongly filled, eg. the new (0,4) should be equel to the old (3,0)=0.0002914 rather than 1.135e-05. Since the new cov matrix is not symmetric, the whole fitting procedure will be badly influenced. This is caused by a bug in the code:
272	//Change to px,py,pz,E,x,y,z
273	    for(int i=0; i<7; i++) {
274	      for(int j=0; j<7; j++) {
275	        if(i>=3) {
276	          if(j>=3) {
277	            p4Cov[i-3][j-3] = p3Cov[i][j];
278	          } else { p4Cov[i-3][j+3] = p3Cov[i][j]; }
279	        } else {
280	          if(j>=3) {
281	            p4Cov[i+4][j-3] = p3Cov[i][j];
282	          } else { p4Cov[i+4][j+4] = p3Cov[i][j]; }
283	        }
284	      }
285	    }
.

The line #278,
Quote:
p4Cov[i-3][j+3] = p3Cov[i][j]
should be p4Cov[i-3][j+4] = p3Cov[i][j].

I've studied the pull distributions of befor & after fixing, combining with another bug fixed in this fitter recetly (trk 29480), with my Ds semileptonic decay chain. The result shows several issues regarding to the covariane matrix itself and the fitter, and seems may evoke a long and detailed discussion. For a more efficent and direct communication, I would prefer to present the plots in the upcoming software meeting on 4th Oct..

BTW, the fixed code is attached. (No right to commit... Crying or Very Sad )

Best regards,
Lu
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to distinguish between STT hits in barrel part and forward tracker?
Next Topic: Fitters and hyperons
Goto Forum:
  


Current Time: Thu Nov 28 21:34:58 CET 2024

Total time taken to generate the page: 0.00825 seconds