#include <MuonBinData.h>
Inheritance diagram for Atlfast::MuonBinData:
Public Member Functions | |
MuonBinData (BinID &, vector< ParameterResolutions * >, vector< ParameterResolutions * >) | |
virtual | ~MuonBinData () |
HepSymMatrix | getMatrix (const TrackTrajectory &track) const |
Private Attributes | |
BinID | m_id |
vector< ParameterResolutions * > | m_sigmas |
vector< ParameterResolutions * > | m_correlations |
Definition at line 32 of file MuonBinData.h.
Atlfast::MuonBinData::MuonBinData | ( | BinID & | , | |
vector< ParameterResolutions * > | , | |||
vector< ParameterResolutions * > | ||||
) |
Constructor from flat file contents
Definition at line 10 of file MuonBinData.cxx.
00012 : 00013 m_id(id), 00014 m_sigmas(sigma), 00015 m_correlations(correlations) 00016 {}
Atlfast::MuonBinData::~MuonBinData | ( | ) | [virtual] |
Definition at line 19 of file MuonBinData.cxx.
00020 { 00021 for (size_t i = 0; i < m_sigmas.size(); i++) 00022 delete m_sigmas[i]; 00023 for (size_t i = 0; i < m_correlations.size(); i++) 00024 delete m_correlations[i]; 00025 }
HepSymMatrix Atlfast::MuonBinData::getMatrix | ( | const TrackTrajectory & | track | ) | const [virtual] |
returns the correlation matrix; track trajectory supplied as argument
Implements Atlfast::IBinData.
Definition at line 47 of file MuonBinData.cxx.
00048 { 00049 00050 HepSymMatrix Sigma(5,0); 00051 00052 // diagonals 00053 for ( int param = 0; param < 5; param++ ) 00054 { 00055 Sigma[param][param] = std::pow( m_sigmas[param]->resolution(traj), 2 ); 00056 } 00057 00058 // off-diagonals 00059 // NOTE: m_correlations[] holds correlation coefficients, need covariances 00060 00061 // (1,3) ... cov(d0,phi0) 00062 // (1,5) ... cov(d0,q/pT) 00063 // (3,5) ... cov(phi0,q/pT) 00064 double rho13 = m_correlations[0]->resolution(traj); 00065 double rho15 = m_correlations[1]->resolution(traj); 00066 double rho35 = m_correlations[2]->resolution(traj); 00067 00068 // covariance sub-matrix of transverse parameters needs to be positive definite 00069 // in order that its square root (cf. MuonMatrixManager) exists 00070 double det3 = 1 - rho13 * rho13 - rho15 * rho15 - rho35 * rho35 - 2 * rho13 * rho15 * rho35; 00071 if ( det3 < 0 ) rho13 = rho15 = rho35 = 0; 00072 00073 // make sure that correlation coefficients stay within [-1,+1] 00074 if ( std::abs(rho13) > 1 ) rho13 *= 0.99 / std::abs(rho13); 00075 if ( std::abs(rho15) > 1 ) rho15 *= 0.99 / std::abs(rho15); 00076 if ( std::abs(rho35) > 1 ) rho35 *= 0.99 / std::abs(rho35); 00077 00078 Sigma(1,3) = Sigma(3,1) = rho13 * std::sqrt( Sigma(1,1) * Sigma(3,3) ); 00079 Sigma(1,5) = Sigma(5,1) = rho15 * std::sqrt( Sigma(1,1) * Sigma(5,5) ); 00080 Sigma(3,5) = Sigma(5,3) = rho35 * std::sqrt( Sigma(3,3) * Sigma(5,5) ); 00081 00082 00083 // (2,4) ... cov(z0,cot(theta0)) 00084 double rho24 = m_correlations[3]->resolution(traj); 00085 // make sure that correlation coefficient stays within [-1,+1] 00086 if ( std::abs(rho24) > 1 ) rho24 *= 0.99 / std::abs(rho24); 00087 Sigma(2,4) = Sigma(4,2) = rho24 * std::sqrt( Sigma(2,2) * Sigma(4,4) ); 00088 00089 // DONE! 00090 return Sigma; 00091 00092 }
BinID Atlfast::MuonBinData::m_id [private] |
Definition at line 49 of file MuonBinData.h.
vector< ParameterResolutions* > Atlfast::MuonBinData::m_sigmas [private] |
Definition at line 51 of file MuonBinData.h.
vector< ParameterResolutions* > Atlfast::MuonBinData::m_correlations [private] |
Definition at line 52 of file MuonBinData.h.