@@ -185,7 +185,7 @@ struct UpcRhoAnalysis {
185185 HistogramRegistry rSystem{" rSystem" , {}, OutputObjHandlingPolicy::AnalysisObject};
186186 HistogramRegistry rMC{" rMC" , {}, OutputObjHandlingPolicy::AnalysisObject};
187187
188- void init (o2::framework::InitContext&)
188+ void init (o2::framework::InitContext& context )
189189 {
190190 // QA //
191191 // collisions
@@ -285,42 +285,45 @@ struct UpcRhoAnalysis {
285285 rSystem.addClone (" system/selected/no-selection/" , " system/selected/Xn0n/" );
286286 rSystem.addClone (" system/selected/no-selection/" , " system/selected/0nXn/" );
287287 rSystem.addClone (" system/selected/no-selection/" , " system/selected/XnXn/" );
288-
289- // MC
290- // collisions
291- rMC.add (" MC/collisions/hPosXY" , " ;vertex #it{x} (cm);vertex #it{y} (cm);counts" , kTH2D , {{2000 , -0.1 , 0.1 }, {2000 , -0.1 , 0.1 }});
292- rMC.add (" MC/collisions/hPosZ" , " ;vertex #it{z} (cm);counts" , kTH1D , {{400 , -20.0 , 20.0 }});
293- rMC.add (" MC/collisions/hNPions" , " ;number of pions;counts" , kTH1D , {{11 , -0.5 , 10.5 }});
294- rMC.add (" MC/collisions/hNumOfCollisionRecos" , " ;number of collision reconstructions;counts" , kTH1D , {{6 , -0.5 , 5.5 }});
295- // tracks
296- rMC.add (" MC/tracks/all/hPdgCode" , " ;pdg code;counts" , kTH1D , {{2001 , -1000.5 , 1000.5 }});
297- rMC.add (" MC/tracks/all/hMotherPdgCode" , " ;mother pdg code;counts" , kTH1D , {{2001 , -1000.5 , 1000.5 }});
298- rMC.add (" MC/tracks/all/hProducedByGenerator" , " ;produced by generator;counts" , kTH1D , {{2 , -0.5 , 1.5 }});
299- rMC.add (" MC/tracks/all/hIsPhysicalPrimary" , " ;is physical primary;counts" , kTH1D , {{2 , -0.5 , 1.5 }});
300- rMC.add (" MC/tracks/all/hPt" , " ;#it{p}_{T} (GeV/#it{c});counts" , kTH1D , {ptAxis});
301- rMC.add (" MC/tracks/all/hEta" , " ;#it{#eta};counts" , kTH1D , {etaAxis});
302- rMC.add (" MC/tracks/all/hPhi" , " ;#it{#phi};counts" , kTH1D , {phiAxis});
303- rMC.addClone (" MC/tracks/all/" , " MC/tracks/primaries/" );
304- rMC.addClone (" MC/tracks/all/" , " MC/tracks/prodByGen/" );
305- rMC.add (" MC/tracks/hPt" , " ;#it{p}_{T leading} (GeV/#it{c});#it{p}_{T subleading} (GeV/#it{c});counts" , kTH2D , {ptAxis, ptAxis});
306- rMC.add (" MC/tracks/hEta" , " ;#it{#eta}_{leading};#it{#eta}_{subleading};counts" , kTH2D , {etaAxis, etaAxis});
307- rMC.add (" MC/tracks/hPhi" , " ;#it{#phi}_{leading};#it{#phi}_{subleading};counts" , kTH2D , {phiAxis, phiAxis});
308- // resolution
309- rMC.add (" MC/resolution/tracks/hPt" , " ;#it{p}_{T, reco} - #it{p}_{T, true} (GeV/#it{c});counts" , kTH1D , {{200 , -1.0 , 1.0 }});
310- rMC.add (" MC/resolution/tracks/hEta" , " ;#it{#eta}_{reco} - #it{#eta}_{true};counts" , kTH1D , {{200 , -0.2 , 0.2 }});
311- rMC.add (" MC/resolution/tracks/hPhi" , " ;#it{#phi}_{reco} - #it{#phi}_{true} (rad);counts" , kTH1D , {{200 , -0.2 , 0.2 }});
312- // system
313- rMC.add (" MC/system/hM" , " ;#it{m} (GeV/#it{c}^{2});counts" , kTH1D , {mAxis });
314- rMC.add (" MC/system/hPt" , " ;#it{p}_{T} (GeV/#it{c});counts" , kTH1D , {ptAxis});
315- rMC.add (" MC/system/hPt2" , " ;#it{p}_{T}^{2} (GeV^{2}/#it{c}^{2});counts" , kTH1D , {pt2Axis});
316- rMC.add (" MC/system/hPtVsM" , " ;#it{m} (GeV/#it{c}^{2});#it{p}_{T} (GeV/#it{c});counts" , kTH2D , {mAxis , ptAxis});
317- rMC.add (" MC/system/hY" , " ;#it{y};counts" , kTH1D , {yAxis});
318- rMC.add (" MC/system/hPhi" , " ;#it{#phi};counts" , kTH1D , {phiAxis});
319- rMC.add (" MC/system/hPhiRandom" , " ;#Delta#it{#phi}_{random};counts" , kTH1D , {deltaPhiAxis});
320- rMC.add (" MC/system/hPhiCharge" , " ;#Delta#it{#phi}_{charge};counts" , kTH1D , {deltaPhiAxis});
321- rMC.add (" MC/system/hPhiRandomVsM" , " ;#it{m} (GeV/#it{c}^{2});#Delta#it{#phi};counts" , kTH2D , {mAxis , deltaPhiAxis});
322- rMC.add (" MC/system/hPhiChargeVsM" , " ;#it{m} (GeV/#it{c}^{2});#Delta#it{#phi};counts" , kTH2D , {mAxis , deltaPhiAxis});
323- rMC.addClone (" MC/system/" , " MC/system/selected/" );
288+
289+ if (context.mOptions .get <bool >(" processMCdata" )) {
290+ // MC
291+ // collisions
292+ rMC.add (" MC/collisions/hPosXY" , " ;vertex #it{x} (cm);vertex #it{y} (cm);counts" , kTH2D , {{2000 , -0.1 , 0.1 }, {2000 , -0.1 , 0.1 }});
293+ rMC.add (" MC/collisions/hPosZ" , " ;vertex #it{z} (cm);counts" , kTH1D , {{400 , -20.0 , 20.0 }});
294+ rMC.add (" MC/collisions/hNPions" , " ;number of pions;counts" , kTH1D , {{11 , -0.5 , 10.5 }});
295+ if (context.mOptions .get <bool >(" processCollisionRecoCheck" ))
296+ rMC.add (" MC/collisions/hNumOfCollisionRecos" , " ;number of collision reconstructions;counts" , kTH1D , {{6 , -0.5 , 5.5 }});
297+ // tracks
298+ rMC.add (" MC/tracks/all/hPdgCode" , " ;pdg code;counts" , kTH1D , {{2001 , -1000.5 , 1000.5 }});
299+ rMC.add (" MC/tracks/all/hMotherPdgCode" , " ;mother pdg code;counts" , kTH1D , {{2001 , -1000.5 , 1000.5 }});
300+ rMC.add (" MC/tracks/all/hProducedByGenerator" , " ;produced by generator;counts" , kTH1D , {{2 , -0.5 , 1.5 }});
301+ rMC.add (" MC/tracks/all/hIsPhysicalPrimary" , " ;is physical primary;counts" , kTH1D , {{2 , -0.5 , 1.5 }});
302+ rMC.add (" MC/tracks/all/hPt" , " ;#it{p}_{T} (GeV/#it{c});counts" , kTH1D , {ptAxis});
303+ rMC.add (" MC/tracks/all/hEta" , " ;#it{#eta};counts" , kTH1D , {etaAxis});
304+ rMC.add (" MC/tracks/all/hPhi" , " ;#it{#phi};counts" , kTH1D , {phiAxis});
305+ rMC.addClone (" MC/tracks/all/" , " MC/tracks/primaries/" );
306+ rMC.addClone (" MC/tracks/all/" , " MC/tracks/prodByGen/" );
307+ rMC.add (" MC/tracks/hPt" , " ;#it{p}_{T leading} (GeV/#it{c});#it{p}_{T subleading} (GeV/#it{c});counts" , kTH2D , {ptAxis, ptAxis});
308+ rMC.add (" MC/tracks/hEta" , " ;#it{#eta}_{leading};#it{#eta}_{subleading};counts" , kTH2D , {etaAxis, etaAxis});
309+ rMC.add (" MC/tracks/hPhi" , " ;#it{#phi}_{leading};#it{#phi}_{subleading};counts" , kTH2D , {phiAxis, phiAxis});
310+ // resolution
311+ rMC.add (" MC/resolution/tracks/hPt" , " ;#it{p}_{T, reco} - #it{p}_{T, true} (GeV/#it{c});counts" , kTH1D , {{200 , -1.0 , 1.0 }});
312+ rMC.add (" MC/resolution/tracks/hEta" , " ;#it{#eta}_{reco} - #it{#eta}_{true};counts" , kTH1D , {{200 , -0.2 , 0.2 }});
313+ rMC.add (" MC/resolution/tracks/hPhi" , " ;#it{#phi}_{reco} - #it{#phi}_{true} (rad);counts" , kTH1D , {{200 , -0.2 , 0.2 }});
314+ // system
315+ rMC.add (" MC/system/hM" , " ;#it{m} (GeV/#it{c}^{2});counts" , kTH1D , {mAxis });
316+ rMC.add (" MC/system/hPt" , " ;#it{p}_{T} (GeV/#it{c});counts" , kTH1D , {ptAxis});
317+ rMC.add (" MC/system/hPt2" , " ;#it{p}_{T}^{2} (GeV^{2}/#it{c}^{2});counts" , kTH1D , {pt2Axis});
318+ rMC.add (" MC/system/hPtVsM" , " ;#it{m} (GeV/#it{c}^{2});#it{p}_{T} (GeV/#it{c});counts" , kTH2D , {mAxis , ptAxis});
319+ rMC.add (" MC/system/hY" , " ;#it{y};counts" , kTH1D , {yAxis});
320+ rMC.add (" MC/system/hPhi" , " ;#it{#phi};counts" , kTH1D , {phiAxis});
321+ rMC.add (" MC/system/hPhiRandom" , " ;#Delta#it{#phi}_{random};counts" , kTH1D , {deltaPhiAxis});
322+ rMC.add (" MC/system/hPhiCharge" , " ;#Delta#it{#phi}_{charge};counts" , kTH1D , {deltaPhiAxis});
323+ rMC.add (" MC/system/hPhiRandomVsM" , " ;#it{m} (GeV/#it{c}^{2});#Delta#it{#phi};counts" , kTH2D , {mAxis , deltaPhiAxis});
324+ rMC.add (" MC/system/hPhiChargeVsM" , " ;#it{m} (GeV/#it{c}^{2});#Delta#it{#phi};counts" , kTH2D , {mAxis , deltaPhiAxis});
325+ rMC.addClone (" MC/system/" , " MC/system/selected/" );
326+ }
324327 }
325328
326329 static constexpr std::string_view AppliedSelections[3 ] = {" all/" , " trackSelections/" , " systemSelections/" };
0 commit comments