/* $Id: CbmRichRing.cxx,v 1.8 2006/09/13 14:51:28 hoehne Exp $*/ /* History of CVS commits: * * $Log: CbmRichRing.cxx,v $ * Revision 1.8 2006/09/13 14:51:28 hoehne * two variables (Selection2D, SelectionNN) added in which values between 0 and 1 are stored for fake rejection * ReconstructedFlag removed * * Revision 1.7 2006/08/11 14:03:57 hoehne * move SetUncertainty and GetUncertainty to SetChi2 and GetChi2 * * Revision 1.6 2006/07/12 06:27:54 hoehne * new functions: SetDistance and GetDistance added which set/ give the distance between ring center and track attached to this * ring * * Revision 1.5 2006/02/23 11:24:10 hoehne * RecFlag added (Simeon Lebedev) * * Revision 1.4 2006/01/23 11:40:13 hoehne * MCMotherID added * * Revision 1.3 2006/01/19 10:40:06 hoehne * restructured according to new RinfFinder Class: * array of hits belonging to a certain ring added * * * */ // ------------------------------------------------------------------------- // ----- CbmRichRing source file ----- // ----- Created 05/07/04 by A. Soloviev ----- // ------------------------------------------------------------------------- #include "CbmRichRing.h" //#include "CbmRichHit.h" // ----- Default constructor ------------------------------------------- CbmRichRing::CbmRichRing() : TObject(), fCenterX(), fCenterY(), fRadius(), fTrackID ( -1 ), fMCMotherID ( -1 ), fDistance ( 99 ), fChi2 ( 0 ), fRecFlag(0) { fSelectionNN = -1.; fSelection2D = -1.; } // ------------------------------------------------------------------------- // ----- Standard constructor ------------------------------------------ CbmRichRing::CbmRichRing ( Double_t x, Double_t y, Double_t r ) : TObject(), fCenterX ( x ), fCenterY ( y ), fRadius ( r ), fTrackID ( -1 ), fMCMotherID ( -1 ), fDistance ( 99 ), fChi2 ( 0 ), fRecFlag(0) { fSelectionNN = -1.; fSelection2D = -1.; } // ------------------------------------------------------------------------- // ----- Destructor ---------------------------------------------------- CbmRichRing::~CbmRichRing() {} // ------------------------------------------------------------------------- void CbmRichRing::Print(){ cout << " Ring parameters: " << " Radius = " << GetRadius() << ", CenterX = " << GetCenterX() << ", CenterY = " << GetCenterY() << ", NofHits = " << GetNofHits() << ", RadialPosition = " << GetRadialPosition() << ", Chi2 = " << GetChi2() << ", RingTrackDistance = "<< GetDistance(); } Double_t CbmRichRing::GetRadialPosition() const{ Double_t radPos; if (fCenterY > 0){ radPos = sqrt((fCenterX - 0)* (fCenterX - 0) + (fCenterY - 110)* (fCenterY - 110)); } else { radPos = sqrt((fCenterX - 0)* (fCenterX - 0) + (fCenterY + 110)* (fCenterY + 110)); } return radPos; } ClassImp(CbmRichRing)