@@ -70,7 +70,7 @@ struct ParticleCompositionCorrection {
7070 Configurable<float > ptMaxCut{" ptMaxCut" , 10 .f , " pt max cut" };
7171 Configurable<bool > enableQAHistos{" enableQAHistos" , true , " enable qa histograms showing the effect of the PCC" };
7272
73- Configurable<std::string> ccdbBasePath{" ccdbBasePath" , " /Users/m/makruger /" , " ccdb directory contianing the particle fraction networks" };
73+ Configurable<std::string> ccdbBasePath{" ccdbBasePath" , " /Users/m/mcalmonb /" , " ccdb directory contianing the particle fraction networks" };
7474 Configurable<std::string> modelPathData{" modelPathData" , " PCC/data/pp" , " Path to the .onnx file containing the particle fractions in data" };
7575 Configurable<std::string> modelPathMC{" modelPathMC" , " PCC/pythia/pp" , " Path to the .onnx file containing the particle fractions in MC" };
7676
@@ -97,14 +97,16 @@ void ParticleCompositionCorrection::init(InitContext const&)
9797 return ;
9898 }
9999 if (!ccdbBasePath.value .empty ()) {
100- ccdbApi.init (" http://ccdb-test.cern.ch:8080" );
100+ // ccdbApi.init("http://ccdb-test.cern.ch:8080");
101+ ccdbApi.init (" http://alice-ccdb.cern.ch" );
101102 static const int64_t dummyTimeStamp = 2 ;
102- if (!ccdbApi.retrieveBlob (ccdbBasePath.value + modelPathData.value , modelPathData.value , {}, dummyTimeStamp, false , " ParticleFractions_Data .onnx" ) || !ccdbApi.retrieveBlob (ccdbBasePath.value + modelPathMC.value , modelPathMC.value , {}, dummyTimeStamp, false , " ParticleFractions_MC .onnx" )) {
103+ if (!ccdbApi.retrieveBlob (ccdbBasePath.value + modelPathData.value , modelPathData.value , {}, dummyTimeStamp, false , " ParticleFractions_data .onnx" ) || !ccdbApi.retrieveBlob (ccdbBasePath.value + modelPathMC.value , modelPathMC.value , {}, dummyTimeStamp, false , " ParticleFractions_pythia .onnx" )) {
103104 LOGP (fatal, " Could not download particle fraction networks!" );
104105 }
105106 }
106- particleFractionsData.initModel (modelPathData.value + " /ParticleFractions_Data.onnx" , true );
107- particleFractionsMC.initModel (modelPathMC.value + " /ParticleFractions_MC.onnx" , true );
107+
108+ particleFractionsData.initModel (modelPathData.value + " /ParticleFractions_data.onnx" , true );
109+ particleFractionsMC.initModel (modelPathMC.value + " /ParticleFractions_pythia.onnx" , true );
108110
109111 if (enableQAHistos) {
110112 std::vector<double > ptBinEdges = {0.15 , 0.2 , 0.25 , 0.3 , 0.35 , 0.4 , 0.45 , 0.5 , 0.55 , 0.6 , 0.65 , 0.7 , 0.75 ,
@@ -113,19 +115,37 @@ void ParticleCompositionCorrection::init(InitContext const&)
113115 6.0 , 6.5 , 7.0 , 8.0 , 9.0 , 10.0 };
114116 const AxisSpec ptAxis{ptBinEdges, " #it{p}_{T} (GeV/#it{c})" , " pt" };
115117
116- histos.add (" frac/data/pion" , " " , kTProfile , {ptAxis});
118+ const int maxMult = 100 ;
119+ const int nBinsMult = maxMult + 1 ;
120+ const AxisSpec multAxis = {nBinsMult, -0.5 , nBinsMult - 0.5 , " #it{N}_{ch}" , " mult" };
121+
122+ histos.add (" multDist_INELg0" , " " , kTH1D , {multAxis});
123+ histos.add (" multDist_fid" , " " , kTH1D , {multAxis});
124+ histos.add (" multDist_fidVsINELg0" , " " , kTH2D , {multAxis, multAxis});
125+
117126 histos.add (" frac/data/kaon" , " " , kTProfile , {ptAxis});
118127 histos.add (" frac/data/proton" , " " , kTProfile , {ptAxis});
119128 histos.add (" frac/data/sigma" , " " , kTProfile , {ptAxis});
129+
130+ histos.add (" frac/data/kaon_mult" , " " , kTProfile2D , {multAxis, ptAxis});
131+ histos.add (" frac/data/proton_mult" , " " , kTProfile2D , {multAxis, ptAxis});
132+ histos.add (" frac/data/sigma_mult" , " " , kTProfile2D , {multAxis, ptAxis});
133+
120134 histos.addClone (" frac/data/" , " frac/mc/" );
121135
122- histos.add (" weight/pion" , " " , kTProfile , {ptAxis});
123136 histos.add (" weight/kaon" , " " , kTProfile , {ptAxis});
124137 histos.add (" weight/proton" , " " , kTProfile , {ptAxis});
125138 histos.add (" weight/sigma" , " " , kTProfile , {ptAxis});
126139
140+ histos.add (" weight/kaon_mult" , " " , kTProfile2D , {multAxis, ptAxis});
141+ histos.add (" weight/proton_mult" , " " , kTProfile2D , {multAxis, ptAxis});
142+ histos.add (" weight/sigma_mult" , " " , kTProfile2D , {multAxis, ptAxis});
143+
127144 histos.add (" weight/secDec" , " " , kTProfile , {ptAxis});
128145 histos.add (" weight/secMat" , " " , kTProfile , {ptAxis});
146+
147+ histos.add (" weight/secDec_mult" , " " , kTProfile2D , {multAxis, ptAxis});
148+ histos.add (" weight/secMat_mult" , " " , kTProfile2D , {multAxis, ptAxis});
129149 }
130150}
131151
@@ -143,6 +163,11 @@ std::tuple<float, float, float> ParticleCompositionCorrection::getWeights(aod::M
143163 }
144164 auto absPDGCode = std::abs (particle.pdgCode ());
145165 // translate abs PDG code to PID variable of neural networks (0: pion, 1: kaon, 2: proton, 3: sigma)
166+
167+ if (absPDGCode == PDG_t::kPiPlus || absPDGCode == PDG_t::kPi0 ) {
168+ return noWeights;
169+ }
170+
146171 static const std::map<int , float > mapPID = {
147172 {PDG_t::kPiPlus , 0 .f },
148173 {PDG_t::kPi0 , 0 .f },
@@ -175,25 +200,29 @@ std::tuple<float, float, float> ParticleCompositionCorrection::getWeights(aod::M
175200 storedWeights[particle.index ()] = weights;
176201 }
177202 if (enableQAHistos && particle.isPhysicalPrimary () && std::abs (particle.eta ()) < 0.8 ) { // o2-linter: disable=magic-number (usual range of charged-partilce measurements)
178- if (iterMapPID->first == PDG_t::kPiPlus ) {
179- histos.fill (HIST (" frac/data/pion" ), pt, fracData);
180- histos.fill (HIST (" frac/mc/pion" ), pt, fracMC);
181- histos.fill (HIST (" weight/pion" ), pt, weight);
182- }
183203 if (iterMapPID->first == PDG_t::kKPlus ) {
184204 histos.fill (HIST (" frac/data/kaon" ), pt, fracData);
185205 histos.fill (HIST (" frac/mc/kaon" ), pt, fracMC);
206+ histos.fill (HIST (" frac/data/kaon_mult" ), dNdEta, pt, fracData);
207+ histos.fill (HIST (" frac/mc/kaon_mult" ), dNdEta, pt, fracMC);
186208 histos.fill (HIST (" weight/kaon" ), pt, weight);
209+ histos.fill (HIST (" weight/kaon_mult" ), dNdEta, pt, weight);
187210 }
188211 if (iterMapPID->first == PDG_t::kProton ) {
189212 histos.fill (HIST (" frac/data/proton" ), pt, fracData);
190213 histos.fill (HIST (" frac/mc/proton" ), pt, fracMC);
214+ histos.fill (HIST (" frac/data/proton_mult" ), dNdEta, pt, fracData);
215+ histos.fill (HIST (" frac/mc/proton_mult" ), dNdEta, pt, fracMC);
191216 histos.fill (HIST (" weight/proton" ), pt, weight);
217+ histos.fill (HIST (" weight/proton_mult" ), dNdEta, pt, weight);
192218 }
193219 if (iterMapPID->first == PDG_t::kSigmaPlus || iterMapPID->first == PDG_t::kSigmaMinus ) {
194220 histos.fill (HIST (" frac/data/sigma" ), pt, fracData);
195221 histos.fill (HIST (" frac/mc/sigma" ), pt, fracMC);
222+ histos.fill (HIST (" frac/data/sigma_mult" ), dNdEta, pt, fracData);
223+ histos.fill (HIST (" frac/mc/sigma_mult" ), dNdEta, pt, fracMC);
196224 histos.fill (HIST (" weight/sigma" ), pt, weight);
225+ histos.fill (HIST (" weight/sigma_mult" ), dNdEta, pt, weight);
197226 }
198227 }
199228 return weights;
@@ -218,8 +247,10 @@ std::tuple<float, float, float> ParticleCompositionCorrection::getWeights(aod::M
218247 if (pdgParticle && pdgParticle->Charge () != 0 .) {
219248 if (particle.getProcess () == TMCProcess::kPDecay ) {
220249 histos.fill (HIST (" weight/secDec" ), particle.pt (), weight);
250+ histos.fill (HIST (" weight/secDec_mult" ), dNdEta, particle.pt (), weight);
221251 } else if (particle.getProcess () == TMCProcess::kPHInhelastic || particle.getProcess () == TMCProcess::kPHadronic || particle.getProcess () == TMCProcess::kPHElastic ) {
222252 histos.fill (HIST (" weight/secMat" ), particle.pt (), weight);
253+ histos.fill (HIST (" weight/secMat_mult" ), dNdEta, particle.pt (), weight);
223254 }
224255 }
225256 }
@@ -232,6 +263,8 @@ void ParticleCompositionCorrection::process(aod::McCollisions::iterator const&,
232263{
233264 // determine dNdEta of the collision
234265 float dNdEta = 0 .f ;
266+ float dNdEtafid = 0 .f ;
267+
235268 for (const auto & particle : particles) {
236269 if (!particle.isPhysicalPrimary ()) {
237270 continue ;
@@ -240,10 +273,19 @@ void ParticleCompositionCorrection::process(aod::McCollisions::iterator const&,
240273 if (!pdgParticle || pdgParticle->Charge () == 0 .) {
241274 continue ;
242275 }
243- if (std::abs (particle.eta ()) >= 0.5 ) { // o2-linter: disable=magic-number (particle density at mid-rapidity)
276+ if (std::abs (particle.eta ()) >= etaCut ) {
244277 continue ;
245278 }
246- ++dNdEta;
279+ if (std::abs (particle.eta ()) < 0.5 ) { // o2-linter: disable=magic-number (particle density at mid-rapidity)
280+ ++dNdEta;
281+ }
282+ ++dNdEtafid;
283+ }
284+
285+ if (dNdEtafid > 0 .f ) {
286+ histos.fill (HIST (" multDist_INELg0" ), dNdEta);
287+ histos.fill (HIST (" multDist_fid" ), dNdEtafid);
288+ histos.fill (HIST (" multDist_fidVsINELg0" ), dNdEta, dNdEtafid);
247289 }
248290
249291 std::map<int32_t , std::tuple<float , float , float >> storedWeights;
0 commit comments