1919//
2020// Internal version number: 6.3
2121//
22+ #include " Common/Core/RecoDecay.h"
2223#include " Common/Core/TrackSelection.h"
2324#include " Common/Core/TrackSelectionDefaults.h"
24- #include " Common/DataModel/EventSelection.h"
2525#include " Common/DataModel/Centrality.h"
26- #include " Common/DataModel/TrackSelectionTables .h"
26+ #include " Common/DataModel/EventSelection .h"
2727#include " Common/DataModel/PIDResponse.h"
28- #include " CommonConstants/MathConstants.h"
28+ #include " Common/DataModel/TrackSelectionTables.h"
29+
2930#include " CCDB/BasicCCDBManager.h"
30- #include " Common/Core/RecoDecay .h"
31+ #include " CommonConstants/MathConstants .h"
3132//
3233#include " Framework/AnalysisTask.h"
3334#include " Framework/RunningWorkflowInfo.h"
3435#include " Framework/runDataProcessing.h"
3536//
37+ #include < TPDGCode.h>
38+
39+ #include < cmath>
40+ #include < set>
3641#include < string>
3742#include < vector>
38- #include < set>
39- #include < cmath>
40- #include < TPDGCode.h>
4143//
4244namespace extConfPar
4345{
@@ -147,21 +149,21 @@ struct qaMatchEff {
147149 // TRD presence
148150 Configurable<int > isTRDThere{" isTRDThere" , 2 , " Integer to turn the presence of TRD off, on, don't care (0,1,anything else)" };
149151 Configurable<int > isTOFThere{" isTOFThere" , 2 , " Integer to turn the presence of TOF off, on, don't care (0,1,anything else)" };
150-
152+
151153 Configurable<bool > isitMC{" isitMC" , false , " Reading MC files, data if false" };
152154 Configurable<bool > doDebug{" doDebug" , false , " Flag of debug information" };
153155 // Histogram configuration
154-
156+
155157 // histos bins
156158 Configurable<int > etaBins{" eta-bins" , 40 , " Number of eta bins" };
157159 Configurable<int > phiBins{" phi-bins" , 18 , " Number of phi bins" };
158160 Configurable<int > qoptBins{" qopt-bins" , 500 , " Number of Q/pt bins" };
159-
161+
160162 // special histo, few particles explicitly stored, then pdg>3000
161163 Configurable<int > pdgBins{" pdg-bins" , 14 , " Number of pdg values counted" };
162-
164+
163165 // histo axes
164-
166+
165167 ConfigurableAxis ptBins{" ptBins" , {100 , 0 .f , 20 .f }, " pT binning" };
166168 ConfigurableAxis XBins{" XBins" , {400 , -2 .f , 2 .f }, " X binning" };
167169 ConfigurableAxis ZBins{" ZBins" , {400 , -20 .f , 20 .f }, " Z binning" };
@@ -1602,16 +1604,16 @@ struct qaMatchEff {
16021604 auto mcpart = track.mcParticle ();
16031605 siPDGCode = mcpart.pdgCode ();
16041606 tpPDGCode = std::abs (siPDGCode);
1605- // if (mcpart.isPhysicalPrimary()) {
1606- // histos.get<TH1>(HIST("MC/control/etahist_diff"))->Fill(mcpart.eta() - track.eta());
1607- // auto delta = RecoDecay::constrainAngle(mcpart.phi() - track.phi());
1608- // if (delta > o2::constants::math::PI) {
1609- // delta -= o2::constants::math::TwoPI;
1610- // }
1611- // if (delta < o2::constants::math::PI) {
1612- // delta += o2::constants::math::TwoPI;
1613- // }
1614- // histos.get<TH1>(HIST("MC/control/phihist_diff"))->Fill(delta);
1607+ // if (mcpart.isPhysicalPrimary()) {
1608+ // histos.get<TH1>(HIST("MC/control/etahist_diff"))->Fill(mcpart.eta() - track.eta());
1609+ // auto delta = RecoDecay::constrainAngle(mcpart.phi() - track.phi());
1610+ // if (delta > o2::constants::math::PI) {
1611+ // delta -= o2::constants::math::TwoPI;
1612+ // }
1613+ // if (delta < o2::constants::math::PI) {
1614+ // delta += o2::constants::math::TwoPI;
1615+ // }
1616+ // histos.get<TH1>(HIST("MC/control/phihist_diff"))->Fill(delta);
16151617 // }
16161618
16171619 // / MC info for THnSparse filling
@@ -1685,7 +1687,7 @@ struct qaMatchEff {
16851687 if (makethn) {
16861688 if constexpr (IS_MC) {
16871689 histos.fill (HIST (" MC/sparse/thnsforfrac" ), track.dcaXY (), track.dcaZ (), trackPt, track.eta (), sayPrim, track.phi (), specind, signOfTrack, hasdet);
1688- if (siPDGCode == PDG_t::kPiPlus || siPDGCode == PDG_t::kKPlus ) // pions and kaons together
1690+ if (siPDGCode == PDG_t::kPiPlus || siPDGCode == PDG_t::kKPlus ) // pions and kaons together
16891691 histos.fill (HIST (" MC/sparse/thnsforfrac" ), track.dcaXY (), track.dcaZ (), trackPt, track.eta (), sayPrim, track.phi (), 10 , signOfTrack, hasdet);
16901692 } else {
16911693 histos.fill (HIST (" data/sparse/thnsforfrac" ), track.dcaXY (), track.dcaZ (), trackPt, track.eta (), sayPrim, track.phi (), specind, signOfTrack, hasdet);
@@ -1702,7 +1704,7 @@ struct qaMatchEff {
17021704 if (makethn) {
17031705 if constexpr (IS_MC) {
17041706 histos.fill (HIST (" MC/sparse/thnsforfrac" ), track.dcaXY (), track.dcaZ (), trackPt, track.eta (), sayPrim, track.phi (), specind, signOfTrack, hasdet);
1705- if (siPDGCode == PDG_t::kPiPlus || siPDGCode == PDG_t::kKPlus ) // pions and kaons together
1707+ if (siPDGCode == PDG_t::kPiPlus || siPDGCode == PDG_t::kKPlus ) // pions and kaons together
17061708 histos.fill (HIST (" MC/sparse/thnsforfrac" ), track.dcaXY (), track.dcaZ (), trackPt, track.eta (), sayPrim, track.phi (), 10 , signOfTrack, hasdet);
17071709 } else {
17081710 histos.fill (HIST (" data/sparse/thnsforfrac" ), track.dcaXY (), track.dcaZ (), trackPt, track.eta (), sayPrim, track.phi (), specind, signOfTrack, hasdet);
@@ -1719,7 +1721,7 @@ struct qaMatchEff {
17191721 if (makethn) {
17201722 if constexpr (IS_MC) {
17211723 histos.fill (HIST (" MC/sparse/thnsforfrac" ), track.dcaXY (), track.dcaZ (), trackPt, track.eta (), sayPrim, track.phi (), specind, signOfTrack, hasdet);
1722- if (siPDGCode == PDG_t::kPiPlus || siPDGCode == PDG_t::kKPlus ) // pions and kaons together
1724+ if (siPDGCode == PDG_t::kPiPlus || siPDGCode == PDG_t::kKPlus ) // pions and kaons together
17231725 histos.fill (HIST (" MC/sparse/thnsforfrac" ), track.dcaXY (), track.dcaZ (), trackPt, track.eta (), sayPrim, track.phi (), 10 , signOfTrack, hasdet);
17241726 } else {
17251727 histos.fill (HIST (" data/sparse/thnsforfrac" ), track.dcaXY (), track.dcaZ (), trackPt, track.eta (), sayPrim, track.phi (), specind, signOfTrack, hasdet);
@@ -1736,7 +1738,7 @@ struct qaMatchEff {
17361738 if (makethn) {
17371739 if constexpr (IS_MC) {
17381740 histos.fill (HIST (" MC/sparse/thnsforfrac" ), track.dcaXY (), track.dcaZ (), trackPt, track.eta (), sayPrim, track.phi (), specind, signOfTrack, hasdet);
1739- if (siPDGCode == PDG_t::kPiPlus || siPDGCode == PDG_t::kKPlus ) // pions and kaons together
1741+ if (siPDGCode == PDG_t::kPiPlus || siPDGCode == PDG_t::kKPlus ) // pions and kaons together
17401742 histos.fill (HIST (" MC/sparse/thnsforfrac" ), track.dcaXY (), track.dcaZ (), trackPt, track.eta (), sayPrim, track.phi (), 10 , signOfTrack, hasdet);
17411743 } else {
17421744 histos.fill (HIST (" data/sparse/thnsforfrac" ), track.dcaXY (), track.dcaZ (), trackPt, track.eta (), sayPrim, track.phi (), specind, signOfTrack, hasdet);
@@ -1753,7 +1755,7 @@ struct qaMatchEff {
17531755 if (makethn) {
17541756 if constexpr (IS_MC) {
17551757 histos.fill (HIST (" MC/sparse/thnsforfrac" ), track.dcaXY (), track.dcaZ (), trackPt, track.eta (), sayPrim, track.phi (), specind, signOfTrack, hasdet);
1756- if (siPDGCode == PDG_t::kPiPlus || siPDGCode == PDG_t::kKPlus ) // pions and kaons together
1758+ if (siPDGCode == PDG_t::kPiPlus || siPDGCode == PDG_t::kKPlus ) // pions and kaons together
17571759 histos.fill (HIST (" MC/sparse/thnsforfrac" ), track.dcaXY (), track.dcaZ (), trackPt, track.eta (), sayPrim, track.phi (), 10 , signOfTrack, hasdet);
17581760 } else {
17591761 histos.fill (HIST (" data/sparse/thnsforfrac" ), track.dcaXY (), track.dcaZ (), trackPt, track.eta (), sayPrim, track.phi (), specind, signOfTrack, hasdet);
@@ -1770,7 +1772,7 @@ struct qaMatchEff {
17701772 if (makethn) {
17711773 if constexpr (IS_MC) {
17721774 histos.fill (HIST (" MC/sparse/thnsforfrac" ), track.dcaXY (), track.dcaZ (), trackPt, track.eta (), sayPrim, track.phi (), specind, signOfTrack, hasdet);
1773- if (siPDGCode == PDG_t::kPiPlus || siPDGCode == PDG_t::kKPlus ) // pions and kaons together
1775+ if (siPDGCode == PDG_t::kPiPlus || siPDGCode == PDG_t::kKPlus ) // pions and kaons together
17741776 histos.fill (HIST (" MC/sparse/thnsforfrac" ), track.dcaXY (), track.dcaZ (), trackPt, track.eta (), sayPrim, track.phi (), 10 , signOfTrack, hasdet);
17751777 } else {
17761778 histos.fill (HIST (" data/sparse/thnsforfrac" ), track.dcaXY (), track.dcaZ (), trackPt, track.eta (), sayPrim, track.phi (), specind, signOfTrack, hasdet);
@@ -1787,7 +1789,7 @@ struct qaMatchEff {
17871789 if (makethn) {
17881790 if constexpr (IS_MC) {
17891791 histos.fill (HIST (" MC/sparse/thnsforfrac" ), track.dcaXY (), track.dcaZ (), trackPt, track.eta (), sayPrim, track.phi (), specind, signOfTrack, hasdet);
1790- if (siPDGCode == PDG_t::kPiPlus || siPDGCode == PDG_t::kKPlus ) // pions and kaons together
1792+ if (siPDGCode == PDG_t::kPiPlus || siPDGCode == PDG_t::kKPlus ) // pions and kaons together
17911793 histos.fill (HIST (" MC/sparse/thnsforfrac" ), track.dcaXY (), track.dcaZ (), trackPt, track.eta (), sayPrim, track.phi (), 10 , signOfTrack, hasdet);
17921794 } else {
17931795 histos.fill (HIST (" data/sparse/thnsforfrac" ), track.dcaXY (), track.dcaZ (), trackPt, track.eta (), sayPrim, track.phi (), specind, signOfTrack, hasdet);
@@ -1804,7 +1806,7 @@ struct qaMatchEff {
18041806 if (makethn) {
18051807 if constexpr (IS_MC) {
18061808 histos.fill (HIST (" MC/sparse/thnsforfrac" ), track.dcaXY (), track.dcaZ (), trackPt, track.eta (), sayPrim, track.phi (), specind, signOfTrack, hasdet);
1807- if (siPDGCode == PDG_t::kPiPlus || siPDGCode == PDG_t::kKPlus ) // pions and kaons together
1809+ if (siPDGCode == PDG_t::kPiPlus || siPDGCode == PDG_t::kKPlus ) // pions and kaons together
18081810 histos.fill (HIST (" MC/sparse/thnsforfrac" ), track.dcaXY (), track.dcaZ (), trackPt, track.eta (), sayPrim, track.phi (), 10 , signOfTrack, hasdet);
18091811 } else {
18101812 histos.fill (HIST (" data/sparse/thnsforfrac" ), track.dcaXY (), track.dcaZ (), trackPt, track.eta (), sayPrim, track.phi (), specind, signOfTrack, hasdet);
@@ -1821,7 +1823,7 @@ struct qaMatchEff {
18211823 if (makethn) {
18221824 if constexpr (IS_MC) {
18231825 histos.fill (HIST (" MC/sparse/thnsforfrac" ), track.dcaXY (), track.dcaZ (), trackPt, track.eta (), sayPrim, track.phi (), specind, signOfTrack, hasdet);
1824- if (siPDGCode == PDG_t::kPiPlus || siPDGCode == PDG_t::kKPlus ) // pions and kaons together
1826+ if (siPDGCode == PDG_t::kPiPlus || siPDGCode == PDG_t::kKPlus ) // pions and kaons together
18251827 histos.fill (HIST (" MC/sparse/thnsforfrac" ), track.dcaXY (), track.dcaZ (), trackPt, track.eta (), sayPrim, track.phi (), 10 , signOfTrack, hasdet);
18261828 } else {
18271829 histos.fill (HIST (" data/sparse/thnsforfrac" ), track.dcaXY (), track.dcaZ (), trackPt, track.eta (), sayPrim, track.phi (), specind, signOfTrack, hasdet);
@@ -1838,7 +1840,7 @@ struct qaMatchEff {
18381840 if (makethn) {
18391841 if constexpr (IS_MC) {
18401842 histos.fill (HIST (" MC/sparse/thnsforfrac" ), track.dcaXY (), track.dcaZ (), trackPt, track.eta (), sayPrim, track.phi (), specind, signOfTrack, hasdet);
1841- if (siPDGCode == PDG_t::kPiPlus || siPDGCode == PDG_t::kKPlus ) // pions and kaons together
1843+ if (siPDGCode == PDG_t::kPiPlus || siPDGCode == PDG_t::kKPlus ) // pions and kaons together
18421844 histos.fill (HIST (" MC/sparse/thnsforfrac" ), track.dcaXY (), track.dcaZ (), trackPt, track.eta (), sayPrim, track.phi (), 10 , signOfTrack, hasdet);
18431845 } else {
18441846 histos.fill (HIST (" data/sparse/thnsforfrac" ), track.dcaXY (), track.dcaZ (), trackPt, track.eta (), sayPrim, track.phi (), specind, signOfTrack, hasdet);
@@ -1855,7 +1857,7 @@ struct qaMatchEff {
18551857 if (makethn) {
18561858 if constexpr (IS_MC) {
18571859 histos.fill (HIST (" MC/sparse/thnsforfrac" ), track.dcaXY (), track.dcaZ (), trackPt, track.eta (), sayPrim, track.phi (), specind, signOfTrack, hasdet);
1858- if (siPDGCode == PDG_t::kPiPlus || siPDGCode == PDG_t::kKPlus ) // pions and kaons together
1860+ if (siPDGCode == PDG_t::kPiPlus || siPDGCode == PDG_t::kKPlus ) // pions and kaons together
18591861 histos.fill (HIST (" MC/sparse/thnsforfrac" ), track.dcaXY (), track.dcaZ (), trackPt, track.eta (), sayPrim, track.phi (), 10 , signOfTrack, hasdet);
18601862 } else {
18611863 histos.fill (HIST (" data/sparse/thnsforfrac" ), track.dcaXY (), track.dcaZ (), trackPt, track.eta (), sayPrim, track.phi (), specind, signOfTrack, hasdet);
@@ -3359,7 +3361,7 @@ struct qaMatchEff {
33593361 if (doDebug)
33603362 LOGF (info, " Event selection not passed, skipping..." );
33613363 return ;
3362- }
3364+ }
33633365 fillHistograms<true >(tracks, mcParticles, mcParticles); // / 3rd argument non-sense in this case
33643366 fillGeneralHistos<true >(collision);
33653367 }
@@ -3462,7 +3464,7 @@ struct qaMatchEff {
34623464 if (doDebug)
34633465 LOGF (info, " Event selection not passed, skipping..." );
34643466 return ;
3465- }
3467+ }
34663468 fillHistograms<false >(tracks, tracks, tracks); // 2nd and 3rd arguments not used in this case
34673469 fillGeneralHistos<false >(collision);
34683470 }
@@ -3486,4 +3488,3 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
34863488 return WorkflowSpec{
34873489 adaptAnalysisTask<qaMatchEff>(cfgc, TaskName{" qa-match-eff" })};
34883490}
3489-
0 commit comments