#ifndef HKALOUTPUT_H #define HKALOUTPUT_H // from ROOT #include "TObject.h" #include "TVectorD.h" #include "TVector3.h" #include "TMatrixD.h" #include "TRotation.h" #define NDIM 5 #define NDIMSTATE 6 class HKalOutput : public TObject { private: Double_t fx; // xpos sec coordinate sys [mm] Double_t fy; // ypos sec coordinate sys [mm] Double_t fz; // zpos sec coordinate sys [mm] Double_t ftx; // tan x sec coordinate sys Double_t fty; // tan y sec coordinate sys Double_t fqp; // q/p [1/MeV/c] Double_t fcovariance[15]; // a00 <==> a00,a10,a11,a20,a21,a22,a30 .... a44 // a10 a11 // a20 a21 a22 // a30 a31 a32 a33 // a40 a41 a42 a43 a44 public: HKalOutput(); //-------------------------------------------------- // direct get + set functions Double_t getX() { return fx;} Double_t getY() { return fy;} Double_t getZ() { return fz;} Double_t getTx() { return ftx;} Double_t getTy() { return fty;} Double_t getQp() { return fqp;} void getHalfCovMatrix (Double_t cov[]); // input array has to be size 15! No range check . sector coord. system void getCovMatrix (TMatrixD &fCov); // sector coord. system void getStateVec (TVectorD &sv); // sector coord. system void setX (Double_t val) { fx = val;} void setY (Double_t val) { fy = val;} void setZ (Double_t val) { fz = val;} void setTx(Double_t val) { ftx= val;} void setTy(Double_t val) { fty= val;} void setQp(Double_t val) { fqp= val;} void setHalfCovMatrix (Double_t cov[]); // input array has to be size 15! No range check .sector coord. system void setCovMatrix (const TMatrixD &fCov); // sector coord. system void setStateVec (const TVectorD &sv); // sector coord. system void copyFrom(HKalOutput& fP); // copy full infos from fP to internal members . sector coord. system //-------------------------------------------------- //-------------------------------------------------- // input output from / to different coordinate systems / formats void setCovMatrixFromTrack(const TMatrixD& m,const TRotation* rot); // Kalman::kVarRot back to sector coord. system void getHalfCovMatrixLab(Double_t cov[],Int_t s); // input array has to be size 15! No range check .Lab coord. system void getStateVecLab (TVectorD &sv,Int_t s,Bool_t convert=kFALSE); // Lab coord. system void getCovMatrixLab(TMatrixD& m,Int_t s,Bool_t convert=kFALSE); // Lab coord. system void getPosAndDir (TVector3& pos,TVector3& dir,Bool_t unit=kTRUE); // sector coord. system void getPosAndDirLab(TVector3& pos,TVector3& dir,Int_t sec,Bool_t unit=kTRUE); // Lab coord. system void getMdcSeg (Double_t &zm, Double_t &r0, Double_t &theta, Double_t &phi,Int_t s=0); void getCandidateState(Double_t &zm, Double_t &r0, Double_t &theta, Double_t &phi,Double_t& p,Int_t s,Int_t pid=14); // Lab coord. system void getCovMatrixCand (TMatrixD& covLab, Int_t s,Int_t pid=14); // Lab coord. system //-------------------------------------------------- // KFParticle compatible get functions void get6DimStateLab (Double_t& x,Double_t& y,Double_t& z,Double_t& px,Double_t& py,Double_t& pz,Int_t s, Int_t pid=14,Bool_t convert=kTRUE); // Lab coord. system void get6DimStateLab (TVectorD& sv ,Int_t s,Int_t pid=14,Bool_t convert=kTRUE); // Lab coord. system void get6DimHalfCovMatrixLab(Double_t cov[],Int_t s,Int_t pid=14,Bool_t convert=kTRUE); // Lab coord. system ,input array has to be size 21! No range check void get6DimCovMatrixLab (TMatrixD& m ,Int_t s,Int_t pid=14,Bool_t convert=kTRUE); // Lab coord. system //-------------------------------------------------- // print content void printStateVec(); void printStateVec(TVectorD& v); void printCovMatrix(); void reset(); ClassDef (HKalOutput,2) }; #endif