X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=blobdiff_plain;f=THijing%2FTHijing.cxx;h=eabf0cf7565b80607cccb24e9654a58dfe18de8c;hp=58130406a1f148a27beca03f4411748b1c542050;hb=489951cd215c791ea1c54717475c98af0303b124;hpb=3010c308f6e4ec63eca9ee50a890049038e342b7 diff --git a/THijing/THijing.cxx b/THijing/THijing.cxx index 58130406a1f..eabf0cf7565 100644 --- a/THijing/THijing.cxx +++ b/THijing/THijing.cxx @@ -55,6 +55,10 @@ # define profile profile_ # define rluget_hijing rluget_hijing_ # define rluset_hijing rluset_hijing_ +# define lulist_hijing lulist_hijing_ +# define luupda_hijing luupda_hijing_ +# define opendecaytable_hijing opendecaytable_hijing_ +# define closedecaytable_hijing closedecaytable_hijing_ # define type_of_call #else # define hijset HIJSET @@ -62,6 +66,10 @@ # define profile PROFILE # define rluget_hijing RLUGET_HIJING # define rluset_hijing RLUSET_HIJING +# define lulist_hijing LULIST_HIJING +# define luupda_hijing LUUPDA_HIJING +# define opendecaytable_hijing OPENDECAYTABLE_HIJING +# define closedecaytable_hijing CLOSEDECAYTABLE_HIJING # define type_of_call _stdcall #endif @@ -77,6 +85,12 @@ extern "C" void type_of_call hijing(const char *, Float_t &, 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 &); +extern "C" void type_of_call luupda_hijing(Int_t &, Int_t &); +extern "C" void type_of_call + opendecaytable_hijing(Int_t&); +extern "C" void type_of_call + closedecaytable_hijing(Int_t&); #else #endif @@ -122,6 +136,13 @@ THijing::THijing(Float_t efrm, const char *frame="CMS", // 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. +// +// Read decaytable + Int_t lun = 15; + opendecaytable_hijing(lun); + Luupda(2,lun); + closedecaytable_hijing(lun); + } //______________________________________________________________________________ @@ -503,6 +524,13 @@ Int_t THijing::GetNATT() const } +Int_t THijing::GetNPART() const +{ +// Get true number of participants + return HIMAIN1.npart; + +} + //______________________________________________________________________________ Float_t THijing::GetEATT() const { @@ -1129,9 +1157,9 @@ void THijing::SetPARJ(Int_t key, Float_t parm) 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; } - - LUDAT1_HIJING.parj[key-1] = parm; } @@ -1141,12 +1169,59 @@ void THijing::SetMSTJ(Int_t key, Int_t parm) 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; } - - 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 ========================= @@ -1253,3 +1328,14 @@ void THijing::Rluset(Int_t lfn, Int_t move) rluset_hijing(lfn, move); } +void THijing::Pylist(Int_t flag) +{ +// call lulist + lulist_hijing(flag); +} + +void THijing::Luupda(Int_t mupda, Int_t lfn) +{ +// call luupda + luupda_hijing(mupda, lfn); +}