3030#include < Framework/HistogramSpec.h>
3131#include < Framework/InitContext.h>
3232#include < Framework/runDataProcessing.h>
33+ #include < Framework/Logger.h>
3334
3435#include " TRandom3.h"
3536#include < TH1.h>
@@ -48,8 +49,8 @@ using namespace o2::framework::expressions;
4849
4950// Shorthand notations
5051using FilteredColl = soa::Filtered<soa::Join<aod::JetCollisions, aod::BkgChargedRhos>>::iterator;
51- using FilteredCollPartLevel = soa::Filtered<soa::Join<aod::JetMcCollisions, aod::BkgChargedMcRhos>>::iterator;
52- using FilteredCollDetLevelGetWeight = soa::Filtered<soa::Join<aod::JetCollisionsMCD, aod::BkgChargedRhos>>::iterator;
52+ using FilteredCollPartLevel = soa::Filtered<soa::Join<aod::JetMcCollisions, aod::BkgChargedMcRhos, aod::JMcCollisionOutliers >>::iterator;
53+ using FilteredCollDetLevelGetWeight = soa::Filtered<soa::Join<aod::JetCollisionsMCD, aod::BkgChargedRhos, aod::JCollisionOutliers >>::iterator;
5354
5455using FilteredJets = soa::Filtered<soa::Join<aod::ChargedJets, aod::ChargedJetConstituents>>;
5556using FilteredJetsDetLevel = soa::Filtered<soa::Join<aod::ChargedMCDetectorLevelJets, aod::ChargedMCDetectorLevelJetConstituents>>;
@@ -59,6 +60,7 @@ using FilteredMatchedJetsDetLevel = soa::Filtered<soa::Join<aod::ChargedMCDetect
5960using FilteredMatchedJetsPartLevel = soa::Filtered<soa::Join<aod::ChargedMCParticleLevelJets, aod::ChargedMCParticleLevelJetConstituents, aod::ChargedMCParticleLevelJetsMatchedToChargedMCDetectorLevelJets>>;
6061
6162using FilteredTracks = soa::Filtered<aod::JetTracks>;
63+ using FilteredParticles = soa::Filtered<aod::JetParticles>;
6264
6365struct RecoilJets {
6466
@@ -183,6 +185,13 @@ struct RecoilJets {
183185 spectra.add (" vertexZMC" , " Z vertex of jmccollision" , kTH1F , {{60 , -12 ., 12 .}});
184186 spectra.add (" ptHat" , " Distribution of pT hat" , kTH1F , {{500 , 0.0 , 100 .}});
185187
188+ spectra.add (" hEventSelectionCountPartLevel" , " Count # of events in the part. level analysis" , kTH1F , {{2 , 0.0 , 2 .}});
189+ spectra.get <TH1>(HIST (" hEventSelectionCountPartLevel" ))->GetXaxis ()->SetBinLabel (1 , " Total # of events" );
190+ spectra.get <TH1>(HIST (" hEventSelectionCountPartLevel" ))->GetXaxis ()->SetBinLabel (2 , " # of events w. outlier" );
191+
192+ spectra.add (" hCountNumberOutliersFrameWork" , " Count # of outlier events based on flag from JE fw" , kTH1F , {{1 , 0.0 , 1 .}});
193+ spectra.get <TH1>(HIST (" hCountNumberOutliersFrameWork" ))->GetXaxis ()->SetBinLabel (1 , " Oulier flag true" );
194+
186195 spectra.add (" hPartPtEtaPhi" , " Charact. of particles" , kTH3F , {pT, pseudorap, phiAngle});
187196 spectra.add (" hNtrig_Part" , " Total number of selected triggers per class" , kTH1F , {{2 , 0.0 , 2 .}});
188197 spectra.get <TH1>(HIST (" hNtrig_Part" ))->GetXaxis ()->SetBinLabel (1 , " TT_{ref}" );
@@ -205,6 +214,8 @@ struct RecoilJets {
205214
206215 spectra.add (" hJetArea_JetPt_Rho_TTRef_Part" , " Events w. TT_{Ref}: A_{jet} & jet pT & #rho" , kTH3F , {jetArea, pT, rho});
207216 spectra.add (" hJetArea_JetPt_Rho_TTSig_Part" , " Events w. TT_{Sig}: A_{jet} & jet pT & #rho" , kTH3F , {jetArea, pT, rho});
217+
218+ spectra.add (" hDiffInOutlierRemove" , " Difference between pT hat from code and fw" , kTH1F , {{502 , -0.2 , 50 .}});
208219 }
209220
210221 // Jet matching: part. vs. det.
@@ -331,7 +342,7 @@ struct RecoilJets {
331342 std::vector<double > vPhiOfTT;
332343 double phiTT = 0 .;
333344 int nTT = 0 ;
334- float pTHat = getPtHat (weight);
345+ float pTHat = getPtHat (weight);
335346 spectra.fill (HIST (" ptHat" ), pTHat, weight);
336347
337348 auto dice = rand->Rndm ();
@@ -340,6 +351,7 @@ struct RecoilJets {
340351
341352 for (const auto & jet : jets) {
342353 if (jet.pt () > pTHatMax * pTHat)
354+ spectra.fill (HIST (" hEventSelectionCountPartLevel" ), 1.5 );
343355 return ;
344356 }
345357
@@ -500,9 +512,10 @@ struct RecoilJets {
500512 PROCESS_SWITCH (RecoilJets, processMCDetLevelWeighted, " process MC detector level with event weight" , false );
501513
502514 void processMCPartLevel (FilteredCollPartLevel const & collision,
503- aod::JetParticles const & particles,
515+ FilteredParticles const & particles,
504516 FilteredJetsPartLevel const & jets)
505517 {
518+ spectra.fill (HIST (" hEventSelectionCountPartLevel" ), 0.5 );
506519 if (skipMBGapEvent (collision))
507520 return ;
508521
@@ -512,13 +525,23 @@ struct RecoilJets {
512525 PROCESS_SWITCH (RecoilJets, processMCPartLevel, " process MC particle level" , false );
513526
514527 void processMCPartLevelWeighted (FilteredCollPartLevel const & collision,
515- aod::JetParticles const & particles,
528+ FilteredParticles const & particles,
516529 FilteredJetsPartLevel const & jets)
517530 {
531+ spectra.fill (HIST (" hEventSelectionCountPartLevel" ), 0.5 );
518532 if (skipMBGapEvent (collision))
519533 return ;
520534
521535 auto weight = collision.weight ();
536+
537+ auto calcPtHat = getPtHat (weight);
538+ auto pThatFromFW = collision.ptHard ();
539+ spectra.fill (HIST (" hDiffInOutlierRemove" ), calcPtHat - pThatFromFW);
540+ if (collision.isOutlier ())
541+ spectra.fill (HIST (" hCountNumberOutliersFrameWork" ), 0.5 );
542+
543+ // LOG(debug) << "Difference between pT hat: " << calcPtHat - pThatFromFW;
544+
522545 spectra.fill (HIST (" vertexZMC" ), collision.posZ (), weight);
523546 fillMCPHistograms (collision, jets, particles, weight);
524547 }
0 commit comments