Skip to content

Commit 7c115a3

Browse files
Wooseok HamWooseok Ham
authored andcommitted
PWGJE: modify the delta pT methods
1 parent f28f5c4 commit 7c115a3

File tree

1 file changed

+26
-20
lines changed

1 file changed

+26
-20
lines changed

PWGJE/Tasks/jetBackgroundAnalysis.cxx

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -119,32 +119,36 @@ struct JetBackgroundAnalysisTask {
119119
float randomConeEta = randomNumber.Uniform(trackEtaMin + randomConeR, trackEtaMax - randomConeR);
120120
float randomConePhi = randomNumber.Uniform(0.0, 2 * M_PI);
121121
float randomConePt = 0;
122-
for (auto const& track : tracks) {
123-
if (jetderiveddatautilities::selectTrack(track, trackSelection)) {
124-
float dPhi = RecoDecay::constrainAngle(track.phi() - randomConePhi, static_cast<float>(-M_PI));
125-
float dEta = track.eta() - randomConeEta;
126-
if (TMath::Sqrt(dEta * dEta + dPhi * dPhi) < randomConeR) {
127-
randomConePt += track.pt();
122+
if (jets.size() > 0) { // Since the purpose of the fluctuation measurement is jet correction, events with zero accepted jets (from the jetfinder cuts) are excluded
123+
for (auto const& track : tracks) {
124+
if (jetderiveddatautilities::selectTrack(track, trackSelection)) {
125+
float dPhi = RecoDecay::constrainAngle(track.phi() - randomConePhi, static_cast<float>(-M_PI));
126+
float dEta = track.eta() - randomConeEta;
127+
if (TMath::Sqrt(dEta * dEta + dPhi * dPhi) < randomConeR) {
128+
randomConePt += track.pt();
129+
}
128130
}
129131
}
132+
registry.fill(HIST("h2_centrality_rhorandomcone"), collision.centFT0M(), randomConePt - M_PI * randomConeR * randomConeR * collision.rho());
130133
}
131-
registry.fill(HIST("h2_centrality_rhorandomcone"), collision.centFT0M(), randomConePt - M_PI * randomConeR * randomConeR * collision.rho());
132134

133135
// randomised eta,phi for tracks, to assess part of fluctuations coming from statistically independently emitted particles
134136
randomConePt = 0;
135-
for (auto const& track : tracks) {
136-
if (jetderiveddatautilities::selectTrack(track, trackSelection)) {
137-
float dPhi = RecoDecay::constrainAngle(randomNumber.Uniform(0.0, 2 * M_PI) - randomConePhi, static_cast<float>(-M_PI)); // ignores actual phi of track
138-
float dEta = randomNumber.Uniform(trackEtaMin, trackEtaMax) - randomConeEta; // ignores actual eta of track
139-
if (TMath::Sqrt(dEta * dEta + dPhi * dPhi) < randomConeR) {
140-
randomConePt += track.pt();
137+
if (jets.size() > 0) { // Since the purpose of the fluctuation measurement is jet correction, events with zero accepted jets (from the jetfinder cuts) are excluded
138+
for (auto const& track : tracks) {
139+
if (jetderiveddatautilities::selectTrack(track, trackSelection)) {
140+
float dPhi = RecoDecay::constrainAngle(randomNumber.Uniform(0.0, 2 * M_PI) - randomConePhi, static_cast<float>(-M_PI)); // ignores actual phi of track
141+
float dEta = randomNumber.Uniform(trackEtaMin, trackEtaMax) - randomConeEta; // ignores actual eta of track
142+
if (TMath::Sqrt(dEta * dEta + dPhi * dPhi) < randomConeR) {
143+
randomConePt += track.pt();
144+
}
141145
}
142146
}
147+
registry.fill(HIST("h2_centrality_rhorandomconerandomtrackdirection"), collision.centFT0M(), randomConePt - M_PI * randomConeR * randomConeR * collision.rho());
143148
}
144-
registry.fill(HIST("h2_centrality_rhorandomconerandomtrackdirection"), collision.centFT0M(), randomConePt - M_PI * randomConeR * randomConeR * collision.rho());
145149

146150
// removing the leading jet from the random cone
147-
if (jets.size() > 0) { // if there are no jets in the acceptance (from the jetfinder cuts) then there can be no leading jet
151+
if (jets.size() > 0) { // Since the purpose of the fluctuation measurement is jet correction, events with zero accepted jets (from the jetfinder cuts) are excluded
148152
float dPhiLeadingJet = RecoDecay::constrainAngle(jets.iteratorAt(0).phi() - randomConePhi, static_cast<float>(-M_PI));
149153
float dEtaLeadingJet = jets.iteratorAt(0).eta() - randomConeEta;
150154

@@ -168,30 +172,32 @@ struct JetBackgroundAnalysisTask {
168172
}
169173
}
170174
}
175+
registry.fill(HIST("h2_centrality_rhorandomconewithoutleadingjet"), collision.centFT0M(), randomConePt - M_PI * randomConeR * randomConeR * collision.rho());
171176
}
172-
registry.fill(HIST("h2_centrality_rhorandomconewithoutleadingjet"), collision.centFT0M(), randomConePt - M_PI * randomConeR * randomConeR * collision.rho());
173177

174178
// randomised eta,phi for tracks, to assess part of fluctuations coming from statistically independently emitted particles, removing tracks from 2 leading jets
175179
double randomConePtWithoutOneLeadJet = 0;
176180
double randomConePtWithoutTwoLeadJet = 0;
177-
if (jets.size() > 1) { // if there are no jets, or just one, in the acceptance (from the jetfinder cuts) then one cannot find 2 leading jets
181+
if (jets.size() > 0) { // Since the purpose of the fluctuation measurement is jet correction, events with zero accepted jets (from the jetfinder cuts) are excluded
178182
for (auto const& track : tracks) {
179183
if (jetderiveddatautilities::selectTrack(track, trackSelection)) {
180184
float dPhi = RecoDecay::constrainAngle(randomNumber.Uniform(0.0, 2 * M_PI) - randomConePhi, static_cast<float>(-M_PI)); // ignores actual phi of track
181185
float dEta = randomNumber.Uniform(trackEtaMin, trackEtaMax) - randomConeEta; // ignores actual eta of track
182186
if (TMath::Sqrt(dEta * dEta + dPhi * dPhi) < randomConeR) {
183187
if (!trackIsInJet(track, jets.iteratorAt(0))) {
184188
randomConePtWithoutOneLeadJet += track.pt();
185-
if (!trackIsInJet(track, jets.iteratorAt(1))) {
189+
if (jets.size() > 1 && !trackIsInJet(track, jets.iteratorAt(1))) { // if there are jets in the acceptance (from the jetfinder cuts) less than two then one cannot find 2 leading jets
186190
randomConePtWithoutTwoLeadJet += track.pt();
187191
}
188192
}
189193
}
190194
}
191195
}
196+
registry.fill(HIST("h2_centrality_rhorandomconerandomtrackdirectionwithoutoneleadingjets"), collision.centFT0M(), randomConePtWithoutOneLeadJet - M_PI * randomConeR * randomConeR * collision.rho());
197+
if (jets.size() > 1) {
198+
registry.fill(HIST("h2_centrality_rhorandomconerandomtrackdirectionwithouttwoleadingjets"), collision.centFT0M(), randomConePtWithoutTwoLeadJet - M_PI * randomConeR * randomConeR * collision.rho());
199+
}
192200
}
193-
registry.fill(HIST("h2_centrality_rhorandomconerandomtrackdirectionwithoutoneleadingjets"), collision.centFT0M(), randomConePtWithoutOneLeadJet - M_PI * randomConeR * randomConeR * collision.rho());
194-
registry.fill(HIST("h2_centrality_rhorandomconerandomtrackdirectionwithouttwoleadingjets"), collision.centFT0M(), randomConePtWithoutTwoLeadJet - M_PI * randomConeR * randomConeR * collision.rho());
195201
}
196202

197203
void processRho(soa::Filtered<soa::Join<aod::JetCollisions, aod::BkgChargedRhos>>::iterator const& collision, soa::Filtered<aod::JetTracks> const& tracks)

0 commit comments

Comments
 (0)