Report problems to ATLAS LXR Team (with time and IP address indicated)

The LXR Cross Referencer

source navigation ]
diff markup ]
identifier search ]
general search ]
 
 
Architecture: linux ]
Version: head ] [ nightly ] [ GaudiDev ]
  Links to LXR source navigation pages for stable releases [ 12.*.* ]   [ 13.*.* ]   [ 14.*.* ]   [ 15.*.* ] 

001 #include "AtlfastAlgs/MuonBinData.h"
002 
003 namespace Atlfast 
004 {
005 
006  /** @brief Class to hold smearing matrix data
007    *
008    * The data is provided through the constructor
009    * in the format found in the flat file and the
010    * correlation matrix corresponding to the bin
011    * can be calculated and returned via public methods.
012    */
013 
014 
015   //-----------------------------------------------
016   // PUBLIC - Constructor
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   // PUBLIC - HepSymMatrix getMatrix(random)
039   // returns appropriate Sigma (=covariance) matrix
040   //
041   // NOTE: the representation of Sigma is determined by the track 
042   //       representation implicitly given in the parameter files,
043   //       i.e., (d0, z0, phi0, cot(theta0), q/pT), which is for 
044   //       internal use only.
045   //
046   //       The main advantage of this representation is that in 
047   //       the context of the ID, for a solenoidal field, the three
048   //       transverse track parameters (d0, phi0, q/pT) are to a 
049   //       good approximation uncorrelated with the two longitudinal 
050   //       ones (z0, cot(theta0)).  
051   //
052   //       Sigma has to be converted into the representation used 
053   //       by Common Tracking, i.e. (d0, z0, phi0, theta0, q/p), 
054   //       when it is written to CBNTs or AODs.  
055   //--------------------------------------------------------------------
056   HepSymMatrix MuonBinData::getMatrix( const TrackTrajectory& traj ) const 
057   {
058 
059     HepSymMatrix Sigma(5,0);
060 
061     // diagonals
062     for ( int param = 0; param < 5; param++ )
063     {
064        Sigma[param][param] = std::pow( m_sigmas[param]->resolution(traj), 2 );
065     }
066 
067     // off-diagonals
068     // NOTE: m_correlations[] holds correlation coefficients, need covariances
069 
070     // (1,3) ... cov(d0,phi0)
071     // (1,5) ... cov(d0,q/pT)
072     // (3,5) ... cov(phi0,q/pT)
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     // covariance sub-matrix of transverse parameters needs to be positive definite
078     // in order that its square root (cf. MuonMatrixManager) exists
079     double det3 = 1 - rho13 * rho13 - rho15 * rho15 - rho35 * rho35 - 2 * rho13 * rho15 * rho35;
080     if ( det3 < 0 )  rho13 = rho15 = rho35 = 0;
081     
082     // make sure that correlation coefficients stay within [-1,+1]
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     // (2,4) ... cov(z0,cot(theta0))
093     double rho24 = m_correlations[3]->resolution(traj);
094     // make sure that correlation coefficient stays within [-1,+1]
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     // DONE!
099     return Sigma;
100     
101   }
102   
103 }//namespace bracket
104 

source navigation ] diff markup ] identifier search ] general search ]

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. Valid HTML 4.01!