Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-10 10:18:06

0001 #pragma once
0002 
0003 #include <TVector3.h>
0004 
0005 namespace IRT2 {
0006 
0007 class IRTSolution {
0008   friend class IRT;
0009 
0010   public:
0011  IRTSolution(): m_Converged(false), m_Theta(0.0), m_SigmaTheta(0.0), m_Phi(0.0), m_Length(0.0), m_Time(0.0),
0012     m_DtDx(0.0), m_DtDy(0.0), m_DtDz(0.0), /*m_DtDn(0.0),*/m_DtDt(0.0), m_DtDf(0.0), 
0013     m_SigmaDx(0.0), m_SigmaDy(0.0), m_SigmaDz(0.0), m_SigmaDt(0.0), m_SigmaDf(0.0) {};
0014   ~IRTSolution() {};
0015 
0016   void SetSeed(const TVector3 &n0) {
0017     m_Theta = n0.Theta();
0018     m_Phi   = n0.Phi();
0019   };
0020 
0021   bool Converged( void )       const { return m_Converged; }
0022   double GetTheta( void )      const { return m_Theta; };
0023   double GetSigmaTheta( void ) const { return m_SigmaTheta; };
0024   double GetPhi( void )        const { return m_Phi; };
0025 #if _LATER_
0026   IRTSolution& operator = (IRTSolution other) {
0027     m_Converged = false; m_Theta = other.m_Theta; m_SigmaTheta = 0.0; m_Phi = other.m_Phi;
0028     return *this;
0029   };
0030 #else
0031   void Set(const IRTSolution *other) {
0032     m_Converged = false; m_Theta = other->m_Theta; m_SigmaTheta = 0.0; m_Phi = other->m_Phi;
0033     //memcpy(this, other, sizeof(IRTSolution));
0034   };
0035 #endif
0036   void SetSigmaDx(double value) { m_SigmaDx = value; };
0037   void SetSigmaDy(double value) { m_SigmaDy = value; };
0038   void SetSigmaDz(double value) { m_SigmaDz = value; };
0039   void SetSigmaDt(double value) { m_SigmaDt = value; };
0040   void SetSigmaDf(double value) { m_SigmaDf = value; };
0041 
0042   void CalculateSigmaThetaEstimate( void ) {
0043     //FIXME: do it better later;
0044     const unsigned dim = 5;
0045     double sigma     [dim] = {m_SigmaDx, m_SigmaDy, m_SigmaDz, m_SigmaDt, m_SigmaDf};
0046     double derivative[dim] = {   m_DtDx,    m_DtDy,    m_DtDz,    m_DtDt,     m_DtDf};
0047     m_SigmaTheta = 0.0;
0048     for(unsigned iq=0; iq<dim; iq++)
0049       m_SigmaTheta += pow(sigma[iq]*derivative[iq], 2);
0050     m_SigmaTheta = sqrt(m_SigmaTheta);
0051   };
0052 
0053   // This is a reconstructed direction in MARS 3D system; 
0054   TVector3 m_Direction;
0055 
0056   //private:
0057   bool m_Converged;
0058   double m_Theta, m_SigmaTheta, m_Phi, m_Length, m_Time;
0059 
0060   // Derivatives: XY-coordinates on the sensor, emission point, "refractive index" (?), 
0061   // charged particle track theta and phi; these ones can be evaluated internally;
0062   double m_DtDx, m_DtDy, m_DtDz/*, m_DtDn*/, m_DtDt, m_DtDf;
0063 
0064   // Qaudratic error estimates as provided by the user; assume tracking errors diagonal;
0065   double m_SigmaDx, m_SigmaDy, m_SigmaDz, m_SigmaDt, m_SigmaDf;
0066 };
0067 
0068 } // namespace IRT2