/* * TpcCalibCluster.h * * Created on: Apr 10, 2015 * Author: mberger */ #ifndef TPCCALIBCLUSTER_H_ #define TPCCALIBCLUSTER_H_ //#include "TObject.h" #include "TVector3.h" #include "TMatrixD.h" #include "TVectorD.h" #include "TMatrixDSym.h" #include "TString.h" #include "GFDetPlane.h" #include "TH1.h" class TpcCalibCluster { public: TpcCalibCluster(); virtual ~TpcCalibCluster(); bool init(); void setPlane(TVector3 O, TVector3 U, TVector3 V); void setPlaneON(TVector3 O,TVector3 N); //void setParams(std::vector const &vec){fParams=vec;} void setParams(double p1, double p2, double p3, double p4, double p5, double p6){fParams[0]=p1;fParams[1]=p2;fParams[2]=p3;fParams[3]=p4;fParams[4]=p5;fParams[5]=p6;} void setParam(int ipar, double val){fParams[ipar]=val;} void setParams(std::vector const &pars){fParams=pars;} double getParam(int ipar){return fParams[ipar];} std::vector getParam(){return fParams;} void setPos(TVector3 pos){fPos=pos;} void setRefPos(TVector3 refpos){fRefPos=refpos;} //make sure that the setRefPos is called BEFORE setPlane, since setplane calculates the refpos on the plane void setID(int i); void setSize(TVector3 size){fsize=size;} void setFake(bool isfake=true){fisFake=isfake;} void setDAFWeight(double weight){fDafWeight=weight;} void setShapeCov(TMatrixDSym m); double getResLL(); double getResLL3D(); TVector3 getPulls(Bool_t fake=kFALSE); TVector3 getPos(){return fPos;} Double_t getTheta(); TVector3 getEv1Glob(){return fev1Glob;} TVector3 getEv2Glob(){return fev2Glob;} const TVector3& getResPlane() const {return fResPlane;} private: TVector3 fPos; //position of cluster TVector3 fRefPos; //position of track on plane TVector3 fRefPosPlane; //position of trsack on plane in plane coord TVector3 fResPlane; //residual in plane coords TVector3 fRes; //residual in XYZ coords TVector3 fPosUV; //position of cluster in plane coords TVector3 fev1Glob; //eigenvector of cov in XYZ TVector3 fev2Glob; //eigenvector of cov in XYZ TVector3 fsize; //size of cluster in XYZ TVector3 fev1,fev2; //eigenvectors from shape cov TMatrixD fMeigenVec; //martix containing eigenvectors from shape cov TMatrixD fMeigenVec_i; //martix containing eigenvectors from shape cov inverted int fID; double fDafWeight; GFDetPlane fPlane; TMatrixD fPlaneM; TVectorD fResPlaneD; std::vector fParams; bool fisFake; bool fEigenVecIsSet; TMatrixDSym fShapeCov; TVector3 produceFakePulls(); TVector3 calcPulls(); TVector3 calcPullsUV(TVector3 cog, TMatrixDSym cov); TVector3 getPosOnPlane(TVector3 pos); TMatrixDSym getErrorCov(bool project=true); TMatrixDSym getErrorCovPlane(); public: ClassDef(TpcCalibCluster,1) }; #endif /* TPCCALIBCLUSTER_H_ */