CbmRoot
Loading...
Searching...
No Matches
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.
 
virtual ~CbmRichGeoTest ()
 Standard destructor.
 
virtual InitStatus Init ()
 Inherited from FairTask.
 
virtual void Exec (Option_t *option)
 Inherited from FairTask.
 
virtual void Finish ()
 Inherited from FairTask.
 
void SetOutputDir (const std::string &dir)
 Set output directory where you want to write results (figures and json).
 
void DrawFromFile (const std::string &fileName, const std::string &outputDir)
 Draw histogram from file.
 
void SetDrawPmts (bool draw)
 
void SetDrawEventDisplay (bool draw)
 

Private Member Functions

void InitHistograms ()
 Initialize histograms.
 
void ProcessMc ()
 Fill MC histogram for detector acceptance calculation.
 
CbmRichRingLight CreateRingLightWithPoints (int fileId, int mcEventId, int mcTrackId)
 
void RingParameters ()
 Loop over all rings in array and fill ring parameters histograms.
 
void FitAndFillHistEllipse (int histIndex, CbmRichRingLight *ring, double momentum)
 Fit ring using ellipse fitter and fill histograms.
 
void FitAndFillHistCircle (int histIndex, CbmRichRingLight *ring, double momentum)
 Fit ring using circle fitter and fill histograms.
 
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.
 
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.
 
void ProcessHits ()
 Calculate residuals between hits and MC points and fill histograms.
 
TH1D * CreateAccVsMinNofHitsHist ()
 Create histogram: RICH detector acceptance vs. minimum required number of hits in ring.
 
void DrawHist ()
 Draw histograms.
 
void DrawRing (CbmRichRingLight *ringHit, CbmRichRingLight *ringPoint)
 Draw ring in separate TCanvas.
 
void DrawH2MeanRms (TH2 *hist, const std::string &canvasName)
 
void DrawPmts ()
 DrawPmts.
 
void DrawPmtPoint (const std::string &coordOpt, const std::vector< int > &ids, bool isDrawPixel)
 
std::string CalcEfficiency (TH1 *histRec, TH1 *histAcc)
 Calculate efficiency.
 
 CbmRichGeoTest (const CbmRichGeoTest &)
 Copy constructor.
 
CbmRichGeoTestoperator= (const CbmRichGeoTest &)
 Assignment operator.
 

Private Attributes

std::string fOutputDir = ""
 
TClonesArray * fRichHits = nullptr
 
TClonesArray * fRichRings = nullptr
 
CbmMCDataArrayfRichRefPlanePoints = nullptr
 
CbmDigiManagerfDigiMan = nullptr
 
CbmMCDataArrayfRichPoints = nullptr
 
CbmMCDataArrayfMcTracks = nullptr
 
TClonesArray * fRichRingMatches = nullptr
 
CbmMCEventListfEventList = nullptr
 
CbmRichRingFitterCOPfCopFit = nullptr
 
CbmRichRingFitterEllipseTaufTauFit = nullptr
 
CbmHistManagerfHM = nullptr
 
int fEventNum = 0
 
int fMinNofHits = 7
 
double fMinAaxis = 3.
 
double fMaxAaxis = 7.
 
double fMinBaxis = 3.
 
double fMaxBaxis = 7.
 
double fMinRadius = 3.
 
double fMaxRadius = 7.
 
int fNofDrawnRings = 0
 
bool fDrawPmts = true
 
bool fDrawEventDisplay = true
 

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 70 of file CbmRichGeoTest.cxx.

◆ ~CbmRichGeoTest()

CbmRichGeoTest::~CbmRichGeoTest ( )
virtual

Standard destructor.

Definition at line 72 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 1142 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 623 of file CbmRichGeoTest.cxx.

References fHM, and CbmHistManager::H1().

Referenced by DrawHist().

◆ CreateRingLightWithPoints()

CbmRichRingLight CbmRichGeoTest::CreateRingLightWithPoints ( int fileId,
int mcEventId,
int mcTrackId )
private

◆ DrawFromFile()

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

Draw histogram from file.

Save old global file and folder pointer to avoid messing with FairRoot

Restore old global file and folder pointer to avoid messing with FairRoot

Definition at line 1153 of file CbmRichGeoTest.cxx.

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

◆ DrawH2MeanRms()

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

Definition at line 637 of file CbmRichGeoTest.cxx.

References CbmHistManager::CreateCanvas(), DrawH1(), DrawH2WithProfile(), fHM, and kLinear.

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 566 of file CbmRichGeoTest.cxx.

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

Referenced by RingParameters().

◆ Exec()

void CbmRichGeoTest::Exec ( Option_t * option)
virtual

Inherited from FairTask.

Definition at line 101 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 516 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 508 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 histIndex,
CbmRichRingLight * ring,
double 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 479 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 histIndex,
CbmRichRingLight * ring,
double 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 447 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 111 of file CbmRichGeoTest.cxx.

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

Referenced by Init().

◆ operator=()

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

Assignment operator.

◆ ProcessHits()

◆ ProcessMc()

◆ RingParameters()

◆ SetDrawEventDisplay()

void CbmRichGeoTest::SetDrawEventDisplay ( bool draw)
inline

Definition at line 86 of file CbmRichGeoTest.h.

References fDrawEventDisplay.

◆ SetDrawPmts()

void CbmRichGeoTest::SetDrawPmts ( bool draw)
inline

Definition at line 85 of file CbmRichGeoTest.h.

References fDrawPmts.

◆ SetOutputDir()

void CbmRichGeoTest::SetOutputDir ( const std::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.

References fOutputDir.

Member Data Documentation

◆ fCopFit

CbmRichRingFitterCOP* CbmRichGeoTest::fCopFit = nullptr
private

Definition at line 203 of file CbmRichGeoTest.h.

Referenced by FitAndFillHistCircle(), and Init().

◆ fDigiMan

CbmDigiManager* CbmRichGeoTest::fDigiMan = nullptr
private

Definition at line 196 of file CbmRichGeoTest.h.

Referenced by Init(), and ProcessHits().

◆ fDrawEventDisplay

bool CbmRichGeoTest::fDrawEventDisplay = true
private

Definition at line 221 of file CbmRichGeoTest.h.

Referenced by RingParameters(), and SetDrawEventDisplay().

◆ fDrawPmts

bool CbmRichGeoTest::fDrawPmts = true
private

Definition at line 220 of file CbmRichGeoTest.h.

Referenced by Finish(), and SetDrawPmts().

◆ fEventList

CbmMCEventList* CbmRichGeoTest::fEventList = nullptr
private

Definition at line 200 of file CbmRichGeoTest.h.

Referenced by Init(), and ProcessMc().

◆ fEventNum

int CbmRichGeoTest::fEventNum = 0
private

Definition at line 208 of file CbmRichGeoTest.h.

Referenced by Exec().

◆ fHM

◆ fMaxAaxis

double CbmRichGeoTest::fMaxAaxis = 7.
private

Definition at line 213 of file CbmRichGeoTest.h.

Referenced by RingParameters().

◆ fMaxBaxis

double CbmRichGeoTest::fMaxBaxis = 7.
private

Definition at line 215 of file CbmRichGeoTest.h.

Referenced by FitAndFillHistEllipse(), and RingParameters().

◆ fMaxRadius

double CbmRichGeoTest::fMaxRadius = 7.
private

Definition at line 217 of file CbmRichGeoTest.h.

Referenced by RingParameters().

◆ fMcTracks

CbmMCDataArray* CbmRichGeoTest::fMcTracks = nullptr
private

Definition at line 198 of file CbmRichGeoTest.h.

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

◆ fMinAaxis

double CbmRichGeoTest::fMinAaxis = 3.
private

Definition at line 212 of file CbmRichGeoTest.h.

Referenced by FitAndFillHistEllipse(), and RingParameters().

◆ fMinBaxis

double CbmRichGeoTest::fMinBaxis = 3.
private

Definition at line 214 of file CbmRichGeoTest.h.

Referenced by FitAndFillHistEllipse(), and RingParameters().

◆ fMinNofHits

int CbmRichGeoTest::fMinNofHits = 7
private

Definition at line 209 of file CbmRichGeoTest.h.

Referenced by RingParameters().

◆ fMinRadius

double CbmRichGeoTest::fMinRadius = 3.
private

Definition at line 216 of file CbmRichGeoTest.h.

Referenced by RingParameters().

◆ fNofDrawnRings

int CbmRichGeoTest::fNofDrawnRings = 0
private

Definition at line 219 of file CbmRichGeoTest.h.

Referenced by DrawRing(), and RingParameters().

◆ fOutputDir

std::string CbmRichGeoTest::fOutputDir = ""
private

Definition at line 191 of file CbmRichGeoTest.h.

Referenced by DrawFromFile(), Finish(), and SetOutputDir().

◆ fRichHits

TClonesArray* CbmRichGeoTest::fRichHits = nullptr
private

Definition at line 193 of file CbmRichGeoTest.h.

Referenced by Init(), and ProcessHits().

◆ fRichPoints

CbmMCDataArray* CbmRichGeoTest::fRichPoints = nullptr
private

Definition at line 197 of file CbmRichGeoTest.h.

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

◆ fRichRefPlanePoints

CbmMCDataArray* CbmRichGeoTest::fRichRefPlanePoints = nullptr
private

Definition at line 195 of file CbmRichGeoTest.h.

Referenced by Init(), and ProcessMc().

◆ fRichRingMatches

TClonesArray* CbmRichGeoTest::fRichRingMatches = nullptr
private

Definition at line 199 of file CbmRichGeoTest.h.

Referenced by Init(), and RingParameters().

◆ fRichRings

TClonesArray* CbmRichGeoTest::fRichRings = nullptr
private

Definition at line 194 of file CbmRichGeoTest.h.

Referenced by Init(), and RingParameters().

◆ fTauFit

CbmRichRingFitterEllipseTau* CbmRichGeoTest::fTauFit = nullptr
private

Definition at line 204 of file CbmRichGeoTest.h.

Referenced by FitAndFillHistEllipse(), and Init().


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