CbmRoot
Loading...
Searching...
No Matches
CbmRichRecoQa Class Reference

#include <CbmRichRecoQa.h>

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

Public Member Functions

 CbmRichRecoQa ()
 Standard constructor.
 
virtual ~CbmRichRecoQa ()
 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 string &dir)
 Set output directory where you want to write results (figures and json).
 
void DrawFromFile (const string &fileName, const string &outputDir)
 Draw histogram from file.
 
void SetCorrection (string s)
 
 CbmRichRecoQa ()
 Standard constructor.
 
virtual ~CbmRichRecoQa ()
 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.
 

Static Public Member Functions

static Bool_t IsMcPrimaryElectron (const CbmMCTrack *mctrack)
 
static Bool_t IsMcPion (const CbmMCTrack *mctrack)
 
static bool IsMcPrimaryElectron (const CbmMCTrack *mctrack)
 
static bool IsMcPion (const CbmMCTrack *mctrack)
 

Private Member Functions

void InitHistograms ()
 Initialize histograms.
 
void FillRichRingNofHits ()
 Fill map mcTrackId -> nof RICH hits.
 
void FillRingTrackDistance ()
 Fill histogramms related to ring track distance.
 
void RingTrackMismatchSource ()
 Fill histograms related to study of the source of ring-track mismatch.
 
void DrawHist ()
 Draw histograms.
 
string GetMeanRmsOverflowString (TH1 *h, Bool_t withOverflow=true)
 Return string with mean, RMS and overflow percent for input TH1.
 
void DrawRingTrackDistHistWithSuffix (const string &suffix)
 Draw histograms related to ring-track distance for pions or electrons (+/-).
 
void DrawRingTrackDistHistWithSuffixPmtHalf (const string &suffix)
 
bool WasRingFound (Int_t mcTrackId)
 
bool WasRingMatched (Int_t mcTrackId)
 
bool WasRichProjectionMatched (Int_t stsTrackId)
 
bool HasRichProjection (Int_t stsTrackId)
 
 CbmRichRecoQa (const CbmRichRecoQa &)
 Copy constructor.
 
CbmRichRecoQaoperator= (const CbmRichRecoQa &)
 Assignment operator.
 
void InitHistograms ()
 Initialize histograms.
 
void FillRichRingNofHits ()
 Fill map mcTrackId -> nof RICH hits.
 
void FillRingTrackDistance ()
 Fill histogramms related to ring track distance.
 
void RingTrackMismatchSource ()
 Fill histograms related to study of the source of ring-track mismatch.
 
void DrawMismatchSrc ()
 Draw MismatchSrc histogram and canvas.
 
void DrawHist ()
 Draw histograms.
 
std::string GetMeanRmsOverflowString (TH1 *h, bool withOverflow=true)
 Return string with mean, RMS and overflow percent for input TH1.
 
void DrawRingTrackDist (const std::string &opt)
 Draw histograms related to ring-track distance for pions or electrons (+/-).
 
bool WasRingFound (const CbmLink &mcTrackLink)
 
bool WasRingMatched (const CbmLink &mcTrackLink)
 
bool WasRichProjectionMatched (int stsTrackId)
 
bool HasRichProjection (int stsTrackId)
 
 CbmRichRecoQa (const CbmRichRecoQa &)
 Copy constructor.
 
CbmRichRecoQaoperator= (const CbmRichRecoQa &)
 Assignment operator.
 

Private Attributes

CbmHistManagerfHM = nullptr
 
Int_t fEventNum
 
string fOutputDir
 
TClonesArray * fMCTracks
 
TClonesArray * fRichPoints
 
TClonesArray * fRichDigis
 
TClonesArray * fRichHits = nullptr
 
TClonesArray * fRichRings = nullptr
 
TClonesArray * fRichRingMatches = nullptr
 
TClonesArray * fGlobalTracks = nullptr
 
TClonesArray * fStsTracks = nullptr
 
TClonesArray * fStsTrackMatches = nullptr
 
TClonesArray * fRichProjections = nullptr
 
std::map< Int_t, Int_t > fNofHitsInRingMap
 
string fCorrection
 
vector< TCanvas * > fCanvas
 
int fEventNum = 0
 
std::string fOutputDir = ""
 
CbmMCDataArrayfMcTracks = nullptr
 
CbmMCDataArrayfRichPoints = nullptr
 
CbmDigiManagerfDigiMan = nullptr
 
CbmMCEventListfEventList = nullptr
 
std::map< CbmLink, int > fNofHitsInRingMap
 

Detailed Description

Definition at line 24 of file alignment/CbmRichRecoQa.h.

Constructor & Destructor Documentation

◆ CbmRichRecoQa() [1/4]

CbmRichRecoQa::CbmRichRecoQa ( )

Standard constructor.

Definition at line 42 of file alignment/CbmRichRecoQa.cxx.

◆ ~CbmRichRecoQa() [1/2]

virtual CbmRichRecoQa::~CbmRichRecoQa ( )
inlinevirtual

Standard destructor.

Definition at line 35 of file alignment/CbmRichRecoQa.h.

◆ CbmRichRecoQa() [2/4]

CbmRichRecoQa::CbmRichRecoQa ( const CbmRichRecoQa & )
private

Copy constructor.

◆ CbmRichRecoQa() [3/4]

CbmRichRecoQa::CbmRichRecoQa ( )

Standard constructor.

◆ ~CbmRichRecoQa() [2/2]

virtual CbmRichRecoQa::~CbmRichRecoQa ( )
inlinevirtual

Standard destructor.

Definition at line 37 of file qa/CbmRichRecoQa.h.

◆ CbmRichRecoQa() [4/4]

CbmRichRecoQa::CbmRichRecoQa ( const CbmRichRecoQa & )
private

Copy constructor.

Member Function Documentation

◆ DrawFromFile() [1/2]

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

Draw histogram from file.

◆ DrawFromFile() [2/2]

void CbmRichRecoQa::DrawFromFile ( const string & fileName,
const 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 897 of file alignment/CbmRichRecoQa.cxx.

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

◆ DrawHist() [1/2]

◆ DrawHist() [2/2]

void CbmRichRecoQa::DrawHist ( )
private

Draw histograms.

◆ DrawMismatchSrc()

void CbmRichRecoQa::DrawMismatchSrc ( )
private

Draw MismatchSrc histogram and canvas.

Definition at line 361 of file qa/CbmRichRecoQa.cxx.

References CbmHistManager::CreateCanvas(), DrawH1(), fHM, CbmHistManager::H1(), kLinear, kLog, and CbmHistManager::Scale().

◆ DrawRingTrackDist()

void CbmRichRecoQa::DrawRingTrackDist ( const std::string & opt)
private

Draw histograms related to ring-track distance for pions or electrons (+/-).

Definition at line 490 of file qa/CbmRichRecoQa.cxx.

References CbmHistManager::CreateCanvas(), DrawH1(), DrawH2WithProfile(), DrawH3Profile(), DrawTextOnPad(), fHM, GetMeanRmsOverflowString(), CbmHistManager::H2(), and CbmHistManager::H3().

◆ DrawRingTrackDistHistWithSuffix()

void CbmRichRecoQa::DrawRingTrackDistHistWithSuffix ( const string & suffix)
private

Draw histograms related to ring-track distance for pions or electrons (+/-).

Definition at line 719 of file alignment/CbmRichRecoQa.cxx.

References CbmHistManager::CreateCanvas(), DrawH1(), DrawH2WithProfile(), DrawH3Profile(), DrawTextOnPad(), fHM, GetMeanRmsOverflowString(), CbmHistManager::H2(), and CbmHistManager::H3().

Referenced by DrawHist().

◆ DrawRingTrackDistHistWithSuffixPmtHalf()

void CbmRichRecoQa::DrawRingTrackDistHistWithSuffixPmtHalf ( const string & suffix)
private

◆ Exec() [1/2]

void CbmRichRecoQa::Exec ( Option_t * option)
virtual

Inherited from FairTask.

Definition at line 256 of file alignment/CbmRichRecoQa.cxx.

References fEventNum, FillRichRingNofHits(), FillRingTrackDistance(), and RingTrackMismatchSource().

◆ Exec() [2/2]

virtual void CbmRichRecoQa::Exec ( Option_t * option)
virtual

Inherited from FairTask.

◆ FillRichRingNofHits() [1/2]

void CbmRichRecoQa::FillRichRingNofHits ( )
private

Fill map mcTrackId -> nof RICH hits.

Definition at line 266 of file alignment/CbmRichRecoQa.cxx.

References fMCTracks, fNofHitsInRingMap, fRichDigis, fRichHits, fRichPoints, and CbmMatchRecoToMC::GetMcTrackMotherIdsForRichHit().

Referenced by Exec().

◆ FillRichRingNofHits() [2/2]

void CbmRichRecoQa::FillRichRingNofHits ( )
private

Fill map mcTrackId -> nof RICH hits.

◆ FillRingTrackDistance() [1/2]

◆ FillRingTrackDistance() [2/2]

void CbmRichRecoQa::FillRingTrackDistance ( )
private

Fill histogramms related to ring track distance.

◆ Finish() [1/2]

void CbmRichRecoQa::Finish ( )
virtual

◆ Finish() [2/2]

virtual void CbmRichRecoQa::Finish ( )
virtual

Inherited from FairTask.

◆ GetMeanRmsOverflowString() [1/2]

string CbmRichRecoQa::GetMeanRmsOverflowString ( TH1 * h,
bool withOverflow = true )
private

Return string with mean, RMS and overflow percent for input TH1.

Definition at line 477 of file qa/CbmRichRecoQa.cxx.

References Cbm::NumberToString().

◆ GetMeanRmsOverflowString() [2/2]

string CbmRichRecoQa::GetMeanRmsOverflowString ( TH1 * h,
Bool_t withOverflow = true )
private

Return string with mean, RMS and overflow percent for input TH1.

Definition at line 707 of file alignment/CbmRichRecoQa.cxx.

References Cbm::NumberToString().

Referenced by DrawHist(), DrawRingTrackDist(), and DrawRingTrackDistHistWithSuffix().

◆ HasRichProjection() [1/2]

bool CbmRichRecoQa::HasRichProjection ( int stsTrackId)
private

Definition at line 286 of file qa/CbmRichRecoQa.cxx.

References fRichProjections.

◆ HasRichProjection() [2/2]

bool CbmRichRecoQa::HasRichProjection ( Int_t stsTrackId)
private

Definition at line 426 of file alignment/CbmRichRecoQa.cxx.

References fRichProjections.

Referenced by RingTrackMismatchSource().

◆ Init() [1/2]

InitStatus CbmRichRecoQa::Init ( )
virtual

◆ Init() [2/2]

virtual InitStatus CbmRichRecoQa::Init ( )
virtual

Inherited from FairTask.

◆ InitHistograms() [1/2]

void CbmRichRecoQa::InitHistograms ( )
private

Initialize histograms.

Definition at line 128 of file alignment/CbmRichRecoQa.cxx.

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

Referenced by Init().

◆ InitHistograms() [2/2]

void CbmRichRecoQa::InitHistograms ( )
private

Initialize histograms.

◆ IsMcPion() [1/2]

bool CbmRichRecoQa::IsMcPion ( const CbmMCTrack * mctrack)
static

Definition at line 873 of file alignment/CbmRichRecoQa.cxx.

References CbmMCTrack::GetPdgCode().

Referenced by FillRingTrackDistance().

◆ IsMcPion() [2/2]

static bool CbmRichRecoQa::IsMcPion ( const CbmMCTrack * mctrack)
static

◆ IsMcPrimaryElectron() [1/2]

bool CbmRichRecoQa::IsMcPrimaryElectron ( const CbmMCTrack * mctrack)
static

◆ IsMcPrimaryElectron() [2/2]

static bool CbmRichRecoQa::IsMcPrimaryElectron ( const CbmMCTrack * mctrack)
static

◆ operator=() [1/2]

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

Assignment operator.

◆ operator=() [2/2]

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

Assignment operator.

◆ RingTrackMismatchSource() [1/2]

◆ RingTrackMismatchSource() [2/2]

void CbmRichRecoQa::RingTrackMismatchSource ( )
private

Fill histograms related to study of the source of ring-track mismatch.

◆ SetCorrection()

void CbmRichRecoQa::SetCorrection ( string s)
inline

Definition at line 67 of file alignment/CbmRichRecoQa.h.

References fCorrection.

◆ SetOutputDir() [1/2]

void CbmRichRecoQa::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 62 of file qa/CbmRichRecoQa.h.

References fOutputDir.

◆ SetOutputDir() [2/2]

void CbmRichRecoQa::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 60 of file alignment/CbmRichRecoQa.h.

References fOutputDir.

◆ WasRichProjectionMatched() [1/2]

bool CbmRichRecoQa::WasRichProjectionMatched ( int stsTrackId)
private

◆ WasRichProjectionMatched() [2/2]

bool CbmRichRecoQa::WasRichProjectionMatched ( Int_t stsTrackId)
private

◆ WasRingFound() [1/2]

bool CbmRichRecoQa::WasRingFound ( const CbmLink & mcTrackLink)
private

◆ WasRingFound() [2/2]

bool CbmRichRecoQa::WasRingFound ( Int_t mcTrackId)
private

◆ WasRingMatched() [1/2]

bool CbmRichRecoQa::WasRingMatched ( const CbmLink & mcTrackLink)
private

◆ WasRingMatched() [2/2]

bool CbmRichRecoQa::WasRingMatched ( Int_t mcTrackId)
private

Member Data Documentation

◆ fCanvas

vector<TCanvas*> CbmRichRecoQa::fCanvas
private

Definition at line 161 of file alignment/CbmRichRecoQa.h.

◆ fCorrection

string CbmRichRecoQa::fCorrection
private

Definition at line 159 of file alignment/CbmRichRecoQa.h.

Referenced by Finish(), and SetCorrection().

◆ fDigiMan

CbmDigiManager* CbmRichRecoQa::fDigiMan = nullptr
private

Definition at line 157 of file qa/CbmRichRecoQa.h.

◆ fEventList

CbmMCEventList* CbmRichRecoQa::fEventList = nullptr
private

Definition at line 158 of file qa/CbmRichRecoQa.h.

◆ fEventNum [1/2]

Int_t CbmRichRecoQa::fEventNum
private

Definition at line 141 of file alignment/CbmRichRecoQa.h.

Referenced by Exec().

◆ fEventNum [2/2]

int CbmRichRecoQa::fEventNum = 0
private

Definition at line 144 of file qa/CbmRichRecoQa.h.

◆ fGlobalTracks

TClonesArray * CbmRichRecoQa::fGlobalTracks = nullptr
private

◆ fHM

◆ fMCTracks

TClonesArray* CbmRichRecoQa::fMCTracks
private

◆ fMcTracks

CbmMCDataArray* CbmRichRecoQa::fMcTracks = nullptr
private

Definition at line 148 of file qa/CbmRichRecoQa.h.

◆ fNofHitsInRingMap [1/2]

std::map<Int_t, Int_t> CbmRichRecoQa::fNofHitsInRingMap
private

Definition at line 157 of file alignment/CbmRichRecoQa.h.

Referenced by FillRichRingNofHits(), and RingTrackMismatchSource().

◆ fNofHitsInRingMap [2/2]

std::map<CbmLink, int> CbmRichRecoQa::fNofHitsInRingMap
private

Definition at line 161 of file qa/CbmRichRecoQa.h.

◆ fOutputDir [1/2]

string CbmRichRecoQa::fOutputDir
private

Definition at line 143 of file alignment/CbmRichRecoQa.h.

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

◆ fOutputDir [2/2]

std::string CbmRichRecoQa::fOutputDir = ""
private

Definition at line 146 of file qa/CbmRichRecoQa.h.

◆ fRichDigis

TClonesArray* CbmRichRecoQa::fRichDigis
private

Definition at line 147 of file alignment/CbmRichRecoQa.h.

Referenced by FillRichRingNofHits(), and Init().

◆ fRichHits

TClonesArray * CbmRichRecoQa::fRichHits = nullptr
private

Definition at line 148 of file alignment/CbmRichRecoQa.h.

Referenced by FillRichRingNofHits(), and Init().

◆ fRichPoints [1/2]

TClonesArray* CbmRichRecoQa::fRichPoints
private

Definition at line 146 of file alignment/CbmRichRecoQa.h.

Referenced by FillRichRingNofHits(), and Init().

◆ fRichPoints [2/2]

CbmMCDataArray* CbmRichRecoQa::fRichPoints = nullptr
private

Definition at line 149 of file qa/CbmRichRecoQa.h.

◆ fRichProjections

TClonesArray * CbmRichRecoQa::fRichProjections = nullptr
private

Definition at line 154 of file alignment/CbmRichRecoQa.h.

Referenced by HasRichProjection(), HasRichProjection(), and Init().

◆ fRichRingMatches

TClonesArray * CbmRichRecoQa::fRichRingMatches = nullptr
private

◆ fRichRings

TClonesArray * CbmRichRecoQa::fRichRings = nullptr
private

◆ fStsTrackMatches

TClonesArray * CbmRichRecoQa::fStsTrackMatches = nullptr
private

Definition at line 153 of file alignment/CbmRichRecoQa.h.

Referenced by FillRingTrackDistance(), Init(), and RingTrackMismatchSource().

◆ fStsTracks

TClonesArray * CbmRichRecoQa::fStsTracks = nullptr
private

Definition at line 152 of file alignment/CbmRichRecoQa.h.

Referenced by Init().


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