23 #include <THnSparse.h>
25 #include <TObjArray.h>
26 #include <TObjString.h>
28 #include <TProfile2D.h>
29 #include <TProfile3D.h>
55 , fVarCutType(new TBits(kMaxCuts))
60 for (Int_t
i = 0;
i < kMaxCuts; ++
i) {
64 fAxes.SetOwner(kTRUE);
65 fArrDielHistos.SetOwner(kTRUE);
71 PairAnalysisHistos(name, title)
75 , fVarCutType(new TBits(kMaxCuts))
84 fAxes.SetOwner(kTRUE);
111 if (!binLimits)
return;
113 Int_t size =
fAxes.GetEntriesFast();
117 fAxes.Add(binLimits);
130 if (cell < 0)
return;
134 SetHistogramList(*
static_cast<THashList*
>(
fArrDielHistos.UncheckedAt(cell)),
136 PairAnalysisHistos::FillClass(histClass, values);
142 const char* config) {
148 TIter nextKey(
f.GetListOfKeys());
150 while ((key = (TKey*) nextKey())) {
151 TString name = key->GetName();
152 if (!name.Contains(
"PairAnalysisHistos"))
continue;
153 if (!strlen(
task) && !name.Contains(
task))
continue;
154 TObject* o =
f.Get(key->GetName());
155 TList* list =
dynamic_cast<TList*
>(o);
159 dynamic_cast<TObjArray*
>(list->FindObject(Form(
"%s_HF", config)));
160 if (!listCfg)
continue;
358 for (Int_t icell = 0; icell < size; icell++) {
364 Int_t nvars =
fAxes.GetEntriesFast();
365 for (Int_t ivar = 0; ivar < nvars; ivar++) {
368 TVectorD* bins =
static_cast<TVectorD*
>(
fAxes.At(ivar));
369 Int_t nbins = bins->GetNrows() - 1;
375 for (Int_t icell = 0; icell < size; icell++) {
378 Int_t ibin = (icell / sizeAdd) % nbins;
379 Double_t lowEdge = (*bins)[ibin];
380 Double_t upEdge = (*bins)[ibin + 1];
391 title += Form(
"#%.2f#%.2f", lowEdge, upEdge);
393 ->SetName(title.Data());
415 for (Int_t
i = 0;
i <
fAxes.GetEntriesFast(); ++
i)
416 size *= ((
static_cast<TVectorD*
>(
fAxes.At(
i)))->GetNrows() - 1);
427 if (
fAxes.GetEntriesFast() == 0)
return 0;
431 for (Int_t
i = 0;
i <
fAxes.GetEntriesFast(); ++
i) {
433 TVectorD* bins =
static_cast<TVectorD*
>(
fAxes.At(
i));
434 Int_t nRows = bins->GetNrows();
435 if ((val < (*bins)[0]) || (val > (*bins)[nRows - 1])) {
return -1; }
437 Int_t
pos = TMath::BinarySearch(nRows, bins->GetMatrixArray(), val);
438 cell += sizeAdd *
pos;
441 sizeAdd *= (nRows - 1);