Skip to content

Commit 682f3a8

Browse files
committed
MegaLinter_errors
1 parent 023bc4f commit 682f3a8

1 file changed

Lines changed: 27 additions & 12 deletions

File tree

PWGJE/Tasks/photonChargedTriggerCorrelation.cxx

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,7 @@ struct PhotonChargedTriggerCorrelation {
648648
return (mgg > etaPCMLowSideMassRange.value[0] && mgg < etaPCMLowSideMassRange.value[1]) ||
649649
(mgg > etaPCMHighSideMassRange.value[0] && mgg < etaPCMHighSideMassRange.value[1]);
650650
}
651+
return false;
651652
}
652653

653654
// analysis /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -969,7 +970,9 @@ struct PhotonChargedTriggerCorrelation {
969970
trigger.eta() - associated.eta(),
970971
trigger.pt(), associated.pt(), collision.posZ(), collision.nGlobalTracks(),
971972
getInvEff<EffParticleType::Trigger>(trigger.pt()));
972-
} else if (checkMassRange<MassRange::pi0PCMSide>(associated.mgg())) {
973+
return;
974+
}
975+
if (checkMassRange<MassRange::pi0PCMSide>(associated.mgg())) {
973976
histos.fill(HIST("reco/corr/h3_ptPhiEta_assoc_pi0PCMSide"),
974977
associated.pt(), associated.phi(), associated.eta(),
975978
getInvEff<EffParticleType::Trigger>(trigger.pt()));
@@ -978,9 +981,10 @@ struct PhotonChargedTriggerCorrelation {
978981
trigger.eta() - associated.eta(),
979982
trigger.pt(), associated.pt(), collision.posZ(), collision.nGlobalTracks(),
980983
getInvEff<EffParticleType::Trigger>(trigger.pt()));
984+
return;
981985
}
982986
// eta
983-
else if (checkMassRange<MassRange::etaPCMPeak>(associated.mgg())) {
987+
if (checkMassRange<MassRange::etaPCMPeak>(associated.mgg())) {
984988
histos.fill(HIST("reco/corr/h3_ptPhiEta_assoc_etaPCMPeak"),
985989
associated.pt(), associated.phi(), associated.eta(),
986990
getInvEff<EffParticleType::Trigger>(trigger.pt()));
@@ -989,7 +993,9 @@ struct PhotonChargedTriggerCorrelation {
989993
trigger.eta() - associated.eta(),
990994
trigger.pt(), associated.pt(), collision.posZ(), collision.nGlobalTracks(),
991995
getInvEff<EffParticleType::Trigger>(trigger.pt()));
992-
} else if (checkMassRange<MassRange::etaPCMSide>(associated.mgg())) {
996+
return;
997+
}
998+
if (checkMassRange<MassRange::etaPCMSide>(associated.mgg())) {
993999
histos.fill(HIST("reco/corr/h3_ptPhiEta_assoc_etaPCMSide"),
9941000
associated.pt(), associated.phi(), associated.eta(),
9951001
getInvEff<EffParticleType::Trigger>(trigger.pt()));
@@ -998,6 +1004,7 @@ struct PhotonChargedTriggerCorrelation {
9981004
trigger.eta() - associated.eta(),
9991005
trigger.pt(), associated.pt(), collision.posZ(), collision.nGlobalTracks(),
10001006
getInvEff<EffParticleType::Trigger>(trigger.pt()));
1007+
return;
10011008
}
10021009
};
10031010
corrProcessCorrelation(collision, triggersThisEvent, photonPCMPairsThisEvent, funcCorrelation);
@@ -1011,26 +1018,32 @@ struct PhotonChargedTriggerCorrelation {
10111018
mixingTriggerEta - associated.eta(),
10121019
mixingTriggerPt, associated.pt(), collision.posZ(), collision.nGlobalTracks(),
10131020
perTriggerWeight * getInvEff<EffParticleType::Trigger>(mixingTriggerPt));
1014-
} else if (checkMassRange<MassRange::pi0PCMSide>(associated.mgg())) {
1021+
return;
1022+
}
1023+
if (checkMassRange<MassRange::pi0PCMSide>(associated.mgg())) {
10151024
histos.fill(HIST("reco/corr/h6_mix_pi0PCMSide"),
10161025
getDeltaPhi(mixingTriggerPhi, associated.phi()),
10171026
mixingTriggerEta - associated.eta(),
10181027
mixingTriggerPt, associated.pt(), collision.posZ(), collision.nGlobalTracks(),
10191028
perTriggerWeight * getInvEff<EffParticleType::Trigger>(mixingTriggerPt));
1029+
return;
10201030
}
10211031
// eta
1022-
else if (checkMassRange<MassRange::etaPCMPeak>(associated.mgg())) {
1032+
if (checkMassRange<MassRange::etaPCMPeak>(associated.mgg())) {
10231033
histos.fill(HIST("reco/corr/h6_mix_etaPCMPeak"),
10241034
getDeltaPhi(mixingTriggerPhi, associated.phi()),
10251035
mixingTriggerEta - associated.eta(),
10261036
mixingTriggerPt, associated.pt(), collision.posZ(), collision.nGlobalTracks(),
10271037
perTriggerWeight * getInvEff<EffParticleType::Trigger>(mixingTriggerPt));
1028-
} else if (checkMassRange<MassRange::etaPCMSide>(associated.mgg())) {
1038+
return;
1039+
}
1040+
if (checkMassRange<MassRange::etaPCMSide>(associated.mgg())) {
10291041
histos.fill(HIST("reco/corr/h6_mix_etaPCMSide"),
10301042
getDeltaPhi(mixingTriggerPhi, associated.phi()),
10311043
mixingTriggerEta - associated.eta(),
10321044
mixingTriggerPt, associated.pt(), collision.posZ(), collision.nGlobalTracks(),
10331045
perTriggerWeight * getInvEff<EffParticleType::Trigger>(mixingTriggerPt));
1046+
return;
10341047
}
10351048
};
10361049
corrProcessMixing(collision, photonPCMPairsThisEvent, funcMixing, nTriggerMixingH0PCM, nTriggersThisDataFrame);
@@ -1147,43 +1160,45 @@ struct PhotonChargedTriggerCorrelation {
11471160
trigger.pt(), associated.pt(), mcCollision.posZ(), mcCollision.nChargedInEtaRange(),
11481161
weight);
11491162
}
1150-
11511163
// pipm selection
11521164
if (std::abs(associated.pdgCode()) == PDG_t::kPiPlus) {
11531165
histos.fill(HIST(getMcHistPath(eventType, correlationType, McCorrAssociatedType::Pipm)),
11541166
getDeltaPhi(trigger.phi(), associated.phi()),
11551167
trigger.eta() - associated.eta(),
11561168
trigger.pt(), associated.pt(), mcCollision.posZ(), mcCollision.nChargedInEtaRange(),
11571169
weight);
1170+
return;
11581171
}
1159-
11601172
// photon selection
1161-
else if (associated.pdgCode() == PDG_t::kGamma) {
1173+
if (associated.pdgCode() == PDG_t::kGamma) {
11621174
histos.fill(HIST(getMcHistPath(eventType, correlationType, McCorrAssociatedType::Photon)),
11631175
getDeltaPhi(trigger.phi(), associated.phi()),
11641176
trigger.eta() - associated.eta(),
11651177
trigger.pt(), associated.pt(), mcCollision.posZ(), mcCollision.nChargedInEtaRange(),
11661178
weight);
1179+
return;
11671180
}
1181+
return;
11681182
}
1169-
11701183
// decaying particles (not marked physical primary)
1171-
else if ((std::abs(associated.eta()) < etaMax)) {
1184+
if ((std::abs(associated.eta()) < etaMax)) {
11721185
// pi0 selection
11731186
if (checkH0Primary(associated, PDG_t::kPi0)) {
11741187
histos.fill(HIST(getMcHistPath(eventType, correlationType, McCorrAssociatedType::Pi0)),
11751188
getDeltaPhi(trigger.phi(), associated.phi()),
11761189
trigger.eta() - associated.eta(),
11771190
trigger.pt(), associated.pt(), mcCollision.posZ(), mcCollision.nChargedInEtaRange(),
11781191
weight);
1192+
return;
11791193
}
11801194
// eta selection
1181-
else if (checkH0Primary(associated, 221)) {
1195+
if (checkH0Primary(associated, 221)) {
11821196
histos.fill(HIST(getMcHistPath(eventType, correlationType, McCorrAssociatedType::Eta)),
11831197
getDeltaPhi(trigger.phi(), associated.phi()),
11841198
trigger.eta() - associated.eta(),
11851199
trigger.pt(), associated.pt(), mcCollision.posZ(), mcCollision.nChargedInEtaRange(),
11861200
weight);
1201+
return;
11871202
}
11881203
}
11891204
}

0 commit comments

Comments
 (0)