@@ -479,9 +479,7 @@ struct AntinucleiInJets {
479479 }
480480 }
481481
482- void getReweightingHistograms (o2::framework::Service<o2::ccdb::BasicCCDBManager> const & ccdbObj,
483- TString filepath, TString antip, TString antilambda, TString antisigma,
484- TString antixi, TString antiomega)
482+ void getReweightingHistograms (o2::framework::Service<o2::ccdb::BasicCCDBManager> const & ccdbObj, TString filepath, TString antip, TString antilambda, TString antisigma, TString antixi, TString antiomega)
485483 {
486484 TList* list = ccdbObj->get <TList>(filepath.Data ());
487485 if (!list) {
@@ -490,10 +488,10 @@ struct AntinucleiInJets {
490488 }
491489
492490 primaryAntiprotons = static_cast <TH1F*>(list->FindObject (antip));
493- primaryAntiLambda = static_cast <TH1F*>(list->FindObject (antilambda));
494- primaryAntiSigma = static_cast <TH1F*>(list->FindObject (antisigma));
495- primaryAntiXi = static_cast <TH1F*>(list->FindObject (antixi));
496- primaryAntiOmega = static_cast <TH1F*>(list->FindObject (antiomega));
491+ primaryAntiLambda = static_cast <TH1F*>(list->FindObject (antilambda));
492+ primaryAntiSigma = static_cast <TH1F*>(list->FindObject (antisigma));
493+ primaryAntiXi = static_cast <TH1F*>(list->FindObject (antixi));
494+ primaryAntiOmega = static_cast <TH1F*>(list->FindObject (antiomega));
497495
498496 if (!primaryAntiprotons || !primaryAntiSigma || !primaryAntiLambda || !primaryAntiXi || !primaryAntiOmega) {
499497 LOGP (error, " Missing one or more reweighting histograms in CCDB list" );
@@ -1416,11 +1414,11 @@ struct AntinucleiInJets {
14161414 double wPrimStd (1.0 ), wPrimUp (1.0 ), wPrimLow (1.0 );
14171415
14181416 // Weight assignment
1419- if (particle.pt () < primaryAntiprotons -> GetXaxis () -> GetXmax ()) {
1420- int ipt = primaryAntiprotons -> FindBin (particle.pt ());
1421- wPrimStd = primaryAntiprotons -> GetBinContent (ipt);
1422- wPrimUp = wPrimStd + primaryAntiprotons -> GetBinError (ipt);
1423- wPrimLow = wPrimStd - primaryAntiprotons -> GetBinError (ipt);
1417+ if (particle.pt () < primaryAntiprotons-> GetXaxis ()-> GetXmax ()) {
1418+ int ipt = primaryAntiprotons-> FindBin (particle.pt ());
1419+ wPrimStd = primaryAntiprotons-> GetBinContent (ipt);
1420+ wPrimUp = wPrimStd + primaryAntiprotons-> GetBinError (ipt);
1421+ wPrimLow = wPrimStd - primaryAntiprotons-> GetBinError (ipt);
14241422 }
14251423
14261424 // Fill histograms
@@ -1439,44 +1437,44 @@ struct AntinucleiInJets {
14391437
14401438 // Antiprotons from sigma
14411439 if (std::abs (mother.pdgCode ()) == PDG_t::kSigmaBarMinus ) {
1442- if (mother.pt () < primaryAntiSigma -> GetXaxis () -> GetXmax ()) {
1443- int ipt = primaryAntiSigma -> FindBin (mother.pt ());
1444- wSecStd = primaryAntiSigma -> GetBinContent (ipt);
1445- wSecUp = wSecStd + primaryAntiSigma -> GetBinError (ipt);
1446- wSecLow = wSecStd - primaryAntiSigma -> GetBinError (ipt);
1440+ if (mother.pt () < primaryAntiSigma-> GetXaxis ()-> GetXmax ()) {
1441+ int ipt = primaryAntiSigma-> FindBin (mother.pt ());
1442+ wSecStd = primaryAntiSigma-> GetBinContent (ipt);
1443+ wSecUp = wSecStd + primaryAntiSigma-> GetBinError (ipt);
1444+ wSecLow = wSecStd - primaryAntiSigma-> GetBinError (ipt);
14471445 }
14481446 }
14491447
14501448 // Antiprotons from primary Lambda0
14511449 if (std::abs (mother.pdgCode ()) == kLambda0Bar ) {
14521450 if (mother.isPhysicalPrimary ()) {
1453- if (mother.pt () < primaryAntiLambda -> GetXaxis () -> GetXmax ()) {
1454- int ipt = primaryAntiLambda -> FindBin (mother.pt ());
1455- wSecStd = primaryAntiLambda -> GetBinContent (ipt);
1456- wSecUp = wSecStd + primaryAntiLambda -> GetBinError (ipt);
1457- wSecLow = wSecStd - primaryAntiLambda -> GetBinError (ipt);
1451+ if (mother.pt () < primaryAntiLambda-> GetXaxis ()-> GetXmax ()) {
1452+ int ipt = primaryAntiLambda-> FindBin (mother.pt ());
1453+ wSecStd = primaryAntiLambda-> GetBinContent (ipt);
1454+ wSecUp = wSecStd + primaryAntiLambda-> GetBinError (ipt);
1455+ wSecLow = wSecStd - primaryAntiLambda-> GetBinError (ipt);
14581456 }
14591457 }
14601458
14611459 // Antiprotons from secondary Lambda0 (Xi -> Lambda0)
14621460 if (!mother.isPhysicalPrimary ()) {
14631461 auto grandmother = mcParticles.iteratorAt (mother.mothersIds ()[0 ]);
14641462 if (std::abs (grandmother.pdgCode ()) == kXiMinus ) {
1465- if (grandmother.pt () < primaryAntiXi -> GetXaxis () -> GetXmax ()) {
1466- int ipt = primaryAntiXi -> FindBin (grandmother.pt ());
1467- wSecStd = primaryAntiXi -> GetBinContent (ipt);
1468- wSecUp = wSecStd + primaryAntiXi -> GetBinError (ipt);
1469- wSecLow = wSecStd - primaryAntiXi -> GetBinError (ipt);
1463+ if (grandmother.pt () < primaryAntiXi-> GetXaxis ()-> GetXmax ()) {
1464+ int ipt = primaryAntiXi-> FindBin (grandmother.pt ());
1465+ wSecStd = primaryAntiXi-> GetBinContent (ipt);
1466+ wSecUp = wSecStd + primaryAntiXi-> GetBinError (ipt);
1467+ wSecLow = wSecStd - primaryAntiXi-> GetBinError (ipt);
14701468 }
14711469 }
14721470
14731471 // Antiprotons from secondary Lambda0 (Omega -> Lambda0)
14741472 if (std::abs (grandmother.pdgCode ()) == kOmegaMinus ) {
1475- if (grandmother.pt () < primaryAntiOmega -> GetXaxis () -> GetXmax ()) {
1476- int ipt = primaryAntiOmega -> FindBin (grandmother.pt ());
1477- wSecStd = primaryAntiOmega -> GetBinContent (ipt);
1478- wSecUp = wSecStd + primaryAntiOmega -> GetBinError (ipt);
1479- wSecLow = wSecStd - primaryAntiOmega -> GetBinError (ipt);
1473+ if (grandmother.pt () < primaryAntiOmega-> GetXaxis ()-> GetXmax ()) {
1474+ int ipt = primaryAntiOmega-> FindBin (grandmother.pt ());
1475+ wSecStd = primaryAntiOmega-> GetBinContent (ipt);
1476+ wSecUp = wSecStd + primaryAntiOmega-> GetBinError (ipt);
1477+ wSecLow = wSecStd - primaryAntiOmega-> GetBinError (ipt);
14801478 }
14811479 }
14821480 }
0 commit comments