//----------------------------------------------------------- // File and Version Information: // $Id$ // // Description: // Simple Fitting Task for the Laser Calibration System // // // // Environment: // Software developed for the PANDA Detector at FAIR. // // Author List: // Felix Boehmer TUM (original author) // //----------------------------------------------------------- #ifndef TPCLASERFITTASK_H #define TPCLASERFITTASK_H //Base class #include "FairTask.h" #include "TClonesArray.h" #include "TMatrixT.h" #include "TString.h" #include "BiCubSpline.h" #include #include // Collaborating Class Declarations -------------------------------------- class TpcLaser; class TpcLaserTrack; class TpcLaserStat; class TpcLaserTask; class TpcCluster; class TpcDigiPar; class TpcLaserFitTask : public FairTask { public: // Constructor ----------------------------------------------------------- TpcLaserFitTask(); //default constructor ~TpcLaserFitTask(); virtual InitStatus Init(); //needs to be overidden as usual virtual void Exec(Option_t* opt); //... virtual void SetParContainers(); // Modifiers ------------------------------------------------------------- void SetPersistence(Bool_t opt=kTRUE) {fPersistence=kTRUE;} void SetSplineMeshKnots(unsigned int nZ, unsigned int nR) {fNknotsZ=nZ; fNknotsR=nR;} void SetPlotSplineFits(Bool_t opt) {fPlot=opt;} void SetFitWithErrors(Bool_t opt=true) {fDoErrors=opt;} //rotate covariance to align with X axis (according to track geometry) //this allows easy blow-up of the error along the track. //In the end this is used for weighting of the residual errors void rotateCov(TMatrixT& cov, double phi, double theta); void rotateCovBack(TMatrixT& cov, double phi, double theta); private: TString fResBranchName; TString fTrackBranchName; TString fSplineBranchName; Bool_t fPersistence; Bool_t fPlot; Bool_t fDoErrors; double frMin; double frMax; double fzMin; double fzMax; unsigned int fNknotsZ; unsigned int fNknotsR; unsigned int fNlamdaZ; unsigned int fNlamdaR; std::vector* flaserList; std::vector* ftrackList; std::vector fknotsZ; std::vector fknotsR; /*2D cubic Splines and associated data vectors for the fits */ BiCubSpline* fdevMapR; BiCubSpline* fdevMapPerp; BiCubSpline* frecoMapR; BiCubSpline* frecoMapPerp; //reconstructed deviation maps: (dr, dperp) at (r,perp) std::vector*> fdevMapR_data; std::vector*> fdevMapPerp_data; //maps FOR reconstruction of MEASURED points: (dr, dperp) at (r+dr, perp+dperp) std::vector*> frecoMapR_data; std::vector*> frecoMapPerp_data; TClonesArray* fstatArray; TClonesArray* ftrackArray; //TClonesArray* ffitStatArray; TClonesArray* fSplineArray; TClonesArray* fResArray; TClonesArray* fTrackArray; TpcDigiPar* fpar; TMatrixT fRotPhi; //rotate around z TMatrixT fRotTheta; //rotate around y TMatrixT fUnity; //needed for rotations public: ClassDef(TpcLaserFitTask,2) }; #endif