X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=THijing%2FTHijing.cxx;h=257649efef76a731afd13ccc5689c39deedf45ec;hb=b275617a2c1057dde45d3559ada1aa1b0593c5d2;hp=6b814b69ff2e2d2cba10985cecfe31c016364217;hpb=ce5a1dbda352ae549fc4fa46233f57d660e7c66c;p=u%2Fmrichter%2FAliRoot.git diff --git a/THijing/THijing.cxx b/THijing/THijing.cxx index 6b814b69ff2..257649efef7 100644 --- a/THijing/THijing.cxx +++ b/THijing/THijing.cxx @@ -1,3 +1,20 @@ +/************************************************************************** + * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * * + * Author: The ALICE Off-line Project. * + * Contributors are mentioned in the code where appropriate. * + * * + * Permission to use, copy, modify and distribute this software and its * + * documentation strictly for non-commercial purposes is hereby granted * + * without fee, provided that the above copyright notice appears in all * + * copies and that both the copyright notice and this permission notice * + * appear in the supporting documentation. The authors make no claims * + * about the suitability of this software for any purpose. It is * + * provided "as is" without express or implied warranty. * + **************************************************************************/ + +/* $Id$ */ + //////////////////////////////////////////////////////////////////////////////// // // // THijing // @@ -23,199 +40,164 @@ // Lawrence Berkeley Laboratory // //****************************************************************************// -//*KEEP,THIJING. -#include "THijing.h" -//*KEEP,HCOMMON. + +#include +#include +#include +#include + #include "Hcommon.h" -//*KEEP,TMCParticle. -//#include "TMCParticle.h" -//*KEEP,TParticle,T=C++. -#include "TParticle.h" -//*KEND. - -//*KEEP,TCanvas. -//#include "TCanvas.h" -//*KEEP,TView. -//#include "TView.h" -//*KEEP,TROOT. -#include "TROOT.h" -//*KEEP,TPaveText. -//#include "TPaveText.h" -//*KEND. +#include "THijing.h" #ifndef WIN32 # define hijset hijset_ # define hijing hijing_ # define profile profile_ +# define rluget_hijing rluget_hijing_ +# define rluset_hijing rluset_hijing_ +# define lulist_hijing lulist_hijing_ # define type_of_call #else # define hijset HIJSET # define hijing HIJING # define profile PROFILE +# define rluget_hijing RLUGET_HIJING +# define rluset_hijing RLUSET_HIJING +# define lulist_hijing LULIST_HIJING # define type_of_call _stdcall #endif #ifndef WIN32 -//extern "C" void type_of_call hijset(float &efrm, const char *frame, -// const char *proj, const char *targ, -// int &iap, int &izp, int &iat, -// int &izt, Long_t l_frame, -// Long_t l_proj, Long_t l_targ); extern "C" void type_of_call hijset(Float_t & , const char *, const char *, const char *, Int_t & , Int_t &, Int_t &, Int_t &, const int, const int, const int); extern "C" float type_of_call profile(Float_t &); - -//extern "C" void type_of_call hijing(const char *frame, float &bmin, -// float &bmax, Long_t l_frame); extern "C" void type_of_call hijing(const char *, Float_t &, Float_t &, const int); +extern "C" void type_of_call rluget_hijing(Int_t & lfn, Int_t & move); + +extern "C" void type_of_call rluset_hijing(Int_t & lfn, Int_t & move); +extern "C" void type_of_call lulist_hijing(Int_t &); + #else -//extern "C" void type_of_call hijset(float &efrm, const char *frame, -// Long_t l_frame, const char *proj, -// Long_t l_proj, const char *targ, -// Long_t l_targ, -// int &iap, int &izp, int &iat, -// int &izt); -//extern "C" void type_of_call hijing(const char *frame, Long_t l_frame, -// float &bmin, float &bmax); #endif ClassImp(THijing) -// void THijing::Streamer(TBuffer &R__b){} -//______________________________________________________________________________ -THijing::THijing() : TGenerator("Hijing","Hijing") -{ -// THijing constructor: creates a TClonesArray in which it will store all -// particles. Note that there may be only one functional THijing object -// at a time, so it's not use to create more than one instance of it. - -// delete fParticles; // was allocated as TObjArray in TGenerator - -// fParticles = new TClonesArray("TMCParticle",50); +THijing::THijing(): + TGenerator("Hijing","Hijing"), + fEfrm(5500.), + fFrame("CMS"), + fProj("A"), + fTarg("A"), + fIap(208), + fIzp(82), + fIat(208), + fIzt(82), + fBmin(0.), + fBmax(5.) +{ +// Default constructor } //______________________________________________________________________________ THijing::THijing(Float_t efrm, const char *frame="CMS", - const char *proj="A", const char *targ="A", Int_t iap=207, - Int_t izp=82, Int_t iat=207, Int_t izt=82, Float_t bmin=0, - Float_t bmax=20) : TGenerator("Hijing","Hijing") -{ -// THijing constructor: creates a TClonesArray in which it will store all -// particles. Note that there may be only one functional THijing object + const char *proj="A", const char *targ="A", + Int_t iap=207, Int_t izp=82, Int_t iat=207, Int_t izt=82, + Float_t bmin=0, Float_t bmax=20): + TGenerator("Hijing","Hijing"), + fEfrm(efrm), + fFrame(frame), + fProj(proj), + fTarg(targ), + fIap(iap), + fIzp(izp), + fIat(iat), + fIzt(izt), + fBmin(bmin), + fBmax(bmax) +{ +// THijing constructor: +// Note that there may be only one functional THijing object // at a time, so it's not use to create more than one instance of it. - -// delete fParticles; // was allocated as TObjArray in TGenerator - -// fParticles = new TClonesArray("TMCParticle",50); - - fEfrm=efrm; - fFrame=frame; - fProj=proj; - fTarg=targ; - fIap=iap; - fIzp=izp; - fIat=iat; - fIzt=izt; - fBmin=bmin; - fBmax=bmax; } //______________________________________________________________________________ THijing::~THijing() { -// Destroys the object, deletes and disposes all TMCParticles currently on list. - -// if (fParticles) { -// fParticles->Delete(); -// delete fParticles; -// fParticles = 0; -// } -} - -//______________________________________________________________________________ -//void THijing::Draw(Option_t *option) -//{ -// Event display - not supported for THijing yet. - -// if (!gPad) { -// if (!gROOT->GetMakeDefCanvas()) return; -// (gROOT->GetMakeDefCanvas())(); -// gPad->GetCanvas()->SetFillColor(13); -// } - -// static Float_t rbox = 1000; -// Float_t rmin[3],rmax[3]; -// TView *view = gPad->GetView(); -// if (!strstr(option,"same")) { -// if (view) { view->GetRange(rmin,rmax); rbox = rmax[2];} -// gPad->Clear(); -// } - -// AppendPad(option); - -// view = gPad->GetView(); -// // compute 3D view -// if (view) { -// view->GetRange(rmin,rmax); -// rbox = rmax[2]; -// } else { -// view = new TView(1); -// view->SetRange(-rbox,-rbox,-rbox, rbox,rbox,rbox ); -// } - -// TPaveText *pt = new TPaveText(-0.94,0.85,-0.25,0.98,"br"); -// pt->AddText((char*)GetName()); -// pt->AddText((char*)GetTitle()); -// pt->SetFillColor(42); -// pt->Draw(); -//} - -//______________________________________________________________________________ -//TObjArray *THijing::ImportParticles(Option_t *) -//{ -// Fills TClonesArray fParticles list with particles from common LUJETS. -// Old contents of a list are cleared. This function should be called after -// any change in common LUJETS, however GetParticles() method calls it -// automatically - user don't need to care about it. In case you make a call -// to LuExec() you must call this method yourself to transfer new data from -// common LUJETS to the fParticles list. -// -// fParticles->Clear(); +// Destructor +} + + +TObjArray* THijing::ImportParticles(Option_t *option) +{ // -// Int_t numpart = LUJETS.n; -// TClonesArray &a = *((TClonesArray*)fParticles); +// Default primary creation method. It reads the /HEPEVT/ common block which +// has been filled by the GenerateEvent method. If the event generator does +// not use the HEPEVT common block, This routine has to be overloaded by +// the subclasses. +// The function loops on the generated particles and store them in +// the TClonesArray pointed by the argument particles. +// The default action is to store only the stable particles (ISTHEP = 1) +// This can be demanded explicitly by setting the option = "Final" +// If the option = "All", all the particles are stored. // -// for (Int_t i = 0; i < numpart; i++) { -// new(a[i]) TMCParticle(LUJETS.k[0][i] , -// LUJETS.k[1][i] , -// LUJETS.k[2][i] , -// LUJETS.k[3][i] , -// LUJETS.k[4][i] , + fParticles->Clear(); + Int_t numpart = HIMAIN1.natt; + printf("\n THijing: HIJING stack contains %d particles.", numpart); + printf("\n THijing: Total energy: %f ", HIMAIN1.eatt); + printf("\n THijing: Number of hard scatterings: %d ", HIMAIN1.jatt); + Int_t nump = 0; + if (!strcmp(option,"") || !strcmp(option,"Final")) { + for (Int_t i = 0; i < numpart; i++) { + + if (HIMAIN2.katt[3][i] == 1) { // -// LUJETS.p[0][i] , -// LUJETS.p[1][i] , -// LUJETS.p[2][i] , -// LUJETS.p[3][i] , -// LUJETS.p[4][i] , +// Use the common block values for the TParticle constructor // -// LUJETS.v[0][i] , -// LUJETS.v[1][i] , -// LUJETS.v[2][i] , -// LUJETS.v[3][i] , -// LUJETS.v[4][i]); - -// } -// return fParticles; -//} + nump++; + TParticle* p = new TParticle( + HIMAIN2.katt[0][i], HIMAIN2.katt[3][i] , + -1, -1, -1, -1, + HIMAIN2.patt[0][i], HIMAIN2.patt[1][i], HIMAIN2.patt[2][i], HIMAIN2.patt[3][i] , + HIMAIN2.vatt[0][i], HIMAIN2.vatt[1][i], HIMAIN2.vatt[2][i], HIMAIN2.vatt[3][i] + ); + p->SetUniqueID(HIMAIN2.katt[1][i]); + fParticles->Add(p); + } + } + } + else if (!strcmp(option,"All")) { + nump = numpart; + for (Int_t i = 0; i < numpart; i++) { + + Int_t iParent = HIMAIN2.katt[2][i]-1; + + if (iParent >= 0) { + TParticle *mother = (TParticle*) (fParticles->UncheckedAt(iParent)); + mother->SetLastDaughter(i); + if (mother->GetFirstDaughter()==-1) + mother->SetFirstDaughter(i); + } + + TParticle* p = new TParticle( + HIMAIN2.katt[0][i], HIMAIN2.katt[3][i], iParent, + -1, -1, -1, + HIMAIN2.patt[0][i], HIMAIN2.patt[1][i], HIMAIN2.patt[2][i], HIMAIN2.patt[3][i] , + HIMAIN2.vatt[0][i], HIMAIN2.vatt[1][i], HIMAIN2.vatt[2][i], HIMAIN2.vatt[3][i] + ); + p->SetUniqueID(HIMAIN2.katt[1][i]); + fParticles->Add(p); + } + } + return fParticles; +} -//______________________________________________________________________________ Int_t THijing::ImportParticles(TClonesArray *particles, Option_t *option) { // @@ -230,20 +212,25 @@ Int_t THijing::ImportParticles(TClonesArray *particles, Option_t *option) // If the option = "All", all the particles are stored. // if (particles == 0) return 0; - TClonesArray &Particles = *particles; - Particles.Clear(); + TClonesArray &particlesR = *particles; + particlesR.Clear(); Int_t numpart = HIMAIN1.natt; + printf("\n THijing: HIJING stack contains %d particles.", numpart); + printf("\n THijing: Total energy: %f ", HIMAIN1.eatt); + printf("\n THijing: Number of hard scatterings: %d ", HIMAIN1.jatt); + Int_t nump = 0; if (!strcmp(option,"") || !strcmp(option,"Final")) { - for (Int_t i = 0; i<=numpart; i++) { + for (Int_t i = 0; i < numpart; i++) { if (HIMAIN2.katt[3][i] == 1) { // // Use the common block values for the TParticle constructor // - new(Particles[i]) TParticle( + nump++; + new(particlesR[i]) TParticle( HIMAIN2.katt[0][i] , - HIMAIN2.katt[1][i] , - HIMAIN2.katt[2][i] , + HIMAIN2.katt[3][i] , + -1 , -1, -1, -1, @@ -252,27 +239,30 @@ Int_t THijing::ImportParticles(TClonesArray *particles, Option_t *option) HIMAIN2.patt[1][i] , HIMAIN2.patt[2][i] , HIMAIN2.patt[3][i] , - - 0, - 0, - 0, - 0); + + HIMAIN2.vatt[0][i] , + HIMAIN2.vatt[1][i] , + HIMAIN2.vatt[2][i] , + HIMAIN2.vatt[3][i] + ); + particlesR[i]->SetUniqueID(HIMAIN2.katt[1][i]); } } } else if (!strcmp(option,"All")) { - for (Int_t i = 0; i<=numpart; i++) { + nump = numpart; + for (Int_t i = 0; i < numpart; i++) { Int_t iParent = HIMAIN2.katt[2][i]-1; if (iParent >= 0) { - TParticle *mother = (TParticle*) (Particles.UncheckedAt(iParent)); + TParticle *mother = (TParticle*) (particlesR.UncheckedAt(iParent)); mother->SetLastDaughter(i); if (mother->GetFirstDaughter()==-1) mother->SetFirstDaughter(i); } - new(Particles[i]) TParticle( + new(particlesR[i]) TParticle( HIMAIN2.katt[0][i] , HIMAIN2.katt[3][i] , iParent, @@ -285,113 +275,135 @@ Int_t THijing::ImportParticles(TClonesArray *particles, Option_t *option) HIMAIN2.patt[2][i] , HIMAIN2.patt[3][i] , - 0, - 0, - 0, - 0); + HIMAIN2.vatt[0][i] , + HIMAIN2.vatt[1][i] , + HIMAIN2.vatt[2][i] , + HIMAIN2.vatt[3][i] + ); + particlesR[i]->SetUniqueID(HIMAIN2.katt[1][i]); } } - return numpart; + return nump; } //______________________________________________________________________________ void THijing::SetEFRM(Float_t efrm) { +// Set the centre of mass (CMS) or lab-energy (LAB) fEfrm=efrm; } //______________________________________________________________________________ void THijing::SetFRAME(const char* frame) { +// Set the frame type ("CMS" or "LAB") fFrame=frame; } //______________________________________________________________________________ void THijing::SetPROJ(const char* proj) { +// Set the projectile type fProj=proj; } //______________________________________________________________________________ void THijing::SetTARG(const char* targ) { +// Set the target type fTarg=targ; } //______________________________________________________________________________ void THijing::SetIAP(Int_t iap) { +// Set the projectile atomic number fIap=iap; } //______________________________________________________________________________ void THijing::SetIZP(Int_t izp) { +// Set the projectile charge number fIzp=izp; } //______________________________________________________________________________ void THijing::SetIAT(Int_t iat) { +// Set the target atomic number fIat=iat; } //______________________________________________________________________________ void THijing::SetIZT(Int_t izt) { +// Set the target charge number fIzt=izt; } //______________________________________________________________________________ void THijing::SetBMIN(Float_t bmin) { +// Set the minimum impact parameter fBmin=bmin; } //______________________________________________________________________________ void THijing::SetBMAX(Float_t bmax) { +// Set the maximum impact parameter fBmax=bmax; } //______________________________________________________________________________ Float_t THijing::GetEFRM() const { +// Get the centre of mass (CMS) or lab-energy (LAB) return fEfrm; } //______________________________________________________________________________ const char* THijing::GetFRAME() const { +// Get the frame type ("CMS" or "LAB") return fFrame.Data(); } //______________________________________________________________________________ const char* THijing::GetPROJ() const { +// Get the projectile type return fProj; } //______________________________________________________________________________ const char* THijing::GetTARG() const { +// Set the target type return fTarg; } //______________________________________________________________________________ Int_t THijing::GetIAP() const { +// Get the projectile atomic number return fIap; } //______________________________________________________________________________ Int_t THijing::GetIZP() const { +// Get the projectile charge number return fIzp; } //______________________________________________________________________________ Int_t THijing::GetIAT() const { +// Get the target atomic number return fIat; } //______________________________________________________________________________ Int_t THijing::GetIZT() const { +// Get the target charge number return fIzt; } //______________________________________________________________________________ Float_t THijing::GetBMIN() const { +// Get the minimum impact parameter return fBmin; } //______________________________________________________________________________ Float_t THijing::GetBMAX() const { +// Get the maximum impact parameter return fBmax; } @@ -400,6 +412,7 @@ Float_t THijing::GetBMAX() const //______________________________________________________________________________ void THijing::SetHIPR1(Int_t key,Float_t value) { +// Set the values of array HIPR1 in common HIPARNT if ( key<1 || key>100 ) { printf ("ERROR in THijing:SetHIPR1(key,value): \n "); printf (" key=%i is out of range [1..100]!\n",key); @@ -413,6 +426,7 @@ void THijing::SetHIPR1(Int_t key,Float_t value) //______________________________________________________________________________ Float_t THijing::GetHIPR1(Int_t key) const { +// Get the values of array HIPR1 in common HIPARNT if ( key<1 || key>100 ) { printf ("ERROR in THijing:GetHIPR1(key): \n "); printf (" key=%i is out of range [1..100]!\n",key); @@ -426,6 +440,7 @@ Float_t THijing::GetHIPR1(Int_t key) const //______________________________________________________________________________ void THijing::SetIHPR2(Int_t key,Int_t value) { +// Set the values of array HIPR2 in common HIPARNT if ( key<1 || key>50 ) { printf ("ERROR in THijing:SetIHPR2(key,value): \n "); printf (" key=%i is out of range [1..50]!\n",key); @@ -439,6 +454,7 @@ void THijing::SetIHPR2(Int_t key,Int_t value) //______________________________________________________________________________ Int_t THijing::GetIHPR2(Int_t key) const { +// Get the values of array HIPR2 in common HIPARNT if ( key<1 || key>50 ) { printf ("ERROR in THijing:GetIHPR2(key): \n "); printf (" key=%i is out of range [1..50]!\n",key); @@ -453,6 +469,7 @@ Int_t THijing::GetIHPR2(Int_t key) const //______________________________________________________________________________ Float_t THijing::GetHINT1(Int_t key) const { +// Get the values of array HINT1 in common HIPARNT if ( key<1 || key>100 ) { printf ("ERROR in THijing:GetHINT1(key): \n "); printf (" key=%i is out of range [1..100]!\n",key); @@ -467,6 +484,7 @@ Float_t THijing::GetHINT1(Int_t key) const //______________________________________________________________________________ Int_t THijing::GetIHNT2(Int_t key) const { +// Get the values of array HINT2 in common HIPARNT if ( key<1 || key>50 ) { printf ("ERROR in THijing:GetIHNT2(key): \n "); printf (" key=%i is out of range [1..50]!\n",key); @@ -483,14 +501,22 @@ Int_t THijing::GetIHNT2(Int_t key) const //______________________________________________________________________________ Int_t THijing::GetNATT() const { - +// Get the number of particles produces return HIMAIN1.natt; } +Int_t THijing::GetNPART() const +{ +// Get true number of participants + return HIMAIN1.npart; + +} + //______________________________________________________________________________ Float_t THijing::GetEATT() const { +// Get total energy of particles return HIMAIN1.eatt; @@ -499,6 +525,7 @@ Float_t THijing::GetEATT() const //______________________________________________________________________________ Int_t THijing::GetJATT() const { +// Get number of hard scatterings return HIMAIN1.jatt; @@ -507,6 +534,7 @@ Int_t THijing::GetJATT() const //______________________________________________________________________________ Int_t THijing::GetNT() const { +// Get number of target participants return HIMAIN1.nt; @@ -515,7 +543,7 @@ Int_t THijing::GetNT() const //______________________________________________________________________________ Int_t THijing::GetNP() const { - +// Get number of projectile participants return HIMAIN1.np; } @@ -524,13 +552,14 @@ Int_t THijing::GetNP() const //______________________________________________________________________________ Int_t THijing::GetN0() const { - +// Get number of N-N collisions return HIMAIN1.n0; } //______________________________________________________________________________ Int_t THijing::GetN01() const { +// Get number of N-wounded collisions return HIMAIN1.n01; @@ -539,6 +568,7 @@ Int_t THijing::GetN01() const //______________________________________________________________________________ Int_t THijing::GetN10() const { +// Get number of wounded-N collisions return HIMAIN1.n10; @@ -547,6 +577,7 @@ Int_t THijing::GetN10() const //______________________________________________________________________________ Int_t THijing::GetN11() const { +// Get number of wounded-wounded collisions return HIMAIN1.n11; @@ -555,6 +586,7 @@ Int_t THijing::GetN11() const //______________________________________________________________________________ Float_t THijing::GetBB() const { +// Get impact parameter return HIMAIN1.bb; @@ -565,9 +597,10 @@ Float_t THijing::GetBB() const //______________________________________________________________________________ Int_t THijing::GetKATT(Int_t key1, Int_t key2) const { - if ( key1<1 || key1>130000 ) { +// Get values of array KATT in common HIMAIN2 + if ( key1<1 || key1>200000 ) { printf("ERROR in THijing::GetKATT(key1,key2):\n"); - printf(" key1=%i is out of range [1..130000]\n",key1); + printf(" key1=%i is out of range [1..200000]\n",key1); return 0; } @@ -583,7 +616,8 @@ Int_t THijing::GetKATT(Int_t key1, Int_t key2) const //______________________________________________________________________________ Float_t THijing::GetPATT(Int_t key1, Int_t key2) const { - if ( key1<1 || key1>130000 ) { +// Get values of array PATT in common HIMAIN2 + if ( key1<1 || key1>200000 ) { printf("ERROR in THijing::GetPATT(key1,key2):\n"); printf(" key1=%i is out of range [1..130000]\n",key1); return 0; @@ -598,11 +632,30 @@ Float_t THijing::GetPATT(Int_t key1, Int_t key2) const return HIMAIN2.patt[key2-1][key1-1]; } +Float_t THijing::GetVATT(Int_t key1, Int_t key2) const +{ +// Get values of array VATT in common HIMAIN2 + if ( key1<1 || key1>200000 ) { + printf("ERROR in THijing::GetVATT(key1,key2):\n"); + printf(" key1=%i is out of range [1..130000]\n",key1); + return 0; + } + + if ( key2<1 || key2>4 ) { + printf("ERROR in THijing::GetVATT(key1,key2):\n"); + printf(" key2=%i is out of range [1..4]\n",key2); + return 0; + } + + return HIMAIN2.vatt[key2-1][key1-1]; +} + //====================== access to common HIJJET1 =============================== //______________________________________________________________________________ Int_t THijing::GetNPJ(Int_t key) const { +// Get values of array NPJ of common HIJJET1 if ( key<1 || key>300 ) { printf("ERROR in THijing::GetNPJ(key):\n"); printf(" key=%i is out of range [1..300]\n",key); @@ -614,6 +667,7 @@ Int_t THijing::GetNPJ(Int_t key) const //______________________________________________________________________________ Int_t THijing::GetKFPJ(Int_t key1, Int_t key2) const { +// Get values of array KFPJ in common HIJJET1 if ( key1<1 || key1>300 ) { printf("ERROR in THijing::GetKFPJ(key1):\n"); printf(" key1=%i is out of range [1..300]\n",key1); @@ -631,6 +685,7 @@ Int_t THijing::GetKFPJ(Int_t key1, Int_t key2) const //______________________________________________________________________________ Float_t THijing::GetPJPX(Int_t key1, Int_t key2) const { +// Get values of array PJPX in common HIJJET1 if ( key1<1 || key1>300 ) { printf("ERROR in THijing::GetPJPX(key1):\n"); printf(" key1=%i is out of range [1..300]\n",key1); @@ -648,6 +703,7 @@ Float_t THijing::GetPJPX(Int_t key1, Int_t key2) const //______________________________________________________________________________ Float_t THijing::GetPJPY(Int_t key1, Int_t key2) const { +// Get values of array PJPY in common HIJJET1 if ( key1<1 || key1>300 ) { printf("ERROR in THijing::GetPJPY(key1):\n"); printf(" key1=%i is out of range [1..300]\n",key1); @@ -665,6 +721,7 @@ Float_t THijing::GetPJPY(Int_t key1, Int_t key2) const //______________________________________________________________________________ Float_t THijing::GetPJPZ(Int_t key1, Int_t key2) const { +// Get values of array PJPZ in common HIJJET1 if ( key1<1 || key1>300 ) { printf("ERROR in THijing::GetPJPZ(key1):\n"); printf(" key1=%i is out of range [1..300]\n",key1); @@ -682,6 +739,7 @@ Float_t THijing::GetPJPZ(Int_t key1, Int_t key2) const //______________________________________________________________________________ Float_t THijing::GetPJPE(Int_t key1, Int_t key2) const { +// Get values of array PJPE in common HIJJET1 if ( key1<1 || key1>300 ) { printf("ERROR in THijing::GetPJPE(key1):\n"); printf(" key1=%i is out of range [1..300]\n",key1); @@ -699,6 +757,7 @@ Float_t THijing::GetPJPE(Int_t key1, Int_t key2) const //______________________________________________________________________________ Float_t THijing::GetPJPM(Int_t key1, Int_t key2) const { +// Get values of array PJPM in common HIJJET1 if ( key1<1 || key1>300 ) { printf("ERROR in THijing::GetPJPM(key1):\n"); printf(" key1=%i is out of range [1..300]\n",key1); @@ -716,6 +775,7 @@ Float_t THijing::GetPJPM(Int_t key1, Int_t key2) const //______________________________________________________________________________ Int_t THijing::GetNTJ(Int_t key) const { +// Get values of array NTJ in common HIJJET1 if ( key<1 || key>300 ) { printf("ERROR in THijing::GetNTJ(key):\n"); printf(" key=%i is out of range [1..300]\n",key); @@ -727,6 +787,7 @@ Int_t THijing::GetNTJ(Int_t key) const //______________________________________________________________________________ Int_t THijing::GetKFTJ(Int_t key1, Int_t key2) const { +// Get values of array KFTJ in common HIJJET1 if ( key1<1 || key1>300 ) { printf("ERROR in THijing::GetKFTJ(key1):\n"); printf(" key1=%i is out of range [1..300]\n",key1); @@ -744,6 +805,7 @@ Int_t THijing::GetKFTJ(Int_t key1, Int_t key2) const //______________________________________________________________________________ Float_t THijing::GetPJTX(Int_t key1, Int_t key2) const { +// Get values of array PJTX in common HIJJET1 if ( key1<1 || key1>300 ) { printf("ERROR in THijing::GetPJTX(key1):\n"); printf(" key1=%i is out of range [1..300]\n",key1); @@ -761,6 +823,7 @@ Float_t THijing::GetPJTX(Int_t key1, Int_t key2) const //______________________________________________________________________________ Float_t THijing::GetPJTY(Int_t key1, Int_t key2) const { +// Get values of array PJTY in common HIJJET1 if ( key1<1 || key1>300 ) { printf("ERROR in THijing::GetPJTY(key1):\n"); printf(" key1=%i is out of range [1..300]\n",key1); @@ -778,6 +841,7 @@ Float_t THijing::GetPJTY(Int_t key1, Int_t key2) const //______________________________________________________________________________ Float_t THijing::GetPJTZ(Int_t key1, Int_t key2) const { +// Get values of array PJTZ in common HIJJET1 if ( key1<1 || key1>300 ) { printf("ERROR in THijing::GetPJTZ(key1):\n"); printf(" key1=%i is out of range [1..300]\n",key1); @@ -795,6 +859,7 @@ Float_t THijing::GetPJTZ(Int_t key1, Int_t key2) const //______________________________________________________________________________ Float_t THijing::GetPJTE(Int_t key1, Int_t key2) const { +// Get values of array PJTE in common HIJJET1 if ( key1<1 || key1>300 ) { printf("ERROR in THijing::GetPJTE(key1):\n"); printf(" key1=%i is out of range [1..300]\n",key1); @@ -812,6 +877,7 @@ Float_t THijing::GetPJTE(Int_t key1, Int_t key2) const //______________________________________________________________________________ Float_t THijing::GetPJTM(Int_t key1, Int_t key2) const { +// Get values of array PJTM in common HIJJET1 if ( key1<1 || key1>300 ) { printf("ERROR in THijing::GetPJTM(key1):\n"); printf(" key1=%i is out of range [1..300]\n",key1); @@ -831,12 +897,14 @@ Float_t THijing::GetPJTM(Int_t key1, Int_t key2) const //______________________________________________________________________________ Int_t THijing::GetNSG() const { +// Get value of NSG in common HIJJET2 return HIJJET2.nsg; } //______________________________________________________________________________ Int_t THijing::GetNJSG(Int_t key) const { +// Get values of array NJSG in common HIJJET2 if ( key<1 || key>900 ) { printf ("ERROR in THijing:GetNJSG(key): \n "); printf (" key=%i is out of range [1..900]!\n",key); @@ -850,6 +918,7 @@ Int_t THijing::GetNJSG(Int_t key) const //______________________________________________________________________________ Int_t THijing::GetIASG(Int_t key1, Int_t key2) const { +// Get values of IASG in common HIJJET2 if ( key1<1 || key1>900 ) { printf("ERROR in THijing::GetIASG(key1):\n"); printf(" key1=%i is out of range [1..900]\n",key1); @@ -867,6 +936,7 @@ Int_t THijing::GetIASG(Int_t key1, Int_t key2) const //______________________________________________________________________________ Int_t THijing::GetK1SG(Int_t key1, Int_t key2) const { +// Get values of K1SG in common HIJJET2 if ( key1<1 || key1>900 ) { printf("ERROR in THijing::GetK1SG(key1):\n"); printf(" key1=%i is out of range [1..900]\n",key1); @@ -884,6 +954,7 @@ Int_t THijing::GetK1SG(Int_t key1, Int_t key2) const //______________________________________________________________________________ Int_t THijing::GetK2SG(Int_t key1, Int_t key2) const { +// Get values of K2SG in common HIJJET2 if ( key1<1 || key1>900 ) { printf("ERROR in THijing::GetK2SG(key1):\n"); printf(" key1=%i is out of range [1..900]\n",key1); @@ -901,6 +972,7 @@ Int_t THijing::GetK2SG(Int_t key1, Int_t key2) const //______________________________________________________________________________ Float_t THijing::GetPXSG(Int_t key1, Int_t key2) const { +// Get values of PXSG in common HIJJET2 if ( key1<1 || key1>900 ) { printf("ERROR in THijing::GetPXSG(key1):\n"); printf(" key1=%i is out of range [1..900]\n",key1); @@ -918,6 +990,7 @@ Float_t THijing::GetPXSG(Int_t key1, Int_t key2) const //______________________________________________________________________________ Float_t THijing::GetPYSG(Int_t key1, Int_t key2) const { +// Get values of PYSG in common HIJJET2 if ( key1<1 || key1>900 ) { printf("ERROR in THijing::GetPYSG(key1):\n"); printf(" key1=%i is out of range [1..900]\n",key1); @@ -935,6 +1008,7 @@ Float_t THijing::GetPYSG(Int_t key1, Int_t key2) const //______________________________________________________________________________ Float_t THijing::GetPZSG(Int_t key1, Int_t key2) const { +// Get values of PZSG in common HIJJET2 if ( key1<1 || key1>900 ) { printf("ERROR in THijing::GetPZSG(key1):\n"); printf(" key1=%i is out of range [1..900]\n",key1); @@ -952,6 +1026,7 @@ Float_t THijing::GetPZSG(Int_t key1, Int_t key2) const //______________________________________________________________________________ Float_t THijing::GetPESG(Int_t key1, Int_t key2) const { +// Get values of PESG in common HIJJET2 if ( key1<1 || key1>900 ) { printf("ERROR in THijing::GetPESG(key1):\n"); printf(" key1=%i is out of range [1..900]\n",key1); @@ -969,6 +1044,7 @@ Float_t THijing::GetPESG(Int_t key1, Int_t key2) const //______________________________________________________________________________ Float_t THijing::GetPMSG(Int_t key1, Int_t key2) const { +// Get values of PMSG in common HIJJET2 if ( key1<1 || key1>900 ) { printf("ERROR in THijing::GetPMSG(key1):\n"); printf(" key1=%i is out of range [1..900]\n",key1); @@ -988,6 +1064,7 @@ Float_t THijing::GetPMSG(Int_t key1, Int_t key2) const //______________________________________________________________________________ Int_t THijing::GetNFP(Int_t key1, Int_t key2) const { +// Get values of array NFP in common HISTRNG if ( key1<1 || key1>300 ) { printf("ERROR in THijing::GetNFP(key1):\n"); printf(" key1=%i is out of range [1..300]\n",key1); @@ -1005,6 +1082,7 @@ Int_t THijing::GetNFP(Int_t key1, Int_t key2) const //______________________________________________________________________________ Float_t THijing::GetPP(Int_t key1, Int_t key2) const { +// Get values of array PP in common HISTRNG if ( key1<1 || key1>300 ) { printf("ERROR in THijing::GetPP(key1):\n"); printf(" key1=%i is out of range [1..300]\n",key1); @@ -1022,6 +1100,7 @@ Float_t THijing::GetPP(Int_t key1, Int_t key2) const //______________________________________________________________________________ Int_t THijing::GetNFT(Int_t key1, Int_t key2) const { +// Get values of array NFT in common HISTRNG if ( key1<1 || key1>300 ) { printf("ERROR in THijing::GetNFT(key1):\n"); printf(" key1=%i is out of range [1..300]\n",key1); @@ -1039,6 +1118,7 @@ Int_t THijing::GetNFT(Int_t key1, Int_t key2) const //______________________________________________________________________________ Float_t THijing::GetPT(Int_t key1, Int_t key2) const { +// Get values of array PT in common HISTRNG if ( key1<1 || key1>300 ) { printf("ERROR in THijing::GetPT(key1):\n"); printf(" key1=%i is out of range [1..300]\n",key1); @@ -1053,8 +1133,77 @@ Float_t THijing::GetPT(Int_t key1, Int_t key2) const return HISTRNG.pt[key2-1][key1-1]; } +void THijing::SetPARJ(Int_t key, Float_t parm) +{ +// Set values of array PARJ in common HISTRNG + if ( key < 1 || key > 200) { + printf("ERROR in THijing::SetPARJ(key,parm):\n"); + printf(" key=%i is out of range [1..200]\n",key); + } else { + LUDAT1_HIJING.parj[key-1] = parm; + } +} + + +void THijing::SetMSTJ(Int_t key, Int_t parm) +{ +// Set values of array MSTJ in common HISTRNG + if ( key < 1 || key > 200) { + printf("ERROR in THijing::SetMSTJ(key,parm):\n"); + printf(" key=%i is out of range [1..200]\n",key); + } else { + LUDAT1_HIJING.mstj[key-1] = parm; + } +} + +void THijing::SetMDCY(Int_t key1, Int_t key2, Int_t parm) +{ + // Set value of array MDCY + if ( key1 < 1 || key1 > 500) { + printf("ERROR in THijing::SetMDCY(key1, key2, parm):\n"); + printf(" key1=%i is out of range [1..500]\n", key1); + } else if ( key2 < 1 || key2 > 3) { + printf("ERROR in THijing::SetMDCY(key1, key2, parm):\n"); + printf(" key2=%i is out of range [1..3]\n", key2); + } else { + LUDAT3_HIJING.mdcy[key2-1][key1-1] = parm; + } + +} +void THijing::SetMDME(Int_t key1, Int_t key2, Int_t parm) +{ + // Set value of array MDME + if ( key1 < 1 || key1 > 2000) { + printf("ERROR in THijing::SetMDME(key1, key2, parm):\n"); + printf(" key1=%i is out of range [1..2000]\n", key1); + } else if ( key2 < 1 || key2 > 2) { + printf("ERROR in THijing::SetMDME(key1, key2, parm):\n"); + printf(" key2=%i is out of range [1..3]\n", key2); + } else { + LUDAT3_HIJING.mdme[key2-1][key1-1] = parm; + } + +} + +Int_t THijing::GetMDCY(Int_t key1, Int_t key2) +{ + // Get value of array MDCY + + if ( key1 < 1 || key1 > 500) { + printf("ERROR in THijing::GetMDCY(key1, key2, parm):\n"); + printf(" key1=%i is out of range [1..200]\n", key1); + return -1; + } else if ( key2 < 1 || key2 > 3) { + printf("ERROR in THijing::GetMDCY(key1, key2, parm):\n"); + printf(" key2=%i is out of range [1..200]\n", key2); + return -1; + } else { + return (LUDAT3_HIJING.mdcy[key2-1][key1-1]); + } + +} //====================== access to Hijing subroutines ========================= @@ -1148,4 +1297,21 @@ Float_t THijing::Profile(float b) } +void THijing::Rluget(Int_t lfn, Int_t move) +{ +// write seed to file + rluget_hijing(lfn, move); +} + + +void THijing::Rluset(Int_t lfn, Int_t move) +{ +// read seed from file + rluset_hijing(lfn, move); +} +void THijing::Pylist(Int_t flag) +{ +// call lulist + lulist_hijing(flag); +}