Skip to content

Commit a178e8f

Browse files
committed
PWGLF: Change Xi/Om spectra for injection
1 parent 5672afa commit a178e8f

File tree

1 file changed

+40
-2
lines changed

1 file changed

+40
-2
lines changed

MC/config/PWGLF/pythia8/generator_pythia8_extraStrangeness.C

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,22 @@ public:
3737
xProd=0.; yProd=0.; zProd=0.;
3838

3939
fLVHelper = std::make_unique<TLorentzVector>();
40+
41+
fSpectrumXi = std::make_unique<TF1>("fSpectrumXi", this, &GeneratorPythia8ExtraStrangeness::boltzPlusPower, 0., genMaxPt, 5, "GeneratorPythia8ExtraStrangeness", "boltzPlusPower");
42+
43+
fSpectrumXi->FixParameter(0, 1.32171);
44+
fSpectrumXi->FixParameter(1, 4.84e-1);
45+
fSpectrumXi->FixParameter(2, 111.9);
46+
fSpectrumXi->FixParameter(3, -2.56511e+00);
47+
fSpectrumXi->FixParameter(4, 1.14011e-04);
48+
49+
fSpectrumOm = std::make_unique<TF1>("fSpectrumOm", this, &GeneratorPythia8ExtraStrangeness::boltzPlusPower, 0., genMaxPt, 5, "GeneratorPythia8ExtraStrangeness", "boltzPlusPower");
50+
51+
fSpectrumXi->FixParameter(0, 1.67245e+00);
52+
fSpectrumXi->FixParameter(1, 5.18174e-01);
53+
fSpectrumXi->FixParameter(2, 1.73747e+01);
54+
fSpectrumXi->FixParameter(3, -2.56681e+00);
55+
fSpectrumXi->FixParameter(4, 1.87513e-04);
4056
}
4157

4258
Double_t y2eta(Double_t pt, Double_t mass, Double_t y){
@@ -85,7 +101,7 @@ public:
85101
ranGenerator->SetSeed(0);
86102

87103
// generate transverse momentum
88-
const double gen_pT = ranGenerator->Uniform(0,5);
104+
const double gen_pT = fSpectraXi->GetRandom(genMinPt,genMaxPt);
89105

90106
//Actually could be something else without loss of generality but okay
91107
const double gen_phi = ranGenerator->Uniform(0,2*TMath::Pi());
@@ -111,7 +127,7 @@ public:
111127
ranGenerator->SetSeed(0);
112128

113129
// generate transverse momentum
114-
const double gen_pT = ranGenerator->Uniform(0,5);
130+
const double gen_pT = fSpectraOm->GetRandom(genMinPt,genMaxPt);
115131

116132
//Actually could be something else without loss of generality but okay
117133
const double gen_phi = ranGenerator->Uniform(0,2*TMath::Pi());
@@ -129,6 +145,26 @@ public:
129145
set4momentum(fLVHelper->Px(),fLVHelper->Py(),fLVHelper->Pz());
130146
}
131147

148+
Double_t boltzPlusPower(const Double_t *x, const Double_t *p)
149+
{
150+
// a plain parametrization. not meant to be physics worthy.
151+
// adjusted to match preliminary 5 TeV shape.
152+
153+
Double_t pt = x[0];
154+
Double_t mass = p[0];
155+
Double_t mt = TMath::Sqrt(pt * pt + mass * mass);
156+
Double_t T = p[1];
157+
Double_t norm = p[2];
158+
159+
Double_t lowptpart = mt * TMath::Exp(-mt / T);
160+
Double_t highptpart = p[4]*TMath::Power(x[0], p[3]);
161+
162+
Double_t mixup = 1./(1.+TMath::Exp((x[0]-4.5)/.1));
163+
164+
//return pt * norm * (mixup * mt * TMath::Exp(-mt / T) + (1.-mixup)*highptpart) ;
165+
return pt * norm * (mt * TMath::Exp(-mt / T) + (1.-mixup)*highptpart) ;
166+
}
167+
132168
//__________________________________________________________________
133169
Bool_t generateEvent() override {
134170

@@ -235,6 +271,8 @@ private:
235271
double zProd; /// z-coordinate position production vertex [cm]
236272

237273
std::unique_ptr<TLorentzVector> fLVHelper;
274+
std::unique_ptr<TF1> fSpectrumXi;
275+
std::unique_ptr<TF1> fSpectrumOm;
238276
};
239277

240278
FairGenerator *generator_extraStrangeness()

0 commit comments

Comments
 (0)