10#include "CorrFitPairGeneratorSimple.h"
11#include "CorrFitMapGroupConfig.h"
15#include "FemtoMiniPair.h"
17#include <RtypesCore.h>
18#include <TClonesArray.h>
19#include <TLorentzVector.h>
25 void CorrFitPairGeneratorSimple::GenerateEvent() {
26 if (fLimitsN[0] > fBinLimit)
return;
28 Double_t min = fGrouping.GetMin();
29 Double_t max = fGrouping.GetMax();
31 if (fFrame == Femto::EKinematics::kLCMS) { scale = 0.5; }
34 TLorentzVector p1, p2;
36 FemtoMicroPair* pair =
nullptr;
38 p1.SetXYZM(x, y, z, fM1);
39 p2.SetXYZM(-x, -y, -z, fM2);
40 p1.Boost(0.2, 0, 0.0);
41 p2.Boost(0.2, 0, 0.0);
42 pair->SetMomenta1(p1.X(), p1.Y(), p1.Z(), p1.E());
43 pair->SetTrueMomenta1(p1.X(), p1.Y(), p1.Z(), p1.E());
44 pair->SetMomenta2(p2.X(), p2.Y(), p2.Z(), p2.E());
45 pair->SetTrueMomenta2(p2.X(), p2.Y(), p2.Z(), p2.E());
51 if (fGrouping.GroupByKStar()) {
52 const Int_t defSize = 100;
53 for (
int bin = 0; bin < fGrouping.GetNbins(); bin++) {
54 const Double_t kstar = fCentersX[bin] * scale;
55 fSignalPairs[bin]->ExpandCreateFast(defSize);
56 for (
int i = 0; i < defSize; i++) {
57 pair = (FemtoMicroPair*) fSignalPairs[bin]->UncheckedAt(i);
58 gRandom->Sphere(x, y, z, kstar);
63 const Int_t defSize = 1;
64 const int binY = fCentersY.
GetSize();
65 const int binX = fCentersX.
GetSize();
66 for (
int bin = 0; bin < fGrouping.GetNbins(); bin++) {
67 fSignalPairs[bin]->ExpandCreateFast(defSize * binY * binX);
69 for (
int biny = 0; biny < binY; biny++) {
70 for (
int binx = 0; binx < binX; binx++) {
71 pair = (FemtoMicroPair*) fSignalPairs[bin]->UncheckedAt(count++);
72 z = fCentersZ[bin] * scale;
73 y = fCentersY[biny] * scale;
74 x = fCentersX[binx] * scale;
75 if (gRandom->Uniform() < 0.5) x = -x;
76 if (gRandom->Uniform() < 0.5) y = -y;
77 if (gRandom->Uniform() < 0.5) z = -z;
85 Bool_t CorrFitPairGeneratorSimple::Init() {
86 auto val = CorrFitPairGenerator::Init();
87 if (fFrame != Hal::Femto::EKinematics::kPRF)
88 Hal::Cout::PrintInfo(Form(
"CorrFitPairGeneratorSimple works correctly only with PRF frame"), EInfo::kError);
static void PrintInfo(TString text, Hal::EInfo status)