001 #include "AtlfastAlgs/MuonBinData.h"
002
003 namespace Atlfast
004 {
005
006
007
008
009
010
011
012
013
014
015
016
017
018
019 MuonBinData::MuonBinData( BinID& id,
020 vector< ParameterResolutions* > sigma,
021 vector< ParameterResolutions* > correlations ) :
022 m_id(id),
023 m_sigmas(sigma),
024 m_correlations(correlations)
025 {}
026
027
028 MuonBinData::~MuonBinData()
029 {
030 for (size_t i = 0; i < m_sigmas.size(); i++)
031 delete m_sigmas[i];
032 for (size_t i = 0; i < m_correlations.size(); i++)
033 delete m_correlations[i];
034 }
035
036
037
038
039
040
041
042
043
044
045
046
047
048
049
050
051
052
053
054
055
056 HepSymMatrix MuonBinData::getMatrix( const TrackTrajectory& traj ) const
057 {
058
059 HepSymMatrix Sigma(5,0);
060
061
062 for ( int param = 0; param < 5; param++ )
063 {
064 Sigma[param][param] = std::pow( m_sigmas[param]->resolution(traj), 2 );
065 }
066
067
068
069
070
071
072
073 double rho13 = m_correlations[0]->resolution(traj);
074 double rho15 = m_correlations[1]->resolution(traj);
075 double rho35 = m_correlations[2]->resolution(traj);
076
077
078
079 double det3 = 1 - rho13 * rho13 - rho15 * rho15 - rho35 * rho35 - 2 * rho13 * rho15 * rho35;
080 if ( det3 < 0 ) rho13 = rho15 = rho35 = 0;
081
082
083 if ( std::abs(rho13) > 1 ) rho13 *= 0.99 / std::abs(rho13);
084 if ( std::abs(rho15) > 1 ) rho15 *= 0.99 / std::abs(rho15);
085 if ( std::abs(rho35) > 1 ) rho35 *= 0.99 / std::abs(rho35);
086
087 Sigma(1,3) = Sigma(3,1) = rho13 * std::sqrt( Sigma(1,1) * Sigma(3,3) );
088 Sigma(1,5) = Sigma(5,1) = rho15 * std::sqrt( Sigma(1,1) * Sigma(5,5) );
089 Sigma(3,5) = Sigma(5,3) = rho35 * std::sqrt( Sigma(3,3) * Sigma(5,5) );
090
091
092
093 double rho24 = m_correlations[3]->resolution(traj);
094
095 if ( std::abs(rho24) > 1 ) rho24 *= 0.99 / std::abs(rho24);
096 Sigma(2,4) = Sigma(4,2) = rho24 * std::sqrt( Sigma(2,2) * Sigma(4,4) );
097
098
099 return Sigma;
100
101 }
102
103 }
104
| Due to the LXR bug, the updates fail sometimes to remove references to deleted files. The Saturday's full rebuilds fix these problems |
|
This page was automatically generated by the
LXR engine.
|
|