From 86b5e22fce178f4c550e60d6fb2797990f143c22 Mon Sep 17 00:00:00 2001 From: Francesco Prino Date: Thu, 1 Oct 2020 14:47:38 +0200 Subject: [PATCH] Possibility to select pt and y for trigger particles --- PYTHIA6/AliPythia6/AliGenPythiaPlus.cxx | 10 +++++++++- PYTHIA6/AliPythia6/AliGenPythiaPlus.h | 10 +++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/PYTHIA6/AliPythia6/AliGenPythiaPlus.cxx b/PYTHIA6/AliPythia6/AliGenPythiaPlus.cxx index 80174d92a93..b2fa6d02288 100644 --- a/PYTHIA6/AliPythia6/AliGenPythiaPlus.cxx +++ b/PYTHIA6/AliPythia6/AliGenPythiaPlus.cxx @@ -100,6 +100,9 @@ AliGenPythiaPlus::AliGenPythiaPlus(): fHFoff(kFALSE), fTriggerParticle(0), fTriggerEta(0.9), + fTriggerY(999.), + fTriggerMinPt(-1), + fTriggerMaxPt(1000), fTriggerMultiplicity(0), fTriggerMultiplicityEta(0), fTriggerMultiplicityEtaMin(0), @@ -213,6 +216,9 @@ AliGenPythiaPlus::AliGenPythiaPlus(AliPythiaBase* pythia) fHFoff(kFALSE), fTriggerParticle(0), fTriggerEta(0.9), + fTriggerY(999.), + fTriggerMinPt(-1), + fTriggerMaxPt(1000), fTriggerMultiplicity(0), fTriggerMultiplicityEta(0), fTriggerMultiplicityEtaMin(0), @@ -733,7 +739,7 @@ void AliGenPythiaPlus::Generate() // // Trigger particle selection // - if(fTriggerParticle!=0 && kf == fTriggerParticle && TMath::Abs(iparticle->Eta()) < fTriggerEta) trigPartOK=kTRUE; + if(fTriggerParticle!=0 && kf == fTriggerParticle && TMath::Abs(iparticle->Eta()) < fTriggerEta && TMath::Abs(iparticle->Y())Pt()>fTriggerMinPt && iparticle->Pt()GetPdgCode()); if (kf != fTriggerParticle) continue; if (iparticle->Pt() == 0.) continue; + if (TMath::Abs(iparticle->Y()) > fTriggerY) continue; if (TMath::Abs(iparticle->Eta()) > fTriggerEta) continue; + if ( iparticle->Pt() > fTriggerMaxPt || iparticle->Pt() < fTriggerMinPt ) continue; triggered = kTRUE; break; } diff --git a/PYTHIA6/AliPythia6/AliGenPythiaPlus.h b/PYTHIA6/AliPythia6/AliGenPythiaPlus.h index 36a99f28c5e..78b741c2506 100644 --- a/PYTHIA6/AliPythia6/AliGenPythiaPlus.h +++ b/PYTHIA6/AliPythia6/AliGenPythiaPlus.h @@ -187,8 +187,9 @@ class AliGenPythiaPlus : public AliGenMC fTriggerMultiplicityPtMin = ptmin;} // Trigger on a single particle (not related to calorimeter trigger above) - virtual void SetTriggerParticle(Int_t particle = 0, Float_t etamax = 0.9) - {fTriggerParticle = particle; fTriggerEta = etamax;} + virtual void SetTriggerParticle(Int_t particle = 0, Float_t etamax = 0.9, Float_t ptmin = -1, Float_t ptmax = 1000) + {fTriggerParticle = particle; fTriggerEta = etamax; fTriggerMinPt = ptmin; fTriggerMaxPt = ptmax;} + virtual void SetTriggerY(Float_t dy) {fTriggerY = dy;} // // Heavy flavor options // @@ -336,6 +337,9 @@ class AliGenPythiaPlus : public AliGenMC Bool_t fHFoff; // Flag for switching heafy flavor production off Int_t fTriggerParticle; // Trigger on this particle ... Float_t fTriggerEta; // .. within |eta| < fTriggerEta + Float_t fTriggerY; // .. within |y| < fTriggerY + Float_t fTriggerMinPt; // .. within pt > fTriggerMinPt + Float_t fTriggerMaxPt; // .. within pt < fTriggerMaxPt Int_t fTriggerMultiplicity; // Trigger on events with a minimum charged multiplicity Float_t fTriggerMultiplicityEta; // in a given eta range Float_t fTriggerMultiplicityEtaMin; // in a given eta min @@ -393,7 +397,7 @@ class AliGenPythiaPlus : public AliGenMC AliGenPythiaPlus(const AliGenPythiaPlus &Pythia); AliGenPythiaPlus & operator=(const AliGenPythiaPlus & rhs); - ClassDef(AliGenPythiaPlus, 7) + ClassDef(AliGenPythiaPlus, 8) }; #endif