#ifndef ROOT_THaOpticsHRS
#define ROOT_THaOpticsHRS
#include "THaOptics.h"
class THaTrack;
class THaSpectrometer;
class TVector3;
class TString;
class THaBeam;
#ifdef DEBUG_LEVEL
# undef DEBUG_LEVEL
#endif
#define DEBUG_LEVEL 2
#include "DebugDef.h"
class THaOpticsHRS : public THaOptics
{
public:
THaOpticsHRS(const char* name, const char* desc, THaSpectrometer *pspec, TString strBeamDetectorName="");
virtual ~THaOpticsHRS();
using THaOptics::ApplyOptics;
virtual Int_t ApplyOptics(
Double_t trackX,
Double_t trackY,
Double_t trackTheta,
Double_t trackPhi,
TVector3 beamPos,
TVector3 beamDir,
TVector3 &P,
TVector3 &Vertex,
Double_t &TargetX,
Double_t &TargetY,
Double_t &TargetTheta,
Double_t &TargetPhi,
Double_t &PathLen
);
protected:
virtual Int_t ReadDatabase( const TDatime& date );
protected:
enum EFPMatrixElemTags { T000 = 0, Y000, P000 };
enum { kPORDER = 7 };
class THaMatrixElement;
friend class THaMatrixElement;
class THaMatrixElement {
public:
THaMatrixElement() : iszero(true), pw(3), order(0), v(0), poly(kPORDER) {}
bool match( const THaMatrixElement& rhs ) const;
bool iszero;
std::vector<int> pw;
int order;
double v;
std::vector<double> poly;
};
std::vector<THaMatrixElement> fTMatrixElems;
std::vector<THaMatrixElement> fDMatrixElems;
std::vector<THaMatrixElement> fPMatrixElems;
std::vector<THaMatrixElement> fPTAMatrixElems;
std::vector<THaMatrixElement> fYMatrixElems;
std::vector<THaMatrixElement> fYTAMatrixElems;
std::vector<THaMatrixElement> fFPMatrixElems;
std::vector<THaMatrixElement> fLMatrixElems;
void CalcMatrix(const double x, std::vector<THaMatrixElement> &matrix);
Double_t DoPoly(const int n, const std::vector<double> &a, const double x);
Double_t PolyInv(const double x1, const double x2, const double xacc,
const double y, const int norder,
const std::vector<double> &a);
Double_t CalcTargetVar(const std::vector<THaMatrixElement> &matrix,
const double powers[][5]);
Double_t CalcTarget2FPLen(const std::vector<THaMatrixElement>& matrix,
const Double_t powers[][5]);
private:
ClassDef(THaOpticsHRS,1);
};
#endif
Last update: Tue Jul 7 19:26:17 2009
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.