Skip to content

Commit b1c6b6e

Browse files
author
Francesco Mazzaschi
committed
Initialize PIDResponseITS only once
1 parent c7d4892 commit b1c6b6e

File tree

1 file changed

+6
-19
lines changed

1 file changed

+6
-19
lines changed

PWGLF/Tasks/Nuspex/antinucleiInJets.cxx

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ struct AntinucleiInJets {
149149
Zorro zorro;
150150
OutputObj<ZorroSummary> zorroSummary{"zorroSummary"};
151151

152+
o2::aod::ITSResponse itsResponse;
153+
152154
// Utility object for jet background subtraction methods
153155
JetBkgSubUtils backgroundSub;
154156

@@ -173,6 +175,10 @@ struct AntinucleiInJets {
173175
double max = 6.0;
174176
int nbins = 120;
175177

178+
if (doprocessJetsMCrec || doprocessAntinucleiEfficiency || doprocessSystEff) {
179+
itsResponse.setMCDefaultParameters();
180+
}
181+
176182
// Quality control histograms for jet/UE topology and multiplicity
177183
if (doprocessQC) {
178184
registryQC.add("deltaEta_deltaPhi_jet", "deltaEta_deltaPhi_jet", HistType::kTH2F, {{200, -0.5, 0.5, "#Delta#eta"}, {200, 0, PIHalf, "#Delta#phi"}});
@@ -743,9 +749,6 @@ struct AntinucleiInJets {
743749
return;
744750
registryData.fill(HIST("number_of_events_data"), 8.5);
745751

746-
// Initialize ITS PID Response object
747-
o2::aod::ITSResponse itsResponse;
748-
749752
// Loop over reconstructed tracks
750753
int id(-1);
751754
std::vector<fastjet::PseudoJet> fjParticles;
@@ -1183,10 +1186,6 @@ struct AntinucleiInJets {
11831186
void processAntinucleiEfficiency(RecCollisionsMc const& collisions, AntiNucleiTracksMc const& mcTracks, aod::McParticles const& mcParticles)
11841187
{
11851188

1186-
// Initialize ITS PID Response object
1187-
o2::aod::ITSResponse itsResponse;
1188-
itsResponse.setMCDefaultParameters();
1189-
11901189
// Loop over all simulated collision events
11911190
for (const auto& collision : collisions) {
11921191

@@ -1496,9 +1495,6 @@ struct AntinucleiInJets {
14961495
// Reconstructed events
14971496
void processJetsMCrec(RecCollisionsMc const& collisions, AntiNucleiTracksMc const& mcTracks, McParticles const&)
14981497
{
1499-
// Initialize ITS PID Response object
1500-
o2::aod::ITSResponse itsResponse;
1501-
itsResponse.setMCDefaultParameters();
15021498

15031499
// Loop over all reconstructed collisions
15041500
for (const auto& collision : collisions) {
@@ -1800,9 +1796,6 @@ struct AntinucleiInJets {
18001796
return;
18011797
registryData.fill(HIST("number_of_events_data_syst"), 7.5);
18021798

1803-
// Initialize ITS PID Response object
1804-
o2::aod::ITSResponse itsResponse;
1805-
18061799
// Cut settings
18071800
static std::vector<double> maxDcaxySyst = {
18081801
0.071, 0.060, 0.066, 0.031, 0.052, 0.078, 0.045, 0.064, 0.036, 0.074,
@@ -1907,9 +1900,6 @@ struct AntinucleiInJets {
19071900
// Process MC with systematic variations of analysis parameters
19081901
void processSystEff(GenCollisionsMc const& genCollisions, RecCollisionsMc const& recCollisions, AntiNucleiTracksMc const& mcTracks, aod::McParticles const& mcParticles)
19091902
{
1910-
// Initialize ITS PID Response object
1911-
o2::aod::ITSResponse itsResponse;
1912-
itsResponse.setMCDefaultParameters();
19131903

19141904
// Cut settings
19151905
static std::vector<double> maxDcaxySyst = {
@@ -2149,9 +2139,6 @@ struct AntinucleiInJets {
21492139
return;
21502140
registryCorr.fill(HIST("eventCounter"), 7.5);
21512141

2152-
// Initialize ITS PID Response object
2153-
o2::aod::ITSResponse itsResponse;
2154-
21552142
// Multiplicity percentile
21562143
const float multiplicity = collision.centFT0M();
21572144

0 commit comments

Comments
 (0)