1616
1717#include < fairlogger/Logger.h>
1818#include < cstdint>
19- #include < iostream>
2019#include < vector>
20+ #include < TDatabasePDG.h>
2121#include " Framework/AnalysisTask.h"
2222#include " Framework/runDataProcessing.h"
2323#include " Framework/HistogramRegistry.h"
@@ -39,32 +39,32 @@ using namespace o2::framework;
3939using namespace o2 ::framework::expressions;
4040using namespace o2 ::soa;
4141
42- struct femtoUniverseDebugV0 {
42+ struct FemtoUniverseDebugV0 {
4343
4444 Service<o2::framework::O2DatabasePDG> pdg;
4545
4646 SliceCache cache;
4747
48- Configurable<int > ConfPDGCodeV0{ " ConfPDGCodePartOne " , 3122 , " V0 - PDG code" };
49- Configurable<int > ConfPDGCodeChildPos{ " ConfPDGCodeChildPos " , 2212 , " Positive Child - PDG code" };
50- Configurable<int > ConfPDGCodeChildNeg{ " ConfPDGCodeChildNeg " , 211 , " Negative Child- PDG code" };
51- Configurable<uint32_t > ConfCutV0{ " ConfCutV0 " , 338 , " V0 - Selection bit from cutCulator" };
52- ConfigurableAxis ConfV0TempFitVarBins{ " ConfV0TempFitVarBins " , {300 , 0.95 , 1 .}, " V0: binning of the TempFitVar in the pT vs. TempFitVar plot" };
53- ConfigurableAxis ConfV0TempFitVarpTBins{ " ConfV0TempFitVarpTBins " , {20 , 0.5 , 4.05 }, " V0: pT binning of the pT vs. TempFitVar plot" };
54-
55- Configurable<uint32_t > ConfCutChildPos{ " ConfCutChildPos " , 150 , " Positive Child of V0 - Selection bit from cutCulator" };
56- Configurable<uint32_t > ConfCutChildNeg{ " ConfCutChildNeg " , 149 , " Negative Child of V0 - Selection bit from cutCulator" };
57- Configurable<float > ConfChildPosPidnSigmaMax{ " ConfChildPosPidnSigmaMax " , 3 .f , " Positive Child of V0 - Selection bit from cutCulator" };
58- Configurable<float > ConfChildNegPidnSigmaMax{ " ConfChildNegPidnSigmaMax " , 3 .f , " Negative Child of V0 - Selection bit from cutCulator" };
59- Configurable<int > ConfChildPosIndex{ " ConfChildPosIndex " , 1 , " Positive Child of V0 - Index from cutCulator" };
60- Configurable<int > ConfChildNegIndex{ " ConfChildNegIndex " , 0 , " Negative Child of V0 - Index from cutCulator" };
61- Configurable<std::vector<float >> ConfChildPIDnSigmaMax{ " ConfChildPIDnSigmaMax " , std::vector<float >{4 .f , 3 .f }, " V0 child sel: Max . PID nSigma TPC" };
62- Configurable<int > ConfChildnSpecies{ " ConfChildnSpecies " , 2 , " Number of particle spieces (for V0 children) with PID info" };
63- ConfigurableAxis ConfChildTempFitVarBins{ " ConfChildTempFitVarBins " , {300 , -0.15 , 0.15 }, " V0 child: binning of the TempFitVar in the pT vs. TempFitVar plot" };
64- ConfigurableAxis ConfChildTempFitVarpTBins{ " ConfChildTempFitVarpTBins " , {20 , 0.5 , 4.05 }, " V0 child: pT binning of the pT vs. TempFitVar plot" };
48+ Configurable<int > confPDGCodeV0{ " confPDGCodeV0 " , 3122 , " V0 - - PDG code" };
49+ Configurable<int > confPDGCodePositiveChild{ " confPDGCodePositiveChild " , 2212 , " Positive Child - - PDG code" };
50+ Configurable<int > confPDGCodeNegativeChild{ " confPDGCodeNegativeChild " , 211 , " Negative Child - - PDG code" };
51+ Configurable<uint32_t > confCutV0{ " confCutV0 " , 338 , " V0 - - Selection bit from cutCulator" };
52+ ConfigurableAxis confV0TempFitVarBins{ " confV0TempFitVarBins " , {300 , 0.95 , 1 .}, " V0: binning of the TempFitVar in the pT vs. TempFitVar plot" };
53+ ConfigurableAxis confV0TempFitVarpTBins{ " confV0TempFitVarpTBins " , {20 , 0.5 , 4.05 }, " V0: pT binning of the pT vs. TempFitVar plot" };
54+
55+ Configurable<uint32_t > confCutPositiveChild{ " confCutPositiveChild " , 150 , " Positive Child of V0 - - Selection bit from cutCulator" };
56+ Configurable<uint32_t > confCutNegativeChild{ " confCutNegativeChild " , 149 , " Negative Child of V0 - - Selection bit from cutCulator" };
57+ Configurable<float > confPositiveChildPIDnSigmaMax{ " confPositiveChildPIDnSigmaMax " , 3 .f , " Positive Child of V0 - - Selection bit from cutCulator" };
58+ Configurable<float > confNegativeChildPIDnSigmaMax{ " confNegativeChildPIDnSigmaMax " , 3 .f , " Negative Child of V0 - - Selection bit from cutCulator" };
59+ Configurable<int > confPositiveChildIndex{ " confPositiveChildIndex " , 1 , " Positive Child of V0 - - Index from cutCulator" };
60+ Configurable<int > confNegativeChildIndex{ " confNegativeChildIndex " , 0 , " Negative Child of V0 - - Index from cutCulator" };
61+ Configurable<std::vector<float >> confChildPIDnSigmaMax{ " confChildPIDnSigmaMax " , std::vector<float >{4 .f , 3 .f }, " V0 child selection: max . PID nSigma TPC" };
62+ Configurable<int > confChildnSpecies{ " confChildnSpecies " , 2 , " Number of particle spieces (for V0 children) with PID info" };
63+ ConfigurableAxis confChildTempFitVarBins{ " confChildTempFitVarBins " , {300 , -0.15 , 0.15 }, " V0 child: binning of the TempFitVar in the pT vs. TempFitVar plot" };
64+ ConfigurableAxis confChildTempFitVarpTBins{ " confChildTempFitVarpTBins " , {20 , 0.5 , 4.05 }, " V0 child: pT binning of the pT vs. TempFitVar plot" };
6565
6666 using FemtoFullParticles = soa::Join<aod::FDParticles, aod::FDExtParticles>;
67- Partition<FemtoFullParticles> partsOne = (aod::femtouniverseparticle::partType == uint8_t (aod::femtouniverseparticle::ParticleType::kV0 )) && ((aod::femtouniverseparticle::cut & ConfCutV0 ) == ConfCutV0 );
67+ Partition<FemtoFullParticles> partsOne = (aod::femtouniverseparticle::partType == uint8_t (aod::femtouniverseparticle::ParticleType::kV0 )) && ((aod::femtouniverseparticle::cut & confCutV0 ) == confCutV0 );
6868 Preslice<FemtoFullParticles> perCol = aod::femtouniverseparticle::fdCollisionId;
6969
7070 // / Histogramming
@@ -81,9 +81,9 @@ struct femtoUniverseDebugV0 {
8181 void init (InitContext&)
8282 {
8383 eventHisto.init (&EventRegistry);
84- posChildHistos.init (&V0Registry, ConfChildTempFitVarpTBins, ConfChildTempFitVarBins , false , ConfPDGCodeChildPos .value , true );
85- negChildHistos.init (&V0Registry, ConfChildTempFitVarpTBins, ConfChildTempFitVarBins , false , ConfPDGCodeChildNeg , true );
86- V0Histos.init (&V0Registry, ConfV0TempFitVarpTBins, ConfV0TempFitVarBins , false , ConfPDGCodeV0 .value , true );
84+ posChildHistos.init (&V0Registry, confChildTempFitVarpTBins, confChildTempFitVarBins , false , confPDGCodePositiveChild .value , true );
85+ negChildHistos.init (&V0Registry, confChildTempFitVarpTBins, confChildTempFitVarBins , false , confPDGCodeNegativeChild , true );
86+ V0Histos.init (&V0Registry, confV0TempFitVarpTBins, confV0TempFitVarBins , false , confPDGCodeV0 .value , true );
8787
8888 thetaRegistry.add (" Theta/hTheta" , " ; p (GeV/#it{c}); cos(#theta)" , kTH2F , {{100 , 0 , 10 }, {50 , -5 , 5 }});
8989 }
@@ -107,10 +107,11 @@ struct femtoUniverseDebugV0 {
107107 // Check cuts on V0 children
108108 if (posChild.partType () == uint8_t (aod::femtouniverseparticle::ParticleType::kV0Child ) &&
109109 negChild.partType () == uint8_t (aod::femtouniverseparticle::ParticleType::kV0Child ) &&
110- isFullPIDSelected (posChild.pidCut (), posChild.p (), 999 .f , ConfChildPosIndex.value , ConfChildnSpecies.value , ConfChildPIDnSigmaMax.value , ConfChildPosPidnSigmaMax.value , 1 .f ) &&
111- isFullPIDSelected (negChild.pidCut (), negChild.p (), 999 .f , ConfChildNegIndex.value , ConfChildnSpecies.value , ConfChildPIDnSigmaMax.value , ConfChildNegPidnSigmaMax.value , 1 .f )) {
112- auto protonMass = pdg->Mass (2212 );
113- auto pionMass = pdg->Mass (211 );
110+ isFullPIDSelected (posChild.pidCut (), posChild.p (), 999 .f , confPositiveChildIndex.value , confChildnSpecies.value , confChildPIDnSigmaMax.value , confPositiveChildPIDnSigmaMax.value , 1 .f ) &&
111+ isFullPIDSelected (negChild.pidCut (), negChild.p (), 999 .f , confNegativeChildIndex.value , confChildnSpecies.value , confChildPIDnSigmaMax.value , confNegativeChildPIDnSigmaMax.value , 1 .f )) {
112+ auto pdgDB = TDatabasePDG::Instance ();
113+ auto protonMass = pdgDB->GetParticle (confPDGCodePositiveChild)->Mass ();
114+ auto pionMass = pdgDB->GetParticle (confPDGCodeNegativeChild)->Mass ();
114115 auto protonBoosted = FemtoUniverseMath::boostPRF<decltype (posChild)>(posChild, protonMass, negChild, pionMass);
115116 auto cosineTheta = (protonBoosted.Px () * part.px () + protonBoosted.Py () * part.py () + protonBoosted.Pz () * part.pz ()) / (protonBoosted.P () * part.p ());
116117
@@ -127,7 +128,7 @@ WorkflowSpec
127128 defineDataProcessing (ConfigContext const & cfgc)
128129{
129130 WorkflowSpec workflow{
130- adaptAnalysisTask<femtoUniverseDebugV0 >(cfgc),
131+ adaptAnalysisTask<FemtoUniverseDebugV0 >(cfgc),
131132 };
132133 return workflow;
133134}
0 commit comments