17 #include <TDirectoryFile.h> 22 #include <THnSparse.h> 23 #include <Riostream.h> 70 std::cout <<
"Extracting input mass plot: " <<
fpTmin <<
" to " <<
fpTmax << std::endl;
75 THnSparseF *sparse =
dynamic_cast<THnSparseF*
>(histList->FindObject(
fObjectName.Data()));
77 TH3D* hInvMassptD =
static_cast<TH3D*
>(sparse->Projection(3, 1, 2));
78 hInvMassptD->SetName(
"hInvMassptD");
80 if (!hInvMassptD)
return kFALSE;
84 for (
int i = 0; i <
fnDbins; i++) {
85 hmassjet[i] =
nullptr;
86 hmassjet_scale[i] =
nullptr;
88 TH1D *hmass =
nullptr;
90 for (
int j = 0; j <
fnDbins; j++) {
91 hmassjet[j] = hInvMassptD->ProjectionX(Form(
"hmassjet%d",j), hInvMassptD->GetYaxis()->FindBin(
fpTmin), hInvMassptD->GetYaxis()->FindBin(
fpTmax)-1, hInvMassptD->GetZaxis()->FindBin(
fDbinpTedges[j]), hInvMassptD->GetZaxis()->FindBin(
fDbinpTedges[j + 1]) - 1);
93 hmassjet_scale[j] =
static_cast<TH1D*
>(hmassjet[j]->Clone(Form(
"hmassjet%d_scale", j)));
96 if (!j) hmass =
static_cast<TH1D*
>(hmassjet_scale[j]->Clone(
"hmass"));
97 else hmass->Add(hmassjet_scale[j]);
100 fMassPlot =
static_cast<TH1D*
>(hmass->Clone(
"inputSpectrum"));
111 std::cout <<
"Extracting input mass plot: " <<
fpTmin <<
" to " <<
fpTmax << std::endl;
113 double jetmin = 5, jetmax = 30;
118 THnSparseF *sparse =
dynamic_cast<THnSparseF*
>(histList->FindObject(
fObjectName.Data()));
120 sparse->GetAxis(1)->SetRangeUser(jetmin, jetmax);
virtual ~AliDJetTHnReader()
Bool_t ExtractInputMassPlotSideband()
Double_t fpTmax
pT upper edge of mass plot to evaluate variations of yields
Declaration of class AliDJetTHnReader.
Double_t * fJetzBinEdges
Jet z bin edges to be used for spectrum.
TString fListName
Name of input list.
Double_t * fDbinpTedges
D-meson pt bin edges values.
Bool_t ExtractInputMassPlotEffScale()
Implementation of an abstract class to read the invariant mass histograms used to extract the raw yie...
Implementation of an abstract class to read the invariant mass histograms used to extract the raw yie...
Int_t fnJetzbins
Number of jet z bins to be used for spectrum.
TH1D * fMassPlot
!Mass spectra to be fitted
Double_t * fDEffValues
D-meson efficiency values.
TString fDirName
Name of input directory in the root file.
Int_t fnDbins
Number of D-meson pT bins (for eff scaling)
Double_t fpTmin
pT lower edge of mass plot to evaluate variations of yields
TString fObjectName
Name of input container to extract the mass plot.
UInt_t fMassRebin
Rebin the mass histogram axis.
TFile * fFileInput
!File containing the task output
TH2D * fMassVsJetPtPlot
!Mass vs jet pt (SB method)
TString fFileNameInput
Name of input file.