Skip to content

Commit fa6b7f3

Browse files
committed
cppcoreguidelines-pro-type-member-init
1 parent b4d2dec commit fa6b7f3

1 file changed

Lines changed: 43 additions & 43 deletions

File tree

PWGDQ/Core/HistogramsLibrary.cxx

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,7 @@ void o2::aod::dqhistograms::DefineHistograms(HistogramManager* hm, const char* h
744744
if (subGroupStr.Contains("tpcpid")) {
745745
if (subGroupStr.Contains("tpcpid_fine")) {
746746
// fine binning for pIN: steps in 10 MeV/c from 0 to 1 GeV/c and 100 MeV/c up to 10 GeV/c
747-
std::array<double, 281> pIN_bins;
747+
std::array<double, 281> pIN_bins{};
748748
for (int i = 0; i <= 200; i++) {
749749
pIN_bins[i] = 0.01 * i;
750750
}
@@ -753,13 +753,13 @@ void o2::aod::dqhistograms::DefineHistograms(HistogramManager* hm, const char* h
753753
}
754754
int nbins_pIN = static_cast<int>(pIN_bins.size()) - 1;
755755

756-
std::array<double, 201> TPCdEdx_bins;
756+
std::array<double, 201> TPCdEdx_bins{};
757757
for (int i = 0; i <= 200; i++) {
758758
TPCdEdx_bins[i] = i;
759759
}
760760
int nbins_TPCdEdx = static_cast<int>(TPCdEdx_bins.size()) - 1;
761761

762-
std::array<double, 101> nSigma_bins;
762+
std::array<double, 101> nSigma_bins{};
763763
for (int i = 0; i <= 100; i++) {
764764
nSigma_bins[i] = -5. + 0.1 * i;
765765
}
@@ -822,7 +822,7 @@ void o2::aod::dqhistograms::DefineHistograms(HistogramManager* hm, const char* h
822822
if (subGroupStr.Contains("postcalib")) {
823823
const int kNvarsPID = 4;
824824
const int kTPCnsigmaNbins = 70;
825-
std::array<double, kTPCnsigmaNbins + 1> tpcNsigmaBinLims;
825+
std::array<double, kTPCnsigmaNbins + 1> tpcNsigmaBinLims{};
826826
for (int i = 0; i <= kTPCnsigmaNbins; ++i) {
827827
tpcNsigmaBinLims[i] = -7.0 + 0.2 * i;
828828
}
@@ -834,7 +834,7 @@ void o2::aod::dqhistograms::DefineHistograms(HistogramManager* hm, const char* h
834834
std::array<double, kEtaNbins + 1> etaBinLimsI = {-0.9, -0.7, -0.5, -0.3, -0.1, 0.1, 0.3, 0.5, 0.7, 0.9};
835835

836836
const int kTPCnClusterbins = 16;
837-
std::array<double, kTPCnClusterbins + 1> tpcNclusterBinLims;
837+
std::array<double, kTPCnClusterbins + 1> tpcNclusterBinLims{};
838838
for (int i = 0; i <= kTPCnClusterbins; ++i) {
839839
tpcNclusterBinLims[i] = 10 * i;
840840
}
@@ -882,7 +882,7 @@ void o2::aod::dqhistograms::DefineHistograms(HistogramManager* hm, const char* h
882882
if (subGroupStr.Contains("tofpid")) {
883883
if (subGroupStr.Contains("tofpid_fine")) {
884884
// fine binning for pIN: steps in 10 MeV/c from 0 to 1 GeV/c and 100 MeV/c up to 10 GeV/c
885-
std::array<double, 281> pIN_bins;
885+
std::array<double, 281> pIN_bins{};
886886
for (int i = 0; i <= 200; i++) {
887887
pIN_bins[i] = 0.01 * i;
888888
}
@@ -891,13 +891,13 @@ void o2::aod::dqhistograms::DefineHistograms(HistogramManager* hm, const char* h
891891
}
892892
int nbins_pIN = static_cast<int>(pIN_bins.size()) - 1;
893893

894-
std::array<double, 241> TOFbeta_bins;
894+
std::array<double, 241> TOFbeta_bins{};
895895
for (int i = 0; i <= 240; i++) {
896896
TOFbeta_bins[i] = 0.005 * i;
897897
}
898898
int nbins_TOFbeta = static_cast<int>(TOFbeta_bins.size()) - 1;
899899

900-
std::array<double, 101> nSigma_bins;
900+
std::array<double, 101> nSigma_bins{};
901901
for (int i = 0; i <= 100; i++) {
902902
nSigma_bins[i] = -5. + 0.1 * i;
903903
}
@@ -919,7 +919,7 @@ void o2::aod::dqhistograms::DefineHistograms(HistogramManager* hm, const char* h
919919
if (subGroupStr.Contains("pidcorre")) {
920920
const int kNvarsPID = 3;
921921
const int kNbins_pIN = 169;
922-
std::array<double, kNbins_pIN + 1> pIN_bins;
922+
std::array<double, kNbins_pIN + 1> pIN_bins{};
923923
for (int i = 0; i <= 140; i++) {
924924
pIN_bins[i] = 0.01 * i + 0.1;
925925
}
@@ -931,7 +931,7 @@ void o2::aod::dqhistograms::DefineHistograms(HistogramManager* hm, const char* h
931931
}
932932

933933
const int kNbins_pINmore = 135;
934-
std::array<double, kNbins_pINmore + 1> pIN_binsmore;
934+
std::array<double, kNbins_pINmore + 1> pIN_binsmore{};
935935
for (int i = 0; i <= 120; i++) {
936936
pIN_binsmore[i] = 0.01 * i + 0.3;
937937
}
@@ -945,31 +945,31 @@ void o2::aod::dqhistograms::DefineHistograms(HistogramManager* hm, const char* h
945945
pIN_binsmore[135] = 10.;
946946

947947
const int kNbins_nSigma = 100;
948-
std::array<double, kNbins_nSigma + 1> nSigma_bins;
948+
std::array<double, kNbins_nSigma + 1> nSigma_bins{};
949949
for (int i = 0; i <= kNbins_nSigma; i++) {
950950
nSigma_bins[i] = -5. + 0.1 * i;
951951
}
952952

953953
const int kNbins_nSigmamore = 50;
954-
std::array<double, kNbins_nSigmamore + 1> nSigma_binsmore;
954+
std::array<double, kNbins_nSigmamore + 1> nSigma_binsmore{};
955955
for (int i = 0; i <= kNbins_nSigmamore; i++) {
956956
nSigma_binsmore[i] = -5. + 0.2 * i;
957957
}
958958

959959
const int kNbins_nSigmagrob = 24;
960-
std::array<double, kNbins_nSigmagrob + 1> nSigma_binsgrob;
960+
std::array<double, kNbins_nSigmagrob + 1> nSigma_binsgrob{};
961961
for (int i = 0; i <= kNbins_nSigmagrob; i++) {
962962
nSigma_binsgrob[i] = -6. + 0.5 * i;
963963
}
964964

965965
const int kNbins_TOFbeta = 120;
966-
std::array<double, kNbins_TOFbeta + 1> TOFbeta_bins;
966+
std::array<double, kNbins_TOFbeta + 1> TOFbeta_bins{};
967967
for (int i = 0; i <= kNbins_TOFbeta; i++) {
968968
TOFbeta_bins[i] = 0.01 * i;
969969
}
970970

971971
const int kNbins_TPCdEdx = 140;
972-
std::array<double, kNbins_TPCdEdx + 1> TPCdEdx_bins;
972+
std::array<double, kNbins_TPCdEdx + 1> TPCdEdx_bins{};
973973
for (int i = 0; i <= kNbins_TPCdEdx; i++) {
974974
TPCdEdx_bins[i] = i + 20;
975975
}
@@ -1148,7 +1148,7 @@ void o2::aod::dqhistograms::DefineHistograms(HistogramManager* hm, const char* h
11481148
hm->AddHistogram(histClass, "tpcNSigmaPi_tofNSigmaPi", "", false, 200, -10., 10., VarManager::kTPCnSigmaPi, 200, -10., 10., VarManager::kTOFnSigmaPi);
11491149
}
11501150
if (subGroupStr.Contains("singlemucumulant")) {
1151-
std::array<double, 67> PtBinEdges; // 0-30GeV/c
1151+
std::array<double, 67> PtBinEdges{}; // 0-30GeV/c
11521152
for (int i = 0; i < 67; i++) {
11531153
if (i <= 39) {
11541154
PtBinEdges[i] = i / 10.;
@@ -1157,7 +1157,7 @@ void o2::aod::dqhistograms::DefineHistograms(HistogramManager* hm, const char* h
11571157
}
11581158
}
11591159

1160-
std::array<double, 19> CentBinEdges; // 0-90%
1160+
std::array<double, 19> CentBinEdges{}; // 0-90%
11611161
for (int i = 0; i < 19; i++) {
11621162
CentBinEdges[i] = i * 5;
11631163
}
@@ -1251,7 +1251,7 @@ void o2::aod::dqhistograms::DefineHistograms(HistogramManager* hm, const char* h
12511251
}
12521252

12531253
if (groupStr.CompareTo("energy-correlator-gen") == 0) {
1254-
std::array<double, 26> coschiBins;
1254+
std::array<double, 26> coschiBins{};
12551255
for (int i = 0; i < 26; i++) {
12561256
coschiBins[i] = -1.0 + 2.0 * TMath::Power(0.04 * i, 2.0);
12571257
}
@@ -1316,11 +1316,11 @@ void o2::aod::dqhistograms::DefineHistograms(HistogramManager* hm, const char* h
13161316
hm->AddHistogram(histClass, "Mass_HighRange", "", false, 375, 0.0, 15.0, VarManager::kMass);
13171317
hm->AddHistogram(histClass, "Pt", "", false, 2000, 0.0, 20., VarManager::kPt);
13181318
hm->AddHistogram(histClass, "Mass_Pt", "", false, 500, 0.0, 5.0, VarManager::kMass, 40, 0.0, 20.0, VarManager::kPt);
1319-
std::array<double, 76> massBins;
1319+
std::array<double, 76> massBins{};
13201320
for (int i = 0; i < 76; i++) {
13211321
massBins[i] = 1.5 + i * 0.04;
13221322
}
1323-
std::array<double, 70> ptBins;
1323+
std::array<double, 70> ptBins{};
13241324
for (int i = 0; i <= 50; i++) {
13251325
ptBins[i] = i * 0.01;
13261326
}
@@ -1351,7 +1351,7 @@ void o2::aod::dqhistograms::DefineHistograms(HistogramManager* hm, const char* h
13511351
4.0, 5.0, 6.5, 8.0, 10.0, 12.0, 15.0, 20.0,
13521352
30.0, 40.0, 60.0, 80.0, 100.0};
13531353

1354-
std::array<double, 501> massBins;
1354+
std::array<double, 501> massBins{};
13551355
for (int i = 0; i < 501; i++) {
13561356
massBins[i] = 0.01 * (i);
13571357
}
@@ -1563,7 +1563,7 @@ void o2::aod::dqhistograms::DefineHistograms(HistogramManager* hm, const char* h
15631563
std::array<double, kPtNbins + 1> PtBinLims = {1., 2., 3., 4., 5., 6., 7., 8., 9., 12., 20.};
15641564

15651565
const int kTauNBins = 500;
1566-
std::array<double, kTauNBins + 1> TauBinLims;
1566+
std::array<double, kTauNBins + 1> TauBinLims{};
15671567
for (int i = 0; i <= kTauNBins; ++i) {
15681568
TauBinLims[i] = -0.3 + (0.0015 * i);
15691569
}
@@ -1625,12 +1625,12 @@ void o2::aod::dqhistograms::DefineHistograms(HistogramManager* hm, const char* h
16251625
hm->AddHistogram(histClass, "U2Q2_CentFT0C_ev2", "mass vs. centrality vs. U2Q2_event2", false, 125, 0.0, 5.0, VarManager::kMass, 9, 0.0, 90.0, VarManager::kCentFT0C, 100, -10.0, 10.0, VarManager::kU2Q2Ev2);
16261626
}
16271627
if (subGroupStr.Contains("metest")) {
1628-
std::array<double, 251> MassBinEdges; // 0-5GeV/c2
1628+
std::array<double, 251> MassBinEdges{}; // 0-5GeV/c2
16291629
for (int i = 0; i < 251; i++) {
16301630
MassBinEdges[i] = i * 0.02;
16311631
}
16321632

1633-
std::array<double, 49> PtBinEdges; // 0-20GeV/c
1633+
std::array<double, 49> PtBinEdges{}; // 0-20GeV/c
16341634
for (int i = 0; i < 49; i++) {
16351635
if (i <= 9) {
16361636
PtBinEdges[i] = i / 10.;
@@ -1639,7 +1639,7 @@ void o2::aod::dqhistograms::DefineHistograms(HistogramManager* hm, const char* h
16391639
}
16401640
}
16411641

1642-
std::array<double, 19> CentBinEdges; // 0-90%
1642+
std::array<double, 19> CentBinEdges{}; // 0-90%
16431643
for (int i = 0; i < 19; i++) {
16441644
CentBinEdges[i] = i * 5;
16451645
}
@@ -1660,12 +1660,12 @@ void o2::aod::dqhistograms::DefineHistograms(HistogramManager* hm, const char* h
16601660
hm->AddHistogram(histClass, "Mass_Pt_CentFT0C_V24ME", "Mass_Pt_CentFT0C_V24ME", true, 250, 0.0, 5.0, VarManager::kMass, 60, 0.0, 30.0, VarManager::kPt, 90, 0.0, 90.0, VarManager::kCentFT0C, "", "", "", VarManager::kV24ME, VarManager::kWV24ME);
16611661
}
16621662
if (subGroupStr.Contains("cumulantme1")) {
1663-
std::array<double, 251> MassBinEdges; // 0-5GeV/c2
1663+
std::array<double, 251> MassBinEdges{}; // 0-5GeV/c2
16641664
for (int i = 0; i < 251; i++) {
16651665
MassBinEdges[i] = i * 0.02;
16661666
}
16671667

1668-
std::array<double, 67> PtBinEdges; // 0-30GeV/c
1668+
std::array<double, 67> PtBinEdges{}; // 0-30GeV/c
16691669
for (int i = 0; i < 67; i++) {
16701670
if (i <= 39) {
16711671
PtBinEdges[i] = i / 10.;
@@ -1674,7 +1674,7 @@ void o2::aod::dqhistograms::DefineHistograms(HistogramManager* hm, const char* h
16741674
}
16751675
}
16761676

1677-
std::array<double, 19> CentBinEdges; // 0-90%
1677+
std::array<double, 19> CentBinEdges{}; // 0-90%
16781678
for (int i = 0; i < 19; i++) {
16791679
CentBinEdges[i] = i * 5;
16801680
}
@@ -1907,12 +1907,12 @@ void o2::aod::dqhistograms::DefineHistograms(HistogramManager* hm, const char* h
19071907
// hm->AddHistogram(histClass, "Mass_Pt_centrFT0C_V3", "", 6, varV3.data(), bins.data(), minBins.data(), maxBins.data(), 0, -1, kTRUE); // removed temporarily
19081908
}
19091909
if (subGroupStr.Contains("flow-ccdb")) {
1910-
std::array<double, 251> MassBinEdges; // 0-5GeV/c2
1910+
std::array<double, 251> MassBinEdges{}; // 0-5GeV/c2
19111911
for (int i = 0; i < 251; i++) {
19121912
MassBinEdges[i] = i * 0.02;
19131913
}
19141914

1915-
std::array<double, 49> PtBinEdges; // 0-20GeV/c
1915+
std::array<double, 49> PtBinEdges{}; // 0-20GeV/c
19161916
for (int i = 0; i < 49; i++) {
19171917
if (i <= 9) {
19181918
PtBinEdges[i] = i / 10.;
@@ -1921,7 +1921,7 @@ void o2::aod::dqhistograms::DefineHistograms(HistogramManager* hm, const char* h
19211921
}
19221922
}
19231923

1924-
std::array<double, 19> CentBinEdges; // 0-90%
1924+
std::array<double, 19> CentBinEdges{}; // 0-90%
19251925
for (int i = 0; i < 19; i++) {
19261926
CentBinEdges[i] = i * 5;
19271927
}
@@ -1997,15 +1997,15 @@ void o2::aod::dqhistograms::DefineHistograms(HistogramManager* hm, const char* h
19971997
hm->AddHistogram(histClass, "Mass_Pt_centrFT0C_Corr4POIplus", "", true, 60, 0.0, 30.0, VarManager::kPt1, 18, 0.0, 90.0, VarManager::kCentFT0C, 0, 0.0, 1.0, VarManager::kCORR4POIplus, "", "", "", VarManager::kNothing, VarManager::kM0111POIoverMpplus);
19981998
}
19991999
if (subGroupStr.Contains("singlecumulant2")) {
2000-
std::array<double, 67> PtBinEdges; // 0-30GeV/c
2000+
std::array<double, 67> PtBinEdges{}; // 0-30GeV/c
20012001
for (int i = 0; i < 67; i++) {
20022002
if (i <= 39) {
20032003
PtBinEdges[i] = i / 10.;
20042004
} else {
20052005
PtBinEdges[i] = (i - 40) * 1. + 4.;
20062006
}
20072007
}
2008-
std::array<double, 19> CentBinEdges; // 0-90%
2008+
std::array<double, 19> CentBinEdges{}; // 0-90%
20092009
for (int i = 0; i < 19; i++) {
20102010
CentBinEdges[i] = i * 5;
20112011
}
@@ -2079,7 +2079,7 @@ void o2::aod::dqhistograms::DefineHistograms(HistogramManager* hm, const char* h
20792079
// every 10 MeV from 0 to 0.2 GeV/c2
20802080
// every 100 MeV from 0.2 to 1. GeV/c2
20812081
// every 500 GeV from 1 to 5 GeV/c2
2082-
std::array<double, 37> mee_bins;
2082+
std::array<double, 37> mee_bins{};
20832083
for (int i = 0; i <= 20; i++) {
20842084
mee_bins[i] = 0.01 * i;
20852085
}
@@ -2093,15 +2093,15 @@ void o2::aod::dqhistograms::DefineHistograms(HistogramManager* hm, const char* h
20932093

20942094
// binning for ptee at large scales:
20952095
// every 0.2 GeV/c from 0 to 10 GeV/c
2096-
std::array<double, 51> ptee_bins;
2096+
std::array<double, 51> ptee_bins{};
20972097
for (int i = 0; i <= 50; i++) {
20982098
ptee_bins[i] = 0.2 * i;
20992099
}
21002100
int nbins_ptee = static_cast<int>(ptee_bins.size()) - 1;
21012101

21022102
// binning for phiv:
21032103
// steps of size pi/100
2104-
std::array<double, 101> phiv_bins;
2104+
std::array<double, 101> phiv_bins{};
21052105
for (int i = 0; i <= 100; i++)
21062106
phiv_bins[i] = o2::constants::math::PI / 100. * i;
21072107
int nbins_phiv = static_cast<int>(phiv_bins.size()) - 1;
@@ -2127,7 +2127,7 @@ void o2::aod::dqhistograms::DefineHistograms(HistogramManager* hm, const char* h
21272127
// every 50 MeV from 1.1 to 2.7 GeV/c2
21282128
// every 10 MeV from 2.7 to 3.2 GeV/c2
21292129
// every 50 MeV from 3.2 to 12 GeV/c2
2130-
std::array<double, 369> mee_bins;
2130+
std::array<double, 369> mee_bins{};
21312131
for (int i = 0; i <= 110; i++) {
21322132
mee_bins[i] = 0.01 * i;
21332133
}
@@ -2145,7 +2145,7 @@ void o2::aod::dqhistograms::DefineHistograms(HistogramManager* hm, const char* h
21452145
// binning for ptee at large scales:
21462146
// every 0.1 GeV/c from 0 to 10 GeV/c
21472147
// every 0.5 GeV/c from 10 to 30 GeV/c
2148-
std::array<double, 201> ptee_bins;
2148+
std::array<double, 201> ptee_bins{};
21492149
for (int i = 0; i <= 100; i++) {
21502150
ptee_bins[i] = 0.1 * i;
21512151
}
@@ -2158,7 +2158,7 @@ void o2::aod::dqhistograms::DefineHistograms(HistogramManager* hm, const char* h
21582158
// every 0.1 sigma from 0 to 5 sigma
21592159
// every 0.5 sigma from 5 to 10 sigma
21602160
// every 1.0 sigma from 10 to 40 sigma
2161-
std::array<double, 91> dca_bins;
2161+
std::array<double, 91> dca_bins{};
21622162
for (int i = 0; i <= 50; i++) {
21632163
dca_bins[i] = 0.1 * i;
21642164
}
@@ -2251,7 +2251,7 @@ void o2::aod::dqhistograms::DefineHistograms(HistogramManager* hm, const char* h
22512251

22522252
const int kNvarsTripletCuts = 4;
22532253
const int kInvMassNbins = 100;
2254-
std::array<double, kInvMassNbins + 1> InvMassBinLims;
2254+
std::array<double, kInvMassNbins + 1> InvMassBinLims{};
22552255
for (int i = 0; i <= kInvMassNbins; ++i) {
22562256
InvMassBinLims[i] = 4.0 + 0.02 * i;
22572257
}
@@ -2279,13 +2279,13 @@ void o2::aod::dqhistograms::DefineHistograms(HistogramManager* hm, const char* h
22792279
}
22802280
if (subGroupStr.Contains("dilepton-hadron-array-correlation")) {
22812281
const int kInvMassBins = 500;
2282-
std::array<double, kInvMassBins + 1> InvMassBinLims;
2282+
std::array<double, kInvMassBins + 1> InvMassBinLims{};
22832283
for (int i = 0; i <= kInvMassBins; i++) {
22842284
InvMassBinLims[i] = 0 + i * 0.01;
22852285
}
22862286

22872287
const int kDelEtaBins = 20;
2288-
std::array<double, kDelEtaBins + 1> DelEtaBinLims;
2288+
std::array<double, kDelEtaBins + 1> DelEtaBinLims{};
22892289
for (int i = 0; i <= kDelEtaBins; i++) {
22902290
DelEtaBinLims[i] = -2 + i * 0.2;
22912291
}
@@ -2313,7 +2313,7 @@ void o2::aod::dqhistograms::DefineHistograms(HistogramManager* hm, const char* h
23132313
hm->AddHistogram(histClass, "Delta_Mass_DstarD0region", "", false, 50, 0.14, 0.16, VarManager::kDeltaMass);
23142314
}
23152315
if (subGroupStr.Contains("energy-correlator")) {
2316-
std::array<double, 26> coschiBins;
2316+
std::array<double, 26> coschiBins{};
23172317
for (int i = 0; i < 26; i++) {
23182318
coschiBins[i] = -1.0 + 2.0 * TMath::Power(0.04 * i, 2.0);
23192319
}

0 commit comments

Comments
 (0)