#ifndef WIN32
# define hijset hijset_
# define hijing hijing_
+# define profile profile_
# define type_of_call
#else
# define hijset HIJSET
# define hijing HIJING
+# define profile PROFILE
# define type_of_call _stdcall
#endif
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 &,
+extern "C" void type_of_call hijing(const char *, Float_t &,
Float_t &, const int);
#else
//extern "C" void type_of_call hijset(float &efrm, const char *frame,
// float &bmin, float &bmax);
#endif
+
+
ClassImp(THijing)
// void THijing::Streamer(TBuffer &R__b){}
Particles.Clear();
Int_t numpart = HIMAIN1.natt;
if (!strcmp(option,"") || !strcmp(option,"Final")) {
- for (Int_t i = 0; i<=numpart; i++) {
- if (HIMAIN2.katt[3][i] == 1) {
+ 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(
- HIMAIN2.katt[0][i] ,
- HIMAIN2.katt[1][i] ,
- HIMAIN2.katt[2][i] ,
- -1,
- -1,
- -1,
-
- HIMAIN2.patt[0][i] ,
- HIMAIN2.patt[1][i] ,
- HIMAIN2.patt[2][i] ,
- HIMAIN2.patt[3][i] ,
-
- 0,
- 0,
- 0,
- 0);
- }
- }
+ new(Particles[i]) TParticle(
+ HIMAIN2.katt[0][i] ,
+ HIMAIN2.katt[1][i] ,
+ HIMAIN2.katt[2][i] ,
+ -1,
+ -1,
+ -1,
+
+ HIMAIN2.patt[0][i] ,
+ HIMAIN2.patt[1][i] ,
+ HIMAIN2.patt[2][i] ,
+ HIMAIN2.patt[3][i] ,
+
+ 0,
+ 0,
+ 0,
+ 0);
+ }
+ }
}
else if (!strcmp(option,"All")) {
- for (Int_t i = 0; i<=numpart; i++) {
+ 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));
+ mother->SetLastDaughter(i);
+ if (mother->GetFirstDaughter()==-1)
+ mother->SetFirstDaughter(i);
+ }
+
new(Particles[i]) TParticle(
- HIMAIN2.katt[0][i] ,
- HIMAIN2.katt[1][i] ,
- HIMAIN2.katt[2][i] ,
- -1,
- -1,
- -1,
-
- HIMAIN2.patt[0][i] ,
- HIMAIN2.patt[1][i] ,
- HIMAIN2.patt[2][i] ,
- HIMAIN2.patt[3][i] ,
-
- 0,
- 0,
- 0,
- 0);
- }
+ 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] ,
+
+ 0,
+ 0,
+ 0,
+ 0);
+ }
}
return numpart;
}
// via SetEFRM, SetFRAME, SetPROJ, SetTARG, SetIAP, SetIZP, SetIAT, SetIZT //
//////////////////////////////////////////////////////////////////////////////////
- if ( (!strcmp(fFrame.Data(), "CMS" )) &&
- (!strcmp(fFrame.Data(), "LAB" ))){
+ if ( (!strcmp(fFrame.Data(), "CMS " )) &&
+ (!strcmp(fFrame.Data(), "LAB " ))){
printf("WARNING! In THijing:Initialize():\n");
printf(" specified frame=%s is neither CMS or LAB\n",fFrame.Data());
printf(" resetting to default \"CMS\" .");
fFrame="CMS";
}
- if ( (!strcmp(fProj.Data(), "A" )) &&
- (!strcmp(fProj.Data(), "P" )) &&
- (!strcmp(fProj.Data(), "PBAR" ))){
+ if ( (!strcmp(fProj.Data(), "A " )) &&
+ (!strcmp(fProj.Data(), "P " )) &&
+ (!strcmp(fProj.Data(), "PBAR " ))){
printf("WARNING! In THijing:Initialize():\n");
printf(" specified projectile=%s is neither A, P or PBAR\n",fProj.Data());
printf(" resetting to default \"A\" .");
fProj="A";
}
- if ( (!strcmp(fTarg.Data(), "A" )) &&
- (!strcmp(fTarg.Data(), "P" )) &&
- (!strcmp(fTarg.Data(), "PBAR" ))){
+ if ( (!strcmp(fTarg.Data(), "A " )) &&
+ (!strcmp(fTarg.Data(), "P " )) &&
+ (!strcmp(fTarg.Data(), "PBAR " ))){
printf("WARNING! In THijing:Initialize():\n");
printf(" specified target=%s is neither A, P or PBAR\n",fTarg.Data());
printf(" resetting to default \"A\" .");
fTarg="A";
}
-
+ printf(" %s-%s at %f GeV \n",fProj.Data(),fTarg.Data(),fEfrm);
Hijset(fEfrm,fFrame.Data(),fProj.Data(),fTarg.Data(),fIap,fIzp,fIat,fIzt);
hijing(frame, s1, bmin, bmax);
#endif
}
+
+
+Float_t THijing::Profile(float b)
+{
+// Call HIJING routine PROFILE
+ return profile(b);
+}
+
+
+