Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Other Jpsi decays and trigger for various particles in dpmjet #1864

Merged
merged 1 commit into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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

Original file line number Diff line number Diff line change
@@ -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

2 changes: 2 additions & 0 deletions MC/config/PWGUD/external/generator/GeneratorStarlight.C
Original file line number Diff line number Diff line change
Expand Up @@ -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 }, //
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
19 changes: 16 additions & 3 deletions MC/config/PWGUD/ini/makeStarlightConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')


Expand Down Expand Up @@ -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:
Expand All @@ -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()
70 changes: 70 additions & 0 deletions MC/config/PWGUD/trigger/triggerDpmjetParticle.C
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
R__ADD_INCLUDE_PATH($O2DPG_MC_CONFIG_ROOT)
#include <TParticle.h>
#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<TParticle>& 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<TParticle>& 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<TParticle>& 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<TParticle>& particles) -> bool {
for (std::vector<TParticle>::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<TParticle>& particles) -> bool {
for (std::vector<TParticle>::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;
};
}



Loading