CbmRoot
CbmRichGeoTest Class Reference

RICH geometry checking and testing. More...

#include <CbmRichGeoTest.h>

Inheritance diagram for CbmRichGeoTest:
[legend]
Collaboration diagram for CbmRichGeoTest:
[legend]

Public Member Functions

 CbmRichGeoTest ()
 Standard constructor. More...
 
virtual ~CbmRichGeoTest ()
 Standard destructor. More...
 
virtual InitStatus Init ()
 Inherited from FairTask. More...
 
virtual void Exec (Option_t *option)
 Inherited from FairTask. More...
 
virtual void Finish ()
 Inherited from FairTask. More...
 
void SetOutputDir (const string &dir)
 Set output directory where you want to write results (figures and json). More...
 
void DrawFromFile (const string &fileName, const string &outputDir)
 Draw histogram from file. More...
 
void SetDrawPmts (Bool_t draw)
 
void SetDrawEventDisplay (Bool_t draw)
 

Private Member Functions

void InitHistograms ()
 Initialize histograms. More...
 
void ProcessMc ()
 Fill MC histogram for detector acceptance calculation. More...
 
void RingParameters ()
 Loop over all rings in array and fill ring parameters histograms. More...
 
void FitAndFillHistEllipse (Int_t histIndex, CbmRichRingLight *ring, Double_t momentum)
 Fit ring using ellipse fitter and fill histograms. More...
 
void FitAndFillHistCircle (Int_t histIndex, CbmRichRingLight *ring, Double_t momentum)
 Fit ring using circle fitter and fill histograms. More...
 
void FillMcVsHitFitEllipse (CbmRichRingLight *ring, CbmRichRingLight *ringMc)
 Calculate difference between ellipse parameters for two fitting using hits and MC points for fit and fill corresponding histograms. More...
 
void FillMcVsHitFitCircle (CbmRichRingLight *ring, CbmRichRingLight *ringMc)
 Calculate difference between circle parameters for two fittings using hits and MC points for fit and fill corresponding histograms. More...
 
void ProcessHits ()
 Calculate residuals between hits and MC points and fill histograms. More...
 
TH1D * CreateAccVsMinNofHitsHist ()
 Create histogram: RICH detector acceptance vs. minimum required number of hits in ring. More...
 
void DrawHist ()
 Draw histograms. More...
 
void DrawRing (CbmRichRingLight *ringHit, CbmRichRingLight *ringPoint)
 Draw ring in separate TCanvas. More...
 
void DrawH2MeanRms (TH2 *hist, const string &canvasName)
 
void DrawPmts ()
 DrawPmts. More...
 
void DrawPmtPoint (const string &coordinates, const vector< Int_t > &ids, Bool_t isDrawPixel)
 
string CalcEfficiency (TH1 *histRec, TH1 *histAcc)
 Calculate efficiency. More...
 
 CbmRichGeoTest (const CbmRichGeoTest &)
 Copy constructor. More...
 
CbmRichGeoTestoperator= (const CbmRichGeoTest &)
 Assignment operator. More...
 

Private Attributes

string fOutputDir
 
TClonesArray * fRichHits
 
TClonesArray * fRichRings
 
CbmMCDataArrayfRichRefPlanePoints
 
CbmDigiManagerfDigiMan = nullptr
 
CbmMCDataArrayfRichPoints
 
CbmMCDataArrayfMcTracks
 
TClonesArray * fRichRingMatches
 
CbmMCEventListfEventList
 
CbmRichRingFitterCOPfCopFit
 
CbmRichRingFitterEllipseTaufTauFit
 
CbmHistManagerfHM
 
Int_t fEventNum
 
Int_t fMinNofHits
 
Double_t fMinAaxis
 
Double_t fMaxAaxis
 
Double_t fMinBaxis
 
Double_t fMaxBaxis
 
Double_t fMinRadius
 
Double_t fMaxRadius
 
Int_t fNofDrawnRings
 
Bool_t fDrawPmts
 
Bool_t fDrawEventDisplay
 

Detailed Description

RICH geometry checking and testing.

Author
Semen Lebedev s.leb.nosp@m.edev.nosp@m.@gsi..nosp@m.de
Date
2011

Definition at line 46 of file CbmRichGeoTest.h.

Constructor & Destructor Documentation

◆ CbmRichGeoTest() [1/2]

CbmRichGeoTest::CbmRichGeoTest ( )

Standard constructor.

Definition at line 63 of file CbmRichGeoTest.cxx.

References fEventNum, fMaxAaxis, fMaxBaxis, fMaxRadius, fMinAaxis, fMinBaxis, fMinNofHits, fMinRadius, and fNofDrawnRings.

◆ ~CbmRichGeoTest()

CbmRichGeoTest::~CbmRichGeoTest ( )
virtual

Standard destructor.

Definition at line 98 of file CbmRichGeoTest.cxx.

◆ CbmRichGeoTest() [2/2]

CbmRichGeoTest::CbmRichGeoTest ( const CbmRichGeoTest )
private

Copy constructor.

Member Function Documentation

◆ CalcEfficiency()

string CbmRichGeoTest::CalcEfficiency ( TH1 *  histRec,
TH1 *  histAcc 
)
private

Calculate efficiency.

Parameters
[in]histRec
[in]histAcc

Definition at line 1841 of file CbmRichGeoTest.cxx.

References Cbm::NumberToString().

Referenced by DrawHist().

◆ CreateAccVsMinNofHitsHist()

TH1D * CbmRichGeoTest::CreateAccVsMinNofHitsHist ( )
private

Create histogram: RICH detector acceptance vs. minimum required number of hits in ring.

Definition at line 1133 of file CbmRichGeoTest.cxx.

References fHM, CbmHistManager::H1(), and i.

Referenced by DrawHist().

◆ DrawFromFile()

void CbmRichGeoTest::DrawFromFile ( const string &  fileName,
const string &  outputDir 
)

Draw histogram from file.

Definition at line 1851 of file CbmRichGeoTest.cxx.

References DrawHist(), fHM, fOutputDir, CbmHistManager::ReadFromFile(), and CbmHistManager::SaveCanvasToImage().

◆ DrawH2MeanRms()

void CbmRichGeoTest::DrawH2MeanRms ( TH2 *  hist,
const string &  canvasName 
)
private

Definition at line 1147 of file CbmRichGeoTest.cxx.

References CbmHistManager::CreateCanvas(), DrawH1andFitGauss(), DrawH2WithProfile(), and fHM.

Referenced by DrawHist().

◆ DrawHist()

◆ DrawPmtPoint()

◆ DrawPmts()

◆ DrawRing()

void CbmRichGeoTest::DrawRing ( CbmRichRingLight ringHit,
CbmRichRingLight ringPoint 
)
private

Draw ring in separate TCanvas.

Parameters
[in]ringRing with RICH hits.
[in]ringPointRing with MC RICH points.

Definition at line 1066 of file CbmRichGeoTest.cxx.

References CbmHistManager::CreateCanvas(), fHM, fNofDrawnRings, CbmRichHitLight::fX, CbmRichHitLight::fY, CbmRichRingLight::GetCenterX(), CbmRichRingLight::GetCenterY(), CbmRichRingLight::GetHit(), CbmRichRingLight::GetNofHits(), CbmRichRingLight::GetRadius(), and i.

Referenced by RingParameters().

◆ Exec()

void CbmRichGeoTest::Exec ( Option_t *  option)
virtual

Inherited from FairTask.

Definition at line 159 of file CbmRichGeoTest.cxx.

References fEventNum, ProcessHits(), ProcessMc(), and RingParameters().

◆ FillMcVsHitFitCircle()

void CbmRichGeoTest::FillMcVsHitFitCircle ( CbmRichRingLight ring,
CbmRichRingLight ringMc 
)
private

Calculate difference between circle parameters for two fittings using hits and MC points for fit and fill corresponding histograms.

Parameters
[in]ringRing fitted using hits.
[in]ringMcRing fitted using MC points

Definition at line 1011 of file CbmRichGeoTest.cxx.

References fHM, CbmRichRingLight::GetCenterX(), CbmRichRingLight::GetCenterY(), CbmRichRingLight::GetNofHits(), CbmRichRingLight::GetRadius(), and CbmHistManager::H2().

Referenced by RingParameters().

◆ FillMcVsHitFitEllipse()

void CbmRichGeoTest::FillMcVsHitFitEllipse ( CbmRichRingLight ring,
CbmRichRingLight ringMc 
)
private

Calculate difference between ellipse parameters for two fitting using hits and MC points for fit and fill corresponding histograms.

Parameters
[in]ringRing fitted using hits.
[in]ringMcRing fitted using MC points

Definition at line 999 of file CbmRichGeoTest.cxx.

References fHM, CbmRichRingLight::GetAaxis(), CbmRichRingLight::GetBaxis(), CbmRichRingLight::GetCenterX(), CbmRichRingLight::GetCenterY(), CbmRichRingLight::GetNofHits(), and CbmHistManager::H2().

Referenced by RingParameters().

◆ Finish()

void CbmRichGeoTest::Finish ( )
virtual

◆ FitAndFillHistCircle()

void CbmRichGeoTest::FitAndFillHistCircle ( Int_t  histIndex,
CbmRichRingLight ring,
Double_t  momentum 
)
private

Fit ring using circle fitter and fill histograms.

Parameters
[in]histIndexFitting type index, 0 - hit fitting, 1 - MC points fitting.
[in]ringPointer to CbmRichRingLight to be fitted and filled in histograms.
[in]momentumMC momentum of particle produced ring.

Definition at line 962 of file CbmRichGeoTest.cxx.

References CbmRichRingFitterCOP::DoFit(), fCopFit, fHM, CbmRichHitLight::fX, CbmRichHitLight::fY, CbmRichRingLight::GetCenterX(), CbmRichRingLight::GetCenterY(), CbmRichRingLight::GetChi2(), CbmRichRingLight::GetHit(), CbmRichRingLight::GetNofHits(), CbmRichRingLight::GetRadius(), CbmHistManager::H1(), CbmHistManager::H2(), and sqrt().

Referenced by RingParameters().

◆ FitAndFillHistEllipse()

void CbmRichGeoTest::FitAndFillHistEllipse ( Int_t  histIndex,
CbmRichRingLight ring,
Double_t  momentum 
)
private

Fit ring using ellipse fitter and fill histograms.

Parameters
[in]histIndexFitting type index, 0 - hit fitting, 1 - MC points fitting.
[in]ringPointer to CbmRichRing to be fitted and filled in histograms.
[in]momentumMC momentum of particle produced ring.

Definition at line 924 of file CbmRichGeoTest.cxx.

References CbmRichRingFitterEllipseTau::DoFit(), fHM, fMaxBaxis, fMinAaxis, fMinBaxis, fTauFit, CbmRichRingLight::GetAaxis(), CbmRichRingLight::GetBaxis(), CbmRichRingLight::GetCenterX(), CbmRichRingLight::GetCenterY(), CbmRichRingLight::GetChi2(), CbmRichRingLight::GetNofHits(), CbmHistManager::H1(), and CbmHistManager::H2().

Referenced by RingParameters().

◆ Init()

◆ InitHistograms()

void CbmRichGeoTest::InitHistograms ( )
private

Initialize histograms.

Definition at line 168 of file CbmRichGeoTest.cxx.

References CbmHistManager::Create1(), CbmHistManager::Create2(), CbmHistManager::Create3(), fHM, and i.

Referenced by Init().

◆ operator=()

CbmRichGeoTest& CbmRichGeoTest::operator= ( const CbmRichGeoTest )
private

Assignment operator.

◆ ProcessHits()

◆ ProcessMc()

◆ RingParameters()

◆ SetDrawEventDisplay()

void CbmRichGeoTest::SetDrawEventDisplay ( Bool_t  draw)
inline

Definition at line 86 of file CbmRichGeoTest.h.

◆ SetDrawPmts()

void CbmRichGeoTest::SetDrawPmts ( Bool_t  draw)
inline

Definition at line 85 of file CbmRichGeoTest.h.

◆ SetOutputDir()

void CbmRichGeoTest::SetOutputDir ( const string &  dir)
inline

Set output directory where you want to write results (figures and json).

Parameters
[in]dirPath to the output directory.

Definition at line 78 of file CbmRichGeoTest.h.

Member Data Documentation

◆ fCopFit

CbmRichRingFitterCOP* CbmRichGeoTest::fCopFit
private

Definition at line 207 of file CbmRichGeoTest.h.

Referenced by FitAndFillHistCircle(), and Init().

◆ fDigiMan

CbmDigiManager* CbmRichGeoTest::fDigiMan = nullptr
private

Definition at line 200 of file CbmRichGeoTest.h.

Referenced by Init(), and ProcessHits().

◆ fDrawEventDisplay

Bool_t CbmRichGeoTest::fDrawEventDisplay
private

Definition at line 226 of file CbmRichGeoTest.h.

Referenced by RingParameters().

◆ fDrawPmts

Bool_t CbmRichGeoTest::fDrawPmts
private

Definition at line 225 of file CbmRichGeoTest.h.

Referenced by Finish().

◆ fEventList

CbmMCEventList* CbmRichGeoTest::fEventList
private

Definition at line 204 of file CbmRichGeoTest.h.

Referenced by Init(), and ProcessMc().

◆ fEventNum

Int_t CbmRichGeoTest::fEventNum
private

Definition at line 212 of file CbmRichGeoTest.h.

Referenced by CbmRichGeoTest(), and Exec().

◆ fHM

◆ fMaxAaxis

Double_t CbmRichGeoTest::fMaxAaxis
private

Definition at line 218 of file CbmRichGeoTest.h.

Referenced by CbmRichGeoTest(), and RingParameters().

◆ fMaxBaxis

Double_t CbmRichGeoTest::fMaxBaxis
private

Definition at line 220 of file CbmRichGeoTest.h.

Referenced by CbmRichGeoTest(), FitAndFillHistEllipse(), and RingParameters().

◆ fMaxRadius

Double_t CbmRichGeoTest::fMaxRadius
private

Definition at line 222 of file CbmRichGeoTest.h.

Referenced by CbmRichGeoTest(), and RingParameters().

◆ fMcTracks

CbmMCDataArray* CbmRichGeoTest::fMcTracks
private

Definition at line 202 of file CbmRichGeoTest.h.

Referenced by Init(), ProcessMc(), and RingParameters().

◆ fMinAaxis

Double_t CbmRichGeoTest::fMinAaxis
private

Definition at line 217 of file CbmRichGeoTest.h.

Referenced by CbmRichGeoTest(), FitAndFillHistEllipse(), and RingParameters().

◆ fMinBaxis

Double_t CbmRichGeoTest::fMinBaxis
private

Definition at line 219 of file CbmRichGeoTest.h.

Referenced by CbmRichGeoTest(), FitAndFillHistEllipse(), and RingParameters().

◆ fMinNofHits

Int_t CbmRichGeoTest::fMinNofHits
private

Definition at line 214 of file CbmRichGeoTest.h.

Referenced by CbmRichGeoTest(), and RingParameters().

◆ fMinRadius

Double_t CbmRichGeoTest::fMinRadius
private

Definition at line 221 of file CbmRichGeoTest.h.

Referenced by CbmRichGeoTest(), and RingParameters().

◆ fNofDrawnRings

Int_t CbmRichGeoTest::fNofDrawnRings
private

Definition at line 224 of file CbmRichGeoTest.h.

Referenced by CbmRichGeoTest(), DrawRing(), and RingParameters().

◆ fOutputDir

string CbmRichGeoTest::fOutputDir
private

Definition at line 195 of file CbmRichGeoTest.h.

Referenced by DrawFromFile(), and Finish().

◆ fRichHits

TClonesArray* CbmRichGeoTest::fRichHits
private

Definition at line 197 of file CbmRichGeoTest.h.

Referenced by Init(), and ProcessHits().

◆ fRichPoints

CbmMCDataArray* CbmRichGeoTest::fRichPoints
private

Definition at line 201 of file CbmRichGeoTest.h.

Referenced by Init(), ProcessHits(), ProcessMc(), and RingParameters().

◆ fRichRefPlanePoints

CbmMCDataArray* CbmRichGeoTest::fRichRefPlanePoints
private

Definition at line 199 of file CbmRichGeoTest.h.

Referenced by Init(), and ProcessMc().

◆ fRichRingMatches

TClonesArray* CbmRichGeoTest::fRichRingMatches
private

Definition at line 203 of file CbmRichGeoTest.h.

Referenced by Init(), and RingParameters().

◆ fRichRings

TClonesArray* CbmRichGeoTest::fRichRings
private

Definition at line 198 of file CbmRichGeoTest.h.

Referenced by Init(), and RingParameters().

◆ fTauFit

CbmRichRingFitterEllipseTau* CbmRichGeoTest::fTauFit
private

Definition at line 208 of file CbmRichGeoTest.h.

Referenced by FitAndFillHistEllipse(), and Init().


The documentation for this class was generated from the following files: