@@ -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
@@ -402,8 +412,8 @@ struct HadronPhotonCorrelation {
402412 if (!initTrig (track)) {
403413 continue ;
404414 }
405- float dphi = RecoDecay::constrainAngle (track .phi () - v0 .phi (), -PIHalf);
406- registry.fill (HIST (" reconstructed/photons/hPhotonCorrelReco" ), track.pt (), v0.pt (), track .eta () - v0 .eta (), dphi);
415+ float dphi = RecoDecay::constrainAngle (v0 .phi () - track .phi (), -PIHalf);
416+ registry.fill (HIST (" reconstructed/photons/hPhotonCorrelReco" ), track.pt (), v0.pt (), v0 .eta () - track .eta (), dphi);
407417 }
408418 }
409419 registry.fill (HIST (" reconstructed/photons/hPhotonMultReco" ), nPhotons);
@@ -442,8 +452,8 @@ struct HadronPhotonCorrelation {
442452 if (!initTrig (track)) {
443453 continue ;
444454 }
445- float dphi = RecoDecay::constrainAngle (track .phi () - v0 .phi (), -PIHalf);
446- registry.fill (HIST (" reconstructed/photons/hPhotonCorrelReco" ), track.pt (), v0.pt (), track .eta () - v0 .eta (), dphi);
455+ float dphi = RecoDecay::constrainAngle (v0 .phi () - track .phi (), -PIHalf);
456+ registry.fill (HIST (" reconstructed/photons/hPhotonCorrelReco" ), track.pt (), v0.pt (), v0 .eta () - track .eta (), dphi);
447457 }
448458 }
449459 registry.fill (HIST (" reconstructed/photons/hPhotonMultReco" ), nPhotons);
@@ -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
@@ -507,8 +518,8 @@ struct HadronPhotonCorrelation {
507518 if (!initParticle (track_assoc)) {
508519 continue ;
509520 }
510- float dphi = RecoDecay::constrainAngle (track_trig .phi () - track_assoc .phi (), -PIHalf);
511- registry.fill (HIST (" generated/photons/hPhotonCorrelGen" ), track_trig.pt (), track_assoc.pt (), track_trig .eta () - track_assoc .eta (), dphi, photonGeneration);
521+ float dphi = RecoDecay::constrainAngle (track_assoc .phi () - track_trig .phi (), -PIHalf);
522+ registry.fill (HIST (" generated/photons/hPhotonCorrelGen" ), track_trig.pt (), track_assoc.pt (), track_assoc .eta () - track_trig .eta (), dphi, photonGeneration);
512523 }
513524 }
514525
@@ -550,8 +561,8 @@ struct HadronPhotonCorrelation {
550561 if (!initTrig (track_trig)) {
551562 continue ;
552563 }
553- float dphi = RecoDecay::constrainAngle (track_trig .phi () - track_assoc .phi (), -PIHalf);
554- registry.fill (HIST (" reconstructed/hadrons/hadrons/hHadronCorrelReco" ), track_trig.pt (), track_assoc.pt (), track_trig .eta () - track_assoc .eta (), dphi);
564+ float dphi = RecoDecay::constrainAngle (track_assoc .phi () - track_trig .phi (), -PIHalf);
565+ registry.fill (HIST (" reconstructed/hadrons/hadrons/hHadronCorrelReco" ), track_trig.pt (), track_assoc.pt (), track_assoc .eta () - track_trig .eta (), dphi);
555566 }
556567 }
557568 registry.fill (HIST (" reconstructed/hadrons/hHadronMultReco" ), nHadrons);
@@ -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
@@ -586,9 +597,9 @@ struct HadronPhotonCorrelation {
586597 if (track_trig == track_assoc) {
587598 continue ;
588599 }
589- float dphi = RecoDecay::constrainAngle (track_trig .phi () - track_assoc .phi (), -PIHalf);
600+ float dphi = RecoDecay::constrainAngle (track_assoc .phi () - track_trig .phi (), -PIHalf);
590601
591- registry.fill (HIST (" generated/hadrons/hHadronCorrelGen" ), track_trig.pt (), track_assoc.pt (), track_trig .eta () - track_assoc .eta (), dphi);
602+ registry.fill (HIST (" generated/hadrons/hHadronCorrelGen" ), track_trig.pt (), track_assoc.pt (), track_assoc .eta () - track_trig .eta (), dphi);
592603 }
593604 }
594605 registry.fill (HIST (" generated/hadrons/hHadronMultGen" ), nHadrons);
@@ -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
@@ -641,9 +652,9 @@ struct HadronPhotonCorrelation {
641652 if (!initTrig (track_trig)) {
642653 continue ;
643654 }
644- float dphi = RecoDecay::constrainAngle (track_trig .phi () - track_assoc .phi (), -PIHalf);
655+ float dphi = RecoDecay::constrainAngle (track_assoc .phi () - track_trig .phi (), -PIHalf);
645656
646- registry.fill (HIST (" reconstructed/hadrons/hHadronCorrelReco" ), track_trig.pt (), track_assoc.pt (), track_trig .eta () - track_assoc .eta (), dphi);
657+ registry.fill (HIST (" reconstructed/hadrons/hHadronCorrelReco" ), track_trig.pt (), track_assoc.pt (), track_assoc .eta () - track_trig .eta (), dphi);
647658 }
648659 }
649660 registry.fill (HIST (" reconstructed/hadrons/hHadronMultReco" ), nHadrons);
@@ -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 ());
@@ -687,8 +698,8 @@ struct HadronPhotonCorrelation {
687698 if (!initTrig (track_trig)) {
688699 continue ;
689700 }
690- float dphi = RecoDecay::constrainAngle (track_trig .phi () - track_assoc .phi (), -PIHalf);
691- registry.fill (HIST (" reconstructed/charged/hPionCorrelReco" ), track_trig.pt (), track_assoc.pt (), track_trig .eta () - track_assoc .eta (), dphi);
701+ float dphi = RecoDecay::constrainAngle (track_assoc .phi () - track_trig .phi (), -PIHalf);
702+ registry.fill (HIST (" reconstructed/charged/hPionCorrelReco" ), track_trig.pt (), track_assoc.pt (), track_assoc .eta () - track_trig .eta (), dphi);
692703 }
693704 }
694705 registry.fill (HIST (" reconstructed/charged/hPionMultReco" ), nPions);
@@ -719,9 +730,9 @@ struct HadronPhotonCorrelation {
719730 if (track_trig == track_assoc) {
720731 continue ;
721732 }
722- float dphi = RecoDecay::constrainAngle (track_trig .phi () - track_assoc .phi (), -PIHalf);
733+ float dphi = RecoDecay::constrainAngle (track_assoc .phi () - track_trig .phi (), -PIHalf);
723734
724- registry.fill (HIST (" generated/charged/hPionCorrelGen" ), track_trig.pt (), track_assoc.pt (), track_trig .eta () - track_assoc .eta (), dphi);
735+ registry.fill (HIST (" generated/charged/hPionCorrelGen" ), track_trig.pt (), track_assoc.pt (), track_assoc .eta () - track_trig .eta (), dphi);
725736 }
726737 }
727738 registry.fill (HIST (" generated/charged/hPionMultGen" ), nPions);
@@ -764,8 +775,8 @@ struct HadronPhotonCorrelation {
764775 if (!initTrig (track_trig)) {
765776 continue ;
766777 }
767- float dphi = RecoDecay::constrainAngle (track_trig .phi () - track_assoc .phi (), -PIHalf);
768- registry.fill (HIST (" reconstructed/charged/hPionCorrelReco" ), track_trig.pt (), track_assoc.pt (), track_trig .eta () - track_assoc .eta (), dphi);
778+ float dphi = RecoDecay::constrainAngle (track_assoc .phi () - track_trig .phi (), -PIHalf);
779+ registry.fill (HIST (" reconstructed/charged/hPionCorrelReco" ), track_trig.pt (), track_assoc.pt (), track_assoc .eta () - track_trig .eta (), dphi);
769780 }
770781 }
771782 registry.fill (HIST (" reconstructed/charged/hPionMultReco" ), nPions);
@@ -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