1717#include " AnalysisDataModel/PID/PIDResponse.h"
1818#include " AnalysisDataModel/TrackSelectionTables.h"
1919
20- // #include "AnalysisDataModel/EventSelection.h"
21- // #include "AnalysisDataModel/TrackSelectionTables.h"
22- // #include "AnalysisDataModel/Centrality.h"
20+ #include " AnalysisDataModel/EventSelection.h"
21+ #include " AnalysisDataModel/TrackSelectionTables.h"
22+ #include " AnalysisDataModel/Centrality.h"
2323
2424#include " Framework/HistogramRegistry.h"
2525
@@ -43,45 +43,65 @@ struct NucleiSpecraTask {
4343 AxisSpec ptAxis = {ptBinning, " #it{p}_{T} (GeV/#it{c})" };
4444 AxisSpec centAxis = {centBinning, " V0M (%)" };
4545
46+ spectra.add (" fCollZpos" , " collision z position" , HistType::kTH1F , {{600 , -20 ., +20 ., " z position (cm)" }});
47+ spectra.add (" fKeepEvent" , " skimming histogram" , HistType::kTH1F , {{2 , -0.5 , +1.5 , " true: keep event, false: reject event" }});
4648 spectra.add (" fTPCsignal" , " Specific energy loss" , HistType::kTH2F , {{600 , 0 ., 3 , " #it{p} (GeV/#it{c})" }, {1400 , 0 , 1400 , " d#it{E} / d#it{X} (a. u.)" }});
47-
48- spectra.add (" fTPCcounts" , " n-sigma TPC" , HistType::kTH2F , {ptAxis, {200 , -5 , 5 , " n#sigma_{d} (a. u.)" }});
49+ spectra.add (" fTPCcounts" , " n-sigma TPC" , HistType::kTH2F , {ptAxis, {200 , -100 ., +100 ., " n#sigma_{He} (a. u.)" }});
4950 }
5051
51- Configurable<float > yMin{" yMin" , -0.5 , " Maximum rapidity" };
52- Configurable<float > yMax{" yMax" , 0.5 , " Minimum rapidity" };
52+ Configurable<float > yMin{" yMin" , -0.8 , " Maximum rapidity" };
53+ Configurable<float > yMax{" yMax" , 0.8 , " Minimum rapidity" };
5354 Configurable<float > yBeam{" yBeam" , 0 ., " Beam rapidity" };
5455
5556 Configurable<float > cfgCutVertex{" cfgCutVertex" , 10 .0f , " Accepted z-vertex range" };
5657 Configurable<float > cfgCutEta{" cfgCutEta" , 0 .8f , " Eta range for tracks" };
57- Configurable<float > nsigmacut{" nsigmacut" , 3 , " Value of the Nsigma cut" };
58+ Configurable<float > nsigmacutLow{" nsigmacutLow" , -30.0 , " Value of the Nsigma cut" };
59+ Configurable<float > nsigmacutHigh{" nsigmacutHigh" , +3 ., " Value of the Nsigma cut" };
5860
5961 Filter collisionFilter = nabs(aod::collision::posZ) < cfgCutVertex;
6062 Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::isGlobalTrack == (uint8_t ) true );
6163
6264 using TrackCandidates = soa::Filtered<soa::Join<aod::Tracks, aod::TracksExtra, aod::pidRespTPC, aod::pidRespTOF, aod::pidRespTOFbeta, aod::TrackSelection>>;
6365
64- void process (/* soa::Join<aod::Collisions, aod::EvSels, aod::Cents> aod::Collisions:: iterator const& col, */ TrackCandidates const & tracks)
66+ void process (soa::Filtered<soa:: Join<aod::Collisions, aod::EvSels>>:: iterator const & collision, aod::BCsWithTimestamps const &, TrackCandidates const & tracks)
6567 {
66- /*
67- if (!col.alias()[kINT7])
68+ //
69+ // collision process loop
70+ //
71+ bool keepEvent = kFALSE ;
72+ if (!collision.alias ()[kINT7 ]) {
6873 return ;
69- if (!col.sel7())
74+ }
75+ if (!collision.sel7 ()) {
7076 return ;
71-
72- fMultiplicity->Fill(col.centV0M());
73- */
74- for (auto track : tracks) {
77+ }
78+ //
79+ spectra.fill (HIST (" fCollZpos" ), collision.posZ ());
80+ //
81+ for (auto track : tracks) { // start loop over tracks
7582
7683 TLorentzVector cutVector{};
77- cutVector.SetPtEtaPhiM (track.pt (), track.eta (), track.phi (), constants::physics::MassDeuteron );
84+ cutVector.SetPtEtaPhiM (track.pt () * 2.0 , track.eta (), track.phi (), constants::physics::MassHelium3 );
7885 if (cutVector.Rapidity () < yMin + yBeam || cutVector.Rapidity () > yMax + yBeam) {
7986 continue ;
8087 }
81-
88+ //
89+ // fill QA histograms
90+ //
8291 spectra.fill (HIST (" fTPCsignal" ), track.tpcInnerParam (), track.tpcSignal ());
83- spectra.fill (HIST (" fTPCcounts" ), fabs (track.pt ()), track.tpcNSigmaDe ());
84- }
92+ spectra.fill (HIST (" fTPCcounts" ), track.tpcInnerParam (), track.tpcNSigmaHe ());
93+ //
94+ // check offline-trigger (skimming) condidition
95+ //
96+ if (track.tpcNSigmaHe () > nsigmacutLow && track.tpcNSigmaHe () < nsigmacutHigh) {
97+ keepEvent = kTRUE ;
98+ }
99+
100+ } // end loop over tracks
101+ //
102+ // fill trigger (skimming) results
103+ //
104+ spectra.fill (HIST (" fKeepEvent" ), keepEvent);
85105 }
86106};
87107
0 commit comments