/****************************************************************************** * $Id: CbmRichRingSelect2DCuts.cxx,v 1.1 2006/09/13 14:53:31 hoehne Exp $ * * Class : CbmRichRingSelect2DCuts * Description : Implementation for concrete RICH ring selection algorithm: * reject rings with a set of certain 2-dimensional cuts * store result in "Selection2D": * 0 = good rings * 1 = rings to be rejected * * Author : Simeon Lebedev * E-mail : salebedev@jinr.ru * ******************************************************************************* * $Log: CbmRichRingSelect2DCuts.cxx,v $ * Revision 1.1 2006/09/13 14:53:31 hoehne * initial version * * * *******************************************************************************/ #include "CbmRichRingSelect2DCuts.h" #include "CbmRichHit.h" #include "CbmRichRing.h" using namespace std; //-------------------------------------------------------------------------- // ----- Default constructor ------------------------------------------- CbmRichRingSelect2DCuts::CbmRichRingSelect2DCuts() { fVerbose = 1; } // ----- Standard constructor ------------------------------------------ CbmRichRingSelect2DCuts::CbmRichRingSelect2DCuts ( Int_t verbose ) { fVerbose = verbose; } // ----- Destructor ---------------------------------------------------- CbmRichRingSelect2DCuts::~CbmRichRingSelect2DCuts() {} void CbmRichRingSelect2DCuts::Init () { } void CbmRichRingSelect2DCuts::DoSelect(CbmRichRing* ring,TClonesArray* rProjArray) { Double_t lChi2 = GetChi2(ring); if (fVerbose > 1) cout << " RingSelect2D: GetChi2 = " << lChi2 << endl; UInt_t lTBSum = GetTBSum(ring); if (fVerbose > 1) cout << " RingSelect2D: GetTBSum = " << lTBSum << endl; Double_t lAngle = GetAngle(ring); if (fVerbose > 1) cout << " RingSelect2D: GetAngle = " << lAngle << endl; Double_t lRadPos = GetRadPos(ring); if (fVerbose > 1) cout << " RingSelect2D: GetRadPos = " << lRadPos << endl; Double_t lTrackD = GetTrackDist(ring,rProjArray); if (fVerbose > 1) cout << " RingSelect2D: GetTrackDist = " << lTrackD << endl; Int_t lNofHits = ring->GetNoOfHits(); if (fVerbose > 1) cout << " RingSelect2D: GetNoOfHits = " << lNofHits << endl; Double_t lRadius = ring->GetRadius(); if (fVerbose > 1) cout << " RingSelect2D: GetRadius = " << lRadius << endl; Bool_t isCut = false; if (lTBSum <=12 && lRadPos <36) isCut = true; if (lAngle > 2.5 && lRadPos <36) isCut = true; if (lChi2 > 0.4 && lRadPos <40) isCut = true; if (lChi2 > 0.6 && (Double_t)lTBSum/(Double_t)lNofHits < 0.42) isCut = true; if (lTBSum <=10) isCut = true; if (lTrackD > 1.0 && lRadPos < 40) isCut = true; if (isCut == true) ring->SetSelection2D(1); else ring->SetSelection2D(0); if (fVerbose > 1) cout << " 2D cut in RingSelect: " << ring->GetSelection2D() << endl; } // ------------------------------------------------------------------------- ClassImp(CbmRichRingSelect2DCuts)