@@ -147,6 +147,7 @@ struct JetDerivedDataProducerTask {
147147 Configurable<std::string> ccdbURL{" ccdb-url" , " http://alice-ccdb.cern.ch" , " url of the ccdb repository" };
148148 Configurable<bool > includeTriggers{" includeTriggers" , false , " fill the collision information with software trigger decisions" };
149149 Configurable<bool > includeHadronicRate{" includeHadronicRate" , true , " fill the collision information with the hadronic rate" };
150+ Configurable<bool > v0ChargedDecaysOnly{" v0ChargedDecaysOnly" , true , " store V0s (at particle-level) only if they decay to charged particles" };
150151
151152 Preslice<aod::EMCALClusterCells> perClusterCells = aod::emcalclustercell::emcalclusterId;
152153 Preslice<aod::EMCALMatchedTracks> perClusterTracks = aod::emcalclustercell::emcalclusterId;
@@ -763,9 +764,8 @@ struct JetDerivedDataProducerTask {
763764 void processV0MC (aod::McCollision const & mcCollision, aod::McParticles const & particles)
764765 { // can loop over McV0Labels tables if we want to only store matched V0Particles
765766 bool filledV0McCollisionTable = false ;
766- bool onlyChargedDecays = false ;
767767 for (auto const & particle : particles) {
768- if (jetv0utilities::isV0Particle (particles, particle, onlyChargedDecays )) {
768+ if (jetv0utilities::isV0Particle (particles, particle, v0ChargedDecaysOnly )) {
769769 if (!filledV0McCollisionTable) {
770770 products.jV0McCollisionsTable (mcCollision.posX (), mcCollision.posY (), mcCollision.posZ ());
771771 products.jV0McCollisionIdsTable (mcCollision.globalIndex ());
@@ -797,43 +797,6 @@ struct JetDerivedDataProducerTask {
797797 }
798798 PROCESS_SWITCH (JetDerivedDataProducerTask, processV0MC, " produces V0 particles" , false );
799799
800- void processV0MCChargedDecays (aod::McCollision const & mcCollision, aod::McParticles const & particles)
801- { // can loop over McV0Labels tables if we want to only store matched V0Particles
802- bool filledV0McCollisionTable = false ;
803- bool onlyChargedDecays = true ;
804- for (auto const & particle : particles) {
805- if (jetv0utilities::isV0Particle (particles, particle, onlyChargedDecays)) {
806- if (!filledV0McCollisionTable) {
807- products.jV0McCollisionsTable (mcCollision.posX (), mcCollision.posY (), mcCollision.posZ ());
808- products.jV0McCollisionIdsTable (mcCollision.globalIndex ());
809- filledV0McCollisionTable = true ;
810- }
811- std::vector<int32_t > mothersId;
812- if (particle.has_mothers ()) {
813- auto mothersIdTemps = particle.mothersIds ();
814- for (auto mothersIdTemp : mothersIdTemps) {
815- mothersId.push_back (mothersIdTemp);
816- }
817- }
818- int daughtersId[2 ] = {-1 , -1 };
819- auto i = 0 ;
820- if (particle.has_daughters ()) {
821- for (auto daughterId : particle.daughtersIds ()) {
822- if (i > 1 ) {
823- break ;
824- }
825- daughtersId[i] = daughterId;
826- i++;
827- }
828- }
829- auto pdgParticle = pdgDatabase->GetParticle (particle.pdgCode ());
830- products.jV0McsTable (products.jV0McCollisionsTable .lastIndex (), particle.pt (), particle.eta (), particle.phi (), particle.y (), particle.e (), pdgParticle->Mass (), particle.pdgCode (), particle.getGenStatusCode (), particle.getHepMCStatusCode (), particle.isPhysicalPrimary (), jetv0utilities::setV0ParticleDecayBit (particles, particle));
831- products.jV0McIdsTable (mcCollision.globalIndex (), particle.globalIndex (), mothersId, daughtersId);
832- }
833- }
834- }
835- PROCESS_SWITCH (JetDerivedDataProducerTask, processV0MCChargedDecays, " produces V0 particles that decay to charged particles" , false );
836-
837800 void processDielectronCollisions (aod::ReducedEventsInfo::iterator const & DielectronCollision)
838801 {
839802 products.jDielectronCollisionIdsTable (DielectronCollision.collisionId ());
0 commit comments