@@ -63,7 +63,7 @@ using namespace constants::math;
6363// define the filtered collisions and tracks
6464#define O2_DEFINE_CONFIGURABLE (NAME, TYPE, DEFAULT, HELP ) Configurable<TYPE > NAME {#NAME , DEFAULT , HELP };
6565
66- struct DiHadronCor {
66+ struct CascDiHadronCor {
6767 Service<ccdb::BasicCCDBManager> ccdb;
6868
6969 O2_DEFINE_CONFIGURABLE (cfgCutVtxZ, float , 10 .0f , " Accepted z-vertex range" )
@@ -192,7 +192,7 @@ struct DiHadronCor {
192192
193193 // make the filters and cuts.
194194 Filter collisionFilter = (nabs(aod::collision::posZ) < cfgCutVtxZ);
195- Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtMin) && (aod::track::pt < cfgCutPtMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t ) true )) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls) && (nabs(aod::track::dcaZ) < cfgCutDCAz);
195+ Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtMin) && (aod::track::pt < cfgCutPtMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t )true )) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls) && (nabs(aod::track::dcaZ) < cfgCutDCAz);
196196 using FilteredCollisions = soa::Filtered<soa::Join<aod::Collisions, aod::EvSel, aod::CentFT0Cs, aod::CentFT0CVariant1s, aod::CentFT0Ms, aod::CentFV0As, aod::Mults>>;
197197 using FilteredTracks = soa::Filtered<soa::Join<aod::Tracks, aod::TrackSelection, aod::TracksExtra, aod::TracksDCA>>;
198198 using FilteredTracksWithMCLabels = soa::Filtered<soa::Join<aod::Tracks, aod::TrackSelection, aod::TracksExtra, aod::TracksDCA, aod::McTrackLabels>>;
@@ -477,10 +477,8 @@ struct DiHadronCor {
477477 if (negdau.tpcNClsCrossedRows () <= trkQualityOpts.cfgTPCCrossedRows .value )
478478 return false ;
479479
480- if (cfgOutputXi)
481- {
482- if (casc.sign () < 0 )
483- {
480+ if (cfgOutputXi) {
481+ if (casc.sign () < 0 ) {
484482 if (std::fabs (bachelor.tpcNSigmaPi ()) > cfgNSigma[0 ])
485483 return false ;
486484 if (std::fabs (posdau.tpcNSigmaPr ()) > cfgNSigma[1 ])
@@ -491,9 +489,7 @@ struct DiHadronCor {
491489 return false ;
492490 if (std::fabs (casc.dcapostopv ()) > cascBuilderOpts.cfgcasc_dcaLapitopv .value )
493491 return false ;
494- }
495- else if (casc.sign () > 0 )
496- {
492+ } else if (casc.sign () > 0 ) {
497493 if (std::fabs (bachelor.tpcNSigmaPi ()) > cfgNSigma[0 ])
498494 return false ;
499495 if (std::fabs (negdau.tpcNSigmaPr ()) > cfgNSigma[1 ])
@@ -521,11 +517,8 @@ struct DiHadronCor {
521517 return false ;
522518 if (std::fabs (casc.mLambda () - o2::constants::physics::MassLambda0) > cascBuilderOpts.cfgcasc_mlambdawindow .value )
523519 return false ;
524- }
525- if (cfgOutputOmega)
526- {
527- if (casc.sign () < 0 )
528- {
520+ } if (cfgOutputOmega) {
521+ if (casc.sign () < 0 ) {
529522 if (std::fabs (bachelor.tpcNSigmaKa ()) > cfgNSigma[2 ])
530523 return false ;
531524 if (std::fabs (posdau.tpcNSigmaPr ()) > cfgNSigma[1 ])
@@ -536,9 +529,7 @@ struct DiHadronCor {
536529 return false ;
537530 if (std::fabs (casc.dcapostopv ()) > cascBuilderOpts.cfgcasc_dcaLapitopv .value )
538531 return false ;
539- }
540- else if (casc.sign () > 0 )
541- {
532+ } else if (casc.sign () > 0 ) {
542533 if (std::fabs (bachelor.tpcNSigmaKa ()) > cfgNSigma[2 ])
543534 return false ;
544535 if (std::fabs (negdau.tpcNSigmaPr ()) > cfgNSigma[1 ])
@@ -869,7 +860,7 @@ struct DiHadronCor {
869860 }
870861
871862 template <CorrelationContainer::CFStep step, typename TTracks, typename TTracksAssoc>
872- void fillCorrelationsExcludeSoloTracks (TTracks tracks1, TTracksAssoc tracks2, float posZ, int magneticField, float cent, float eventWeight, bool ischarged = true ) // function to fill the Output functions (sparse) and the delta eta and delta phi histograms
863+ void fillCorrelationsExcludeSoloTracks (TTracks tracks1, TTracksAssoc tracks2, float posZ, int magneticField, float cent, float eventWeight) // function to fill the Output functions (sparse) and the delta eta and delta phi histograms
873864 {
874865 std::vector<int64_t > tracksSkipIndices;
875866 std::vector<int64_t > tracks2SkipIndices;
@@ -890,11 +881,9 @@ struct DiHadronCor {
890881 }
891882 }
892883
893- if (ischarged) {
894- if (!cfgCentTableUnavailable)
895- registry.fill (HIST (" Centrality_used" ), cent);
896- registry.fill (HIST (" Nch_used" ), tracks1.size ());
897- }
884+ if (!cfgCentTableUnavailable)
885+ registry.fill (HIST (" Centrality_used" ), cent);
886+ registry.fill (HIST (" Nch_used" ), tracks1.size ());
898887
899888 int fSampleIndex = gRandom ->Uniform (0 , cfgSampleSize);
900889
@@ -908,15 +897,13 @@ struct DiHadronCor {
908897 if (!getEfficiencyCorrection (triggerWeight, track1.eta (), track1.pt (), posZ))
909898 continue ;
910899
911- if (ischarged) {
912- registry.fill (HIST (" Nch_final_pt" ), track1.pt ());
900+ registry.fill (HIST (" Nch_final_pt" ), track1.pt ());
913901
914- if (std::find (tracksSkipIndices.begin (), tracksSkipIndices.end (), track1.globalIndex ()) != tracksSkipIndices.end ()) {
915- registry.fill (HIST (" Solo_tracks_trigger" ), track1.pt ());
916- continue ; // Skip the track1 if it is alone in pt bin
917- }
918- registry.fill (HIST (" Trig_hist" ), fSampleIndex , posZ, track1.pt (), eventWeight * triggerWeight);
902+ if (std::find (tracksSkipIndices.begin (), tracksSkipIndices.end (), track1.globalIndex ()) != tracksSkipIndices.end ()) {
903+ registry.fill (HIST (" Solo_tracks_trigger" ), track1.pt ());
904+ continue ; // Skip the track1 if it is alone in pt bin
919905 }
906+ registry.fill (HIST (" Trig_hist" ), fSampleIndex , posZ, track1.pt (), eventWeight * triggerWeight);
920907
921908 for (auto const & track2 : tracks2) {
922909
@@ -929,7 +916,7 @@ struct DiHadronCor {
929916 continue ; // For pt-differential correlations, skip if the trigger and associate are the same track
930917 if (cfgUsePtOrder && track1.pt () <= track2.pt ())
931918 continue ; // Without pt-differential correlations, skip if the trigger pt is less than the associate pt
932- if (!cfgSingleSoloPtTrack && ischarged ) { // avoid skipping the second track if we only want one
919+ if (!cfgSingleSoloPtTrack) { // avoid skipping the second track if we only want one
933920 if (std::find (tracks2SkipIndices.begin (), tracks2SkipIndices.end (), track2.globalIndex ()) != tracks2SkipIndices.end ()) {
934921 registry.fill (HIST (" Solo_tracks_assoc" ), track2.pt ());
935922 continue ; // Skip the track2 if it is alone in pt bin
@@ -963,8 +950,7 @@ struct DiHadronCor {
963950
964951 // fill the right sparse and histograms
965952 same->getPairHist ()->Fill (step, fSampleIndex , posZ, track1.pt (), track2.pt (), deltaPhi, deltaEta, eventWeight * triggerWeight * associatedWeight);
966- if (ischarged)
967- registry.fill (HIST (" deltaEta_deltaPhi_same" ), deltaPhi, deltaEta, eventWeight * triggerWeight * associatedWeight);
953+ registry.fill (HIST (" deltaEta_deltaPhi_same" ), deltaPhi, deltaEta, eventWeight * triggerWeight * associatedWeight);
968954 }
969955 }
970956 }
@@ -1196,7 +1182,7 @@ struct DiHadronCor {
11961182 fillCorrelationsExcludeSoloTracks<CorrelationContainer::kCFStepReconstructed >(tracks, tracks, collision.posZ (), getMagneticField (bc.timestamp ()), cent, weightCent);
11971183 }
11981184 }
1199- PROCESS_SWITCH (DiHadronCor , processSame, " Process same event" , true );
1185+ PROCESS_SWITCH (CascDiHadronCor , processSame, " Process same event" , true );
12001186
12011187 // the process for filling the mixed events
12021188 void processMixed (FilteredCollisions const & collisions, FilteredTracks const & tracks, aod::BCsWithTimestamps const &)
@@ -1258,7 +1244,7 @@ struct DiHadronCor {
12581244 }
12591245 }
12601246
1261- PROCESS_SWITCH (DiHadronCor , processMixed, " Process mixed events" , true );
1247+ PROCESS_SWITCH (CascDiHadronCor , processMixed, " Process mixed events" , true );
12621248
12631249 void processMixedCasc (FilteredCollisions const & collisions, FilteredTracks const & tracks, aod::CascDatas const & cascades, aod::BCsWithTimestamps const &)
12641250 {
@@ -1318,7 +1304,7 @@ struct DiHadronCor {
13181304 }
13191305 }
13201306
1321- PROCESS_SWITCH (DiHadronCor , processMixedCasc, " Process mixed events" , true );
1307+ PROCESS_SWITCH (CascDiHadronCor , processMixedCasc, " Process mixed events" , true );
13221308
13231309
13241310 int getSpecies (int pdgCode)
@@ -1370,7 +1356,7 @@ struct DiHadronCor {
13701356 }
13711357 }
13721358 }
1373- PROCESS_SWITCH (DiHadronCor , processMCEfficiency, " MC: Extract efficiencies" , false );
1359+ PROCESS_SWITCH (CascDiHadronCor , processMCEfficiency, " MC: Extract efficiencies" , false );
13741360
13751361 void processMCSame (FilteredMcCollisions::iterator const & mcCollision, FilteredMcParticles const & mcParticles, SmallGroupMcCollisions const & collisions)
13761362 {
@@ -1418,7 +1404,7 @@ struct DiHadronCor {
14181404 same->fillEvent (mcParticles.size (), CorrelationContainer::kCFStepTrackedOnlyPrim );
14191405 fillMCCorrelations<CorrelationContainer::kCFStepTrackedOnlyPrim >(mcParticles, mcParticles, mcCollision.posZ (), SameEvent, 1 .0f );
14201406 }
1421- PROCESS_SWITCH (DiHadronCor , processMCSame, " Process MC same event" , false );
1407+ PROCESS_SWITCH (CascDiHadronCor , processMCSame, " Process MC same event" , false );
14221408
14231409 void processMCMixed (FilteredMcCollisions const & mcCollisions, FilteredMcParticles const & mcParticles, SmallGroupMcCollisions const & collisions)
14241410 {
@@ -1474,8 +1460,8 @@ struct DiHadronCor {
14741460 fillMCCorrelations<CorrelationContainer::kCFStepTrackedOnlyPrim >(tracks1, tracks2, collision1.posZ (), MixedEvent, eventWeight);
14751461 }
14761462 }
1477- PROCESS_SWITCH (DiHadronCor , processMCMixed, " Process MC mixed events" , false );
1478- void processOntheflySame (aod::McCollisions::iterator const & mcCollision, aod::McParticles const & mcParticles)
1463+ PROCESS_SWITCH (CascDiHadronCor , processMCMixed, " Process MC mixed events" , false );
1464+ void processOntheflySame (aod::McCollisions::iterator const & mcCollision, aod::McParticles const & mcParticles)
14791465 {
14801466 if (cfgVerbosity) {
14811467 LOGF (info, " processOntheflySame. MC collision: %d, particles: %d" , mcCollision.globalIndex (), mcParticles.size ());
@@ -1504,7 +1490,7 @@ struct DiHadronCor {
15041490 same->fillEvent (mcParticles.size (), CorrelationContainer::kCFStepTrackedOnlyPrim );
15051491 fillMCCorrelations<CorrelationContainer::kCFStepTrackedOnlyPrim >(mcParticles, mcParticles, mcCollision.posZ (), SameEvent, 1 .0f );
15061492 }
1507- PROCESS_SWITCH (DiHadronCor , processOntheflySame, " Process on-the-fly same event" , false );
1493+ PROCESS_SWITCH (CascDiHadronCor , processOntheflySame, " Process on-the-fly same event" , false );
15081494
15091495 void processOntheflyMixed (aod::McCollisions const & mcCollisions, aod::McParticles const & mcParticles)
15101496 {
@@ -1541,12 +1527,11 @@ struct DiHadronCor {
15411527 fillMCCorrelations<CorrelationContainer::kCFStepTrackedOnlyPrim >(tracks1, tracks2, collision1.posZ (), MixedEvent, eventWeight);
15421528 }
15431529 }
1544- PROCESS_SWITCH (DiHadronCor , processOntheflyMixed, " Process on-the-fly mixed events" , false );
1530+ PROCESS_SWITCH (CascDiHadronCor , processOntheflyMixed, " Process on-the-fly mixed events" , false );
15451531};
1546-
15471532WorkflowSpec defineDataProcessing (ConfigContext const & cfgc)
15481533{
15491534 return WorkflowSpec{
1550- adaptAnalysisTask<DiHadronCor >(cfgc),
1535+ adaptAnalysisTask<CascDiHadronCor >(cfgc),
15511536 };
15521537}
0 commit comments