Skip to content

Commit 35efc45

Browse files
committed
made the mass and pt cut configurable
1 parent 272c31d commit 35efc45

2 files changed

Lines changed: 12 additions & 7 deletions

File tree

‎MC/config/PWGLF/ini/GeneratorLF_doublephi_triggerMasspTcut.ini‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[GeneratorExternal]
22
fileName=${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGLF/pythia8/generator_pythia8_twophi_triggerMassCut.C
3-
funcName=generateDoublePhi(0, 0.0, 100.0, 0.8)
3+
funcName=generateDoublePhi(0, 0.0, 100.0, 0.8, 2.4, 6.0)
44

55
[GeneratorPythia8]
66
config=${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGLF/pythia8/generator/pythia8_inel_136tev.cfg

‎MC/config/PWGLF/pythia8/generator_pythia8_twophi_triggerMassCut.C‎

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,17 @@ class GeneratorPythia8DoublePhi : public o2::eventgen::GeneratorPythia8
2525
{
2626
public:
2727
/// Constructor
28-
GeneratorPythia8DoublePhi(int gapSize = 0, double minPt = 0.0, double maxPt = 100.0, double maxEta = 0.8)
28+
GeneratorPythia8DoublePhi(int gapSize = 0, double minPt = 0.0, double maxPt = 100.0, double maxEta = 0.8, double minPairMass = 2.4, double minPairPt = 6.0)
2929
: o2::eventgen::GeneratorPythia8(),
3030
mGapSize(gapSize),
3131
mMinPt(minPt),
3232
mMaxPt(maxPt),
33-
mMaxEta(maxEta)
33+
mMaxEta(maxEta),
34+
mMinPairMass(minPairMass),
35+
mMinPairPt(minPairPt)
3436
{
35-
fmt::printf(">> Pythia8 generator: two phi(1020) mesons, gap = %d, minPtPhi = %f, maxPtPhi = %f, |etaPhi| < %f\n", gapSize, minPt, maxPt, maxEta);
37+
fmt::printf(">> Pythia8 generator: two phi(1020) mesons, gap = %d, minPtPhi = %f, maxPtPhi = %f, |etaPhi| < %f, minPairMass = %f, minPairPt = %f\n",
38+
gapSize, minPt, maxPt, maxEta, minPairMass, minPairPt);
3639
}
3740
/// Destructor
3841
~GeneratorPythia8DoublePhi() = default;
@@ -156,7 +159,7 @@ protected:
156159
double mass = phiPhi.M();
157160
double pt = phiPhi.Pt();
158161

159-
if (mass > 2.4 && pt > 4.0)
162+
if (mass > mMinPairMass && pt > mMinPairPt)
160163
return true;
161164
}
162165
}
@@ -169,13 +172,15 @@ private:
169172
double mMinPt{0.0};
170173
double mMaxPt{100.0};
171174
double mMaxEta{0.8};
175+
double mMinPairMass{2.4};
176+
double mMinPairPt{6.0};
172177
uint64_t mGeneratedEvents{0};
173178
};
174179

175180
///___________________________________________________________
176-
FairGenerator *generateDoublePhi(int gap = 0, double minPt = 0.0, double maxPt = 100.0, double maxEta = 0.8)
181+
FairGenerator *generateDoublePhi(int gap = 0, double minPt = 0.0, double maxPt = 100.0, double maxEta = 0.8, double minPairMass = 2.4, double minPairPt = 6.0)
177182
{
178-
auto myGenerator = new GeneratorPythia8DoublePhi(gap, minPt, maxPt, maxEta);
183+
auto myGenerator = new GeneratorPythia8DoublePhi(gap, minPt, maxPt, maxEta, minPairMass, minPairPt);
179184

180185
myGenerator->readString("333:onMode = off");
181186
myGenerator->readString("333:onIfMatch = 321 -321");

0 commit comments

Comments
 (0)