Skip to content

Commit b0d256c

Browse files
authored
[PWGCF] Add closure test
Add closure test Optimize some code
1 parent 845da7e commit b0d256c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -608,9 +608,9 @@ struct FlowGfwOmegaXi {
608608
{
609609
if (correctionsLoaded)
610610
return;
611-
int nspecies = 5
611+
long unsigned int nspecies = 5;
612612
if (cfgAcceptance.size() == nspecies) {
613-
for (int i = 0; i <= nspecies - 1; i++) {
613+
for (int i = 0; i <= 4; i++) {
614614
mAcceptance.push_back(ccdb->getForTimeStamp<GFWWeights>(cfgAcceptance[i], timestamp));
615615
}
616616
if (mAcceptance.size() == nspecies)
@@ -619,7 +619,7 @@ struct FlowGfwOmegaXi {
619619
LOGF(warning, "Could not load acceptance weights");
620620
}
621621
if (cfgEfficiency.size() == nspecies) {
622-
for (int i = 0; i <= nspecies - 1; i++) {
622+
for (int i = 0; i <= 4; i++) {
623623
mEfficiency.push_back(ccdb->getForTimeStamp<TH1D>(cfgEfficiency[i], timestamp));
624624
}
625625
if (mEfficiency.size() == nspecies)
@@ -633,7 +633,7 @@ struct FlowGfwOmegaXi {
633633
template <typename TrackObject>
634634
bool setCurrentParticleWeights(float& weight_nue, float& weight_nua, TrackObject track, float vtxz, int ispecies)
635635
{
636-
int nspecies = 5;
636+
long unsigned int nspecies = 5;
637637
float eff = 1.;
638638
if (mEfficiency.size() == nspecies)
639639
eff = mEfficiency[ispecies]->GetBinContent(mEfficiency[ispecies]->FindBin(track.pt()));
@@ -654,7 +654,7 @@ struct FlowGfwOmegaXi {
654654
{
655655
auto cfgLocDenPara = (std::vector<std::vector<double>>){cfgLocDenParaK0s, cfgLocDenParaLambda, cfgLocDenParaXi, cfgLocDenParaOmega};
656656
int ptbin = fXiPtAxis->FindBin(track.pt());
657-
if (ptbin == 0 || ptbin == (fXiPtAxis->GetNBins() + 1)) {
657+
if (ptbin == 0 || ptbin == (fXiPtAxis->GetNbins() + 1)) {
658658
weight_loc = 1.0;
659659
return true;
660660
}
@@ -741,7 +741,7 @@ struct FlowGfwOmegaXi {
741741
const auto cent = collision.centFT0C();
742742
if (!collision.sel8())
743743
return;
744-
if (eventSelected(collision,/* tracks.size(),*/ cent))
744+
if (eventSelected(collision, cent))
745745
return;
746746
TH1D* hLocalDensity = new TH1D("hphi", "hphi", 400, -constants::math::TwoPI, constants::math::TwoPI);
747747
auto bc = collision.bc_as<aod::BCsWithTimestamps>();

0 commit comments

Comments
 (0)