Skip to content

Commit f6d2de5

Browse files
miranov25miranov25
andauthored
O2-6235 - change pt range and bug fix (#2270)
* O2-6235 - change pt range and bug fix kMaxInvPt to 2 (pt>0.5) make the inv_pt independent of the pt scale --------- Co-authored-by: miranov25 <marian.ivanov@cern.cg>
1 parent f102e9e commit f6d2de5

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

MC/config/common/external/generator/performanceGenerator.C

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,8 @@ namespace o2
208208
};
209209

210210
// pT bounds: Max pT ~5 TeV (ALICE Pb-Pb energy)
211-
const float kMaxInvPt = 1.0f; // Min pT = 1 GeV
212-
const float kBaseMinInvPt = 2e-4f; // Max pT = 5000 GeV (unscaled)
211+
const float kMaxInvPt = 2.f; // Min pT = 0.5 GeV
212+
const float kMinInvPt = 2e-4f; // Max pT = 5000 GeV (unscaled)
213213

214214
// Check if particle is a parton (quark/gluon, status=11)
215215
bool isParton(int& pdgCode)
@@ -261,8 +261,7 @@ namespace o2
261261
// 3. Status: 11 for partons (jets), 1 for final-state
262262
int status = isParton(pdgCode) ? 11 : 1;
263263
// 4. Kinematics (flat 1/pT, max ~5000 GeV / pTScale)
264-
float min_inv_pt = kBaseMinInvPt / pTScale; // E.g., max pT=40,000 GeV for b quarks
265-
float inv_pt = (gRandom->Rndm() / pTScale) * (kMaxInvPt - min_inv_pt) + min_inv_pt;
264+
float inv_pt = gRandom->Rndm() * (kMaxInvPt - kMinInvPt) + kMinInvPt;
266265
float pt = 1.0f / inv_pt;
267266
float phi = gRandom->Rndm() * 2.0f * TMath::Pi();
268267
float eta = gRandom->Rndm() * 3.0f - 1.5f; // ALICE TPC: -1.5 to 1.5

0 commit comments

Comments
 (0)