46 : TNamed(name, title), fArrPools(
"TClonesArray"), fAxes(kMaxCuts) {
53 fAxes.SetOwner(kTRUE);
68 TVectorD*
const bins) {
76 Int_t size =
fAxes.GetEntriesFast();
100 Error(
"Fill",
"Bin outside range: %s", dim.Data());
105 TClonesArray* poolp =
static_cast<TClonesArray*
>(
fArrPools.At(bin));
108 TClonesArray& pool = *poolp;
115 Info(
"Fill",
"New pool at %d (%s)", bin, dim.Data());
116 poolp =
new (
fArrPools[bin]) TClonesArray(
"PairAnalysisMixedEvent",
fDepth);
117 poolp->SetUniqueID(0);
120 index1 = (poolp->GetUniqueID() + 1) %
fDepth;
123 TClonesArray& pool = *poolp;
132 event->SetProcessID(
fPID);
142 pool.SetUniqueID(index1);
153 if (pool.GetEntriesFast() < 1)
return;
156 TObjArray arrTrDummy[4];
157 for (Int_t
i = 0;
i < 4; ++
i)
166 TIter ev1P(&arrTrDummy[0]);
167 TIter ev1N(&arrTrDummy[1]);
170 for (Int_t i1 = 0; i1 < pool.GetEntriesFast(); ++i1) {
219 for (Int_t
i = 0;
i < 4; ++
i) {
235 Info(
"Init",
"Creating a pool array with size %d", size);
239 for (Int_t
i = 0;
i <
fAxes.GetEntriesFast(); ++
i) {
240 TVectorD* bins =
static_cast<TVectorD*
>(
fAxes.At(
i));
241 Int_t nRows = bins->GetNrows();
243 for (Int_t irow = 0; irow < nRows; ++irow) {
244 values += Form(
"%.2f, ", (*bins)[irow]);
248 if (!
fPID) {
fPID = TProcessID::AddProcessID(); }
250 Info(
"Init",
"%s", values.Data());
259 for (Int_t
i = 0;
i <
fAxes.GetEntriesFast(); ++
i)
260 size *= ((
static_cast<TVectorD*
>(
fAxes.At(
i)))->GetNrows() - 1);
273 if (
fAxes.GetEntriesFast() == 0) {
274 if (dim) (*dim) =
"single bin";
277 if (dim) (*dim) =
"";
280 for (Int_t
i = 0;
i <
fAxes.GetEntriesFast(); ++
i) {
282 TVectorD* bins =
static_cast<TVectorD*
>(
fAxes.At(
i));
283 Int_t nRows = bins->GetNrows();
284 if ((val < (*bins)[0]) || (val > (*bins)[nRows - 1])) {
return -1; }
286 Int_t
pos = TMath::BinarySearch(nRows, bins->GetMatrixArray(), val);
287 bin += sizeAdd *
pos;
289 (*dim) += Form(
"%s: %f (%d); ",
293 sizeAdd *= (nRows - 1);