#ifndef TFITPARAMS_H #define TFITPARAMS_H ////////////////////////////////////////////////////////////////////////// // // // TFitParams // // // // Kinematics base class for TCandidates // // // // Author List: // // Marcel Kunze, RUB, Feb. 00 // // Copyright (C) 1999-2001, Ruhr-University Bochum. // // // ////////////////////////////////////////////////////////////////////////// #include "RhoMath/TError.h" #include "RhoMath/TPointErr.h" #include "RhoMath/TVectorErr.h" #include "RhoMath/TLorentzVectorErr.h" #include "TVector3.h" #include "TLorentzVector.h" #define MATRIXSIZE 28 class TCandidate; // --------------------- // -- Class Interface -- // --------------------- class TFitParams : public TObject { protected: // the params Char_t fCharge; // The electrical charge Float_t fXposition, // The origin in x fYposition, // The origin in y fZposition; // The origin in z Double_t fXmomentum, // The momentum in x fYmomentum, // The momentum in y fZmomentum, // The momentum in z fEnergy; // The total energy Float_t fErrP7[MATRIXSIZE], // The symmetric 7*7 error matrix fParams[5], // The helix fit parameters fCov[15]; // The helix error matrix // Fitter interface public: enum Status{unlocked=0,locked,nailed,unknown}; private: Double_t fChi2; Status fStatus; TCandidate* fFit; //!owned pointer public: // // Public interface // // default TFitParams(); // // from the quantities themselves // // this one takes the full 7X7 covariance TFitParams( Double_t charge, const TVector3& pos, const TLorentzVector& p4, const TMatrixD& cov7 ); // copy constructor TFitParams( const TFitParams& ); // Use helix parameters (for fitting applications) TFitParams( Double_t charge, Float_t* par, Float_t* cov ); // destructor ~TFitParams(); TFitParams& GetFitParams() const { return (TFitParams&) *this; } // modifiers void SetCharge( Double_t charge ) { fCharge = (Char_t) charge; } void SetMass( Double_t mass ); void SetEnergy( Double_t energy ) { fEnergy = energy; } void SetE( Double_t energy ) { fEnergy = energy; } void SetMassAndEnergy( Double_t mass, Double_t energy ); void SetPosition( const TVector3& pos ); void SetPos( const TVector3& pos ) { SetPosition(pos); } void SetP3( const TVector3& p3 ); void SetVect( const TVector3& p3 ) { SetP3(p3); } void SetP4( Double_t mass, const TVector3& p3 ); void SetP4( const TLorentzVector& p4 ); void SetP7( const TVector3& pos, const TLorentzVector& p4 ); void SetCovP4( const TMatrixD& covP4 ); void SetCov7( const TMatrixD& cov7 ); void SetCov7( const TMatrixD& covPos, const TMatrixD& covP4 ); void SetCov7( const TMatrixD& covPos, const TMatrixD& covP4,const TMatrixD& covPosP4 ); void Set( const TVector3& pos, const TLorentzVector& p4, const TMatrixD& cov7 ); void Set( Double_t mass,const TPointErr& posErr, const TVectorErr& p3Err, const TMatrixD& xpErr ); void Set( Double_t charge, Float_t* par, Float_t* cov=0); // From helix parms void SetErr(Float_t *err) {if (err!=0) for (int i=0; i