@@ -100,6 +100,8 @@ struct JetFinderQATask {
100100 std::vector<int > eventSelectionBits;
101101 int trackSelection = -1 ;
102102
103+ float simPtRef = 10 .;
104+
103105 std::vector<double > jetPtBins;
104106 std::vector<double > jetPtBinsRhoAreaSub;
105107
@@ -406,13 +408,15 @@ struct JetFinderQATask {
406408 AxisSpec jetPtAxisRhoAreaSub = {400 , -200 ., 200 ., " #it{p}_{T} (GeV/#it{c})" };
407409 AxisSpec jetEtaAxis = {nBinsEta, -1.0 , 1.0 , " #eta" };
408410
411+ registry.add (" h_fakecollisions" , " event status;event status;entries" , {HistType::kTH1F , {{4 , 0.0 , 4.0 }}});
412+
409413 registry.add (" h_collisions" , " event status;event status;entries" , {HistType::kTH1F , {{4 , 0.0 , 4.0 }}});
410414 registry.add (" h2_centrality_collisions" , " centrality vs collisions; centrality; collisions" , {HistType::kTH2F , {centAxis, {4 , 0.0 , 4.0 }}});
411- // registry.add("h2_mccollision_pthardfromweight_pthardfromhepmcxsection", "ptHard from weight vs ptHard from HepMCXSections; ptHard_weight; ptHard_hepmcxsections", {HistType::kTH2F, {{200, 0.0, 200.0}, {200, 0.0, 200.0}}});
415+ registry.add (" h2_mccollision_pthardfromweight_pthardfromhepmcxsection" , " ptHard from weight vs ptHard from HepMCXSections; ptHard_weight; ptHard_hepmcxsections" , {HistType::kTH2F , {{200 , 0.0 , 200.0 }, {200 , 0.0 , 200.0 }}});
412416
413417 registry.add (" h_collisions_weighted" , " event status;event status;entries" , {HistType::kTH1F , {{4 , 0.0 , 4.0 }}}, doSumw2);
414418 registry.add (" h2_centrality_collisions_weighted" , " centrality vs collisions; centrality; collisions" , {HistType::kTH2F , {centAxis, {4 , 0.0 , 4.0 }}}, doSumw2);
415- // registry.add("h2_mccollision_pthardfromweight_pthardfromhepmcxsection_weighted", "ptHard from weight vs ptHard from HepMCXSections; ptHard_weight; ptHard_hepmcxsections", {HistType::kTH2F, {{200, 0.0, 200.0}, {200, 0.0, 200.0}}}, doSumw2);
419+ registry.add (" h2_mccollision_pthardfromweight_pthardfromhepmcxsection_weighted" , " ptHard from weight vs ptHard from HepMCXSections; ptHard_weight; ptHard_hepmcxsections" , {HistType::kTH2F , {{200 , 0.0 , 200.0 }, {200 , 0.0 , 200.0 }}}, doSumw2);
416420
417421 registry.add (" h_collisions_zvertex" , " position of collision ;#it{Z} (cm)" , {HistType::kTH1F , {{300 , -15.0 , 15.0 }}}, doSumw2);
418422 registry.add (" h_collisions_ntracks" , " N_{tracks};" , {HistType::kTH1F , {{10000 , 0.0 , 10000.0 }}}, doSumw2);
@@ -430,6 +434,12 @@ struct JetFinderQATask {
430434 registry.add (" h2_track_pt_track_sigma1overpt" , " #sigma(1/#it{p}_{T}); #it{p}_{T,track} (GeV/#it{c})" , {HistType::kTH2F , {{100 , 0 ., 10 .}, {10000 , 0.0 , 1.0 }}});
431435 registry.add (" h2_track_pt_high_track_sigma1overpt" , " #sigma(1/#it{p}_{T}); #it{p}_{T,track} (GeV/#it{c})" , {HistType::kTH2F , {{90 , 10 ., 100 .}, {10000 , 0.0 , 1.0 }}});
432436
437+ registry.add (" h_particle_pdgcode" , " particle pdgcode;particle pdgcode;entries" , {HistType::kTH1D , {{3000 , 0.0 , 3000.0 }}});
438+ registry.add (" h_particle_genstatuscode" , " particle gen status code;particle gen status code;entries" , {HistType::kTH1D , {{210 , 0.0 , 210.0 }}});
439+ registry.add (" h_particle_hepmcstatuscode" , " particle hep mc status code;particle hep mc status code;entries" , {HistType::kTH1D , {{210 , 0.0 , 210.0 }}});
440+ registry.add (" h_particle_process" , " particle process;particle process;entries" , {HistType::kTH1D , {{50 , 0.0 , 50.0 }}});
441+ registry.add (" h_particle_producedbygenerator" , " particle producedByGenerator status;particle producedByGenerator status;entries" , {HistType::kTH1D , {{2 , 0.0 , 2 }}});
442+
433443 registry.add (" h_jet_pt" , " jet pT;#it{p}_{T,jet} (GeV/#it{c}); counts" , {HistType::kTH1F , {jetPtAxis}}, doSumw2);
434444 registry.add (" h_jet_eta" , " jet eta;#eta; counts" , {HistType::kTH1F , {jetEtaAxis}}, doSumw2);
435445 registry.add (" h_jet_phi" , " jet phi;#phi; counts" , {HistType::kTH1F , {phiAxis}}, doSumw2);
@@ -444,6 +454,7 @@ struct JetFinderQATask {
444454 }
445455
446456 Filter trackCuts = (aod::jtrack::pt >= trackPtMin && aod::jtrack::pt < trackPtMax && aod::jtrack::eta > trackEtaMin && aod::jtrack::eta < trackEtaMax);
457+ Filter particleCuts = (aod::jmcparticle::pt >= trackPtMin && aod::jmcparticle::pt < trackPtMax && aod::jmcparticle::eta > trackEtaMin && aod::jmcparticle::eta < trackEtaMax);
447458 Filter eventCuts = (nabs(aod::jcollision::posZ) < vertexZCut &&
448459 ((checkCentFT0M ? aod::jcollision::centFT0M : aod::jcollision::centFT0C) >= centralityMin) &&
449460 ((checkCentFT0M ? aod::jcollision::centFT0M : aod::jcollision::centFT0C) < centralityMax));
@@ -1471,17 +1482,13 @@ struct JetFinderQATask {
14711482 }
14721483 PROCESS_SWITCH (JetFinderQATask, processOccupancyQA, " occupancy QA on jet derived data" , false );
14731484
1474- void processQcMultCutCheck (soa::Filtered<soa::Join<aod::JetCollisions, aod::BkgChargedRhos>>::iterator const & collision,
1485+ void processQcMultCutCheck (soa::Filtered<soa::Join<aod::JetCollisions, aod::BkgChargedRhos, aod::JMcCollisionLbs>>::iterator const & collision,
1486+ aod::JetMcCollisions const &,
14751487 soa::Join<aod::ChargedMCDetectorLevelJets, aod::ChargedMCDetectorLevelJetConstituents> const & mcdjets,
1476- soa::Filtered<soa::Join<aod::JetTracks, aod::JTrackExtras, aod::JTrackPIs>> const & tracks)
1488+ soa::Filtered<soa::Join<aod::JetTracks, aod::JTrackExtras, aod::JTrackPIs>> const & tracks,
1489+ soa::Filtered<aod::JetParticles> const & mcparticles)
14771490 {
1478- bool fillHistograms = true ;
1479- bool isWeighted = true ;
14801491 float eventWeight = collision.weight ();
1481- if (!applyCollisionCuts_multCutCheck (collision, fillHistograms, isWeighted, eventWeight)) {
1482- return ;
1483- }
1484- registry.fill (HIST (" h_collisions_zvertex" ), collision.posZ (), eventWeight);
14851492
14861493 bool hasJetAboveMultCut = false ;
14871494 for (auto const & mcdjet : mcdjets) {
@@ -1493,6 +1500,20 @@ struct JetFinderQATask {
14931500 return ;
14941501 }
14951502
1503+ bool fillHistograms = true ;
1504+ bool isWeighted = true ;
1505+ if (!applyCollisionCuts_multCutCheck (collision, fillHistograms, isWeighted, eventWeight)) {
1506+ return ;
1507+ }
1508+ registry.fill (HIST (" h_collisions_zvertex" ), collision.posZ (), eventWeight);
1509+
1510+ if (collision.has_mcCollision ()) { // the collision is fake and has no associated mc coll; skip as .mccollision() cannot be called
1511+ registry.fill (HIST (" h2_mccollision_pthardfromweight_pthardfromhepmcxsection" ), simPtRef / (std::pow (eventWeight, 1.0 / pTHatExponent)), collision.mcCollision ().ptHard ());
1512+ registry.fill (HIST (" h2_mccollision_pthardfromweight_pthardfromhepmcxsection_weighted" ), simPtRef / (std::pow (eventWeight, 1.0 / pTHatExponent)), collision.mcCollision ().ptHard (), eventWeight);
1513+ } else {
1514+ registry.fill (HIST (" h_fakecollisions" ), 0.5 );
1515+ }
1516+
14961517 registry.fill (HIST (" h_collisions_ntracks" ), tracks.size (), eventWeight);
14971518 registry.fill (HIST (" h2_centrality_ntracks" ), collision.centFT0M (), tracks.size (), eventWeight);
14981519 registry.fill (HIST (" h_collisions_njets" ), mcdjets.size (), eventWeight);
@@ -1501,6 +1522,9 @@ struct JetFinderQATask {
15011522 registry.fill (HIST (" h2_centrality_rho" ), collision.centFT0M (), collision.rho (), eventWeight);
15021523
15031524 for (auto const & track : tracks) {
1525+ if (!jetderiveddatautilities::selectTrack (track, trackSelection)) {
1526+ continue ;
1527+ }
15041528 registry.fill (HIST (" h2_centrality_track_pt" ), collision.centFT0M (), track.pt (), eventWeight);
15051529 registry.fill (HIST (" h2_centrality_track_eta" ), collision.centFT0M (), track.eta (), eventWeight);
15061530 registry.fill (HIST (" h2_track_pt_track_sigma1overpt" ), track.pt (), track.sigma1Pt (), eventWeight);
@@ -1509,6 +1533,14 @@ struct JetFinderQATask {
15091533 registry.fill (HIST (" h2_track_pt_high_track_sigmapt" ), track.pt (), track.sigma1Pt () * track.pt (), eventWeight);
15101534 }
15111535
1536+ for (auto const & mcparticle : mcparticles) {
1537+ registry.fill (HIST (" h_particle_pdgcode" ), mcparticle.pdgCode ());
1538+ registry.fill (HIST (" h_particle_genstatuscode" ), mcparticle.getGenStatusCode ());
1539+ registry.fill (HIST (" h_particle_hepmcstatuscode" ), mcparticle.getHepMCStatusCode ());
1540+ registry.fill (HIST (" h_particle_process" ), mcparticle.getProcess ());
1541+ registry.fill (HIST (" h_particle_producedbygenerator" ), mcparticle.producedByGenerator ());
1542+ }
1543+
15121544 for (auto const & mcdjet : mcdjets) {
15131545 registry.fill (HIST (" h_jet_pt" ), mcdjet.pt (), eventWeight);
15141546 registry.fill (HIST (" h_jet_eta" ), mcdjet.eta (), eventWeight);
0 commit comments