@@ -143,17 +143,16 @@ struct HfCandidateCreatorXicToXiPiPi {
143143 }
144144
145145 // add histograms to registry
146+ registry.add (" hVertexerType" , " Use DCAFitter or KFParticle;;entries" , {HistType::kTH1F , {{2 , -0.5 , 1.5 }}});
147+ registry.get <TH1>(HIST (" hVertexerType" ))->GetXaxis ()->SetBinLabel (1 + aod::hf_cand::VertexerType::DCAFitter, " DCAFitter" );
148+ registry.get <TH1>(HIST (" hVertexerType" ))->GetXaxis ()->SetBinLabel (1 + aod::hf_cand::VertexerType::KfParticle, " KFParticle" );
149+ registry.add (" hCandCounter" , " hCandCounter" , {HistType::kTH1F , {{4 , -0.5 , 3.5 }}});
150+ registry.get <TH1>(HIST (" hCandCounter" ))->GetXaxis ()->SetBinLabel (1 + TotalSkimmedTriplets, " total" );
151+ registry.get <TH1>(HIST (" hCandCounter" ))->GetXaxis ()->SetBinLabel (1 + SelEvent, " Event selected" );
152+ registry.get <TH1>(HIST (" hCandCounter" ))->GetXaxis ()->SetBinLabel (1 + CascPreSel, " Cascade preselection" );
153+ registry.get <TH1>(HIST (" hCandCounter" ))->GetXaxis ()->SetBinLabel (1 + VertexFit, " Successful vertex fit" );
154+ // physical variables
146155 if (fillHistograms) {
147- // counter
148- registry.add (" hVertexerType" , " Use DCAFitter or KFParticle;;entries" , {HistType::kTH1F , {{2 , -0.5 , 1.5 }}});
149- registry.get <TH1>(HIST (" hVertexerType" ))->GetXaxis ()->SetBinLabel (1 + aod::hf_cand::VertexerType::DCAFitter, " DCAFitter" );
150- registry.get <TH1>(HIST (" hVertexerType" ))->GetXaxis ()->SetBinLabel (1 + aod::hf_cand::VertexerType::KfParticle, " KFParticle" );
151- registry.add (" hCandCounter" , " hCandCounter" , {HistType::kTH1F , {{4 , -0.5 , 3.5 }}});
152- registry.get <TH1>(HIST (" hCandCounter" ))->GetXaxis ()->SetBinLabel (1 + TotalSkimmedTriplets, " total" );
153- registry.get <TH1>(HIST (" hCandCounter" ))->GetXaxis ()->SetBinLabel (1 + SelEvent, " Event selected" );
154- registry.get <TH1>(HIST (" hCandCounter" ))->GetXaxis ()->SetBinLabel (1 + CascPreSel, " Cascade preselection" );
155- registry.get <TH1>(HIST (" hCandCounter" ))->GetXaxis ()->SetBinLabel (1 + VertexFit, " Successful vertex fit" );
156- // physical variables
157156 registry.add (" hMass3" , " 3-prong candidates;inv. mass (#Xi #pi #pi) (GeV/#it{c}^{2});entries" , {HistType::kTH1D , {{500 , 2.3 , 2.7 }}});
158157 registry.add (" hCovPVXX" , " 3-prong candidates;XX element of cov. matrix of prim. vtx. position (cm^{2});entries" , {HistType::kTH1D , {{100 , 0 ., 1 .e -4 }}});
159158 registry.add (" hCovSVXX" , " 3-prong candidates;XX element of cov. matrix of sec. vtx. position (cm^{2});entries" , {HistType::kTH1D , {{100 , 0 ., 0.2 }}});
@@ -205,9 +204,7 @@ struct HfCandidateCreatorXicToXiPiPi {
205204 {
206205 // loop over triplets of track indices
207206 for (const auto & rowTrackIndexXicPlus : rowsTrackIndexXicPlus) {
208- if (fillHistograms) {
209- registry.fill (HIST (" hCandCounter" ), TotalSkimmedTriplets);
210- }
207+ registry.fill (HIST (" hCandCounter" ), TotalSkimmedTriplets);
211208
212209 // check if the event is selected
213210 auto collision = rowTrackIndexXicPlus.collision_as <Collision>();
@@ -217,9 +214,7 @@ struct HfCandidateCreatorXicToXiPiPi {
217214 // / at least one event selection not satisfied --> reject the candidate
218215 continue ;
219216 }
220- if (fillHistograms) {
221- registry.fill (HIST (" hCandCounter" ), SelEvent);
222- }
217+ registry.fill (HIST (" hCandCounter" ), SelEvent);
223218
224219 // Retrieve skimmed cascade and pion tracks
225220 auto cascAodElement = rowTrackIndexXicPlus.cascade_as <CascadesLinked>();
@@ -239,9 +234,7 @@ struct HfCandidateCreatorXicToXiPiPi {
239234 continue ;
240235 }
241236 }
242- if (fillHistograms) {
243- registry.fill (HIST (" hCandCounter" ), CascPreSel);
244- }
237+ registry.fill (HIST (" hCandCounter" ), CascPreSel);
245238
246239 // ----------------------Set the magnetic field from ccdb---------------------------------------
247240 // / The static instance of the propagator was already modified in the HFTrackIndexSkimCreator,
@@ -294,9 +287,7 @@ struct HfCandidateCreatorXicToXiPiPi {
294287 LOG (info) << " Run time error found: " << error.what () << " . DCAFitterN cannot work, skipping the candidate." ;
295288 continue ;
296289 }
297- if (fillHistograms) {
298- registry.fill (HIST (" hCandCounter" ), VertexFit);
299- }
290+ registry.fill (HIST (" hCandCounter" ), VertexFit);
300291
301292 // ----------------------------calculate physical properties-----------------------
302293 // Charge of charm baryon
@@ -446,9 +437,7 @@ struct HfCandidateCreatorXicToXiPiPi {
446437 {
447438 // loop over triplets of track indices
448439 for (const auto & rowTrackIndexXicPlus : rowsTrackIndexXicPlus) {
449- if (fillHistograms) {
450- registry.fill (HIST (" hCandCounter" ), TotalSkimmedTriplets);
451- }
440+ registry.fill (HIST (" hCandCounter" ), TotalSkimmedTriplets);
452441
453442 // check if the event is selected
454443 auto collision = rowTrackIndexXicPlus.collision_as <Collision>();
@@ -458,9 +447,7 @@ struct HfCandidateCreatorXicToXiPiPi {
458447 // / at least one event selection not satisfied --> reject the candidate
459448 continue ;
460449 }
461- if (fillHistograms) {
462- registry.fill (HIST (" hCandCounter" ), SelEvent);
463- }
450+ registry.fill (HIST (" hCandCounter" ), SelEvent);
464451
465452 // Retrieve skimmed cascade and pion tracks
466453 auto cascAodElement = rowTrackIndexXicPlus.cascade_as <aod::KFCascadesLinked>();
@@ -480,9 +467,7 @@ struct HfCandidateCreatorXicToXiPiPi {
480467 continue ;
481468 }
482469 }
483- if (fillHistograms) {
484- registry.fill (HIST (" hCandCounter" ), CascPreSel);
485- }
470+ registry.fill (HIST (" hCandCounter" ), CascPreSel);
486471
487472 // ----------------------Set the magnetic field from ccdb-----------------------------
488473 // / The static instance of the propagator was already modified in the HFTrackIndexSkimCreator,
@@ -539,9 +524,7 @@ struct HfCandidateCreatorXicToXiPiPi {
539524 LOG (debug) << " Failed to construct XicPlus : " << e.what ();
540525 continue ;
541526 }
542- if (fillHistograms) {
543- registry.fill (HIST (" hCandCounter" ), VertexFit);
544- }
527+ registry.fill (HIST (" hCandCounter" ), VertexFit);
545528
546529 // get chi2 values
547530 float chi2GeoXicPlus = kfXicPlus.GetChi2 () / kfXicPlus.GetNDF ();
0 commit comments