Skip to content

Commit b3b0157

Browse files
committed
Modify cuts for mother hadrons and decay photons
1 parent 7812e52 commit b3b0157

File tree

1 file changed

+26
-14
lines changed

1 file changed

+26
-14
lines changed

PWGJE/Tasks/hadronPhotonCorrelation.cxx

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,12 @@ struct HadronPhotonCorrelation {
6464
Configurable<std::string> eventSelections{"eventSelections", "sel8", "choose event selection"};
6565
Configurable<std::string> trackSelections{"trackSelections", "globalTracks", "set track selections"};
6666

67+
Configurable<int> tpcNClsCrossedRows{"tpcNClsCrossedRows", 70, "tpcNClsCrossedRows"};
68+
Configurable<double> tpcCrossedRowsOverFindableCls{"tpcCrossedRowsOverFindableCls", 0.8, "tpcCrossedRowsOverFindableCls"};
69+
Configurable<double> tpcNSigmaPi{"tpcNSigmaPi", 2., "tpcNSigmaPi"};
70+
71+
const int pidCodeHadronCut = 100;
72+
6773
Configurable<float> etaMax{"etaMax", 0.8, "maximum eta cut"};
6874

6975
AxisSpec axisPhi = {72, 0., TwoPI, "#phi"}; // Axis for phi distribution
@@ -83,7 +89,7 @@ struct HadronPhotonCorrelation {
8389
AxisSpec axisMult = {100, 0., 99., "N_{ch}"}; // Axis for mutplipicity
8490
AxisSpec axisAlpha = {100, 0., 1., "alpha"}; // Axis for decay photon pt assymetry
8591

86-
AxisSpec axisDeltaRDecay = {100, 0., 0.8, "#Delta R"}; // Axis for Delta R = sqrt(Delta eta^2 + Delta phi^2) between neutral hadrons and decay photons
92+
AxisSpec axisDeltaRDecay = {400, 0., 3.2, "#Delta R"}; // Axis for Delta R = sqrt(Delta eta^2 + Delta phi^2) between neutral hadrons and decay photons
8793

8894
float ptMinTrig;
8995
float ptMaxTrig;
@@ -138,7 +144,7 @@ struct HadronPhotonCorrelation {
138144
////Neutral particles
139145
registry.add("generated/neutral/hNeutralCorrelGen", "Generated Trigger-Neutral Hadron Correlation", kTHnSparseF, {axisPtTrig, axisPtAssoc, axisDeltaEta, axisDeltaPhi, axisPid});
140146
registry.add("generated/neutral/hNeutralMultGen", "Generated Neutral Hadron Multiplicity", kTH1F, {axisMult});
141-
registry.add("generated/neutral/hNeutralSpectrumGen", "Generated Neutral Hadron Spectrum", kTHnSparseF, {axisPtAssoc, axisEta, axisPhi, axisPid}); // Particle ID of neutral hadrons
147+
registry.add("generated/neutral/hNeutralSpectrumGen", "Generated Neutral Hadron Spectrum", kTHnSparseF, {axisPtAssoc, axisEta, axisPhi, axisPid});
142148
registry.add("generated/neutral/hNeutralDecayGen", "Generated Neutral Hadron-Decay Photon Correlation", kTHnSparseF, {axisPtAssoc, axisDeltaPt, axisDeltaRDecay, axisAlpha, axisPid}); // Correlation with decay photons
143149

144150
// Reconstructed histograms
@@ -205,6 +211,10 @@ struct HadronPhotonCorrelation {
205211
return false;
206212
}
207213

214+
if (particle.getGenStatusCode() == -1) {
215+
return false;
216+
}
217+
208218
if (std::abs(particle.eta()) > etaMax) {
209219
return false;
210220
}
@@ -286,11 +296,11 @@ struct HadronPhotonCorrelation {
286296
return false;
287297
}
288298

289-
if (track.tpcNClsCrossedRows() < 70) {
299+
if (track.tpcNClsCrossedRows() < tpcNClsCrossedRows) {
290300
return false;
291301
}
292302

293-
if (track.tpcCrossedRowsOverFindableCls() < 0.8) {
303+
if (track.tpcCrossedRowsOverFindableCls() < tpcCrossedRowsOverFindableCls) {
294304
return false;
295305
}
296306

@@ -474,8 +484,9 @@ struct HadronPhotonCorrelation {
474484
}
475485

476486
auto pdgMother = pdg->GetParticle(mother.pdgCode());
477-
if (!pdgMother)
487+
if (!pdgMother) {
478488
continue;
489+
}
479490
int photonGeneration;
480491
switch (std::abs(origPhoton.getGenStatusCode())) {
481492
case 23: // prompt direct photons
@@ -572,7 +583,7 @@ struct HadronPhotonCorrelation {
572583
if (!pdgParticle || pdgParticle->Charge() == 0.) {
573584
continue;
574585
}
575-
if (std::abs(track_assoc.pdgCode()) < 100) {
586+
if (std::abs(track_assoc.pdgCode()) < pidCodeHadronCut) {
576587
continue;
577588
}
578589

@@ -618,7 +629,7 @@ struct HadronPhotonCorrelation {
618629
if (!pdgParticle || pdgParticle->Charge() == 0.) {
619630
continue;
620631
}
621-
if (std::abs(particle.pdgCode()) < 100) {
632+
if (std::abs(particle.pdgCode()) < pidCodeHadronCut) {
622633
continue;
623634
}
624635

@@ -671,7 +682,7 @@ struct HadronPhotonCorrelation {
671682
if (!initTrack(track_assoc)) {
672683
continue;
673684
}
674-
if (std::abs(track_assoc.tpcNSigmaPi()) > 2) {
685+
if (std::abs(track_assoc.tpcNSigmaPi()) > tpcNSigmaPi) {
675686
continue;
676687
} // remove non-pions
677688
registry.fill(HIST("reconstructed/charged/hPionSpectrumReco"), track_assoc.pt(), track_assoc.eta(), track_assoc.phi());
@@ -793,7 +804,7 @@ struct HadronPhotonCorrelation {
793804
if (pdgParticle->Charge() != 0.) {
794805
continue;
795806
} // remove charged particles
796-
if (track_assoc.pdgCode() < 100 || (PDG_t)track_assoc.pdgCode() == kNeutron) {
807+
if (track_assoc.pdgCode() < pidCodeHadronCut || (PDG_t)track_assoc.pdgCode() == kNeutron) {
797808
continue;
798809
} // remove non-hadrons and neutrons
799810
registry.fill(HIST("generated/neutral/hNeutralSpectrumGen"), track_assoc.pt(), track_assoc.eta(), track_assoc.phi(), pidCodes[pdgParticle->GetName()]);
@@ -802,7 +813,8 @@ struct HadronPhotonCorrelation {
802813
// Get correlations between neutral hadrons and their respective decay photons
803814
auto daughters = track_assoc.daughters_as<aod::JMcParticles>();
804815
double alpha = -1;
805-
if (daughters.size() == 2) {
816+
int nPhotonsPionDecay = 2;
817+
if (daughters.size() == nPhotonsPionDecay) {
806818
auto daughter = daughters.begin();
807819
double pt1 = daughter.pt();
808820
++daughter;
@@ -811,12 +823,12 @@ struct HadronPhotonCorrelation {
811823
}
812824

813825
for (const auto& daughter : daughters) {
814-
if ((PDG_t)std::abs(daughter.pdgCode()) != kGamma)
815-
continue;
816-
if (!initParticle(daughter, false))
826+
if ((PDG_t)std::abs(daughter.pdgCode()) != kGamma) {
817827
continue;
818-
if (!daughter.isPhysicalPrimary() && daughter.getGenStatusCode() == -1)
828+
}
829+
if (!daughter.isPhysicalPrimary() && daughter.getGenStatusCode() == -1) {
819830
continue;
831+
}
820832
double deltaPt = daughter.pt() / track_assoc.pt();
821833
double deltaEta = daughter.eta() - track_assoc.eta();
822834
double deltaPhi = RecoDecay::constrainAngle(daughter.phi() - track_assoc.phi(), -PIHalf);

0 commit comments

Comments
 (0)