1010// or submit itself to any jurisdiction.
1111//
1212// Task for analysing (anti)deuteron production in jets using pT-triggered data - update: 27-01
13- //
13+ //
1414// Executable : o2-analysis-lf-deuteron-in-jet-trg-pt
1515
1616#include " PWGJE/Core/JetBkgSubUtils.h"
4646#include < vector>
4747
4848using namespace o2 ;
49- using namespace o2 ::framework;
49+ using namespace o2 ::framework;
5050using namespace o2 ::aod;
5151using namespace o2 ::soa;
5252using namespace o2 ::constants::math;
@@ -93,10 +93,10 @@ struct DeuteronInJetsTrgPt{
9393 Configurable<double > maxNsigmaTpc{" maxNsigmaTpc" , +3.0 , " Maximum nsigma TPC" };
9494 // Part relatuive to TOF
9595 Configurable<double > minNsigmaTof{" minNsigmaTof" , -3.0 , " Minimum nsigma TOF" };
96- Configurable<double > maxNsigmaTof{" maxNsigmaTof" , +3.5 , " Maximum nsigma TOF" };
96+ Configurable<double > maxNsigmaTof{" maxNsigmaTof" , +3.5 , " Maximum nsigma TOF" };
9797 } cfgTrackCut;
9898
99- // Setting default selection criteria for events. May be changes when configuring the analysis.
99+ // Setting default selection criteria for events. May be changes when configuring the analysis.
100100 struct : o2::framework::ConfigurableGroup{
101101 std::string prefix{" cgfEventCut" };
102102 Configurable<double > zVtx{" zVtx" , 10.0 , " Maximum z vertex" };
@@ -106,7 +106,7 @@ struct DeuteronInJetsTrgPt{
106106 Configurable<bool > cfgSkimmedProcessing{" cfgSkimmedProcessing" , false , " Skimmed dataset processing" };
107107 Configurable<std::string> triggerList{" triggerList" , " fJetFullLowPt" , " Trigger list" };
108108
109- // Setting default selection criteria fr jet identification. May be changes when configuring the analysis.
109+ // Setting default selection criteria fr jet identification. May be changes when configuring the analysis.
110110 struct : o2::framework::ConfigurableGroup{
111111 std::string prefix{" cgfJetCut" };
112112 Configurable<double > minJetPt{" minJetPt" , 10.0 , " Minimum pt of the jet after bkg subtraction" };
@@ -146,7 +146,7 @@ struct DeuteronInJetsTrgPt{
146146
147147 // Set default MC parametrization for ITS response
148148 if (cfgTrackCut.setMCDefaultItsParams ) itsResponse.setMCDefaultParameters ();
149-
149+
150150 // Initialize random seed using high-resolution clock to ensure unique sequences across parallel Grid jobs
151151 auto time_seed = std::chrono::high_resolution_clock::now ().time_since_epoch ().count ();
152152 mRand .SetSeed (time_seed);
@@ -299,11 +299,11 @@ struct DeuteronInJetsTrgPt{
299299 if (!track.hasTPC ()) return false ;
300300 if (track.tpcNClsCrossedRows () < MinTpcCr) return false ;
301301 if (track.tpcChi2NCl () >= MaxChi2Tpc) return false ;
302-
302+
303303 return true ;
304304 }
305305
306-
306+
307307 // Track selection for antinuclei
308308 template <typename AntinucleusTrack>
309309 bool passedTrackSelection (const AntinucleusTrack& track){
@@ -321,9 +321,9 @@ struct DeuteronInJetsTrgPt{
321321 if (!track.hasTPC ()) return false ; // Flag to check if track has a ITS match
322322 if (track.tpcNClsFound () < cfgTrackCut.TPCnClsMin ) return false ; // Minimum number of TPC cluster
323323 if (track.tpcNClsCrossedRows () < cfgTrackCut.TPCnCrossedRowsMin ) return false ; // Minimum number of crossed rows in TPC
324- if (track.tpcChi2NCl () < cfgTrackCut.TPCchi2ClusMin ) return false ; // Minimum chi2 per cluster in TPC
324+ if (track.tpcChi2NCl () < cfgTrackCut.TPCchi2ClusMin ) return false ; // Minimum chi2 per cluster in TPC
325325 if (track.tpcChi2NCl () > cfgTrackCut.TPCchi2ClusMax ) return false ; // Maximum chi2 per cluster in TPC
326- if (track.tpcCrossedRowsOverFindableCls () < cfgTrackCut.Rtpc ) return false ; // R_{TPC} > 0.8
326+ if (track.tpcCrossedRowsOverFindableCls () < cfgTrackCut.Rtpc ) return false ; // R_{TPC} > 0.8
327327
328328 return true ;
329329 }
@@ -360,25 +360,25 @@ struct DeuteronInJetsTrgPt{
360360 }
361361
362362 if (fjParticles.empty ()) return ; // Reject empty events
363-
363+
364364 // Cluster particles using the the anti-kT algorithm
365365 fastjet::JetDefinition jetDef (fastjet::antikt_algorithm, cfgJetCut.rJet ); // Defining the algorithm to cluster, and the jet radius
366366 fastjet::AreaDefinition areaDef (fastjet::active_area, fastjet::GhostedAreaSpec (1.0 )); // Activate area evaluation, and set area evaluation method
367367 fastjet::ClusterSequenceArea cs (fjParticles, jetDef, areaDef); // Declare the will of applying clustering algorithm with area evaluation to the selected candidates
368368 std::vector<fastjet::PseudoJet> jets = fastjet::sorted_by_pt (cs.inclusive_jets ());
369369 auto [rhoPerp, rhoMPerp] = jetutilities::estimateRhoPerpCone (fjParticles, jets[0 ], cfgJetCut.rJet );
370-
370+
371371 // Loop over reco jets
372372 bool isAtLeastOneJetSelected = false ;
373373 for (auto const & jet : jets){
374374
375375 if ((std::fabs (jet.eta ()) + cfgJetCut.rJet ) > (cfgTrackCut.EtaMax - cfgJetCut.deltaEtaEdge )) continue ; // Jet must be fully contained in the acceptance
376-
376+
377377 // Jet pt must be larger than threshold
378378 auto jetForSub = jet;
379379 fastjet::PseudoJet jetMinusBkg = backgroundSub.doRhoAreaSub (jetForSub, rhoPerp, rhoMPerp);
380380 if (jetMinusBkg.pt () < cfgJetCut.minJetPt ) continue ; // Skip jets with pT < pT threshold
381-
381+
382382 double normalizedJetArea = jet.area () / (PI * cfgJetCut.rJet * cfgJetCut.rJet );
383383 isAtLeastOneJetSelected = true ;
384384
@@ -409,18 +409,18 @@ struct DeuteronInJetsTrgPt{
409409 // Fill DCA distribution for (anti)protons
410410 if (track.sign () < 0 && std::fabs (dcaz) < cfgTrackCut.maxDcaz ) registryData.fill (HIST (" antiproton_dca_jet" ), pt, dcaxy);
411411 if (track.sign () > 0 && std::fabs (dcaz) < cfgTrackCut.maxDcaz ) registryData.fill (HIST (" proton_dca_jet" ), pt, dcaxy);
412-
412+
413413 // Apply DCA selections
414414 if (std::fabs (dcaxy) > cfgTrackCut.maxDcaxy || std::fabs (dcaz) > cfgTrackCut.maxDcaz ) continue ;
415-
415+
416416 // Particle identification using the ITS cluster size
417417 bool passedItsPidProt (true ), passedItsPidDeut (true );
418418 double nSigmaITSprot = static_cast <double >(itsResponse.nSigmaITS <o2::track::PID::Proton>(track));
419419 double nSigmaITSdeut = static_cast <double >(itsResponse.nSigmaITS <o2::track::PID::Deuteron>(track));
420420
421- if (cfgTrackCut.applyItsPid && pt < cfgTrackCut.ptMaxItsPidProt && (nSigmaITSprot < cfgTrackCut.nSigmaItsMin || nSigmaITSprot > cfgTrackCut.nSigmaItsMax )) passedItsPidProt = false ;
422- if (cfgTrackCut.applyItsPid && pt < cfgTrackCut.ptMaxItsPidDeut && (nSigmaITSdeut < cfgTrackCut.nSigmaItsMin || nSigmaITSdeut > cfgTrackCut.nSigmaItsMax )) passedItsPidDeut = false ;
423-
421+ if (cfgTrackCut.applyItsPid && pt < cfgTrackCut.ptMaxItsPidProt && (nSigmaITSprot < cfgTrackCut.nSigmaItsMin || nSigmaITSprot > cfgTrackCut.nSigmaItsMax )) passedItsPidProt = false ;
422+ if (cfgTrackCut.applyItsPid && pt < cfgTrackCut.ptMaxItsPidDeut && (nSigmaITSdeut < cfgTrackCut.nSigmaItsMin || nSigmaITSdeut > cfgTrackCut.nSigmaItsMax )) passedItsPidDeut = false ;
423+
424424 // Fill histograms for antimatter
425425 if (track.sign ()<0 ){
426426 if (passedItsPidProt){
@@ -429,7 +429,7 @@ struct DeuteronInJetsTrgPt{
429429 }
430430 if (passedItsPidDeut){
431431 registryData.fill (HIST (" antideuteron_jet_tpc" ), pt, nsigmaTPCDe);
432- if (nsigmaTPCDe > cfgTrackCut.minNsigmaTpc && nsigmaTPCDe < cfgTrackCut.maxNsigmaTpc && track.hasTOF ()) registryData.fill (HIST (" antideuteron_jet_tof" ), pt, nsigmaTOFDe); // requiring that track candidate in TOF have nisgma in TPC < threshold
432+ if (nsigmaTPCDe > cfgTrackCut.minNsigmaTpc && nsigmaTPCDe < cfgTrackCut.maxNsigmaTpc && track.hasTOF ()) registryData.fill (HIST (" antideuteron_jet_tof" ), pt, nsigmaTOFDe); // requiring that track candidate in TOF have nisgma in TPC < threshold
433433 }
434434 }
435435 // Fill histograms for matter
@@ -440,9 +440,9 @@ struct DeuteronInJetsTrgPt{
440440 }
441441 if (passedItsPidDeut){
442442 registryData.fill (HIST (" deuteron_jet_tpc" ), pt, nsigmaTPCDe);
443- if (nsigmaTPCDe > cfgTrackCut.minNsigmaTpc && nsigmaTPCDe < cfgTrackCut.maxNsigmaTpc && track.hasTOF ()) registryData.fill (HIST (" deuteron_jet_tof" ), pt, nsigmaTOFDe); // requiring that track candidate in TOF have nisgma in TPC < threshold
443+ if (nsigmaTPCDe > cfgTrackCut.minNsigmaTpc && nsigmaTPCDe < cfgTrackCut.maxNsigmaTpc && track.hasTOF ()) registryData.fill (HIST (" deuteron_jet_tof" ), pt, nsigmaTOFDe); // requiring that track candidate in TOF have nisgma in TPC < threshold
444444 }
445- }
445+ }
446446 } // End of loop over jet constituents
447447
448448 // Loop over tracks in the UE
@@ -459,7 +459,7 @@ struct DeuteronInJetsTrgPt{
459459
460460 double maxConeRadius = coneRadius;
461461 if (deltaRUe1 > maxConeRadius && deltaRUe2 > maxConeRadius) continue ; // Reject tracks that lie outside the maxConeRadius from both UE axes
462-
462+
463463 // Define variables
464464 double nsigmaTPCPr = track.tpcNSigmaPr ();
465465 double nsigmaTOFPr = track.tofNSigmaPr ();
@@ -472,18 +472,18 @@ struct DeuteronInJetsTrgPt{
472472 // Fill DCA distribution for (anti)protons
473473 if (track.sign () < 0 && std::fabs (dcaz) < cfgTrackCut.maxDcaz ) registryData.fill (HIST (" antiproton_dca_ue" ), pt, dcaxy);
474474 if (track.sign () > 0 && std::fabs (dcaz) < cfgTrackCut.maxDcaz ) registryData.fill (HIST (" proton_dca_ue" ), pt, dcaxy);
475-
475+
476476 // Apply DCA selections
477477 if (std::fabs (dcaxy) > cfgTrackCut.maxDcaxy || std::fabs (dcaz) > cfgTrackCut.maxDcaz ) continue ;
478-
478+
479479 // Particle identification using the ITS cluster size
480480 bool passedItsPidProt (true ), passedItsPidDeut (true );
481481 double nSigmaITSprot = static_cast <double >(itsResponse.nSigmaITS <o2::track::PID::Proton>(track));
482482 double nSigmaITSdeut = static_cast <double >(itsResponse.nSigmaITS <o2::track::PID::Deuteron>(track));
483483
484- if (cfgTrackCut.applyItsPid && pt < cfgTrackCut.ptMaxItsPidProt && (nSigmaITSprot < cfgTrackCut.nSigmaItsMin || nSigmaITSprot > cfgTrackCut.nSigmaItsMax )) passedItsPidProt = false ;
485- if (cfgTrackCut.applyItsPid && pt < cfgTrackCut.ptMaxItsPidDeut && (nSigmaITSdeut < cfgTrackCut.nSigmaItsMin || nSigmaITSdeut > cfgTrackCut.nSigmaItsMax )) passedItsPidDeut = false ;
486-
484+ if (cfgTrackCut.applyItsPid && pt < cfgTrackCut.ptMaxItsPidProt && (nSigmaITSprot < cfgTrackCut.nSigmaItsMin || nSigmaITSprot > cfgTrackCut.nSigmaItsMax )) passedItsPidProt = false ;
485+ if (cfgTrackCut.applyItsPid && pt < cfgTrackCut.ptMaxItsPidDeut && (nSigmaITSdeut < cfgTrackCut.nSigmaItsMin || nSigmaITSdeut > cfgTrackCut.nSigmaItsMax )) passedItsPidDeut = false ;
486+
487487 // Fill histograms for antimatter
488488 if (track.sign ()<0 ){
489489 if (passedItsPidProt){
@@ -492,7 +492,7 @@ struct DeuteronInJetsTrgPt{
492492 }
493493 if (passedItsPidDeut){
494494 registryData.fill (HIST (" antideuteron_ue_tpc" ), pt, nsigmaTPCDe);
495- if (nsigmaTPCDe > cfgTrackCut.minNsigmaTpc && nsigmaTPCDe < cfgTrackCut.maxNsigmaTpc && track.hasTOF ()) registryData.fill (HIST (" antideuteron_ue_tof" ), pt, nsigmaTOFDe); // requiring that track candidate in TOF have nisgma in TPC < threshold
495+ if (nsigmaTPCDe > cfgTrackCut.minNsigmaTpc && nsigmaTPCDe < cfgTrackCut.maxNsigmaTpc && track.hasTOF ()) registryData.fill (HIST (" antideuteron_ue_tof" ), pt, nsigmaTOFDe); // requiring that track candidate in TOF have nisgma in TPC < threshold
496496 }
497497 }
498498 // Fill histograms for matter
@@ -503,7 +503,7 @@ struct DeuteronInJetsTrgPt{
503503 }
504504 if (passedItsPidDeut){
505505 registryData.fill (HIST (" deuteron_ue_tpc" ), pt, nsigmaTPCDe);
506- if (nsigmaTPCDe > cfgTrackCut.minNsigmaTpc && nsigmaTPCDe < cfgTrackCut.maxNsigmaTpc && track.hasTOF ()) registryData.fill (HIST (" deuteron_ue_tof" ), pt, nsigmaTOFDe); // requiring that track candidate in TOF have nisgma in TPC < threshold
506+ if (nsigmaTPCDe > cfgTrackCut.minNsigmaTpc && nsigmaTPCDe < cfgTrackCut.maxNsigmaTpc && track.hasTOF ()) registryData.fill (HIST (" deuteron_ue_tof" ), pt, nsigmaTOFDe); // requiring that track candidate in TOF have nisgma in TPC < threshold
507507 }
508508 }
509509 }
@@ -518,8 +518,3 @@ struct DeuteronInJetsTrgPt{
518518WorkflowSpec defineDataProcessing (ConfigContext const & cfgc){
519519 return WorkflowSpec{adaptAnalysisTask<DeuteronInJetsTrgPt>(cfgc)};
520520}
521-
522-
523-
524-
525-
0 commit comments