+/**************************************************************************
+ * 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 //
//****************************************************************************//
-#include "THijing.h"
-#include "TObjArray.h"
+#include <TClonesArray.h>
+#include <TObjArray.h>
+#include <TParticle.h>
+#include <TROOT.h>
+
#include "Hcommon.h"
-#include "TParticle.h"
-#include "TROOT.h"
+#include "THijing.h"
#ifndef WIN32
# define hijset hijset_
# 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 profile PROFILE
# define rluget_hijing RLUGET_HIJING
# define rluset_hijing RLUSET_HIJING
+# define lulist_hijing LULIST_HIJING
# define type_of_call _stdcall
#endif
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
#endif
ClassImp(THijing)
-THijing::THijing() : TGenerator("Hijing","Hijing")
+
+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")
+ 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.
- fEfrm=efrm;
- fFrame=frame;
- fProj=proj;
- fTarg=targ;
- fIap=iap;
- fIzp=izp;
- fIat=iat;
- fIzt=izt;
- fBmin=bmin;
- fBmax=bmax;
}
//______________________________________________________________________________
//
nump++;
TParticle* p = new TParticle(
- HIMAIN2.katt[0][i], HIMAIN2.katt[1][i] ,
+ 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);
}
}
}
TParticle* p = new TParticle(
- HIMAIN2.katt[0][i], HIMAIN2.katt[1][i], iParent,
+ 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);
}
}
nump++;
new(particlesR[i]) TParticle(
HIMAIN2.katt[0][i] ,
- HIMAIN2.katt[1][i] ,
+ HIMAIN2.katt[3][i] ,
-1 ,
-1,
-1,
HIMAIN2.vatt[2][i] ,
HIMAIN2.vatt[3][i]
);
+ particlesR[i]->SetUniqueID(HIMAIN2.katt[1][i]);
}
}
}
new(particlesR[i]) TParticle(
HIMAIN2.katt[0][i] ,
- HIMAIN2.katt[1][i] ,
+ HIMAIN2.katt[3][i] ,
iParent,
-1,
-1,
HIMAIN2.vatt[2][i] ,
HIMAIN2.vatt[3][i]
);
+ particlesR[i]->SetUniqueID(HIMAIN2.katt[1][i]);
}
}
return nump;
}
+Int_t THijing::GetNPART() const
+{
+// Get true number of participants
+ return HIMAIN1.npart;
+
+}
+
//______________________________________________________________________________
Float_t THijing::GetEATT() const
{
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;
}
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..200]\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..200]\n", key2);
+ } else {
+ LUDAT3_HIJING.mdcy[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 =========================
rluset_hijing(lfn, move);
}
+void THijing::Pylist(Int_t flag)
+{
+// call lulist
+ lulist_hijing(flag);
+}