Skip to content

Commit 9741bb9

Browse files
committed
Please consider the following formatting changes
1 parent 1d75a04 commit 9741bb9

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

PWGEM/Dilepton/Core/Dilepton.h

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@
4646
#include "MathUtils/Utils.h"
4747

4848
#include "Math/Vector4D.h"
49-
#include "TString.h"
5049
#include "TRandom3.h"
50+
#include "TString.h"
5151

5252
#include <algorithm>
5353
#include <array>
@@ -1096,7 +1096,7 @@ struct Dilepton {
10961096
// LOGF(info, "collision.centFT0C() = %f, collision.trackOccupancyInTimeRange() = %d, getSPresolution = %f", collision.centFT0C(), collision.trackOccupancyInTimeRange(), getSPresolution(collision.centFT0C(), collision.trackOccupancyInTimeRange()));
10971097

10981098
float sp = RecoDecay::dotProd(std::array<float, 2>{static_cast<float>(std::cos(nmod * v12.Phi())), static_cast<float>(std::sin(nmod * v12.Phi()))}, qvectors[nmod][cfgQvecEstimator]) / getSPresolution(collision.centFT0C(), collision.trackOccupancyInTimeRange());
1099-
for(int i = 0; i<cfgNumBootstrapSamples; i++){
1099+
for (int i = 0; i < cfgNumBootstrapSamples; i++) {
11001100
if (t1.sign() * t2.sign() < 0) { // ULS
11011101
fRegistry.fill(HIST("Pair/") + HIST(event_pair_types[ev_id]) + HIST("uls/hs"), v12.M(), v12.Pt(), pair_dca, v12.Rapidity(), sp, i + 0.5, weightvector.at(i));
11021102
} else if (t1.sign() > 0 && t2.sign() > 0) { // LS++
@@ -1311,17 +1311,16 @@ struct Dilepton {
13111311

13121312
std::vector<float> bootstrapweights = {};
13131313
int randomSeed = static_cast<int>(std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count());
1314-
TRandom3 randomNumber(randomSeed);
1315-
if(cfgAnalysisType == static_cast<int>(o2::aod::pwgem::dilepton::utils::pairutil::DileptonAnalysisType::kBootstrapv2)){ // bootstrapping for accepted events
1316-
for(int i = 0; i<cfgNumBootstrapSamples; i++){
1314+
TRandom3 randomNumber(randomSeed);
1315+
if (cfgAnalysisType == static_cast<int>(o2::aod::pwgem::dilepton::utils::pairutil::DileptonAnalysisType::kBootstrapv2)) { // bootstrapping for accepted events
1316+
for (int i = 0; i < cfgNumBootstrapSamples; i++) {
13171317
float poissonweight = 0.;
13181318
poissonweight = static_cast<float>(randomNumber.PoissonD(1.0));
13191319
bootstrapweights.push_back(poissonweight);
13201320
o2::aod::pwgem::dilepton::utils::eventhistogram::fillEventInfoBootstrap(&fRegistry, collision, i, poissonweight);
13211321
}
1322-
}
1323-
else{
1324-
bootstrapweights.push_back(1.0); // to pass as non-empyt dummy to use
1322+
} else {
1323+
bootstrapweights.push_back(1.0); // to pass as non-empyt dummy to use
13251324
}
13261325

13271326
if (nmod == 2) {

PWGEM/Dilepton/Utils/EventHistograms.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,11 @@ void addEventHistogramsBootstrap(HistogramRegistry* fRegistry, int nsamples = 1)
156156
fRegistry->add("Event/bootstrap/hPrfQ2FT0AQ2BPos_CentFT0C_bootstrap", "Q_{2}^{FT0A} #upoint Q_{2}^{BPos};centrality FT0C (%);bootstrap sample;Q_{2}^{FT0A} #upoint Q_{2}^{BPos}", kTProfile2D, {{100, 0, 100}, {nsamples, 0.5, nsamples + 0.5}}, false);
157157
fRegistry->add("Event/bootstrap/hPrfQ2FT0AQ2BNeg_CentFT0C_bootstrap", "Q_{2}^{FT0A} #upoint Q_{2}^{BNeg};centrality FT0C (%);bootstrap sample;Q_{2}^{FT0A} #upoint Q_{2}^{BNeg}", kTProfile2D, {{100, 0, 100}, {nsamples, 0.5, nsamples + 0.5}}, false);
158158
fRegistry->add("Event/bootstrap/hPrfQ2FT0AQ2BTot_CentFT0C_bootstrap", "Q_{2}^{FT0A} #upoint Q_{2}^{BTot};centrality FT0C (%);bootstrap sample;Q_{2}^{FT0A} #upoint Q_{2}^{BTot}", kTProfile2D, {{100, 0, 100}, {nsamples, 0.5, nsamples + 0.5}}, false);
159-
fRegistry->add("Event/bootstrap/hPrfQ2FT0AQ2FT0C_CentFT0C_bootstrap", "Q_{2}^{FT0A} #upoint Q_{2}^{FT0C};centrality FT0C (%);bootstrap sample;Q_{2}^{FT0A} #upoint Q_{2}^{FT0C}", kTProfile2D, {{100, 0, 100}, {nsamples, 0.5, nsamples + 0.5}}, false);
159+
fRegistry->add("Event/bootstrap/hPrfQ2FT0AQ2FT0C_CentFT0C_bootstrap", "Q_{2}^{FT0A} #upoint Q_{2}^{FT0C};centrality FT0C (%);bootstrap sample;Q_{2}^{FT0A} #upoint Q_{2}^{FT0C}", kTProfile2D, {{100, 0, 100}, {nsamples, 0.5, nsamples + 0.5}}, false);
160160
fRegistry->add("Event/bootstrap/hPrfQ2FV0AQ2BPos_CentFT0C_bootstrap", "Q_{2}^{FV0A} #upoint Q_{2}^{BPos};centrality FT0C (%);bootstrap sample;Q_{2}^{FV0A} #upoint Q_{2}^{BPos}", kTProfile2D, {{100, 0, 100}, {nsamples, 0.5, nsamples + 0.5}}, false);
161161
fRegistry->add("Event/bootstrap/hPrfQ2FV0AQ2BNeg_CentFT0C_bootstrap", "Q_{2}^{FV0A} #upoint Q_{2}^{BNeg};centrality FT0C (%);bootstrap sample;Q_{2}^{FV0A} #upoint Q_{2}^{BNeg}", kTProfile2D, {{100, 0, 100}, {nsamples, 0.5, nsamples + 0.5}}, false);
162162
fRegistry->add("Event/bootstrap/hPrfQ2FV0AQ2BTot_CentFT0C_bootstrap", "Q_{2}^{FV0A} #upoint Q_{2}^{BTot};centrality FT0C (%);bootstrap sample;Q_{2}^{FV0A} #upoint Q_{2}^{BTot}", kTProfile2D, {{100, 0, 100}, {nsamples, 0.5, nsamples + 0.5}}, false);
163-
fRegistry->add("Event/bootstrap/hPrfQ2FV0AQ2FT0C_CentFT0C_bootstrap", "Q_{2}^{FV0A} #upoint Q_{2}^{FT0C};centrality FT0C (%);bootstrap sample;Q_{2}^{FV0A} #upoint Q_{2}^{FT0C}", kTProfile2D, {{100, 0, 100}, {nsamples, 0.5, nsamples + 0.5}}, false);
163+
fRegistry->add("Event/bootstrap/hPrfQ2FV0AQ2FT0C_CentFT0C_bootstrap", "Q_{2}^{FV0A} #upoint Q_{2}^{FT0C};centrality FT0C (%);bootstrap sample;Q_{2}^{FV0A} #upoint Q_{2}^{FT0C}", kTProfile2D, {{100, 0, 100}, {nsamples, 0.5, nsamples + 0.5}}, false);
164164
}
165165

166166
template <const int ev_id, const int nmod = -1, typename TCollision>
@@ -351,11 +351,11 @@ void fillEventInfoBootstrap(HistogramRegistry* fRegistry, TCollision const& coll
351351
fRegistry->fill(HIST("Event/bootstrap/hPrfQ2FT0AQ2BPos_CentFT0C_bootstrap"), collision.centFT0C(), sample + 0.5, RecoDecay::dotProd(q2ft0a, q2bpos), weight);
352352
fRegistry->fill(HIST("Event/bootstrap/hPrfQ2FT0AQ2BNeg_CentFT0C_bootstrap"), collision.centFT0C(), sample + 0.5, RecoDecay::dotProd(q2ft0a, q2bneg), weight);
353353
fRegistry->fill(HIST("Event/bootstrap/hPrfQ2FT0AQ2BTot_CentFT0C_bootstrap"), collision.centFT0C(), sample + 0.5, RecoDecay::dotProd(q2ft0a, q2btot), weight);
354-
fRegistry->fill(HIST("Event/bootstrap/hPrfQ2FT0AQ2FT0C_CentFT0C_bootstrap"), collision.centFT0C(), sample + 0.5, RecoDecay::dotProd(q2ft0a, q2ft0c), weight);
354+
fRegistry->fill(HIST("Event/bootstrap/hPrfQ2FT0AQ2FT0C_CentFT0C_bootstrap"), collision.centFT0C(), sample + 0.5, RecoDecay::dotProd(q2ft0a, q2ft0c), weight);
355355
fRegistry->fill(HIST("Event/bootstrap/hPrfQ2FV0AQ2BPos_CentFT0C_bootstrap"), collision.centFT0C(), sample + 0.5, RecoDecay::dotProd(q2fv0a, q2bpos), weight);
356356
fRegistry->fill(HIST("Event/bootstrap/hPrfQ2FV0AQ2BNeg_CentFT0C_bootstrap"), collision.centFT0C(), sample + 0.5, RecoDecay::dotProd(q2fv0a, q2bneg), weight);
357357
fRegistry->fill(HIST("Event/bootstrap/hPrfQ2FV0AQ2BTot_CentFT0C_bootstrap"), collision.centFT0C(), sample + 0.5, RecoDecay::dotProd(q2fv0a, q2btot), weight);
358-
fRegistry->fill(HIST("Event/bootstrap/hPrfQ2FV0AQ2FT0C_CentFT0C_bootstrap"), collision.centFT0C(), sample + 0.5, RecoDecay::dotProd(q2fv0a, q2ft0c), weight);
358+
fRegistry->fill(HIST("Event/bootstrap/hPrfQ2FV0AQ2FT0C_CentFT0C_bootstrap"), collision.centFT0C(), sample + 0.5, RecoDecay::dotProd(q2fv0a, q2ft0c), weight);
359359
}
360360
} // namespace o2::aod::pwgem::dilepton::utils::eventhistogram
361361
#endif // PWGEM_DILEPTON_UTILS_EVENTHISTOGRAMS_H_

0 commit comments

Comments
 (0)