@@ -196,6 +196,12 @@ struct AntinucleiInJets {
196196 // helium-3
197197 registryData.add (" helium3_jet_tpc" , " helium3_jet_tpc" , HistType::kTH2F , {{nbins, min * 3 , max * 3 , " #it{p}_{T} (GeV/#it{c})" }, {400 , -20.0 , 20.0 , " n#sigma_{TPC}" }});
198198 registryData.add (" helium3_ue_tpc" , " helium3_ue_tpc" , HistType::kTH2F , {{nbins, min * 3 , max * 3 , " #it{p}_{T} (GeV/#it{c})" }, {400 , -20.0 , 20.0 , " n#sigma_{TPC}" }});
199+
200+ // systematic variations
201+ registryData.add (" antiproton_tpc_syst" , " antiproton_tpc_syst" , HistType::kTHnSparseF , {{nbins, min, max, " #it{p}_{T} (GeV/#it{c})" }, {400 , -20.0 , 20.0 , " n#sigma_{TPC}" }, {10 , 0 , 10 , " systematic uncertainty" }});
202+ registryData.add (" antiproton_tof_syst" , " antiproton_tof_syst" , HistType::kTHnSparseF , {{nbins, min, max, " #it{p}_{T} (GeV/#it{c})" }, {400 , -20.0 , 20.0 , " n#sigma_{TOF}" }, {10 , 0 , 10 , " systematic uncertainty" }});
203+ registryData.add (" antideuteron_tpc_syst" , " antideuteron_tpc_syst" , HistType::kTHnSparseF , {{nbins, min * 2 , max * 2 , " #it{p}_{T} (GeV/#it{c})" }, {400 , -20.0 , 20.0 , " n#sigma_{TPC}" }, {10 , 0 , 10 , " systematic uncertainty" }});
204+ registryData.add (" antideuteron_tof_syst" , " antideuteron_tof_syst" , HistType::kTHnSparseF , {{nbins, min * 2 , max * 2 , " #it{p}_{T} (GeV/#it{c})" }, {400 , -20.0 , 20.0 , " n#sigma_{TOF}" }, {10 , 0 , 10 , " systematic uncertainty" }});
199205 }
200206
201207 // monte carlo histograms
@@ -1172,6 +1178,135 @@ struct AntinucleiInJets {
11721178 }
11731179 }
11741180 PROCESS_SWITCH (AntinucleiInJets, processJetsMCrec, " process jets MC rec" , false );
1181+
1182+ // Process Systematics
1183+ void processSystematicsData (SelectedCollisions::iterator const & collision, FullNucleiTracks const & tracks)
1184+ {
1185+ const int nSystematics = 10 ;
1186+ int itsNclustersSyst[nSystematics] = {5 , 6 , 5 , 4 , 5 , 3 , 5 , 6 , 3 , 4 };
1187+ float tpcNcrossedRowsSyst[nSystematics] = {100 , 85 , 80 , 110 , 95 , 90 , 105 , 95 , 100 , 105 };
1188+ float dcaxySyst[nSystematics] = {0.05 , 0.07 , 0.10 , 0.03 , 0.06 , 0.15 , 0.08 , 0.04 , 0.09 , 0.10 };
1189+ float dcazSyst[nSystematics] = {0.1 , 0.15 , 0.3 , 0.075 , 0.12 , 0.18 , 0.2 , 0.1 , 0.15 , 0.2 };
1190+
1191+ // event selection
1192+ if (!collision.sel8 () || std::fabs (collision.posZ ()) > zVtx)
1193+ return ;
1194+
1195+ // loop over reconstructed tracks
1196+ int id (-1 );
1197+ std::vector<fastjet::PseudoJet> fjParticles;
1198+ for (auto const & track : tracks) {
1199+ id++;
1200+ if (!passedTrackSelectionForJetReconstruction (track))
1201+ continue ;
1202+
1203+ // 4-momentum representation of a particle
1204+ fastjet::PseudoJet fourMomentum (track.px (), track.py (), track.pz (), track.energy (MassPionCharged));
1205+ fourMomentum.set_user_index (id);
1206+ fjParticles.emplace_back (fourMomentum);
1207+ }
1208+
1209+ // reject empty events
1210+ if (fjParticles.size () < 1 )
1211+ return ;
1212+
1213+ // cluster particles using the anti-kt algorithm
1214+ fastjet::JetDefinition jetDef (fastjet::antikt_algorithm, rJet);
1215+ fastjet::AreaDefinition areaDef (fastjet::active_area, fastjet::GhostedAreaSpec (1.0 )); // active_area_explicit_ghosts
1216+ fastjet::ClusterSequenceArea cs (fjParticles, jetDef, areaDef);
1217+ std::vector<fastjet::PseudoJet> jets = fastjet::sorted_by_pt (cs.inclusive_jets ());
1218+ auto [rhoPerp, rhoMPerp] = backgroundSub.estimateRhoPerpCone (fjParticles, jets);
1219+
1220+ // loop over reconstructed jets
1221+ for (auto & jet : jets) {
1222+
1223+ // jet must be fully contained in the acceptance
1224+ if ((std::fabs (jet.eta ()) + rJet) > (maxEta - deltaEtaEdge))
1225+ continue ;
1226+
1227+ // jet pt must be larger than threshold
1228+ fastjet::PseudoJet jetMinusBkg = backgroundSub.doRhoAreaSub (jet, rhoPerp, rhoMPerp);
1229+ if (getCorrectedPt (jetMinusBkg.pt ()) < minJetPt)
1230+ continue ;
1231+
1232+ // get jet constituents
1233+ std::vector<fastjet::PseudoJet> jetConstituents = jet.constituents ();
1234+ o2::aod::ITSResponse itsResponse;
1235+
1236+ // loop over jet constituents
1237+ for (const auto & particle : jetConstituents) {
1238+ for (int i = 0 ; i < nSystematics; i++) {
1239+ // get corresponding track and apply track selection criteria
1240+ auto const & track = tracks.iteratorAt (particle.user_index ());
1241+
1242+ // variables
1243+ double nsigmaTPCPr = track.tpcNSigmaPr ();
1244+ double nsigmaTOFPr = track.tofNSigmaPr ();
1245+ double nsigmaTPCDe = track.tpcNSigmaDe ();
1246+ double nsigmaTOFDe = track.tofNSigmaDe ();
1247+ double pt = track.pt ();
1248+ double dcaxy = track.dcaXY ();
1249+ double dcaz = track.dcaZ ();
1250+
1251+ if (requirePvContributor && !(track.isPVContributor ()))
1252+ continue ;
1253+ if (!track.hasITS ())
1254+ continue ;
1255+ if (track.itsNCls () < itsNclustersSyst[i])
1256+ continue ;
1257+ if (!track.hasTPC ())
1258+ continue ;
1259+ if (track.tpcNClsCrossedRows () < tpcNcrossedRowsSyst[i])
1260+ continue ;
1261+ if ((static_cast <double >(track.tpcNClsCrossedRows ()) / static_cast <double >(track.tpcNClsFindable ())) < minTpcNcrossedRowsOverFindable)
1262+ continue ;
1263+ if (track.tpcChi2NCl () > maxChiSquareTpc)
1264+ continue ;
1265+ if (track.itsChi2NCl () > maxChiSquareIts)
1266+ continue ;
1267+ if (track.eta () < minEta || track.eta () > maxEta)
1268+ continue ;
1269+ if (track.pt () < minPt)
1270+ continue ;
1271+ if (std::fabs (dcaxy) > dcaxySyst[i])
1272+ continue ;
1273+ if (std::fabs (dcaz) > dcazSyst[i])
1274+ continue ;
1275+
1276+ bool passedItsPidProt (false ), passedItsPidDeut (false );
1277+ if (itsResponse.nSigmaITS <o2::track::PID::Proton>(track) > nSigmaItsMin && itsResponse.nSigmaITS <o2::track::PID::Proton>(track) < nSigmaItsMax) {
1278+ passedItsPidProt = true ;
1279+ }
1280+ if (itsResponse.nSigmaITS <o2::track::PID::Deuteron>(track) > nSigmaItsMin && itsResponse.nSigmaITS <o2::track::PID::Deuteron>(track) < nSigmaItsMax) {
1281+ passedItsPidDeut = true ;
1282+ }
1283+ if (!applyItsPid) {
1284+ passedItsPidProt = true ;
1285+ passedItsPidDeut = true ;
1286+ }
1287+ if (pt > ptMaxItsPidProt)
1288+ passedItsPidProt = true ;
1289+ if (pt > ptMaxItsPidDeut)
1290+ passedItsPidDeut = true ;
1291+
1292+ // antimatter
1293+ if (track.sign () < 0 ) {
1294+ if (passedItsPidProt) {
1295+ registryData.fill (HIST (" antiproton_tpc_syst" ), pt, nsigmaTPCPr, i);
1296+ if (nsigmaTPCPr > minNsigmaTpc && nsigmaTPCPr < maxNsigmaTpc && track.hasTOF ())
1297+ registryData.fill (HIST (" antiproton_tof_syst" ), pt, nsigmaTOFPr, i);
1298+ }
1299+ if (passedItsPidDeut) {
1300+ registryData.fill (HIST (" antideuteron_tpc_syst" ), pt, nsigmaTPCDe, i);
1301+ if (nsigmaTPCDe > minNsigmaTpc && nsigmaTPCDe < maxNsigmaTpc && track.hasTOF ())
1302+ registryData.fill (HIST (" antideuteron_tof_syst" ), pt, nsigmaTOFDe, i);
1303+ }
1304+ }
1305+ }
1306+ }
1307+ }
1308+ }
1309+ PROCESS_SWITCH (AntinucleiInJets, processSystematicsData, " Process Systematics" , false );
11751310};
11761311
11771312WorkflowSpec defineDataProcessing (ConfigContext const & cfgc)
0 commit comments