@@ -53,7 +53,7 @@ struct JetDerivedDataWriter {
5353 Configurable<bool > performTrackSelection{" performTrackSelection" , true , " only save tracks that pass one of the track selections" };
5454 Configurable<float > trackPtSelectionMin{" trackPtSelectionMin" , 0.15 , " only save tracks that have a pT larger than this pT" };
5555 Configurable<float > trackEtaSelectionMax{" trackEtaSelectionMax" , 0.9 , " only save tracks that have an eta smaller than this eta" };
56-
56+ Configurable< bool > storeOnlyFinalStateMCparticles{ " storeOnlyFinalStateMCparticles " , false , " only save the final state mc particles " };
5757 Configurable<std::string> triggerMasks{" triggerMasks" , " " , " possible JE Trigger masks: fJetChLowPt,fJetChHighPt,fTrackLowPt,fTrackHighPt,fJetD0ChLowPt,fJetD0ChHighPt,fJetLcChLowPt,fJetLcChHighPt,fEMCALReadout,fJetFullHighPt,fJetFullLowPt,fJetNeutralHighPt,fJetNeutralLowPt,fGammaVeryHighPtEMCAL,fGammaVeryHighPtDCAL,fGammaHighPtEMCAL,fGammaHighPtDCAL,fGammaLowPtEMCAL,fGammaLowPtDCAL,fGammaVeryLowPtEMCAL,fGammaVeryLowPtDCAL" };
5858 } config;
5959
@@ -681,8 +681,16 @@ struct JetDerivedDataWriter {
681681 i++;
682682 }
683683 }
684- products.storedJMcParticlesTable (mcCollisionMapping[mcCollision.globalIndex ()], o2::math_utils::detail::truncateFloatFraction (particle.pt (), precisionMomentumMask), o2::math_utils::detail::truncateFloatFraction (particle.eta (), precisionPositionMask), o2::math_utils::detail::truncateFloatFraction (particle.phi (), precisionPositionMask), o2::math_utils::detail::truncateFloatFraction (particle.y (), precisionPositionMask), o2::math_utils::detail::truncateFloatFraction (particle.e (), precisionMomentumMask), particle.pdgCode (), particle.getGenStatusCode (), particle.getHepMCStatusCode (), particle.isPhysicalPrimary (), mothersIds, daughtersIds);
685- products.storedJParticlesParentIndexTable (particle.mcParticleId ());
684+ if (storeOnlyFinalStateMCparticles == false ){
685+ products.storedJMcParticlesTable (mcCollisionMapping[mcCollision.globalIndex ()], o2::math_utils::detail::truncateFloatFraction (particle.pt (), precisionMomentumMask), o2::math_utils::detail::truncateFloatFraction (particle.eta (), precisionPositionMask), o2::math_utils::detail::truncateFloatFraction (particle.phi (), precisionPositionMask), o2::math_utils::detail::truncateFloatFraction (particle.y (), precisionPositionMask), o2::math_utils::detail::truncateFloatFraction (particle.e (), precisionMomentumMask), particle.pdgCode (), particle.getGenStatusCode (), particle.getHepMCStatusCode (), particle.isPhysicalPrimary (), mothersIds, daughtersIds);
686+ products.storedJParticlesParentIndexTable (particle.mcParticleId ());
687+ }else {
688+ if (particle.getHepMCStatusCode () == 1 ){
689+ products.storedJMcParticlesTable (mcCollisionMapping[mcCollision.globalIndex ()], o2::math_utils::detail::truncateFloatFraction (particle.pt (), precisionMomentumMask), o2::math_utils::detail::truncateFloatFraction (particle.eta (), precisionPositionMask), o2::math_utils::detail::truncateFloatFraction (particle.phi (), precisionPositionMask), o2::math_utils::detail::truncateFloatFraction (particle.y (), precisionPositionMask), o2::math_utils::detail::truncateFloatFraction (particle.e (), precisionMomentumMask), particle.pdgCode (), particle.getGenStatusCode (), particle.getHepMCStatusCode (), particle.isPhysicalPrimary (), mothersIds, daughtersIds);
690+ products.storedJParticlesParentIndexTable (particle.mcParticleId ());
691+ }
692+ }
693+
686694 }
687695 }
688696 }
0 commit comments