Home » PANDA » PandaRoot » Tracking » RhoError class in pandaroot
RhoError class in pandaroot [message #16766] 
Tue, 03 June 2014 11:52 
Elisabetta Prencipe (2)
Messages: 214 Registered: February 2013

firstgrade participant 
From: *ikp.kfajuelich.de


Dear Ralf, dear rhodevelopers,
I have a question how to evaluate the error of the momentum, position, theta, phi, distributions using rho candidates and rho lists, and I am wondering if below is the best way how to proceed. For example, if I want to evaluate the pull of quantities like momentum, or theta and phi, I need information about the reco variables (easy), the true value (easy) and the error distributions. I see that in RhoMath/ the information about the covariance error matrix is accessible. So I could write:
while (theAnalysis>GetEvent() && i++<nevts)
{
theAnalysis>FillList(muminus, "MuonAllMinus");
for (j=0;j<muminus.GetLength();++j)
{
// reco variables
hmomtrk>Fill(muminus[j]>P());
hthttrk>Fill(muminus[j]>P4().Theta());
hphitrk>Fill(muminus[j]>P4().Phi());
// error matrix : variance
RhoError tempvar = muminus[j]>Cov7(); //variance of 7 parameters: x,y,z,px,py,pz,E
double var_px = tempvar(3,3);
double var_py = tempvar(4,4);
double var_pz = tempvar(5,5);
double var_energy = tempvar(6,6);
}
}
This shoud give my access to the variance of px, py, pz, energy. Am I correct?
Sqrt() of what I get from here should deliver the error distribution of px, py, pz, E. Now my question is: is this the way to proceed to get the error distirbutions? and what about Theta() and Phi()? Should I combine, then, the information which I obtain, and get the error distribution for the angular variables? or is there a smarter way/funcion implemented to obtain the error distribution of kinematic variables, in pandaroot?
Thank you for your help,
Elisabetta




Re: RhoError class in pandaroot [message #16768 is a reply to message #16767] 
Tue, 03 June 2014 13:12 
Elisabetta Prencipe (2)
Messages: 214 Registered: February 2013

firstgrade participant 
From: *ikp.kfajuelich.de


Hi Ralf,
thank you for your reply. So you confirm that for additional (basic) kimenatic variables nothing is already implemented. Then, I will do myself. no problem!
So, instead of Cov7(), you suggest the use of P4Cov(), where:
cov[0]0] is the variance for px
cov[1][1] is the variance for py
cov[2][2] is the variance for pz
cov[3][3] is the variance for E
Actually I checked, and I found that if I use Cov7(), and I evaluate cov[3][3], cov[4][4], cov[5][5] and cov[6][6],
or
if I use P4Cov(), as you suggested, to evaluate the variance of px,py,pz,E respectively, as indicated in my previous posting, results are identical, as expected. This is the output for the px variance, if I run in my macro Cov7(3,3) left side, or P4Cov(0,0) right side.
4.7454e05, 4.7454e05
7.9324e05, 7.9324e05
0.00021817, 0.00021817
0.000140595, 0.000140595
1.7677e05, 1.7677e05
0.000121126, 0.000121126
0.000230273, 0.000230273
0.000486443, 0.000486443
2.26079e05, 2.26079e05
1.85428e05, 1.85428e05
0.000152567, 0.000152567
cheers, Elisabetta



Goto Forum:
Current Time: Sat Aug 03 21:53:16 CEST 2024
Total time taken to generate the page: 0.00673 seconds
