Skip to content

Commit 37874de

Browse files
authored
[PWGJE] Bug fix on jet finder selector eta (#14878)
1 parent f0a2ba2 commit 37874de

File tree

6 files changed

+29
-6
lines changed

6 files changed

+29
-6
lines changed

PWGJE/Core/JetFinder.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ void JetFinder::setParams()
3838
}
3939
float jetRForClustering = isReclustering ? 5.0 * jetR : jetR;
4040

41-
selGhosts = fastjet::SelectorEtaRange(ghostEtaMin, ghostEtaMax) && fastjet::SelectorPhiRange(phiMin, phiMax);
41+
selGhosts = fastjet::SelectorRapRange(etaMin, etaMax) && fastjet::SelectorPhiRange(phiMin, phiMax); // note that this is rapidity not eta but since ghosts are effectively massless this is ok
4242
// ghostAreaSpec=fastjet::GhostedAreaSpec(selGhosts,ghostRepeatN,ghostArea,gridScatter,ktScatter,ghostktMean);
43-
ghostAreaSpec = fastjet::GhostedAreaSpec(selGhosts, ghostRepeatN, ghostArea, gridScatter, ktScatter, ghostktMean); // the first argument is rapidity not pseudorapidity, to be checked
43+
ghostAreaSpec = fastjet::GhostedAreaSpec(selGhosts, ghostRepeatN, ghostArea, gridScatter, ktScatter, ghostktMean);
4444
jetDef = fastjet::JetDefinition(fastjet::antikt_algorithm, jetRForClustering, recombScheme, strategy);
4545
if (fastjetExtraParam > -98.0) {
4646
jetDef.set_extra_param(fastjetExtraParam);

PWGJE/Core/JetFinder.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,22 +48,20 @@ class JetFinder
4848
/// \return ClusterSequenceArea object needed to access constituents
4949
// fastjet::ClusterSequenceArea findJets(std::vector<fastjet::PseudoJet> &inputParticles, std::vector<fastjet::PseudoJet> &jets);
5050

51-
float phiMin = 0.;
51+
float phiMin = -2. * M_PI;
5252
float phiMax = 2. * M_PI;
5353
float etaMin = -.9;
5454
float etaMax = .9;
5555

5656
float jetR = .4;
5757
float jetPtMin = 0.;
5858
float jetPtMax = 1000.;
59-
float jetPhiMin = 0.;
59+
float jetPhiMin = -2. * M_PI;
6060
float jetPhiMax = 2. * M_PI;
6161
float jetEtaMin = -99.;
6262
float jetEtaMax = 99.;
6363
bool jetEtaDefault = false;
6464

65-
float ghostEtaMin = -.9;
66-
float ghostEtaMax = .9;
6765
float ghostArea = .005;
6866
int ghostRepeatN = 1;
6967
double ghostktMean = 1.e-100;

PWGJE/JetFinders/jetFinder.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ struct JetFinderTask {
9696
o2::framework::Configurable<std::vector<double>> jetRadius{"jetRadius", {0.4}, "jet resolution parameters"};
9797
o2::framework::Configurable<float> jetPtMin{"jetPtMin", 0.0, "minimum jet pT"};
9898
o2::framework::Configurable<float> jetPtMax{"jetPtMax", 1000.0, "maximum jet pT"};
99+
o2::framework::Configurable<float> jetPhiMin{"jetPhiMin", -99.0, "minimum jet phi"};
100+
o2::framework::Configurable<float> jetPhiMax{"jetPhiMax", 99.0, "maximum jet phi"};
99101
o2::framework::Configurable<float> jetEWSPtMin{"jetEWSPtMin", 0.0, "minimum event-wise subtracted jet pT"};
100102
o2::framework::Configurable<float> jetEWSPtMax{"jetEWSPtMax", 1000.0, "maximum event-wise subtracted jet pT"};
101103
o2::framework::Configurable<float> jetEtaMin{"jetEtaMin", -99.0, "minimum jet pseudorapidity"};
@@ -135,11 +137,16 @@ struct JetFinderTask {
135137
jetFinder.etaMax = trackEtaMax;
136138
jetFinder.phiMin = trackPhiMin;
137139
jetFinder.phiMax = trackPhiMax;
140+
if (jetPhiMin < -98.0) {
141+
jetFinder.jetPhiMin = -2. * M_PI;
142+
jetFinder.jetPhiMax = 2. * M_PI;
143+
}
138144
jetFinder.jetEtaMin = jetEtaMin;
139145
jetFinder.jetEtaMax = jetEtaMax;
140146
if (jetEtaMin < -98.0) {
141147
jetFinder.jetEtaDefault = true;
142148
}
149+
143150
jetFinder.algorithm = static_cast<fastjet::JetAlgorithm>(static_cast<int>(jetAlgorithm));
144151
jetFinder.recombScheme = static_cast<fastjet::RecombinationScheme>(static_cast<int>(jetRecombScheme));
145152
jetFinder.ghostArea = jetGhostArea;

PWGJE/JetFinders/jetFinderHF.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ struct JetFinderHFTask {
101101
o2::framework::Configurable<std::vector<double>> jetRadius{"jetRadius", {0.4}, "jet resolution parameters"};
102102
o2::framework::Configurable<float> jetPtMin{"jetPtMin", 0.0, "minimum jet pT"};
103103
o2::framework::Configurable<float> jetPtMax{"jetPtMax", 1000.0, "maximum jet pT"};
104+
o2::framework::Configurable<float> jetPhiMin{"jetPhiMin", -99.0, "minimum jet phi"};
105+
o2::framework::Configurable<float> jetPhiMax{"jetPhiMax", 99.0, "maximum jet phi"};
104106
o2::framework::Configurable<float> jetEWSPtMin{"jetEWSPtMin", 0.0, "minimum event-wise subtracted jet pT"};
105107
o2::framework::Configurable<float> jetEWSPtMax{"jetEWSPtMax", 1000.0, "maximum event-wise subtracted jet pT"};
106108
o2::framework::Configurable<float> jetEtaMin{"jetEtaMin", -99.0, "minimum jet pseudorapidity"};
@@ -140,6 +142,10 @@ struct JetFinderHFTask {
140142
jetFinder.etaMax = trackEtaMax;
141143
jetFinder.jetPtMin = jetPtMin;
142144
jetFinder.jetPtMax = jetPtMax;
145+
if (jetPhiMin < -98.0) {
146+
jetFinder.jetPhiMin = -2. * M_PI;
147+
jetFinder.jetPhiMax = 2. * M_PI;
148+
}
143149
jetFinder.jetEtaMin = jetEtaMin;
144150
jetFinder.jetEtaMax = jetEtaMax;
145151
if (jetEtaMin < -98.0) {

PWGJE/JetFinders/jetFinderHFHFBar.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ struct JetFinderHFHFBarTask {
101101
o2::framework::Configurable<std::vector<double>> jetRadius{"jetRadius", {0.4}, "jet resolution parameters"};
102102
o2::framework::Configurable<float> jetPtMin{"jetPtMin", 0.0, "minimum jet pT"};
103103
o2::framework::Configurable<float> jetPtMax{"jetPtMax", 1000.0, "maximum jet pT"};
104+
o2::framework::Configurable<float> jetPhiMin{"jetPhiMin", -99.0, "minimum jet phi"};
105+
o2::framework::Configurable<float> jetPhiMax{"jetPhiMax", 99.0, "maximum jet phi"};
104106
o2::framework::Configurable<float> jetEWSPtMin{"jetEWSPtMin", 0.0, "minimum event-wise subtracted jet pT"};
105107
o2::framework::Configurable<float> jetEWSPtMax{"jetEWSPtMax", 1000.0, "maximum event-wise subtracted jet pT"};
106108
o2::framework::Configurable<float> jetEtaMin{"jetEtaMin", -99.0, "minimum jet pseudorapidity"};
@@ -137,6 +139,10 @@ struct JetFinderHFHFBarTask {
137139
jetFinder.etaMax = trackEtaMax;
138140
jetFinder.jetPtMin = jetPtMin;
139141
jetFinder.jetPtMax = jetPtMax;
142+
if (jetPhiMin < -98.0) {
143+
jetFinder.jetPhiMin = -2. * M_PI;
144+
jetFinder.jetPhiMax = 2. * M_PI;
145+
}
140146
jetFinder.jetEtaMin = jetEtaMin;
141147
jetFinder.jetEtaMax = jetEtaMax;
142148
if (jetEtaMin < -98.0) {

PWGJE/JetFinders/jetFinderV0.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ struct JetFinderV0Task {
8383
o2::framework::Configurable<std::vector<double>> jetRadius{"jetRadius", {0.4}, "jet resolution parameters"};
8484
o2::framework::Configurable<float> jetPtMin{"jetPtMin", 0.0, "minimum jet pT"};
8585
o2::framework::Configurable<float> jetPtMax{"jetPtMax", 1000.0, "maximum jet pT"};
86+
o2::framework::Configurable<float> jetPhiMin{"jetPhiMin", -99.0, "minimum jet phi"};
87+
o2::framework::Configurable<float> jetPhiMax{"jetPhiMax", 99.0, "maximum jet phi"};
8688
o2::framework::Configurable<float> jetEtaMin{"jetEtaMin", -99.0, "minimum jet pseudorapidity"};
8789
o2::framework::Configurable<float> jetEtaMax{"jetEtaMax", 99.0, "maximum jet pseudorapidity"};
8890
o2::framework::Configurable<int> jetTypeParticleLevel{"jetTypeParticleLevel", 1, "Type of stored jets. 0 = full, 1 = charged, 2 = neutral"};
@@ -121,6 +123,10 @@ struct JetFinderV0Task {
121123
jetFinder.etaMax = trackEtaMax;
122124
jetFinder.jetPtMin = jetPtMin;
123125
jetFinder.jetPtMax = jetPtMax;
126+
if (jetPhiMin < -98.0) {
127+
jetFinder.jetPhiMin = -2. * M_PI;
128+
jetFinder.jetPhiMax = 2. * M_PI;
129+
}
124130
jetFinder.jetEtaMin = jetEtaMin;
125131
jetFinder.jetEtaMax = jetEtaMax;
126132
if (jetEtaMin < -98.0) {

0 commit comments

Comments
 (0)