@@ -349,8 +349,8 @@ struct Phianalysisrun3pbpb {
349349 return true ;
350350 }
351351 return false ;
352-
353- } else if (pidHypothesis == 1 ) {
352+ }
353+ if (pidHypothesis == 1 ) {
354354 constexpr double PtThresholdForTOF = 0.5 ;
355355 if (candidate.pt () < PtThresholdForTOF && std::abs (candidate.tpcNSigmaKa ()) < selectionConfig.nsigmacutTPC ) {
356356 return true ;
@@ -370,41 +370,48 @@ struct Phianalysisrun3pbpb {
370370 template <typename CollType>
371371 bool myEventSelections (const CollType& collision)
372372 {
373- if (selectionConfig.cutvz && !(std::abs (collision.posZ ()) < selectionConfig.cfgCutVertex ))
373+ if (selectionConfig.cutvz && !(std::abs (collision.posZ ()) < selectionConfig.cfgCutVertex )) {
374374 return false ;
375+ }
375376
376- if (!collision.sel8 ())
377+ if (!collision.sel8 ()) {
377378 return false ;
379+ }
378380
379- if (selectionConfig.selHasBC && !collision.has_foundBC ())
381+ if (selectionConfig.selHasBC && !collision.has_foundBC ()) {
380382 return false ;
383+ }
381384
382- if (selectionConfig.selHasFT0 && !collision.has_foundFT0 ())
385+ if (selectionConfig.selHasFT0 && !collision.has_foundFT0 ()) {
383386 return false ;
387+ }
384388
385- if (selectionConfig.additionalEvSel1 && !collision.selection_bit (aod::evsel::kNoTimeFrameBorder ))
389+ if (selectionConfig.additionalEvSel1 && !collision.selection_bit (aod::evsel::kNoTimeFrameBorder )) {
386390 return false ;
391+ }
387392
388- if (selectionConfig.additionalEvSel2 && !collision.selection_bit (aod::evsel::kNoITSROFrameBorder ))
393+ if (selectionConfig.additionalEvSel2 && !collision.selection_bit (aod::evsel::kNoITSROFrameBorder )) {
389394 return false ;
395+ }
390396
391- if (selectionConfig.additionalEvSel3 && !collision.selection_bit (aod::evsel::kNoSameBunchPileup ))
397+ if (selectionConfig.additionalEvSel3 && !collision.selection_bit (aod::evsel::kNoSameBunchPileup )) {
392398 return false ;
399+ }
393400
394- if (selectionConfig.additionalEvSel4 && !collision.selection_bit (o2::aod::evsel::kIsGoodITSLayersAll ))
401+ if (selectionConfig.additionalEvSel4 && !collision.selection_bit (o2::aod::evsel::kIsGoodITSLayersAll )) {
395402 return false ;
396- if (selectionConfig.additionalEvSel5 && !collision.selection_bit (o2::aod::evsel::kNoCollInTimeRangeStandard ))
403+ }
404+ if (selectionConfig.additionalEvSel5 && !collision.selection_bit (o2::aod::evsel::kNoCollInTimeRangeStandard )) {
397405 return false ;
398- if (selectionConfig.additionalEvSel6 && !collision.selection_bit (o2::aod::evsel::kIsGoodZvtxFT0vsPV ))
406+ }
407+ if (selectionConfig.additionalEvSel6 && !collision.selection_bit (o2::aod::evsel::kIsGoodZvtxFT0vsPV )) {
399408 return false ;
409+ }
400410 if (selectionConfig.isINELgt0 && !collision.isInelGt0 ()) {
401411 return false ;
402412 }
403413 int occupancy = collision.trackOccupancyInTimeRange ();
404- if (selectionConfig.fillOccupancy && (occupancy < cfgMinOccupancy || occupancy > cfgMaxOccupancy))
405- return false ;
406-
407- return true ;
414+ return !(selectionConfig.fillOccupancy && (occupancy < cfgMinOccupancy || occupancy > cfgMaxOccupancy));
408415 }
409416 template <typename CheckColCent>
410417 float selColMultMC (CheckColCent const & col)
@@ -435,18 +442,14 @@ struct Phianalysisrun3pbpb {
435442 template <typename T1 , typename T2 >
436443 bool selectionPair (const T1 & candidate1, const T2 & candidate2)
437444 {
438- double pt1, pt2, pz1, pz2, p1, p2, angle;
439- pt1 = candidate1.pt ();
440- pt2 = candidate2.pt ();
441- pz1 = candidate1.pz ();
442- pz2 = candidate2.pz ();
443- p1 = candidate1.p ();
444- p2 = candidate2.p ();
445- angle = std::acos ((pt1 * pt2 + pz1 * pz2) / (p1 * p2));
446- if (isDeepAngle && angle < cfgDeepAngle) {
447- return false ;
448- }
449- return true ;
445+ double pt1 = candidate1.pt ();
446+ double pt2 = candidate2.pt ();
447+ double pz1 = candidate1.pz ();
448+ double pz2 = candidate2.pz ();
449+ double p1 = candidate1.p ();
450+ double p2 = candidate2.p ();
451+ double angle = std::acos ((pt1 * pt2 + pz1 * pz2) / (p1 * p2));
452+ return !(isDeepAngle && angle < cfgDeepAngle);
450453 }
451454 template <typename T1 , typename T2 >
452455 void fillinvMass (const T1 & candidate1, const T2 & candidate2, float multiplicity, bool unlike, bool mix, float massd1, float massd2)
@@ -731,8 +734,7 @@ struct Phianalysisrun3pbpb {
731734 (occupancy2 < cfgMinOccupancy || occupancy2 > cfgMaxOccupancy))) {
732735 continue ;
733736 }
734- float multiplicity;
735- multiplicity = c1.centFT0C ();
737+ float multiplicity = c1.centFT0C ();
736738 for (const auto & [t1, t2] : o2::soa::combinations (o2::soa::CombinationsFullIndexPolicy (tracks1, tracks2))) {
737739 bool unlike = false ;
738740 bool mix = true ;
@@ -813,8 +815,7 @@ struct Phianalysisrun3pbpb {
813815 (occupancy2 < cfgMinOccupancy || occupancy2 > cfgMaxOccupancy))) {
814816 continue ;
815817 }
816- float multiplicity;
817- multiplicity = c1.centFT0A ();
818+ float multiplicity = c1.centFT0A ();
818819 for (const auto & [t1, t2] : o2::soa::combinations (o2::soa::CombinationsFullIndexPolicy (tracks1, tracks2))) {
819820 bool unlike = false ;
820821 bool mix = true ;
@@ -896,8 +897,7 @@ struct Phianalysisrun3pbpb {
896897 (occupancy2 < cfgMinOccupancy || occupancy2 > cfgMaxOccupancy))) {
897898 continue ;
898899 }
899- float multiplicity;
900- multiplicity = c1.centFT0M ();
900+ float multiplicity = c1.centFT0M ();
901901 for (const auto & [t1, t2] : o2::soa::combinations (o2::soa::CombinationsFullIndexPolicy (tracks1, tracks2))) {
902902 bool unlike = false ;
903903 bool mix = true ;
@@ -979,8 +979,7 @@ struct Phianalysisrun3pbpb {
979979 (occupancy2 < cfgMinOccupancy || occupancy2 > cfgMaxOccupancy))) {
980980 continue ;
981981 }
982- float multiplicity;
983- multiplicity = c1.centFV0A ();
982+ float multiplicity = c1.centFV0A ();
984983 for (const auto & [t1, t2] : o2::soa::combinations (o2::soa::CombinationsFullIndexPolicy (tracks1, tracks2))) {
985984 bool unlike = false ;
986985 bool mix = true ;
@@ -1028,8 +1027,9 @@ struct Phianalysisrun3pbpb {
10281027 return ;
10291028 }
10301029 float multiplicity{-1 };
1031- if (cfgMultFT0)
1030+ if (cfgMultFT0) {
10321031 multiplicity = collision.centFT0C ();
1032+ }
10331033 histos.fill (HIST (" hCentrality" ), multiplicity);
10341034 histos.fill (HIST (" hVtxZ" ), collision.posZ ());
10351035 histos.fill (HIST (" hOccupancy" ), occupancy);
@@ -1230,7 +1230,7 @@ struct Phianalysisrun3pbpb {
12301230 histos.fill (HIST (" h3PhiInvMassSameMC1" ), centrality, phiMesonMother.pt (), phiMesonMother.M ());
12311231 int track1PDG = std::abs (mctrack1.pdgCode ());
12321232 int track2PDG = std::abs (mctrack2.pdgCode ());
1233- if (!( track1PDG == PDG_t::kKPlus && track2PDG == PDG_t::kKPlus ) ) {
1233+ if (track1PDG != PDG_t::kKPlus || track2PDG != PDG_t::kKPlus ) {
12341234 continue ;
12351235 }
12361236 for (const auto & mothertrack1 : mctrack1.mothers_as <aod::McParticles>()) {
@@ -1328,7 +1328,7 @@ struct Phianalysisrun3pbpb {
13281328 histos.fill (HIST (" hImpactParameterGen" ), imp);
13291329 std::vector<int64_t > selectedEvents (collisions.size ());
13301330 int nevts = 0 ;
1331- auto multiplicity = 0 ;
1331+ float multiplicity = 0 . f ;
13321332 for (const auto & collision : collisions) {
13331333 if (cfgDoSel8 && !collision.sel8 ()) {
13341334 continue ;
@@ -1480,7 +1480,7 @@ struct Phianalysisrun3pbpb {
14801480 if (!mctrack2.isPhysicalPrimary ()) {
14811481 continue ;
14821482 }
1483- if (!( track1PDG == PDG_t::kKPlus && track2PDG == PDG_t::kKPlus ) ) {
1483+ if (track1PDG != PDG_t::kKPlus || track2PDG != PDG_t::kKPlus ) {
14841484 continue ;
14851485 }
14861486 daughter1 = ROOT::Math::PxPyPzMVector (track1.px (), track1.py (), track1.pz (), massKa);
@@ -1766,15 +1766,17 @@ struct Phianalysisrun3pbpb {
17661766 histos.fill (HIST (" hMC1" ), 1.5 );
17671767
17681768 // INEL>0 selection
1769- if (isApplyInelgt0 && !mcCollision.isInelGt0 ())
1769+ if (isApplyInelgt0 && !mcCollision.isInelGt0 ()) {
17701770 return ;
1771+ }
17711772
17721773 histos.fill (HIST (" hMC1" ), 2.5 );
17731774
17741775 // TVX selection
17751776 if (isApplyTVX &&
1776- ! (mcCollision.multMCFT0C () > 0 && mcCollision.multMCFT0A () > 0 ))
1777+ (mcCollision.multMCFT0C () <= 0 || mcCollision.multMCFT0A () <= 0 )) {
17771778 return ;
1779+ }
17781780
17791781 histos.fill (HIST (" hMC1" ), 3.5 );
17801782 std::vector<int64_t > selectedEvents (collisions.size ());
@@ -1989,7 +1991,7 @@ struct Phianalysisrun3pbpb {
19891991 if (!mctrack2.isPhysicalPrimary ()) {
19901992 continue ;
19911993 }
1992- if (!( track1PDG == PDG_t::kKPlus && track2PDG == PDG_t::kKPlus ) ) {
1994+ if (track1PDG != PDG_t::kKPlus || track2PDG != PDG_t::kKPlus ) {
19931995 continue ;
19941996 }
19951997 for (const auto & mothertrack1 : mctrack1.mothers_as <aod::McParticles>()) {
@@ -2064,7 +2066,7 @@ struct Phianalysisrun3pbpb {
20642066 return ;
20652067 }
20662068
2067- if (isApplyTVX && ! (mcCollision.multMCFT0C () > 0 && mcCollision.multMCFT0A () > 0 )) {
2069+ if (isApplyTVX && (mcCollision.multMCFT0C () <= 0 || mcCollision.multMCFT0A () <= 0 )) {
20682070 return ;
20692071 }
20702072 // Event loss estimation
@@ -2075,8 +2077,9 @@ struct Phianalysisrun3pbpb {
20752077 bool isSel = false ;
20762078 auto centrality = -999 .;
20772079 for (const auto & RecCollision : recCollisions) {
2078- if (!myEventSelections (RecCollision))
2080+ if (!myEventSelections (RecCollision)) {
20792081 continue ;
2082+ }
20802083 const int kCentFT0C = 0 ;
20812084 const int kCentFT0A = 1 ;
20822085 const int kCentFT0M = 2 ;
@@ -2109,12 +2112,14 @@ struct Phianalysisrun3pbpb {
21092112
21102113 // Generated MC
21112114 for (const auto & mcPart : mcParticles) {
2112- if (mcPart.y () < rapiditycut1 || mcPart.y () > rapiditycut2)
2115+ if (mcPart.y () < rapiditycut1 || mcPart.y () > rapiditycut2) {
21132116 continue ;
2117+ }
21142118
21152119 // select phi meson
2116- if (std::abs (mcPart.pdgCode ()) != o2::constants::physics::kPhi )
2120+ if (std::abs (mcPart.pdgCode ()) != o2::constants::physics::kPhi ) {
21172121 continue ;
2122+ }
21182123
21192124 // signal loss estimation
21202125 histos.fill (HIST (" QAevent/phigenBeforeEvtSel" ), mcPart.pt (), impactPar);
@@ -2139,7 +2144,7 @@ struct Phianalysisrun3pbpb {
21392144 return ;
21402145 }
21412146
2142- if (isApplyTVX && ! (mcCollision.multMCFT0C () > 0 && mcCollision.multMCFT0A () > 0 )) {
2147+ if (isApplyTVX && (mcCollision.multMCFT0C () <= 0 || mcCollision.multMCFT0A () <= 0 )) {
21432148 return ;
21442149 }
21452150 // All generated events
@@ -2156,8 +2161,9 @@ struct Phianalysisrun3pbpb {
21562161 bool atLeastOne = false ;
21572162 auto centrality = -999 .;
21582163 for (auto const & collision : collisions) {
2159- if (!myEventSelections (collision))
2164+ if (!myEventSelections (collision)) {
21602165 continue ;
2166+ }
21612167 centrality = selColCent (collision);
21622168 atLeastOne = true ;
21632169 }
@@ -2173,16 +2179,19 @@ struct Phianalysisrun3pbpb {
21732179 }
21742180 for (const auto & particle : GenParticles) {
21752181
2176- if (particle.y () < rapiditycut1 || particle.y () > rapiditycut2)
2182+ if (particle.y () < rapiditycut1 || particle.y () > rapiditycut2) {
21772183 continue ;
2184+ }
21782185
2179- if (particle.pdgCode () != o2::constants::physics::kPhi )
2186+ if (particle.pdgCode () != o2::constants::physics::kPhi ) {
21802187 continue ;
2188+ }
21812189
21822190 auto daughters = particle.daughters_as <aod::McParticles>();
21832191 static constexpr int PhiNDaughters = 2 ;
2184- if (daughters.size () != PhiNDaughters)
2192+ if (daughters.size () != PhiNDaughters) {
21852193 continue ;
2194+ }
21862195
21872196 bool daup = false , daun = false ;
21882197
@@ -2196,8 +2205,9 @@ struct Phianalysisrun3pbpb {
21962205 }
21972206 }
21982207
2199- if (!daup || !daun)
2208+ if (!daup || !daun) {
22002209 continue ;
2210+ }
22012211
22022212 mother = d1 + d2;
22032213
0 commit comments