1919#include " Common/DataModel/Centrality.h"
2020#include " Common/DataModel/EventSelection.h"
2121#include " Common/DataModel/Multiplicity.h"
22- #include " Common/DataModel/PIDResponseTOF.h"
23- #include " Common/DataModel/PIDResponseTPC.h"
22+ #include " Common/DataModel/PIDResponse.h"
2423#include " Common/DataModel/TrackSelectionTables.h"
2524
2625#include " CCDB/BasicCCDBManager.h"
@@ -73,6 +72,7 @@ struct phianalysisrun3_PbPb {
7372 } rctCut;
7473 RCTFlagsChecker rctChecker;
7574 HistogramRegistry histos{" histos" , {}, OutputObjHandlingPolicy::AnalysisObject};
75+ HistogramRegistry registry{" registry" };
7676 // events
7777 Configurable<float > cfgCutVertex{" cfgCutVertex" , 10 .0f , " Accepted z-vertex range" };
7878 // track
@@ -118,7 +118,7 @@ struct phianalysisrun3_PbPb {
118118 ConfigurableAxis ptAxisphi{" ptAxisphi" , {200 , 0 .0f , 20 .0f }, " phi pT axis" };
119119 ConfigurableAxis centAxisphi{" centAxisphi" , {200 , 0.0 , 200.0 }, " phi centrality axis" };
120120 ConfigurableAxis massAxisphi{" massAxisphi" , {200 , 0.9 , 1.1 }, " phi mass axis" };
121-
121+ ConfigurableAxis axisNch{ " axisNch " , { 100 , 0 . 0f , 100 . 0f }, " Number of charged particles in |y| < 0.5 " };
122122 ConfigurableAxis binsImpactPar{" binsImpactPar" , {VARIABLE_WIDTH, 0 , 3.5 , 5.67 , 7.45 , 8.85 , 10.0 , 11.21 , 12.26 , 13.28 , 14.23 , 15.27 }, " Binning of the impact parameter axis" };
123123 ConfigurableAxis binsPt{" binsPt" , {VARIABLE_WIDTH, 0.0 , 0.1 , 0.2 , 0.3 , 0.4 , 0.6 , 0.8 , 1 , 1.2 , 1.4 , 1.6 , 1.8 , 2.0 , 2.2 , 2.4 , 2.6 , 2.8 , 3.0 , 3.5 , 4.0 , 4.5 , 5.0 , 6.0 , 7.0 , 8.0 , 10.0 , 12.0 }, " Binning of the pT axis" };
124124 ConfigurableAxis binsCent{" binsCent" , {VARIABLE_WIDTH, 0.0 , 10.0 , 20.0 , 30.0 , 40.0 , 50.0 , 60.0 , 70.0 , 80.0 , 90.0 , 100.0 , 110.0 }, " Binning of the centrality axis" };
@@ -245,6 +245,16 @@ struct phianalysisrun3_PbPb {
245245 histos.add (" TPC_Nsigma1_MC" , " TPC NSigma for Kaon;#it{p}_{T} (GeV/#it{c});#sigma_{TPC}^{Kaon};" , {HistType::kTH3D , {{200 , -12 , 12 }, centAxisphi, ptAxisphi}});
246246 histos.add (" trkDCAxy" , " DCAxy distribution of positive kaon track candidates" , HistType::kTH3F , {{150 , -1 .0f , 1 .0f }, centAxisphi, ptAxisphi});
247247 histos.add (" trkDCAz" , " DCAxy distribution of negative kaon track candidates" , HistType::kTH3F , {{150 , -1 .0f , 1 .0f }, centAxisphi, ptAxisphi});
248+ registry.add (" Factors/hCentralityVsMultMC" , " Event centrality vs MC multiplicity" , kTH2F , {{101 , 0 .0f , 101 .0f }, axisNch});
249+ registry.add (" Factors/hEventCentrality" , " Event centrality" , kTH1F , {{101 , 0 , 101 }});
250+ registry.add (" Factors/hNrecInGen" , " Number of collisions in MC" , kTH1F , {{4 , -0.5 , 3.5 }});
251+ registry.add (" Factors/hGenEvents" , " Generated events" , HistType::kTH2F , {{axisNch}, {4 , 0 , 4 }});
252+ auto hGenEvents = registry.get <TH2>(HIST (" Factors/hGenEvents" ));
253+ hGenEvents->GetYaxis ()->SetBinLabel (1 , " All generated events" );
254+ hGenEvents->GetYaxis ()->SetBinLabel (2 , " Generated events with Mc collision V_{z} cut" );
255+ hGenEvents->GetYaxis ()->SetBinLabel (3 , " Generated events with at least one reconstructed event" );
256+ registry.add (" Factors/h2dGenPhi" , " Centrality vs p_{T}" , kTH2D , {{101 , 0 .0f , 101 .0f }, ptAxisphi});
257+ registry.add (" Factors/h3dGenPhiVsMultMCVsCentrality" , " MC multiplicity vs centrality vs p_{T}" , kTH3D , {axisNch, {101 , 0 .0f , 101 .0f }, ptAxisphi});
248258 if (doprocessEvtLossSigLossMC) {
249259 histos.add (" QAevent/hImpactParameterGen" , " Impact parameter of generated MC events" , kTH1F , {impactParAxis});
250260 histos.add (" QAevent/hImpactParameterRec" , " Impact parameter of selected MC events" , kTH1F , {impactParAxis});
@@ -259,6 +269,7 @@ struct phianalysisrun3_PbPb {
259269 double rapidity;
260270 double genMass, recMass, resolution;
261271 ROOT::Math::PxPyPzMVector phiMother, daughter1, daughter2;
272+ ROOT::Math::PxPyPzMVector d1, d2, mother;
262273 double mass{0 .};
263274 double massrotation{0 .};
264275 double pT{0 .};
@@ -410,7 +421,7 @@ struct phianalysisrun3_PbPb {
410421 Filter acceptanceFilter = (nabs(aod::track::eta) < cfgCutEta && nabs(aod::track::pt) > cfgCutPT);
411422 Filter dcacutFilter = (nabs(aod::track::dcaXY) < cfgCutDCAxy) && (nabs(aod::track::dcaZ) < cfgCutDCAz);
412423
413- using EventCandidates = soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::FT0Mults, aod::MultZeqs, aod::CentFT0Ms, aod::CentFT0As, aod::CentFT0Cs, aod::CentFV0As>>;
424+ using EventCandidates = soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::FT0Mults, aod::MultZeqs, aod::CentFT0Ms, aod::CentFT0As, aod::CentFT0Cs, aod::CentFV0As, aod::Mults, aod::PVMults >>;
414425 using TrackCandidates = soa::Filtered<soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod::TrackSelection, aod::pidTPCFullKa, aod::pidTOFFullKa, aod::pidTOFbeta>>;
415426
416427 // using EventCandidatesMC = soa::Join<aod::Collisions, aod::EvSels, aod::FT0Mults, aod::MultZeqs, aod::McCollisionLabels>;
@@ -423,6 +434,8 @@ struct phianalysisrun3_PbPb {
423434 using CollisionMCRecTableCentFT0C = soa::SmallGroups<soa::Join<aod::McCollisionLabels, aod::Collisions, aod::CentFT0Cs, aod::EvSels, aod::CentFT0Ms, aod::CentFT0As, aod::CentFV0As>>;
424435 using TrackMCRecTable = soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod::McTrackLabels, aod::TrackSelection, aod::pidTPCFullKa, aod::pidTOFFullKa, aod::pidTOFbeta>;
425436 using FilTrackMCRecTable = soa::Filtered<TrackMCRecTable>;
437+ using McCollisionMults = soa::Join<aod::McCollisions, aod::MultMCExtras>;
438+ using LabeledTracks = soa::Join<aod::Tracks, aod::McTrackLabels>;
426439
427440 ConfigurableAxis axisVertex{" axisVertex" , {20 , -10 , 10 }, " vertex axis for bin" };
428441 ConfigurableAxis axisMultiplicity{" axisMultiplicity" , {2000 , 0 , 10000 }, " multiplicity for bin" };
@@ -1880,6 +1893,62 @@ struct phianalysisrun3_PbPb {
18801893 } // end loop on gen particles
18811894 }
18821895 PROCESS_SWITCH (phianalysisrun3_PbPb, processEvtLossSigLossMC, " Process Signal Loss, Event Loss" , false );
1896+ void processFactors (McCollisionMults::iterator const & mcCollision, soa::SmallGroups<EventCandidatesMC> const & collisions, LabeledTracks const & /* particles*/ , aod::McParticles const & mcParticles)
1897+ {
1898+ registry.fill (HIST (" Factors/hGenEvents" ), mcCollision.multMCNParticlesEta08 (), 0.5 );
1899+
1900+ if (std::abs (mcCollision.posZ ()) > cfgCutVertex)
1901+ return ;
1902+
1903+ registry.fill (HIST (" Factors/hGenEvents" ), mcCollision.multMCNParticlesEta08 (), 1.5 );
1904+
1905+ float centrality = 100 .5f ;
1906+ for (auto const & collision : collisions) {
1907+ centrality = collision.centFT0M ();
1908+ }
1909+
1910+ registry.fill (HIST (" Factors/hCentralityVsMultMC" ), centrality, mcCollision.multMCNParticlesEta08 ());
1911+ registry.fill (HIST (" Factors/hNrecInGen" ), collisions.size ());
1912+
1913+ for (const auto & particle : mcParticles) {
1914+
1915+ if (std::abs (particle.y ()) > 0.5 )
1916+ continue ;
1917+
1918+ if (particle.pdgCode () == 333 ) {
1919+ int dauSize = 2 ;
1920+ auto daughters = particle.daughters_as <aod::McParticles>();
1921+ if (daughters.size () != dauSize)
1922+ continue ;
1923+
1924+ auto daup = false ;
1925+ auto daun = false ;
1926+
1927+ for (const auto & dau : daughters) {
1928+ if (dau.pdgCode () == 321 ) {
1929+ daup = true ;
1930+ d1 = ROOT::Math::PxPyPzMVector (dau.px (), dau.py (), dau.pz (), massKa);
1931+ } else if (dau.pdgCode () == -321 ) {
1932+ daun = true ;
1933+ d2 = ROOT::Math::PxPyPzMVector (dau.px (), dau.py (), dau.pz (), massKa);
1934+ }
1935+ }
1936+ if (!daup || !daun)
1937+ continue ;
1938+
1939+ mother = d1 + d2;
1940+
1941+ registry.fill (HIST (" Factors/h2dGenPhi" ), centrality, mother.Pt ());
1942+ registry.fill (HIST (" Factors/h3dGenPhiVsMultMCVsCentrality" ), mcCollision.multMCNParticlesEta08 (), centrality, mother.Pt ());
1943+ }
1944+ }
1945+
1946+ if (collisions.size () == 0 )
1947+ return ;
1948+
1949+ registry.fill (HIST (" Factors/hGenEvents" ), mcCollision.multMCNParticlesEta08 (), 2.5 );
1950+ }
1951+ PROCESS_SWITCH (phianalysisrun3_PbPb, processFactors, " Process Signal Loss, Event Loss" , false );
18831952};
18841953WorkflowSpec defineDataProcessing (ConfigContext const & cfgc)
18851954{
0 commit comments