Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 14 additions & 24 deletions PWGCF/TwoParticleCorrelations/Tasks/corrFit.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@
O2_DEFINE_CONFIGURABLE(cfgMaxMultForCorrelations, int, 20, "maximum multiplicity for correlations")
O2_DEFINE_CONFIGURABLE(cfgRefMultiplicity, bool, false, "Use multiplicity of reference tracks for multiplicity correlation cut instead of Nch")


struct : ConfigurableGroup{
O2_DEFINE_CONFIGURABLE(cfgPtCutMin, float, 0.2f, "minimum accepted track pT")
O2_DEFINE_CONFIGURABLE(cfgPtCutMax, float, 10.0f, "maximum accepted track pT")
Expand Down Expand Up @@ -690,7 +689,7 @@
TFile* fEfficiencyTrigger = TFile::Open(cfgEfficiency.value.c_str(), "READ");
mEfficiency = reinterpret_cast<TH3D*>(fEfficiencyTrigger->Get("ccdb_object"));

std::cout << "Loaded efficiency histogram from local file " << cfgEfficiency.value.c_str() << " with pointer " << mEfficiency << std::endl;

Check failure on line 692 in PWGCF/TwoParticleCorrelations/Tasks/corrFit.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[logging]

Use O2 logging (LOG, LOGF, LOGP).
} else {
mEfficiency = ccdb->getForTimeStamp<TH3D>(cfgEfficiency, timestamp);
}
Expand All @@ -699,20 +698,19 @@
}
LOGF(info, "Loaded efficiency histogram from %s (%p)", cfgEfficiency.value.c_str(), (void*)mEfficiency);
}
if (cfgEfficiencyNch.value.empty() == false){
if (cfgEfficiencyNch.value.empty() == false) {
if (cfgLocalEfficiencyNch) {
TFile* fEfficiencyTrigger = TFile::Open(cfgEfficiencyNch.value.c_str(), "READ");
mEfficiencyNch = reinterpret_cast<TH1D*>(fEfficiencyTrigger->Get("ccdb_object"));

std::cout << "Loaded efficiency for Nch corrected histogram from local file " << cfgEfficiencyNch.value.c_str() << " with pointer " << mEfficiencyNch << std::endl;

Check failure on line 706 in PWGCF/TwoParticleCorrelations/Tasks/corrFit.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[logging]

Use O2 logging (LOG, LOGF, LOGP).
} else {
mEfficiencyNch = ccdb->getForTimeStamp<TH1D>(cfgEfficiencyNch, timestamp);
}
if (!mEfficiencyNch ) {
if (!mEfficiencyNch) {
LOGF(fatal, "Could not load efficiency histogram for trigger particles from %s", cfgEfficiencyNch.value.c_str());
}
LOGF(info, "Loaded efficiency histogram from %s (%p)", cfgEfficiencyNch.value.c_str(), (void*)mEfficiencyNch);

}
if (cfgCentralityWeight.value.empty() == false) {
mCentralityWeight = ccdb->getForTimeStamp<TH1D>(cfgCentralityWeight, timestamp);
Expand Down Expand Up @@ -782,20 +780,18 @@
float weight_Nch = 1.0f;
for (auto const& track : tracks) {

if (cfgRefMultiplicity){
if (cfgRefMultiplicity) {
if (track.pt() < 0.2 || track.pt() > 3.0)

Check failure on line 784 in PWGCF/TwoParticleCorrelations/Tasks/corrFit.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
continue;
continue;
}

if (!getEfficiencyCorrection_Nch(weight_Nch, track.pt())) {
continue;
}

nTracksCorrected += weight_Nch;

}
multiplicity = nTracksCorrected;

}

template <CorrelationContainer::CFStep step, typename TTracks, typename TFT0s>
Expand Down Expand Up @@ -988,9 +984,9 @@
continue;

if (cfgRefpTt) {
if (track2.pt() > cfgRefpTMax) {
continue;
}
if (track2.pt() > cfgRefpTMax) {
continue;
}
}
if (track1.pt() <= track2.pt())
continue; // skip if the trigger pt is less than the associate pt
Expand Down Expand Up @@ -1084,7 +1080,6 @@
return;
}


const auto& ft0 = collision.foundFT0();
fillCorrelationsTPCFT0<CorrelationContainer::kCFStepReconstructed>(tracks, ft0, collision.posZ(), SameEvent, multiplicity, kFT0A, eventWeight);
}
Expand Down Expand Up @@ -1136,9 +1131,8 @@
}

if (cfgQaCheck) {
registry.fill(HIST("Nch_corrected"), multiplicity);
}

registry.fill(HIST("Nch_corrected"), multiplicity);
}

const auto& ft0 = collision2.foundFT0();
fillCorrelationsTPCFT0<CorrelationContainer::kCFStepReconstructed>(tracks1, ft0, collision1.posZ(), MixedEvent, multiplicity, kFT0A, eventWeight);
Expand Down Expand Up @@ -1185,7 +1179,6 @@
registry.fill(HIST("Nch_corrected"), multiplicity);
}


fillCorrelationsTPCFT0<CorrelationContainer::kCFStepReconstructed>(tracks, ft0, collision.posZ(), SameEvent, multiplicity, kFT0C, 1.0f);
}
PROCESS_SWITCH(CorrFit, processSameTpcFt0c, "Process same event for TPC-FT0C correlation", false);
Expand Down Expand Up @@ -1236,9 +1229,8 @@
}

if (cfgQaCheck) {
registry.fill(HIST("Nch_corrected"), multiplicity);
}

registry.fill(HIST("Nch_corrected"), multiplicity);
}

fillCorrelationsTPCFT0<CorrelationContainer::kCFStepReconstructed>(tracks1, ft0, collision1.posZ(), MixedEvent, multiplicity, kFT0C, eventWeight);
}
Expand Down Expand Up @@ -1287,7 +1279,6 @@
registry.fill(HIST("Nch_corrected"), multiplicity);
}


fillCorrelationsFT0AFT0C<CorrelationContainer::kCFStepReconstructed>(ft0, ft0, collision.posZ(), SameEvent, multiplicity, eventWeight);
}
PROCESS_SWITCH(CorrFit, processSameFt0aFt0c, "Process same event for FT0A-FT0C correlation", true);
Expand Down Expand Up @@ -1340,8 +1331,8 @@
}

if (cfgQaCheck) {
registry.fill(HIST("Nch_corrected"), multiplicity);
}
registry.fill(HIST("Nch_corrected"), multiplicity);
}
registry.fill(HIST("eventcount"), MixedEvent); // fill the mixed event in the 3 bin

fillCorrelationsFT0AFT0C<CorrelationContainer::kCFStepReconstructed>(ft0Col1, ft0Col2, collision1.posZ(), MixedEvent, multiplicity, eventWeight);
Expand All @@ -1368,9 +1359,8 @@

registry.fill(HIST("eventcount"), SameEvent); // because its same event i put it in the 1 bin
loadCorrection(bc.timestamp());

fillYield(collision, tracks);


double multiplicity = tracks.size();

Expand Down
Loading