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
62 changes: 31 additions & 31 deletions PWGLF/Tasks/Nuspex/antinucleiInJets.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,11 @@
// Configuration parameters for CCDB access and reweighting input files
Configurable<std::string> urlToCcdb{"urlToCcdb", "http://alice-ccdb.cern.ch", "url of the personal ccdb"};
Configurable<std::string> pathToFile{"pathToFile", "Users/a/alcaliva/PrimaryFractionAntip", "path to file with reweighting"};
Configurable<std::string> nameReweightingAntiprotons{"weights_proton", "", "nameReweightingAntiprotons"};

Check failure on line 148 in PWGLF/Tasks/Nuspex/antinucleiInJets.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
Configurable<std::string> nameReweightingAntilambda{"weights_lambda", "", "nameReweightingAntilambda"};

Check failure on line 149 in PWGLF/Tasks/Nuspex/antinucleiInJets.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
Configurable<std::string> nameReweightingAntisigma{"weights_sigma", "", "nameReweightingAntisigma"};

Check failure on line 150 in PWGLF/Tasks/Nuspex/antinucleiInJets.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
Configurable<std::string> nameReweightingAntixi{"weights_xi", "", "nameReweightingAntixi"};

Check failure on line 151 in PWGLF/Tasks/Nuspex/antinucleiInJets.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
Configurable<std::string> nameReweightingAntiomega{"weights_omega", "", "nameReweightingAntiomega"};

Check failure on line 152 in PWGLF/Tasks/Nuspex/antinucleiInJets.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)

// Reweighting histograms
TH1F* primaryAntiprotons;
Expand Down Expand Up @@ -480,8 +480,8 @@
}

void getReweightingHistograms(o2::framework::Service<o2::ccdb::BasicCCDBManager> const& ccdbObj,
TString filepath, TString antip, TString antilambda, TString antisigma,
TString antixi, TString antiomega)
TString filepath, TString antip, TString antilambda, TString antisigma,
TString antixi, TString antiomega)
{
TList* list = ccdbObj->get<TList>(filepath.Data());
if (!list) {
Expand All @@ -490,10 +490,10 @@
}

primaryAntiprotons = static_cast<TH1F*>(list->FindObject(antip));
primaryAntiLambda = static_cast<TH1F*>(list->FindObject(antilambda));
primaryAntiSigma = static_cast<TH1F*>(list->FindObject(antisigma));
primaryAntiXi = static_cast<TH1F*>(list->FindObject(antixi));
primaryAntiOmega = static_cast<TH1F*>(list->FindObject(antiomega));
primaryAntiLambda = static_cast<TH1F*>(list->FindObject(antilambda));
primaryAntiSigma = static_cast<TH1F*>(list->FindObject(antisigma));
primaryAntiXi = static_cast<TH1F*>(list->FindObject(antixi));
primaryAntiOmega = static_cast<TH1F*>(list->FindObject(antiomega));

if (!primaryAntiprotons || !primaryAntiSigma || !primaryAntiLambda || !primaryAntiXi || !primaryAntiOmega) {
LOGP(error, "Missing one or more reweighting histograms in CCDB list");
Expand Down Expand Up @@ -1416,11 +1416,11 @@
double wPrimStd(1.0), wPrimUp(1.0), wPrimLow(1.0);

// Weight assignment
if (particle.pt() < primaryAntiprotons -> GetXaxis() -> GetXmax()) {
int ipt = primaryAntiprotons -> FindBin(particle.pt());
wPrimStd = primaryAntiprotons -> GetBinContent(ipt);
wPrimUp = wPrimStd + primaryAntiprotons -> GetBinError(ipt);
wPrimLow = wPrimStd - primaryAntiprotons -> GetBinError(ipt);
if (particle.pt() < primaryAntiprotons->GetXaxis()->GetXmax()) {
int ipt = primaryAntiprotons->FindBin(particle.pt());
wPrimStd = primaryAntiprotons->GetBinContent(ipt);
wPrimUp = wPrimStd + primaryAntiprotons->GetBinError(ipt);
wPrimLow = wPrimStd - primaryAntiprotons->GetBinError(ipt);
}

// Fill histograms
Expand All @@ -1439,44 +1439,44 @@

// Antiprotons from sigma
if (std::abs(mother.pdgCode()) == PDG_t::kSigmaBarMinus) {
if (mother.pt() < primaryAntiSigma -> GetXaxis() -> GetXmax()) {
int ipt = primaryAntiSigma -> FindBin(mother.pt());
wSecStd = primaryAntiSigma -> GetBinContent(ipt);
wSecUp = wSecStd + primaryAntiSigma -> GetBinError(ipt);
wSecLow = wSecStd - primaryAntiSigma -> GetBinError(ipt);
if (mother.pt() < primaryAntiSigma->GetXaxis()->GetXmax()) {
int ipt = primaryAntiSigma->FindBin(mother.pt());
wSecStd = primaryAntiSigma->GetBinContent(ipt);
wSecUp = wSecStd + primaryAntiSigma->GetBinError(ipt);
wSecLow = wSecStd - primaryAntiSigma->GetBinError(ipt);
}
}

// Antiprotons from primary Lambda0
if (std::abs(mother.pdgCode()) == kLambda0Bar) {
if (mother.isPhysicalPrimary()) {
if (mother.pt() < primaryAntiLambda -> GetXaxis() -> GetXmax()) {
int ipt = primaryAntiLambda -> FindBin(mother.pt());
wSecStd = primaryAntiLambda -> GetBinContent(ipt);
wSecUp = wSecStd + primaryAntiLambda -> GetBinError(ipt);
wSecLow = wSecStd - primaryAntiLambda -> GetBinError(ipt);
if (mother.pt() < primaryAntiLambda->GetXaxis()->GetXmax()) {
int ipt = primaryAntiLambda->FindBin(mother.pt());
wSecStd = primaryAntiLambda->GetBinContent(ipt);
wSecUp = wSecStd + primaryAntiLambda->GetBinError(ipt);
wSecLow = wSecStd - primaryAntiLambda->GetBinError(ipt);
}
}

// Antiprotons from secondary Lambda0 (Xi -> Lambda0)
if (!mother.isPhysicalPrimary()) {
auto grandmother = mcParticles.iteratorAt(mother.mothersIds()[0]);
if (std::abs(grandmother.pdgCode()) == kXiMinus) {
if (grandmother.pt() < primaryAntiXi -> GetXaxis() -> GetXmax()) {
int ipt = primaryAntiXi -> FindBin(grandmother.pt());
wSecStd = primaryAntiXi -> GetBinContent(ipt);
wSecUp = wSecStd + primaryAntiXi -> GetBinError(ipt);
wSecLow = wSecStd - primaryAntiXi -> GetBinError(ipt);
if (grandmother.pt() < primaryAntiXi->GetXaxis()->GetXmax()) {
int ipt = primaryAntiXi->FindBin(grandmother.pt());
wSecStd = primaryAntiXi->GetBinContent(ipt);
wSecUp = wSecStd + primaryAntiXi->GetBinError(ipt);
wSecLow = wSecStd - primaryAntiXi->GetBinError(ipt);
}
}

// Antiprotons from secondary Lambda0 (Omega -> Lambda0)
if (std::abs(grandmother.pdgCode()) == kOmegaMinus) {
if (grandmother.pt() < primaryAntiOmega -> GetXaxis() -> GetXmax()) {
int ipt = primaryAntiOmega -> FindBin(grandmother.pt());
wSecStd = primaryAntiOmega -> GetBinContent(ipt);
wSecUp = wSecStd + primaryAntiOmega -> GetBinError(ipt);
wSecLow = wSecStd - primaryAntiOmega -> GetBinError(ipt);
if (grandmother.pt() < primaryAntiOmega->GetXaxis()->GetXmax()) {
int ipt = primaryAntiOmega->FindBin(grandmother.pt());
wSecStd = primaryAntiOmega->GetBinContent(ipt);
wSecUp = wSecStd + primaryAntiOmega->GetBinError(ipt);
wSecLow = wSecStd - primaryAntiOmega->GetBinError(ipt);
}
}
}
Expand Down
Loading