1414// / \file dedxAnalysis.cxx
1515// / \brief Analysis to do PID
1616
17+ #include " PWGLF/DataModel/LFStrangenessTables.h"
18+
1719#include " Common/Core/RecoDecay.h"
1820#include " Common/Core/TrackSelection.h"
21+ #include " Common/Core/TrackSelectionDefaults.h"
1922#include " Common/Core/trackUtilities.h"
2023#include " Common/DataModel/EventSelection.h"
24+ #include " Common/DataModel/Multiplicity.h"
2125#include " Common/DataModel/PIDResponse.h"
2226#include " Common/DataModel/TrackSelectionTables.h"
23- # include " Common/DataModel/Multiplicity.h "
27+
2428#include " Framework/ASoAHelpers.h"
2529#include " Framework/AnalysisDataModel.h"
2630#include " Framework/AnalysisTask.h"
2731#include " Framework/runDataProcessing.h"
28- #include " PWGLF/DataModel/LFStrangenessTables.h"
2932#include " ReconstructionDataFormats/Track.h"
30- # include " Common/Core/TrackSelectionDefaults.h "
33+
3134#include " TF1.h"
3235
3336using namespace o2 ;
@@ -59,7 +62,7 @@ struct DedxAnalysis {
5962 float pionTofCut = 1.0 ;
6063 float invMassCut = 0.01 ;
6164 float invMassCutGamma = 0.0015 ;
62- float magField = 1.0 ;
65+ float magField = 1 ;
6366 float pTcut = 2.0 ;
6467
6568 // Configurable Parameters
@@ -96,8 +99,8 @@ struct DedxAnalysis {
9699 " Minimum Mass Gamma" };
97100 Configurable<float > maxMassGamma{" maxMassGamma" , 0 .002022f ,
98101 " Maximum Mass Gamma" };
99- Configurable<bool > calibrationMode{" calibrationMode" , false , " calibration mode" };
100- Configurable<bool > additionalCuts{" additionalCuts" , false , " additional cuts" };
102+ Configurable<bool > calibrationMode{" calibrationMode" , true , " calibration mode" };
103+ Configurable<bool > additionalCuts{" additionalCuts" , true , " additional cuts" };
101104 // Histograms names
102105 static constexpr std::string_view kDedxvsMomentumPos [kParticlesType ] = {" dEdx_vs_Momentum_all_Pos" , " dEdx_vs_Momentum_Pi_v0_Pos" , " dEdx_vs_Momentum_Pr_v0_Pos" , " dEdx_vs_Momentum_El_v0_Pos" };
103106 static constexpr std::string_view kDedxvsMomentumNeg [kParticlesType ] = {" dEdx_vs_Momentum_all_Neg" , " dEdx_vs_Momentum_Pi_v0_Neg" , " dEdx_vs_Momentum_Pr_v0_Neg" , " dEdx_vs_Momentum_El_v0_Neg" };
@@ -213,16 +216,22 @@ struct DedxAnalysis {
213216
214217 // phi cut
215218 registryDeDx.add (
216- " hpt_vs_phi" , " phi cut" , HistType::kTH2F ,
217- {{ptAxis}, {100 , 0.0 , 6.4 , " #phi" }});
219+ " hpt_vs_phi_Ncl_After" , " phi cut" , HistType::kTH3F ,
220+ {{ptAxis}, {100 , 0.0 , 0.4 , " #varphi^{'}" }, {100 , 0 , 160 , " N_{cl}" }});
221+
222+ registryDeDx.add (
223+ " hpt_vs_phi_Ncl_Before" , " phi cut" , HistType::kTH3F ,
224+ {{ptAxis}, {100 , 0.0 , 0.4 , " #varphi^{'}" }, {100 , 0 , 160 , " N_{cl}" }});
218225
226+ // beta plot
219227 registryDeDx.add (
220228 " hbeta_vs_p_Neg" , " beta" , HistType::kTH2F ,
221229 {{pAxis}, {100 , 0.0 , 1.1 , " #beta" }});
222230
223231 registryDeDx.add (
224232 " hbeta_vs_p_Pos" , " beta" , HistType::kTH2F ,
225233 {{pAxis}, {100 , 0.0 , 1.1 , " #beta" }});
234+
226235 // Event Counter
227236 registryDeDx.add (" histRecVtxZData" , " collision z position" , HistType::kTH1F , {{100 , -20.0 , +20.0 , " z_{vtx} (cm)" }});
228237
@@ -396,11 +405,12 @@ struct DedxAnalysis {
396405 float pt = trk.pt ();
397406 float phi = trk.phi ();
398407 int charge = trk.sign ();
408+ auto nTPCCl = trk.tpcNClsFindable () - trk.tpcNClsFindableMinusFound ();
399409
400410 if (pt < pTcut)
401411 return true ;
402412
403- if (magField < 0 . ) // for negatve polarity field
413+ if (magField < 0 ) // for negatve polarity field
404414 phi = o2::constants::math::TwoPI - phi;
405415 if (charge < 0 ) // for negatve charge
406416 phi = o2::constants::math::TwoPI - phi;
@@ -409,10 +419,12 @@ struct DedxAnalysis {
409419 phi += o2::constants::math::PI / 18 .0f ;
410420 phi = std::fmod (phi, o2::constants::math::PI / 9 .0f );
411421
422+ registryDeDx.fill (HIST (" hpt_vs_phi_Ncl_Before" ), pt, phi, nTPCCl);
423+
412424 if (phi < fphiCutHigh.Eval (pt) && phi > fphiCutLow.Eval (pt))
413425 return false ; // reject track
414426
415- registryDeDx.fill (HIST (" hpt_vs_phi " ), pt, phi);
427+ registryDeDx.fill (HIST (" hpt_vs_phi_Ncl_After " ), pt, phi, nTPCCl );
416428 return true ;
417429 }
418430
0 commit comments