CbmRoot
|
RICH geometry checking and testing. More...
#include <CbmRichGeoTest.h>
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... | |
CbmRichGeoTest & | operator= (const CbmRichGeoTest &) |
Assignment operator. More... | |
Private Attributes | |
string | fOutputDir |
TClonesArray * | fRichHits |
TClonesArray * | fRichRings |
CbmMCDataArray * | fRichRefPlanePoints |
CbmDigiManager * | fDigiMan = nullptr |
CbmMCDataArray * | fRichPoints |
CbmMCDataArray * | fMcTracks |
TClonesArray * | fRichRingMatches |
CbmMCEventList * | fEventList |
CbmRichRingFitterCOP * | fCopFit |
CbmRichRingFitterEllipseTau * | fTauFit |
CbmHistManager * | fHM |
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 |
CbmRichGeoTest::CbmRichGeoTest | ( | ) |
Standard constructor.
Definition at line 63 of file CbmRichGeoTest.cxx.
References fEventNum, fMaxAaxis, fMaxBaxis, fMaxRadius, fMinAaxis, fMinBaxis, fMinNofHits, fMinRadius, and fNofDrawnRings.
|
virtual |
Standard destructor.
Definition at line 98 of file CbmRichGeoTest.cxx.
|
private |
Copy constructor.
|
private |
Calculate efficiency.
[in] | histRec | |
[in] | histAcc |
Definition at line 1841 of file CbmRichGeoTest.cxx.
References Cbm::NumberToString().
Referenced by DrawHist().
|
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().
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().
|
private |
Definition at line 1147 of file CbmRichGeoTest.cxx.
References CbmHistManager::CreateCanvas(), DrawH1andFitGauss(), DrawH2WithProfile(), and fHM.
Referenced by DrawHist().
|
private |
Draw histograms.
Definition at line 1162 of file CbmRichGeoTest.cxx.
References CalcEfficiency(), CreateAccVsMinNofHitsHist(), CbmHistManager::CreateCanvas(), Cbm::DivideH1(), Cbm::DivideH2(), DrawH1(), DrawH1andFitGauss(), DrawH2(), DrawH2MeanRms(), DrawH2WithProfile(), DrawH3Profile(), CbmRichDraw::DrawPmtH2(), fHM, CbmHistManager::H1(), CbmHistManager::H2(), CbmHistManager::H3(), i, kLinear, kLog, and SetDefaultDrawStyle().
Referenced by DrawFromFile(), and Finish().
|
private |
Definition at line 1752 of file CbmRichGeoTest.cxx.
References CbmRichPmtData::fHeight, CbmRichPixelData::fX, CbmRichPmtData::fX, CbmRichPixelData::fY, CbmRichPmtData::fY, CbmRichPixelData::fZ, CbmRichPmtData::fZ, CbmRichDigiMapManager::GetInstance(), CbmRichGeoManager::GetInstance(), CbmRichDigiMapManager::GetPixelDataByAddress(), CbmRichDigiMapManager::GetPmtDataById(), i, and CbmRichGeoManager::RotatePoint().
Referenced by DrawPmts().
|
private |
DrawPmts.
Definition at line 1657 of file CbmRichGeoTest.cxx.
References CbmHistManager::Create3(), CbmHistManager::CreateCanvas(), DrawPmtPoint(), fHM, CbmRichPixelData::fX, CbmRichPixelData::fY, CbmRichPixelData::fZ, CbmRichGeoManager::GetInstance(), CbmRichDigiMapManager::GetInstance(), CbmRichDigiMapManager::GetPixelAddresses(), CbmRichDigiMapManager::GetPixelDataByAddress(), CbmRichDigiMapManager::GetPmtIds(), CbmHistManager::H3(), i, and CbmRichGeoManager::RotatePoint().
Referenced by Finish().
|
private |
Draw ring in separate TCanvas.
[in] | ring | Ring with RICH hits. |
[in] | ringPoint | Ring 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().
|
virtual |
Inherited from FairTask.
Definition at line 159 of file CbmRichGeoTest.cxx.
References fEventNum, ProcessHits(), ProcessMc(), and RingParameters().
|
private |
Calculate difference between circle parameters for two fittings using hits and MC points for fit and fill corresponding histograms.
[in] | ring | Ring fitted using hits. |
[in] | ringMc | Ring 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().
|
private |
Calculate difference between ellipse parameters for two fitting using hits and MC points for fit and fill corresponding histograms.
[in] | ring | Ring fitted using hits. |
[in] | ringMc | Ring 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().
|
virtual |
Inherited from FairTask.
Definition at line 1827 of file CbmRichGeoTest.cxx.
References DrawHist(), DrawPmts(), fDrawPmts, fHM, fOutputDir, CbmHistManager::SaveCanvasToImage(), and CbmHistManager::WriteToFile().
|
private |
Fit ring using circle fitter and fill histograms.
[in] | histIndex | Fitting type index, 0 - hit fitting, 1 - MC points fitting. |
[in] | ring | Pointer to CbmRichRingLight to be fitted and filled in histograms. |
[in] | momentum | MC 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().
|
private |
Fit ring using ellipse fitter and fill histograms.
[in] | histIndex | Fitting type index, 0 - hit fitting, 1 - MC points fitting. |
[in] | ring | Pointer to CbmRichRing to be fitted and filled in histograms. |
[in] | momentum | MC 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().
|
virtual |
Inherited from FairTask.
Definition at line 100 of file CbmRichGeoTest.cxx.
References fCopFit, fDigiMan, fEventList, fMcTracks, fRichHits, fRichPoints, fRichRefPlanePoints, fRichRingMatches, fRichRings, fTauFit, CbmMCDataManager::GetObject(), CbmDigiManager::Init(), CbmMCDataManager::InitBranch(), InitHistograms(), CbmDigiManager::Instance(), CbmDigiManager::IsMatchPresent(), CbmDigiManager::IsPresent(), and kRich.
|
private |
Initialize histograms.
Definition at line 168 of file CbmRichGeoTest.cxx.
References CbmHistManager::Create1(), CbmHistManager::Create2(), CbmHistManager::Create3(), fHM, and i.
Referenced by Init().
|
private |
Assignment operator.
|
private |
Calculate residuals between hits and MC points and fill histograms.
Definition at line 1021 of file CbmRichGeoTest.cxx.
References fDigiMan, fHM, fRichHits, fRichPoints, CbmMCDataArray::Get(), CbmDigiManager::Get(), CbmRichGeoManager::GetInstance(), CbmRichPmt::getLambda(), CbmMatch::GetLinks(), CbmDigiManager::GetMatch(), CbmHit::GetRefId(), CbmPixelHit::GetX(), CbmPixelHit::GetY(), CbmHit::GetZ(), CbmHistManager::H1(), CbmHistManager::H2(), i, kRich, and CbmRichGeoManager::RotatePoint().
Referenced by Exec().
|
private |
Fill MC histogram for detector acceptance calculation.
Definition at line 732 of file CbmRichGeoTest.cxx.
References fEventList, fHM, fMcTracks, fRichPoints, fRichRefPlanePoints, CbmMCDataArray::Get(), CbmMCEventList::GetEventIdByIndex(), CbmMCEventList::GetFileIdByIndex(), CbmMCTrack::GetGeantProcessId(), CbmRichGeoManager::GetInstance(), CbmRichPmt::getLambda(), CbmMCTrack::GetMotherId(), CbmMCEventList::GetNofEvents(), CbmMCTrack::GetP(), CbmMCTrack::GetPdgCode(), CbmMCTrack::GetPt(), CbmMCTrack::GetRapidity(), CbmHistManager::H1(), CbmHistManager::H2(), CbmRichGeoManager::RotatePoint(), and CbmMCDataArray::Size().
Referenced by Exec().
|
private |
Loop over all rings in array and fill ring parameters histograms.
Definition at line 800 of file CbmRichGeoTest.cxx.
References CbmRichRingLight::AddHit(), CbmRichConverter::CopyHitsToRingLight(), DrawRing(), fDrawEventDisplay, fHM, FillMcVsHitFitCircle(), FillMcVsHitFitEllipse(), FitAndFillHistCircle(), FitAndFillHistEllipse(), fMaxAaxis, fMaxBaxis, fMaxRadius, fMcTracks, fMinAaxis, fMinBaxis, fMinNofHits, fMinRadius, fNofDrawnRings, fRichPoints, fRichRingMatches, fRichRings, CbmRichHitLight::fX, CbmRichHitLight::fY, CbmMCDataArray::Get(), CbmRichRingLight::GetAaxis(), CbmRichRingLight::GetBaxis(), CbmRichRingLight::GetCenterX(), CbmRichRingLight::GetCenterY(), CbmLink::GetEntry(), CbmMCTrack::GetGeantProcessId(), CbmRichRingLight::GetHit(), CbmLink::GetIndex(), CbmRichGeoManager::GetInstance(), CbmMatch::GetMatchedLink(), CbmMCTrack::GetMotherId(), CbmRichRing::GetNofHits(), CbmRichRingLight::GetNofHits(), CbmMCTrack::GetP(), CbmMCTrack::GetPdgCode(), CbmMCTrack::GetPt(), CbmRichRingLight::GetRadius(), CbmMCTrack::GetRapidity(), CbmHistManager::H1(), CbmHistManager::H2(), CbmHistManager::H3(), CbmRichGeoManager::RotatePoint(), CbmMCDataArray::Size(), and sqrt().
Referenced by Exec().
|
inline |
Definition at line 86 of file CbmRichGeoTest.h.
|
inline |
Definition at line 85 of file CbmRichGeoTest.h.
|
inline |
Set output directory where you want to write results (figures and json).
[in] | dir | Path to the output directory. |
Definition at line 78 of file CbmRichGeoTest.h.
|
private |
Definition at line 207 of file CbmRichGeoTest.h.
Referenced by FitAndFillHistCircle(), and Init().
|
private |
Definition at line 200 of file CbmRichGeoTest.h.
Referenced by Init(), and ProcessHits().
|
private |
Definition at line 226 of file CbmRichGeoTest.h.
Referenced by RingParameters().
|
private |
Definition at line 225 of file CbmRichGeoTest.h.
Referenced by Finish().
|
private |
Definition at line 204 of file CbmRichGeoTest.h.
Referenced by Init(), and ProcessMc().
|
private |
Definition at line 212 of file CbmRichGeoTest.h.
Referenced by CbmRichGeoTest(), and Exec().
|
private |
Definition at line 210 of file CbmRichGeoTest.h.
Referenced by CreateAccVsMinNofHitsHist(), DrawFromFile(), DrawH2MeanRms(), DrawHist(), DrawPmts(), DrawRing(), FillMcVsHitFitCircle(), FillMcVsHitFitEllipse(), Finish(), FitAndFillHistCircle(), FitAndFillHistEllipse(), InitHistograms(), ProcessHits(), ProcessMc(), and RingParameters().
|
private |
Definition at line 218 of file CbmRichGeoTest.h.
Referenced by CbmRichGeoTest(), and RingParameters().
|
private |
Definition at line 220 of file CbmRichGeoTest.h.
Referenced by CbmRichGeoTest(), FitAndFillHistEllipse(), and RingParameters().
|
private |
Definition at line 222 of file CbmRichGeoTest.h.
Referenced by CbmRichGeoTest(), and RingParameters().
|
private |
Definition at line 202 of file CbmRichGeoTest.h.
Referenced by Init(), ProcessMc(), and RingParameters().
|
private |
Definition at line 217 of file CbmRichGeoTest.h.
Referenced by CbmRichGeoTest(), FitAndFillHistEllipse(), and RingParameters().
|
private |
Definition at line 219 of file CbmRichGeoTest.h.
Referenced by CbmRichGeoTest(), FitAndFillHistEllipse(), and RingParameters().
|
private |
Definition at line 214 of file CbmRichGeoTest.h.
Referenced by CbmRichGeoTest(), and RingParameters().
|
private |
Definition at line 221 of file CbmRichGeoTest.h.
Referenced by CbmRichGeoTest(), and RingParameters().
|
private |
Definition at line 224 of file CbmRichGeoTest.h.
Referenced by CbmRichGeoTest(), DrawRing(), and RingParameters().
|
private |
Definition at line 195 of file CbmRichGeoTest.h.
Referenced by DrawFromFile(), and Finish().
|
private |
Definition at line 197 of file CbmRichGeoTest.h.
Referenced by Init(), and ProcessHits().
|
private |
Definition at line 201 of file CbmRichGeoTest.h.
Referenced by Init(), ProcessHits(), ProcessMc(), and RingParameters().
|
private |
Definition at line 199 of file CbmRichGeoTest.h.
Referenced by Init(), and ProcessMc().
|
private |
Definition at line 203 of file CbmRichGeoTest.h.
Referenced by Init(), and RingParameters().
|
private |
Definition at line 198 of file CbmRichGeoTest.h.
Referenced by Init(), and RingParameters().
|
private |
Definition at line 208 of file CbmRichGeoTest.h.
Referenced by FitAndFillHistEllipse(), and Init().