diff --git a/Tutorials/Skimming/derivedBasicConsumer.cxx b/Tutorials/Skimming/derivedBasicConsumer.cxx index 27734ecd9e9..20cb390b463 100644 --- a/Tutorials/Skimming/derivedBasicConsumer.cxx +++ b/Tutorials/Skimming/derivedBasicConsumer.cxx @@ -27,7 +27,7 @@ using namespace o2::framework::expressions; struct DerivedBasicConsumer { SliceCache cache; - + /// Function to aid in calculating delta-phi /// \param phi1 first phi value /// \param phi2 second phi value @@ -55,7 +55,7 @@ struct DerivedBasicConsumer { HistogramRegistry histos{"histos", {}, OutputObjHandlingPolicy::AnalysisObject}; Partition triggerTracks = aod::track::pt > minPtTrig; - Partition assocTracks = aod::track::pt > minPtAssoc && aod::track::pt < maxPtAssoc; + Partition assocTracks = aod::track::pt > minPtAssoc&& aod::track::pt < maxPtAssoc; Preslice perCollision = aod::track::collisionId; @@ -64,8 +64,8 @@ struct DerivedBasicConsumer { // define axes you want to use const AxisSpec axisCounter{1, 0, +1, ""}; histos.add("eventCounter", "eventCounter", kTH1F, {axisCounter}); - - // for correlation study + + // for correlation study histos.add("etaHistogramTrigger", "etaHistogramTrigger", kTH1F, {axisEta}); histos.add("etaHistogramAssoc", "etaHistogramAssoc", kTH1F, {axisEta}); histos.add("phiHistogramTrigger", "phiHistogramTrigger", kTH1F, {axisPhi}); @@ -77,23 +77,23 @@ struct DerivedBasicConsumer { { histos.fill(HIST("eventCounter"), 0.5); - //partitions are not grouped by default + // partitions are not grouped by default auto triggerTracksGrouped = triggerTracks->sliceByCached(aod::exampleTrackSpace::derivedCollisionId, collision.globalIndex(), cache); auto assocTracksGrouped = assocTracks->sliceByCached(aod::exampleTrackSpace::derivedCollisionId, collision.globalIndex(), cache); - //Inspect the trigger and associated populations - for (auto& track : triggerTracksGrouped) { //<- only for a subset + // Inspect the trigger and associated populations + for (auto& track : triggerTracksGrouped) { //<- only for a subset histos.get(HIST("etaHistogramTrigger"))->Fill(track.eta()); //<- this should show the selection histos.get(HIST("ptHistogramTrigger"))->Fill(track.pt()); } - for (auto& track : assocTracksGrouped) { //<- only for a subset + for (auto& track : assocTracksGrouped) { //<- only for a subset histos.get(HIST("etaHistogramAssoc"))->Fill(track.eta()); //<- this should show the selection histos.get(HIST("ptHistogramAssoc"))->Fill(track.pt()); } - //Now we do two-particle correlations, using "combinations" + // Now we do two-particle correlations, using "combinations" for (auto& [trackTrigger, trackAssoc] : combinations(o2::soa::CombinationsFullIndexPolicy(triggerTracksGrouped, assocTracksGrouped))) { - histos.get(HIST("correlationFunction"))->Fill( ComputeDeltaPhi(trackTrigger.phi(), trackAssoc.phi() )); + histos.get(HIST("correlationFunction"))->Fill(ComputeDeltaPhi(trackTrigger.phi(), trackAssoc.phi())); } } }; diff --git a/Tutorials/Skimming/derivedBasicProvider.cxx b/Tutorials/Skimming/derivedBasicProvider.cxx index 018e00a0876..6e3d5bcc5b8 100644 --- a/Tutorials/Skimming/derivedBasicProvider.cxx +++ b/Tutorials/Skimming/derivedBasicProvider.cxx @@ -39,7 +39,7 @@ struct DerivedBasicProvider { // Look at primary tracks only Filter trackFilter = nabs(aod::track::dcaXY) < 0.2f && nabs(aod::track::eta) < 0.5f && aod::track::pt > minPt; - //This is an example of a convenient declaration of "using" + // This is an example of a convenient declaration of "using" using myCompleteTracks = soa::Join; using myFilteredTracks = soa::Filtered; // do not forget this! @@ -57,9 +57,10 @@ struct DerivedBasicProvider { histos.fill(HIST("eventCounter"), 0.5); outputCollisions(collision.posZ()); for (const auto& track : tracks) { - if( track.tpcNClsCrossedRows() < 70 ) continue; //remove badly tracked + if (track.tpcNClsCrossedRows() < 70) + continue; // remove badly tracked histos.get(HIST("ptHistogram"))->Fill(track.pt()); - outputTracks( outputCollisions.lastIndex(), track.pt(), track.eta(), track.phi() ); // all that I need for posterior analysis! + outputTracks(outputCollisions.lastIndex(), track.pt(), track.eta(), track.phi()); // all that I need for posterior analysis! } } };