@@ -57,6 +57,7 @@ struct LFNucleiBATask {
5757 HistogramRegistry spectraGen{" spectraGen" , {}, OutputObjHandlingPolicy::AnalysisObject, false , true };
5858 HistogramRegistry debugHistos{" debugHistos" , {}, OutputObjHandlingPolicy::AnalysisObject};
5959 HistogramRegistry evtimeHistos{" evtimeHistos" , {}, OutputObjHandlingPolicy::AnalysisObject};
60+ HistogramRegistry evLossHistos{" evLossHistos" , {}, OutputObjHandlingPolicy::AnalysisObject};
6061
6162 // Enable particle for analysis
6263 Configurable<bool > enablePr{" enablePr" , true , " Flag to enable proton analysis." };
@@ -268,6 +269,19 @@ struct LFNucleiBATask {
268269 if (doprocessData == true && doprocessMCReco == true ) {
269270 LOG (fatal) << " Can't enable processData and processMCReco in the same time, pick one!" ;
270271 }
272+ if (doprocessEvSgLossMC) {
273+ evLossHistos.add <TH1>(" evLoss/hEvent" , " Event loss histograms; ; counts" , HistType::kTH1F , {{3 , 0 ., 3 .}});
274+ evLossHistos.get <TH1>(HIST (" evLoss/hEvent" ))->GetXaxis ()->SetBinLabel (1 , " All Gen." );
275+ evLossHistos.get <TH1>(HIST (" evLoss/hEvent" ))->GetXaxis ()->SetBinLabel (2 , " TVX (reco.)" );
276+ evLossHistos.get <TH1>(HIST (" evLoss/hEvent" ))->GetXaxis ()->SetBinLabel (3 , " Sel8 (reco.)" );
277+
278+ evLossHistos.add <TH1>(" evLoss/pt/hDeuteronTriggeredTVX" , " Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts" , HistType::kTH1F , {{100 , 0 ., 5 .}});
279+ evLossHistos.add <TH1>(" evLoss/pt/hDeuteronTriggeredSel8" , " Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts" , HistType::kTH1F , {{100 , 0 ., 5 .}});
280+ evLossHistos.add <TH1>(" evLoss/pt/hDeuteronGen" , " Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts" , HistType::kTH1F , {{100 , 0 ., 5 .}});
281+ evLossHistos.add <TH1>(" evLoss/pt/hAntiDeuteronTriggeredTVX" , " Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts" , HistType::kTH1F , {{100 , 0 ., 5 .}});
282+ evLossHistos.add <TH1>(" evLoss/pt/hAntiDeuteronTriggeredSel8" , " Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts" , HistType::kTH1F , {{100 , 0 ., 5 .}});
283+ evLossHistos.add <TH1>(" evLoss/pt/hAntiDeuteronGen" , " Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts" , HistType::kTH1F , {{100 , 0 ., 5 .}});
284+ }
271285 spectraGen.add <TH1>(" LfEv/pT_nocut" , " Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts" , HistType::kTH1F , {{ptHeAxis}});
272286 spectraGen.add <TH1>(" LfEv/pT_TVXtrigger" , " Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts" , HistType::kTH1F , {{ptHeAxis}});
273287 spectraGen.add <TH1>(" LfEv/pT_TFrameBorder" , " Track #it{p}_{T}; #it{p}_{T} (GeV/#it{c}); counts" , HistType::kTH1F , {{ptHeAxis}});
@@ -2267,10 +2281,12 @@ struct LFNucleiBATask {
22672281 break ;
22682282 }
22692283
2270- float nITSTr, nITSHe;
2271- nITSTr = track.itsNSigmaTr ();
2272- nITSHe = track.itsNSigmaHe ();
2273-
2284+ float nITSTr = 99 .f ;
2285+ float nITSHe = 99 .f ;
2286+ if (!IsFilteredData) {
2287+ nITSTr = track.itsNSigmaTr ();
2288+ nITSHe = track.itsNSigmaHe ();
2289+ }
22742290 heP = track.p ();
22752291 antiheP = track.p ();
22762292 heTPCmomentum = track.tpcInnerParam ();
@@ -6131,6 +6147,63 @@ struct LFNucleiBATask {
61316147 }
61326148 } // Close processMCGen
61336149 PROCESS_SWITCH (LFNucleiBATask, processMCGen, " process MC Generated" , true );
6150+ void processEvSgLossMC (aod::McCollision const & mcCollision,
6151+ aod::McParticles const & mcParticles,
6152+ const soa::SmallGroups<EventCandidatesMC>& recoColls)
6153+ {
6154+ if (std::abs (mcCollision.posZ ()) < cfgHighCutVertex) {
6155+ evLossHistos.fill (HIST (" evLoss/hEvent" ), 0.5 );
6156+ }
6157+
6158+ bool isSel8Event = false ;
6159+ bool isTvxEvent = false ;
6160+
6161+ // Check if there is an event reconstructed for a generated event
6162+ for (const auto & recoColl : recoColls) {
6163+ if (std::abs (recoColl.posZ ()) > cfgHighCutVertex)
6164+ continue ;
6165+ if (recoColl.selection_bit (o2::aod::evsel::kIsTriggerTVX )) {
6166+ isTvxEvent = true ;
6167+ }
6168+ if (recoColl.sel8 ()) {
6169+ isSel8Event = true ;
6170+ }
6171+ }
6172+
6173+ if (isTvxEvent) {
6174+ evLossHistos.fill (HIST (" evLoss/hEvent" ), 1.5 );
6175+ }
6176+ if (isSel8Event) {
6177+ evLossHistos.fill (HIST (" evLoss/hEvent" ), 2.5 );
6178+ }
6179+
6180+ // Loop over all the Generated level particles
6181+ for (const auto & mcPart : mcParticles) {
6182+ if (!mcPart.isPhysicalPrimary ())
6183+ continue ;
6184+ if (std::abs (mcPart.y ()) >= 0.5 )
6185+ continue ;
6186+ if (mcPart.pdgCode () == PDGDeuteron) {
6187+ evLossHistos.fill (HIST (" evLoss/pt/hDeuteronGen" ), mcPart.pt ());
6188+ if (isTvxEvent) {
6189+ evLossHistos.fill (HIST (" evLoss/pt/hDeuteronTriggeredTVX" ), mcPart.pt ());
6190+ }
6191+ if (isSel8Event) {
6192+ evLossHistos.fill (HIST (" evLoss/pt/hDeuteronTriggeredSel8" ), mcPart.pt ());
6193+ }
6194+ }
6195+ if (mcPart.pdgCode () == -PDGDeuteron) {
6196+ evLossHistos.fill (HIST (" evLoss/pt/hAntiDeuteronGen" ), mcPart.pt ());
6197+ if (isTvxEvent) {
6198+ evLossHistos.fill (HIST (" evLoss/pt/hAntiDeuteronTriggeredTVX" ), mcPart.pt ());
6199+ }
6200+ if (isSel8Event) {
6201+ evLossHistos.fill (HIST (" evLoss/pt/hAntiDeuteronTriggeredSel8" ), mcPart.pt ());
6202+ }
6203+ }
6204+ } // MC particles
6205+ }
6206+ PROCESS_SWITCH (LFNucleiBATask, processEvSgLossMC, " process MC Sig Event" , false );
61346207};
61356208
61366209WorkflowSpec defineDataProcessing (ConfigContext const & cfgc)
0 commit comments