From 811826d8a73b793e11febd62654f7cd05f448f36 Mon Sep 17 00:00:00 2001 From: morsch Date: Mon, 18 Sep 2000 10:41:35 +0000 Subject: [PATCH] Add possibility to use nuclear structure functions from PDF library V8. --- EVGEN/AliGenPythia.cxx | 20 +++++++++++++++++++- EVGEN/AliGenPythia.h | 5 +++++ EVGEN/AliPythia.cxx | 25 +++++++++++++++++++++++++ EVGEN/AliPythia.h | 3 +++ 4 files changed, 52 insertions(+), 1 deletion(-) diff --git a/EVGEN/AliGenPythia.cxx b/EVGEN/AliGenPythia.cxx index 4f7480a372f..9bd8a6c3edf 100644 --- a/EVGEN/AliGenPythia.cxx +++ b/EVGEN/AliGenPythia.cxx @@ -15,6 +15,9 @@ /* $Log$ +Revision 1.23 2000/09/14 14:05:40 morsch +dito + Revision 1.22 2000/09/14 14:02:22 morsch - Correct conversion from mm to cm when passing particle vertex to MC. - Correct handling of fForceDecay == all. @@ -83,6 +86,8 @@ AliGenPythia::AliGenPythia(Int_t npart) // structure function GRVHO // fXsection = 0.; + fNucA1=0; + fNucA2=0; fParentSelect.Set(5); fChildSelect.Set(5); for (Int_t i=0; i<5; i++) fParentSelect[i]=fChildSelect[i]=0; @@ -123,6 +128,7 @@ void AliGenPythia::Init() fPythia->SetCKIN(3,fPtHardMin); fPythia->SetCKIN(4,fPtHardMax); + if (fNucA1 > 0 && fNucA2 > 0) fPythia->SetNuclei(fNucA1, fNucA2); fPythia->ProcInit(fProcess,fEnergyCMS,fStrucFunc); // fPythia->Pylist(0); @@ -344,6 +350,8 @@ void AliGenPythia::Generate() if (jev >= fNpart || fNpart == -1) { fKineBias=Float_t(fNpart)/Float_t(fTrials); printf("\n Trials: %i %i %i\n",fTrials, fNpart, jev); +// Print x-section summary + fPythia->Pystat(1); break; } } @@ -475,7 +483,16 @@ Int_t AliGenPythia::CheckPDGCode(Int_t pdgcode) //non diffractive state -- return code unchanged return pdgcode; } - + + +void AliGenPythia::SetNuclei(Int_t a1, Int_t a2) +{ +// Treat protons as inside nuclei with mass numbers a1 and a2 + fNucA1 = a1; + fNucA2 = a2; +} + + AliGenPythia& AliGenPythia::operator=(const AliGenPythia& rhs) { // Assignment operator @@ -483,6 +500,7 @@ AliGenPythia& AliGenPythia::operator=(const AliGenPythia& rhs) } + void AliGenPythia::Streamer(TBuffer &R__b) { // Stream an object of class AliGenPythia. diff --git a/EVGEN/AliGenPythia.h b/EVGEN/AliGenPythia.h index 588b8ae19df..31ce52a6019 100644 --- a/EVGEN/AliGenPythia.h +++ b/EVGEN/AliGenPythia.h @@ -34,6 +34,8 @@ class AliGenPythia : public AliGenerator virtual void SetEnergyCMS(Float_t energy=5500) {fEnergyCMS=energy;} // force decay type virtual void SetForceDecay(Decay_t decay=semimuonic) {fForceDecay=decay;} + // treat protons as inside nuclei + virtual void SetNuclei(Int_t a1, Int_t a2); // get cross section of process virtual Float_t GetXsection() {return fXsection;} // Check PDG code @@ -53,6 +55,9 @@ class AliGenPythia : public AliGenerator AliPythia *fPythia; // Pythia Float_t fPtHardMin; // lower pT-hard cut Float_t fPtHardMax; // higher pT-hard cut + Int_t fNucA1; // mass number nucleus side 1 + Int_t fNucA2; // mass number nucleus side 2 + AliDecayer *fDecayer; private: // check if particle is selected as parent particle diff --git a/EVGEN/AliPythia.cxx b/EVGEN/AliPythia.cxx index 5e1626ef742..06db4c0b569 100644 --- a/EVGEN/AliPythia.cxx +++ b/EVGEN/AliPythia.cxx @@ -15,6 +15,10 @@ /* $Log$ +Revision 1.8 2000/09/06 14:26:24 morsch +Decayer functionality of AliPythia has been moved to AliDecayerPythia. +Class is now a singleton. + Revision 1.7 2000/06/09 20:34:50 morsch All coding rule violations except RS3 corrected @@ -154,6 +158,27 @@ Int_t AliPythia::CheckedLuComp(Int_t kf) return kc; } +void AliPythia::SetNuclei(Int_t a1, Int_t a2) +{ +// Treat protons as inside nuclei with mass numbers a1 and a2 +// The MSTP array in the PYPARS common block is used to enable and +// select the nuclear structure functions. +// MSTP(52) : (D=1) choice of proton and nuclear structure-function library +// =1: internal PYTHIA acording to MSTP(51) +// =2: PDFLIB proton s.f., with MSTP(51) = 1000xNGROUP+NSET +// =3: PDFLIB proton s.f. with nuclar correction: +// MSTP( 51) = 1000xNPGROUP+NPSET +// MSTP(151) = 1000xNAGROUP+NASET +// MSTP(192) : Mass number of nucleus side 1 +// MSTP(193) : Mass number of nucleus side 2 + + SetMSTP(52,3); + SetMSTP(191, 1001); + SetMSTP(192, a1); + SetMSTP(193, a2); +} + + AliPythia* AliPythia::Instance() { if (fgAliPythia) { diff --git a/EVGEN/AliPythia.h b/EVGEN/AliPythia.h index d1fca32e2d7..2a58e82c24e 100644 --- a/EVGEN/AliPythia.h +++ b/EVGEN/AliPythia.h @@ -17,6 +17,9 @@ class AliPythia:public TPythia6 // Pythia initialisation for selected processes virtual void ProcInit (Process_t process, Float_t energy, StrucFunc_t strucfunc); + // treat protons as inside nuclei + virtual void SetNuclei(Int_t a1, Int_t a2); + // return instance of the singleton static AliPythia* Instance(); protected: -- 2.39.3