diff --git a/MC/config/PWGUD/external/generator/DecayTablesEvtGen/JPSI.4PRONG.DEC b/MC/config/PWGUD/external/generator/DecayTablesEvtGen/JPSI.4PRONG.DEC new file mode 100644 index 000000000..212e77d3e --- /dev/null +++ b/MC/config/PWGUD/external/generator/DecayTablesEvtGen/JPSI.4PRONG.DEC @@ -0,0 +1,7 @@ +Decay J/psi +0.33 p+ anti-p- pi+ pi- PHSP; +0.33 pi+ pi- pi+ pi- PHSP; +0.33 pi+ pi- K+ K- PHSP; +Enddecay +End + diff --git a/MC/config/PWGUD/external/generator/DecayTablesEvtGen/JPSI.6PRONG.DEC b/MC/config/PWGUD/external/generator/DecayTablesEvtGen/JPSI.6PRONG.DEC new file mode 100644 index 000000000..0e49d1906 --- /dev/null +++ b/MC/config/PWGUD/external/generator/DecayTablesEvtGen/JPSI.6PRONG.DEC @@ -0,0 +1,6 @@ +Decay J/psi +0.5 pi+ pi- pi+ pi- K+ K- PHSP; +0.5 pi+ pi- pi+ pi- pi+ pi- PHSP; +Enddecay +End + diff --git a/MC/config/PWGUD/external/generator/GeneratorStarlight.C b/MC/config/PWGUD/external/generator/GeneratorStarlight.C index 6cb67cbe9..66402130b 100644 --- a/MC/config/PWGUD/external/generator/GeneratorStarlight.C +++ b/MC/config/PWGUD/external/generator/GeneratorStarlight.C @@ -94,6 +94,8 @@ class GeneratorStarlight_class : public Generator {"kCohJpsiToEl", 2, 443011, 20, -1.0, -1.0, 443, 0 }, // {"kCohJpsiToElRad", 2, 443011, 20, -1.0, -1.0, 443, 1 }, // {"kCohJpsiToProton", 2, 4432212, 20, -1.0, -1.0, 443, 0 }, // + {"kCohJpsi4Prong", 2, 443013, 20, -1.0, -1.0, 443, 1 }, // + {"kCohJpsi6Prong", 2, 443013, 20, -1.0, -1.0, 443, 1 }, // {"kCohPsi2sToMu", 2, 444013, 20, -1.0, -1.0, 100443, 0 }, // {"kCohPsi2sToEl", 2, 444011, 20, -1.0, -1.0, 100443, 0 }, // {"kCohPsi2sToMuPi", 2, 444013, 20, -1.0, -1.0, 100443, 1 }, // diff --git a/MC/config/PWGUD/external/generator/GeneratorStarlightToEvtGen.C b/MC/config/PWGUD/external/generator/GeneratorStarlightToEvtGen.C index 84b6a6e4e..f743ff0e7 100644 --- a/MC/config/PWGUD/external/generator/GeneratorStarlightToEvtGen.C +++ b/MC/config/PWGUD/external/generator/GeneratorStarlightToEvtGen.C @@ -36,6 +36,8 @@ FairGenerator* else if (configuration.find("ToElMu") != std::string::npos) gen->SetDecayTable(Form("%s/TAUTAU.ELMU.DEC",pathO2.Data())); else if (configuration.find("ToElPiPi0") != std::string::npos) gen->SetDecayTable(Form("%s/TAUTAU.ELPI.DEC",pathO2.Data())); else if (configuration.find("ToPoPiPi0") != std::string::npos) gen->SetDecayTable(Form("%s/TAUTAU.POPI.DEC",pathO2.Data())); + else if (configuration.find("Jpsi4Prong") != std::string::npos) gen->SetDecayTable(Form("%s/JPSI.4PRONG.DEC",pathO2.Data())); + else if (configuration.find("Jpsi6Prong") != std::string::npos) gen->SetDecayTable(Form("%s/JPSI.6PRONG.DEC",pathO2.Data())); return gen; } diff --git a/MC/config/PWGUD/ini/makeStarlightConfig.py b/MC/config/PWGUD/ini/makeStarlightConfig.py index b067d6501..6a6a163df 100755 --- a/MC/config/PWGUD/ini/makeStarlightConfig.py +++ b/MC/config/PWGUD/ini/makeStarlightConfig.py @@ -17,7 +17,7 @@ parser.add_argument('--rapidity', default='cent', choices=['cent_rap', 'muon_rap', 'cent_eta', 'muon_eta'], help='Rapidity to select') -parser.add_argument('--process',default=None, choices=['kTwoGammaToMuLow', 'kTwoGammaToElLow', 'kTwoGammaToMuMedium', 'kTwoGammaToElMedium', 'kTwoGammaToMuHigh', 'kTwoGammaToElHigh', 'kTwoGammaToRhoRho', 'kTwoGammaToF2', 'kCohRhoToPi', 'kCohRhoToElEl', 'kCohRhoToMuMu', 'kCohRhoToPiWithCont', 'kCohRhoToPiFlat', 'kCohPhiToKa', 'kDirectPhiToKaKa', 'kCohPhiToEl', 'kCohOmegaTo2Pi', 'kCohOmegaTo3Pi', 'kCohOmegaToPiPiPi', 'kCohRhoPrimeTo4Pi', 'kCohJpsiToMu', 'kCohJpsiToEl', 'kCohJpsiToElRad', 'kCohJpsiToProton', 'kCohPsi2sToMu','kCohPsi2sToEl', 'kCohPsi2sToMuPi', 'kCohPsi2sToElPi', 'kCohUpsilonToMu', 'kCohUpsilonToEl', 'kIncohRhoToPi', 'kIncohRhoToElEl', 'kIncohRhoToMuMu', 'kIncohRhoToPiWithCont', 'kIncohRhoToPiFlat', 'kIncohPhiToKa', 'kIncohOmegaTo2Pi', 'kIncohOmegaTo3Pi', 'kIncohOmegaToPiPiPi', 'kIncohRhoPrimeTo4Pi', 'kIncohJpsiToMu', 'kIncohJpsiToEl', 'kIncohJpsiToElRad', 'kIncohJpsiToProton', 'kIncohJpsiToLLbar', 'kIncohPsi2sToMu', 'kIncohPsi2sToEl', 'kIncohPsi2sToMuPi', 'kIncohPsi2sToElPi', 'kIncohUpsilonToMu', 'kIncohUpsilonToEl', 'kDpmjetSingleA', 'kDpmjetSingleC', 'kTauLowToEl3Pi', 'kTauLowToPo3Pi', 'kTauMediumToEl3Pi', 'kTauMediumToPo3Pi', 'kTauHighToEl3Pi', 'kTauHighToPo3Pi', 'kTauLowToElMu', 'kTauLowToElPiPi0', 'kTauLowToPoPiPi0'], +parser.add_argument('--process',default=None, choices=['kTwoGammaToMuLow', 'kTwoGammaToElLow', 'kTwoGammaToMuMedium', 'kTwoGammaToElMedium', 'kTwoGammaToMuHigh', 'kTwoGammaToElHigh', 'kTwoGammaToRhoRho', 'kTwoGammaToF2', 'kCohRhoToPi', 'kCohRhoToElEl', 'kCohRhoToMuMu', 'kCohRhoToPiWithCont', 'kCohRhoToPiFlat', 'kCohPhiToKa', 'kDirectPhiToKaKa', 'kCohPhiToEl', 'kCohOmegaTo2Pi', 'kCohOmegaTo3Pi', 'kCohOmegaToPiPiPi', 'kCohRhoPrimeTo4Pi', 'kCohJpsiToMu', 'kCohJpsiToEl', 'kCohJpsiToElRad', 'kCohJpsiToProton', 'kCohJpsi4Prong', 'kCohJpsi6Prong', 'kCohPsi2sToMu','kCohPsi2sToEl', 'kCohPsi2sToMuPi', 'kCohPsi2sToElPi', 'kCohUpsilonToMu', 'kCohUpsilonToEl', 'kIncohRhoToPi', 'kIncohRhoToElEl', 'kIncohRhoToMuMu', 'kIncohRhoToPiWithCont', 'kIncohRhoToPiFlat', 'kIncohPhiToKa', 'kIncohOmegaTo2Pi', 'kIncohOmegaTo3Pi', 'kIncohOmegaToPiPiPi', 'kIncohRhoPrimeTo4Pi', 'kIncohJpsiToMu', 'kIncohJpsiToEl', 'kIncohJpsiToElRad', 'kIncohJpsiToProton', 'kIncohJpsiToLLbar', 'kIncohPsi2sToMu', 'kIncohPsi2sToEl', 'kIncohPsi2sToMuPi', 'kIncohPsi2sToElPi', 'kIncohUpsilonToMu', 'kIncohUpsilonToEl', 'kDpmjetSingleA', 'kDpmjetSingleA_Dzero', 'kDpmjetSingleA_Dcharged', 'kDpmjetSingleA_Dstar', 'kDpmjetSingleA_Phi', 'kDpmjetSingleA_Kstar', 'kDpmjetSingleC', 'kDpmjetSingleC_Dzero', 'kDpmjetSingleC_Dcharged', 'kDpmjetSingleC_Dstar', 'kDpmjetSingleC_Phi', 'kDpmjetSingleC_Kstar', 'kTauLowToEl3Pi', 'kTauLowToPo3Pi', 'kTauMediumToEl3Pi', 'kTauMediumToPo3Pi', 'kTauHighToEl3Pi', 'kTauHighToPo3Pi', 'kTauLowToElMu', 'kTauLowToElPiPi0', 'kTauLowToPoPiPi0'], help='Process to switch on') @@ -74,12 +74,12 @@ ### Generator fout.write('[GeneratorExternal] \n') -if 'Psi2sToMuPi' in args.process or 'Psi2sToElPi' in args.process or 'OmegaTo3Pi' in args.process or 'JpsiToElRad' in args.process or 'kTau' in args.process: +if 'Psi2sToMuPi' in args.process or 'Psi2sToElPi' in args.process or 'OmegaTo3Pi' in args.process or 'JpsiToElRad' in args.process or 'Jpsi4Prong' in args.process or 'Jpsi6Prong' in args.process or 'kTau' in args.process: fout.write('fileName = ${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGUD/external/generator/GeneratorStarlightToEvtGen.C \n') fout.write('funcName = GeneratorStarlightToEvtGen("%s", %f, %d, %d, %d, %d, "%s") \n' % (args.process,args.eCM ,pZ,pA,tZ,tA,args.extraPars)) else: fout.write('fileName = ${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGUD/external/generator/GeneratorStarlight.C \n') - fout.write('funcName = GeneratorStarlight("%s", %f, %d, %d, %d, %d, "%s", "%s") \n' % (args.process,args.eCM ,pZ,pA,tZ,tA,args.extraPars,args.dpmjetConf)) + fout.write('funcName = GeneratorStarlight("%s", %f, %d, %d, %d, %d, "%s", "%s") \n' % (args.process.split('_')[0],args.eCM ,pZ,pA,tZ,tA,args.extraPars,args.dpmjetConf)) ###Trigger if not 'kDpmjet' in args.process: @@ -99,6 +99,19 @@ fout.write('funcName = selectDaughterPartInAcc(-0.9,0.9) \n') if args.rapidity == 'muon_eta': fout.write('funcName = selectDaughterPartInAcc(-4.0,-2.5) \n') +elif '_' in args.process: + fout.write('[TriggerExternal] \n') + fout.write('fileName = ${O2DPG_MC_CONFIG_ROOT}/MC/config/PWGUD/trigger/triggerDpmjetParticle.C \n') + if 'Dzero' in args.process: + fout.write('funcName = triggerDzero(-0.9,0.9) \n') + if 'Dcharged' in args.process: + fout.write('funcName = triggerDcharged(-0.9,0.9) \n') + if 'Dstar' in args.process: + fout.write('funcName = triggerDstar(-0.9,0.9) \n') + if 'Phi' in args.process: + fout.write('funcName = triggerPhi(-0.9,0.9) \n') + if 'Kstar' in args.process: + fout.write('funcName = triggerKstar(-0.9,0.9) \n') ### close outout file fout.close() diff --git a/MC/config/PWGUD/trigger/triggerDpmjetParticle.C b/MC/config/PWGUD/trigger/triggerDpmjetParticle.C new file mode 100644 index 000000000..5fe8e2bc8 --- /dev/null +++ b/MC/config/PWGUD/trigger/triggerDpmjetParticle.C @@ -0,0 +1,70 @@ +R__ADD_INCLUDE_PATH($O2DPG_MC_CONFIG_ROOT) +#include +#include "Generators/Trigger.h" + +/// ================================================================================================================================= +/// Select events with at least one particle in a given rapidity or eta window +/// ================================================================================================================================= + +o2::eventgen::Trigger triggerDzero(double rapidityMin = -1., double rapidityMax = -1.) +{ + return [rapidityMin, rapidityMax](const std::vector& particles) -> bool { + for (const auto& particle : particles) { + if (TMath::Abs(particle.GetPdgCode()) == 421) + if ((particle.Y() > rapidityMin) && (particle.Y() < rapidityMax)) + return kTRUE; + } + return kFALSE; + }; +} + +o2::eventgen::Trigger triggerDcharged(double rapidityMin = -1., double rapidityMax = -1.) +{ + return [rapidityMin, rapidityMax](const std::vector& particles) -> bool { + for (const auto& particle : particles) { + if (TMath::Abs(particle.GetPdgCode()) == 411) + if ((particle.Y() > rapidityMin) && (particle.Y() < rapidityMax)) + return kTRUE; + } + return kFALSE; + }; +} + +o2::eventgen::Trigger triggerDstar(double rapidityMin = -1., double rapidityMax = -1.) +{ + return [rapidityMin, rapidityMax](const std::vector& particles) -> bool { + for (const auto& particle : particles) { + if ((TMath::Abs(particle.GetPdgCode()) == 413) || (TMath::Abs(particle.GetPdgCode()) == 423)) + if ((particle.Y() > rapidityMin) && (particle.Y() < rapidityMax)) + return kTRUE; + } + return kFALSE; + }; +} + +o2::eventgen::Trigger triggerPhi(double rapidityMin = -1., double rapidityMax = -1.) +{ + return [rapidityMin, rapidityMax](const std::vector& particles) -> bool { + for (std::vector::size_type i = 0; i != (particles.size()-1); i++) { + if ((particles[i].GetPdgCode() == 321 && particles[i+1].GetPdgCode() == -321) || (particles[i].GetPdgCode() == -321 && particles[i+1].GetPdgCode() == 321)) + if ((particles[i].Eta() > rapidityMin) && (particles[i].Eta() < rapidityMax) && (particles[i+1].Eta() > rapidityMin) && (particles[i+1].Eta() < rapidityMax)) + return kTRUE; + } + return kFALSE; + }; +} + +o2::eventgen::Trigger triggerKstar(double rapidityMin = -1., double rapidityMax = -1.) +{ + return [rapidityMin, rapidityMax](const std::vector& particles) -> bool { + for (std::vector::size_type i = 0; i != (particles.size()-1); i++) { + if ((particles[i].GetPdgCode() == 321 && particles[i+1].GetPdgCode() == -211) || (particles[i].GetPdgCode() == -211 && particles[i+1].GetPdgCode() == 321)) + if ((particles[i].Eta() > rapidityMin) && (particles[i].Eta() < rapidityMax) && (particles[i+1].Eta() > rapidityMin) && (particles[i+1].Eta() < rapidityMax)) + return kTRUE; + } + return kFALSE; + }; +} + + +