// ------------------------------------------------------------------------- // ------------------------------------------------------------------------- #ifndef PNDDCHSIMPLEFITTER_H #define PNDDCHSIMPLEFITTER_H #include "CbmTask.h" #include "TVector3.h" class TClonesArray; class TH1F; class TString; class PndDchSimpleFitter : public CbmTask { public: PndDchSimpleFitter(); ~PndDchSimpleFitter(); // Virtual method Init virtual InitStatus Init(); virtual void Finish(); // Virtual method Exec virtual void Exec(Option_t* opt); private: //fit circle by less square method Bool_t GetCircleParameters(TClonesArray *fPoints, TVector3& result); //fit line by less square method Bool_t GetLineParameters(TClonesArray *fPoints, TVector2& result); Bool_t GetMomentum(TVector3 circle, TVector2 lineXZ, TVector2 lineYZ, TVector3& momentum); // Input array of PndDchPoints TClonesArray* fPointArray; // array of hit points (TVector2) in XZ plane upstream the dipole (Chamber3 and Chamber4) TClonesArray* fPointsBeforeXZ; // array of hit points (TVector2) in XZ plane downstream the dipole (Chamber7 and Chamber8) TClonesArray* fPointsAfterXZ; // array of hit points (TVector2) in XZ plane for the region of dipole // which are hits form (Chamber7 and Chamber8 plus 2 artificial points when the track // is entering and exiting the field region) TClonesArray* fPointsInXZ; // array of hit points (TVector2) in YZ plane (hits from Chamber3 to Chamber8) TClonesArray* fPointsYZ; //upstream z - coordinate of the field border Double_t fZFieldBegin; //downstream z - coordinate of the field border Double_t fZFieldEnd; //effecitive field strength Double_t fField; //pull histos TH1F* fPullPx; TH1F* fPullPy; TH1F* fPullPz; TH1F* fPullP; TString fOutFile; ClassDef(PndDchSimpleFitter,1) }; #endif