CbmRoot
CbmAnaDielectronTaskDraw Class Reference

#include <CbmAnaDielectronTaskDraw.h>

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

Public Member Functions

 CbmAnaDielectronTaskDraw ()
 
virtual ~CbmAnaDielectronTaskDraw ()
 
void DrawHistFromFile (const std::string &fileName, const std::string &outputDir="", Bool_t useMvd=true, Bool_t drawSig=true)
 Implement functionality of drawing histograms in the macro from the specified file, this function should be called from macro. More...
 

Private Member Functions

void RebinMinvHist ()
 Rebin minv histograms for better drawing. Should be called after calculation of S/BG ratios. More...
 
TH1D * H1 (const std::string &name)
 Return TH1D* pointer to the specified histogram. More...
 
TH2D * H2 (const std::string &name)
 Return TH2D* pointer to the specified histogram. More...
 
void SaveCanvasToImage ()
 Save all created canvases to images. More...
 
void DrawEfficiencyOnHist (TH1 *h1, TH1 *h2, Double_t xPos, Double_t yPos)
 Draw an integrated efficiency on a histogram (100.*h1->GetEntries()/h2->GetEntries()). Histogram must be drawn in advance. More...
 
TH1D * CreateSignificanceH1D (TH1D *s, TH1D *bg, const std::string &name, const std::string &option)
 
TH2D * CreateSignificanceH2D (TH2D *signal, TH2D *bg, const std::string &name, const std::string &title)
 
void SOverBg (CbmLmvmAnalysisSteps step)
 Fit signal histogram using Fit("gaus"). Calculate S/BG ratio in 2 sigma region. Print summary table of the efficiency, S/BG, sigma etc for each step in cout. More...
 
void SOverBgAll ()
 
void DrawPtYDistribution (int step, bool drawAnaStep=true)
 
void DrawPtYDistributionAll ()
 
void DrawRapidityDistributionAll ()
 
void DrawPtYEfficiency (int step, bool drawAnaStep=true)
 Draw efficiency in dependence on Pt and Rapidity. Efficiency is normalized to the previous step. More...
 
void DrawPtYEfficiencyAll ()
 
void DrawMomentumDistributionAll ()
 
void DrawMomentumEfficiencyAll ()
 
void DrawMotherPdg ()
 
void DrawPPAngleMCSignal ()
 
void Draw1DSourceTypes (const std::string &hName, bool doScale=true)
 
void Draw1DCut (const std::string &hName, const std::string &sigOption, double cutValue=-999999.)
 
void DrawElPiMomHis ()
 
void Draw2DCutTriangle (double xCross, double yCross)
 
void Draw2DCut (const std::string &hist, double cutCrossX=-999999., double cutCrossY=-999999.)
 
void DrawCutDistributions ()
 
void DrawMismatchesAndGhosts ()
 
void DrawSourcesBgPairsEpEm (int step, bool inPercent, bool drawAnaStep=true)
 
void DrawSourcesBgPairsAll ()
 
void DrawGammaVertex ()
 
void Draw1DHistoForEachAnalysisStep (const std::string &hist, Bool_t logy=false)
 
void DrawMinvForEachAnalysisStep ()
 
void DrawMinvSandBg (int step)
 
void DrawMinvSandBgAll ()
 
void DrawMinvSource (int step, bool drawAnaStep=true)
 
void DrawMinvSourceAll ()
 
void RemoveMvdCutBins ()
 
void DrawBgSource2D (const std::string &canvasName, const std::string &histName, const std::vector< std::string > &yLabels, double scale, const std::string &zTitle)
 
void DrawBgSourceTracks ()
 
void SetAnalysisStepLabels (TH1 *h)
 Set labels of X axis usinf analysis steps names. More...
 
void DrawMinvPtAll ()
 
void DrawBgSourcesVsMomentum ()
 
void DrawMvdCutQa ()
 
void DrawMvdAndStsHist ()
 
void DrawPmtXY ()
 
 CbmAnaDielectronTaskDraw (const CbmAnaDielectronTaskDraw &)
 
CbmAnaDielectronTaskDrawoperator= (const CbmAnaDielectronTaskDraw &)
 
 ClassDef (CbmAnaDielectronTaskDraw, 1)
 

Private Attributes

Int_t fNofEvents
 
Bool_t fUseMvd
 
Bool_t fDrawSignificance
 
CbmLmvmCuts fCuts
 
CbmHistManagerfHM
 
std::string fOutputDir
 

Detailed Description

Definition at line 26 of file CbmAnaDielectronTaskDraw.h.

Constructor & Destructor Documentation

◆ CbmAnaDielectronTaskDraw() [1/2]

CbmAnaDielectronTaskDraw::CbmAnaDielectronTaskDraw ( )

Definition at line 42 of file CbmAnaDielectronTaskDraw.cxx.

◆ ~CbmAnaDielectronTaskDraw()

virtual CbmAnaDielectronTaskDraw::~CbmAnaDielectronTaskDraw ( )
inlinevirtual

Definition at line 31 of file CbmAnaDielectronTaskDraw.h.

◆ CbmAnaDielectronTaskDraw() [2/2]

CbmAnaDielectronTaskDraw::CbmAnaDielectronTaskDraw ( const CbmAnaDielectronTaskDraw )
private

Member Function Documentation

◆ ClassDef()

CbmAnaDielectronTaskDraw::ClassDef ( CbmAnaDielectronTaskDraw  ,
 
)
private

◆ CreateSignificanceH1D()

TH1D * CbmAnaDielectronTaskDraw::CreateSignificanceH1D ( TH1D *  s,
TH1D *  bg,
const std::string &  name,
const std::string &  option 
)
private

Produce 1D significance histogram Significance=S/sqrt(S+BG).

Parameters
[in]sHistogram with signal.
[in]bgHistogram eith background.
[in]nameName of new significance histogram.
[in]optionCould be "right" or "left".

Definition at line 150 of file CbmAnaDielectronTaskDraw.cxx.

References i.

Referenced by Draw1DCut().

◆ CreateSignificanceH2D()

TH2D * CbmAnaDielectronTaskDraw::CreateSignificanceH2D ( TH2D *  signal,
TH2D *  bg,
const std::string &  name,
const std::string &  title 
)
private

Produce 2D significance histogram Significance=S/sqrt(S+BG).

Definition at line 191 of file CbmAnaDielectronTaskDraw.cxx.

◆ Draw1DCut()

void CbmAnaDielectronTaskDraw::Draw1DCut ( const std::string &  hName,
const std::string &  sigOption,
double  cutValue = -999999. 
)
private

◆ Draw1DHistoForEachAnalysisStep()

void CbmAnaDielectronTaskDraw::Draw1DHistoForEachAnalysisStep ( const std::string &  hist,
Bool_t  logy = false 
)
private

◆ Draw1DSourceTypes()

void CbmAnaDielectronTaskDraw::Draw1DSourceTypes ( const std::string &  hName,
bool  doScale = true 
)
private

◆ Draw2DCut()

void CbmAnaDielectronTaskDraw::Draw2DCut ( const std::string &  hist,
double  cutCrossX = -999999.,
double  cutCrossY = -999999. 
)
private

◆ Draw2DCutTriangle()

void CbmAnaDielectronTaskDraw::Draw2DCutTriangle ( double  xCross,
double  yCross 
)
private

Definition at line 590 of file CbmAnaDielectronTaskDraw.cxx.

Referenced by Draw2DCut().

◆ DrawBgSource2D()

void CbmAnaDielectronTaskDraw::DrawBgSource2D ( const std::string &  canvasName,
const std::string &  histName,
const std::vector< std::string > &  yLabels,
double  scale,
const std::string &  zTitle 
)
private

◆ DrawBgSourcesVsMomentum()

◆ DrawBgSourceTracks()

void CbmAnaDielectronTaskDraw::DrawBgSourceTracks ( )
private

◆ DrawCutDistributions()

◆ DrawEfficiencyOnHist()

void CbmAnaDielectronTaskDraw::DrawEfficiencyOnHist ( TH1 *  h1,
TH1 *  h2,
Double_t  xPos,
Double_t  yPos 
)
private

Draw an integrated efficiency on a histogram (100.*h1->GetEntries()/h2->GetEntries()). Histogram must be drawn in advance.

Parameters
[in]h1Pointer to the first histogram.
[in]h2Pointer to the second histogram.
[in]xPosX position of the text in absolute coordinates.
[in]yPosY position of the text in absolute coordinates.

Definition at line 135 of file CbmAnaDielectronTaskDraw.cxx.

Referenced by DrawPtYDistribution(), and DrawPtYEfficiency().

◆ DrawElPiMomHis()

void CbmAnaDielectronTaskDraw::DrawElPiMomHis ( )
private

◆ DrawGammaVertex()

void CbmAnaDielectronTaskDraw::DrawGammaVertex ( )
private

Definition at line 670 of file CbmAnaDielectronTaskDraw.cxx.

References CbmHistManager::CreateCanvas(), DrawH1(), DrawH2(), fHM, and H2().

Referenced by DrawHistFromFile().

◆ DrawHistFromFile()

void CbmAnaDielectronTaskDraw::DrawHistFromFile ( const std::string &  fileName,
const std::string &  outputDir = "",
Bool_t  useMvd = true,
Bool_t  drawSig = true 
)

Implement functionality of drawing histograms in the macro from the specified file, this function should be called from macro.

Parameters
[in]fileNameName of the input file with histograms.
[in]outputDirPath to the output directory (if it does not exist, it will be created automatically).
[in]useMvddraw histograms related to the MVD detector?
[in]drawSigDo you want to draw significance histograms?

Definition at line 51 of file CbmAnaDielectronTaskDraw.cxx.

References DrawBgSourcesVsMomentum(), DrawBgSourceTracks(), DrawCutDistributions(), DrawElPiMomHis(), DrawGammaVertex(), DrawMinvForEachAnalysisStep(), DrawMinvPtAll(), DrawMinvSandBgAll(), DrawMinvSourceAll(), DrawMismatchesAndGhosts(), DrawMomentumDistributionAll(), DrawMomentumEfficiencyAll(), DrawMotherPdg(), DrawMvdAndStsHist(), DrawMvdCutQa(), DrawPmtXY(), DrawPPAngleMCSignal(), DrawPtYDistributionAll(), DrawPtYEfficiencyAll(), DrawRapidityDistributionAll(), DrawSourcesBgPairsAll(), fCuts, fDrawSignificance, fHM, fNofEvents, fOutputDir, fUseMvd, H1(), CbmHistManager::ReadFromFile(), RebinMinvHist(), RemoveMvdCutBins(), SaveCanvasToImage(), CbmHistManager::ScaleByPattern(), CbmLmvmCuts::SetDefaultCuts(), SetDefaultDrawStyle(), and SOverBgAll().

◆ DrawMinvForEachAnalysisStep()

void CbmAnaDielectronTaskDraw::DrawMinvForEachAnalysisStep ( )
private

◆ DrawMinvPtAll()

void CbmAnaDielectronTaskDraw::DrawMinvPtAll ( )
private

◆ DrawMinvSandBg()

void CbmAnaDielectronTaskDraw::DrawMinvSandBg ( int  step)
private

◆ DrawMinvSandBgAll()

void CbmAnaDielectronTaskDraw::DrawMinvSandBgAll ( )
private

◆ DrawMinvSource()

void CbmAnaDielectronTaskDraw::DrawMinvSource ( int  step,
bool  drawAnaStep = true 
)
private

◆ DrawMinvSourceAll()

void CbmAnaDielectronTaskDraw::DrawMinvSourceAll ( )
private

◆ DrawMismatchesAndGhosts()

void CbmAnaDielectronTaskDraw::DrawMismatchesAndGhosts ( )
private

◆ DrawMomentumDistributionAll()

void CbmAnaDielectronTaskDraw::DrawMomentumDistributionAll ( )
private

Draw momentum distribution of signal for all steps.

Definition at line 358 of file CbmAnaDielectronTaskDraw.cxx.

References CbmHistManager::CreateCanvas(), Draw1DHistoForEachAnalysisStep(), and fHM.

Referenced by DrawHistFromFile().

◆ DrawMomentumEfficiencyAll()

void CbmAnaDielectronTaskDraw::DrawMomentumEfficiencyAll ( )
private

Draw efficiency vs. momentum of pair for all steps.

Definition at line 366 of file CbmAnaDielectronTaskDraw.cxx.

Referenced by DrawHistFromFile().

◆ DrawMotherPdg()

void CbmAnaDielectronTaskDraw::DrawMotherPdg ( )
private

Draw Mother PDG

Definition at line 386 of file CbmAnaDielectronTaskDraw.cxx.

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

Referenced by DrawHistFromFile().

◆ DrawMvdAndStsHist()

void CbmAnaDielectronTaskDraw::DrawMvdAndStsHist ( )
private

◆ DrawMvdCutQa()

void CbmAnaDielectronTaskDraw::DrawMvdCutQa ( )
private

◆ DrawPmtXY()

void CbmAnaDielectronTaskDraw::DrawPmtXY ( )
private

◆ DrawPPAngleMCSignal()

void CbmAnaDielectronTaskDraw::DrawPPAngleMCSignal ( )
private

Draw PP Angle hist for MC signal

Definition at line 399 of file CbmAnaDielectronTaskDraw.cxx.

References CbmHistManager::CreateCanvas(), DrawH2(), fHM, and H2().

Referenced by DrawHistFromFile().

◆ DrawPtYDistribution()

void CbmAnaDielectronTaskDraw::DrawPtYDistribution ( int  step,
bool  drawAnaStep = true 
)
private

Draw Pt vs. Y distribution of signal for one step. Print integrated efficiency using DrawEfficiencyOnHist method.

Parameters
[in]stepAnalysis step.

Definition at line 278 of file CbmAnaDielectronTaskDraw.cxx.

References DrawEfficiencyOnHist(), DrawH2(), DrawTextOnPad(), CbmLmvmHist::fAnaSteps, CbmLmvmHist::fAnaStepsLatex, H2(), and kLinear.

Referenced by DrawPtYDistributionAll().

◆ DrawPtYDistributionAll()

void CbmAnaDielectronTaskDraw::DrawPtYDistributionAll ( )
private

Draw Pt vs. Y distributions of signal for all steps using DrawPtYDistribution method.

Definition at line 288 of file CbmAnaDielectronTaskDraw.cxx.

References CbmHistManager::CreateCanvas(), DrawPtYDistribution(), CbmLmvmHist::fAnaSteps, fHM, CbmLmvmHist::fNofAnaSteps, fUseMvd, kAcc, kMvd1Cut, kMvd2Cut, and kPtCut.

Referenced by DrawHistFromFile().

◆ DrawPtYEfficiency()

void CbmAnaDielectronTaskDraw::DrawPtYEfficiency ( int  step,
bool  drawAnaStep = true 
)
private

Draw efficiency in dependence on Pt and Rapidity. Efficiency is normalized to the previous step.

Parameters
[in]stepAnalysis step.

Definition at line 328 of file CbmAnaDielectronTaskDraw.cxx.

References Cbm::DivideH2(), DrawEfficiencyOnHist(), DrawH2(), DrawTextOnPad(), CbmLmvmHist::fAnaSteps, CbmLmvmHist::fAnaStepsLatex, H2(), and kMc.

Referenced by DrawPtYEfficiencyAll().

◆ DrawPtYEfficiencyAll()

void CbmAnaDielectronTaskDraw::DrawPtYEfficiencyAll ( )
private

Draw efficiency in dependence on Pt and Rapidity of signal for all steps.

Definition at line 342 of file CbmAnaDielectronTaskDraw.cxx.

References CbmHistManager::CreateCanvas(), DrawPtYEfficiency(), fHM, CbmLmvmHist::fNofAnaSteps, fUseMvd, kAcc, kMvd1Cut, kMvd2Cut, and kPtCut.

Referenced by DrawHistFromFile().

◆ DrawRapidityDistributionAll()

void CbmAnaDielectronTaskDraw::DrawRapidityDistributionAll ( )
private

◆ DrawSourcesBgPairsAll()

void CbmAnaDielectronTaskDraw::DrawSourcesBgPairsAll ( )
private

◆ DrawSourcesBgPairsEpEm()

void CbmAnaDielectronTaskDraw::DrawSourcesBgPairsEpEm ( int  step,
bool  inPercent,
bool  drawAnaStep = true 
)
private

◆ H1()

TH1D * CbmAnaDielectronTaskDraw::H1 ( const std::string &  name)
private

◆ H2()

TH2D * CbmAnaDielectronTaskDraw::H2 ( const std::string &  name)
private

◆ operator=()

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

◆ RebinMinvHist()

void CbmAnaDielectronTaskDraw::RebinMinvHist ( )
private

Rebin minv histograms for better drawing. Should be called after calculation of S/BG ratios.

Definition at line 99 of file CbmAnaDielectronTaskDraw.cxx.

References CbmLmvmHist::fAnaSteps, CbmLmvmHist::fNofAnaSteps, CbmLmvmHist::fNofBgPairSources, H1(), and i.

Referenced by DrawHistFromFile().

◆ RemoveMvdCutBins()

void CbmAnaDielectronTaskDraw::RemoveMvdCutBins ( )
private

Definition at line 1125 of file CbmAnaDielectronTaskDraw.cxx.

References CbmLmvmHist::fNofAnaSteps, H1(), H2(), kMvd2Cut, and y.

Referenced by DrawHistFromFile().

◆ SaveCanvasToImage()

void CbmAnaDielectronTaskDraw::SaveCanvasToImage ( )
private

Save all created canvases to images.

Definition at line 1431 of file CbmAnaDielectronTaskDraw.cxx.

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

Referenced by DrawHistFromFile().

◆ SetAnalysisStepLabels()

void CbmAnaDielectronTaskDraw::SetAnalysisStepLabels ( TH1 *  h)
private

Set labels of X axis usinf analysis steps names.

Definition at line 1318 of file CbmAnaDielectronTaskDraw.cxx.

References CbmLmvmHist::fAnaStepsLatex, CbmLmvmHist::fNofAnaSteps, fUseMvd, kMvd1Cut, kMvd2Cut, and x.

Referenced by DrawBgSource2D(), DrawBgSourceTracks(), and DrawMismatchesAndGhosts().

◆ SOverBg()

void CbmAnaDielectronTaskDraw::SOverBg ( CbmLmvmAnalysisSteps  step)
private

Fit signal histogram using Fit("gaus"). Calculate S/BG ratio in 2 sigma region. Print summary table of the efficiency, S/BG, sigma etc for each step in cout.

Parameters
[in]stepAnalysis step.

Definition at line 240 of file CbmAnaDielectronTaskDraw.cxx.

References CbmLmvmHist::fAnaSteps, H1(), H2(), and i.

Referenced by SOverBgAll().

◆ SOverBgAll()

void CbmAnaDielectronTaskDraw::SOverBgAll ( )
private

Calculates S/BG ratio for each step of the analysis using SOverBg method.

Definition at line 265 of file CbmAnaDielectronTaskDraw.cxx.

References CbmHistManager::CreateCanvas(), fHM, fUseMvd, kChi2Prim, kElId, kGammaCut, kMvd1Cut, kMvd2Cut, kPtCut, kReco, kStCut, kTtCut, and SOverBg().

Referenced by DrawHistFromFile().

Member Data Documentation

◆ fCuts

CbmLmvmCuts CbmAnaDielectronTaskDraw::fCuts
private

Definition at line 53 of file CbmAnaDielectronTaskDraw.h.

Referenced by DrawCutDistributions(), and DrawHistFromFile().

◆ fDrawSignificance

Bool_t CbmAnaDielectronTaskDraw::fDrawSignificance
private

Definition at line 51 of file CbmAnaDielectronTaskDraw.h.

Referenced by Draw1DCut(), and DrawHistFromFile().

◆ fHM

◆ fNofEvents

Int_t CbmAnaDielectronTaskDraw::fNofEvents
private

Definition at line 47 of file CbmAnaDielectronTaskDraw.h.

Referenced by Draw2DCut(), DrawElPiMomHis(), and DrawHistFromFile().

◆ fOutputDir

std::string CbmAnaDielectronTaskDraw::fOutputDir
private

Definition at line 56 of file CbmAnaDielectronTaskDraw.h.

Referenced by DrawHistFromFile(), and SaveCanvasToImage().

◆ fUseMvd


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