/*
$Log$
+Revision 1.13 2000/11/09 17:40:27 morsch
+Possibility to select/unselect spectator protons and neutrons.
+Method SetSpectators(Int_t spect) added. (FCA, Ch. Oppedisano)
+
+Revision 1.12 2000/10/20 13:38:38 morsch
+Debug printouts commented.
+
+Revision 1.11 2000/10/20 13:22:26 morsch
+- skip particle type 92 (string)
+- Charmed and beauty baryions (5122, 4122) are considered as stable consistent with
+ mesons.
+
Revision 1.10 2000/10/17 15:10:20 morsch
Write first all the parent particles to the stack and then the final state particles.
#include "AliGenHijing.h"
#include "AliGenHijingEventHeader.h"
#include "AliRun.h"
-#include "AliMC.h"
#include <TArrayI.h>
#include <TParticle.h>
fEvaluate=0;
fSelectAll=0;
fFlavor=0;
+ fSpectators=1;
}
AliGenHijing::AliGenHijing(const AliGenHijing & Hijing)
fTrials=0;
for (j=0;j<3;j++) origin0[j]=fOrigin[j];
if(fVertexSmear==kPerEvent) {
- gMC->Rndm(random,6);
+ Rndm(random,6);
for (j=0;j<3;j++) {
origin0[j]+=fOsigma[j]*TMath::Cos(2*random[2*j]*TMath::Pi())*
TMath::Sqrt(-2*TMath::Log(random[2*j+1]));
imo = (mother->GetPdgCode() != 92) ? imo=*(newPos+imo) : -1;
}
// Put particle on the stack ...
- printf("\n set track mother: %d %d %d %d %d %d ",i,imo, kf, nt+1, selected, hasSelectedDaughters);
+// printf("\n set track mother: %d %d %d %d %d %d ",i,imo, kf, nt+1, selected, hasSelectedDaughters);
gAlice->SetTrack(0,imo,kf,p,origin,polar,
- tof,"Primary",nt);
+ tof,kPPrimary,nt);
// ... and keep it there
gAlice->KeepTrack(nt);
//
Bool_t hasMother = (iparticle->GetFirstMother() >=0);
Bool_t selected = kTRUE;
kf = iparticle->GetPdgCode();
- if (!fSelectAll) selected = KinematicSelection(iparticle)&&SelectFlavor(kf);
+ ks = iparticle->GetStatusCode();
+ if (!fSelectAll) {
+ selected = KinematicSelection(iparticle)&&SelectFlavor(kf);
+ if (!fSpectators && selected) selected = (ks != 0 && ks != 10);
+ }
//
// Put particle on the stack if selected
//
if (selected) {
nc++;
- ks = iparticle->GetStatusCode();
p[0]=iparticle->Px();
p[1]=iparticle->Py();
p[2]=iparticle->Pz();
}
// Put particle on the stack
gAlice->SetTrack(fTrackIt,imo,kf,p,origin,polar,
- tof,"Secondary",nt);
+ tof,kPNoProcess,nt);
+// tof,"Secondary",nt);
- printf("\n set track final: %d %d %d",imo, kf, nt);
+// printf("\n set track final: %d %d %d",imo, kf, nt);
gAlice->KeepTrack(nt);
*(newPos+i)=nt;
} // selected
TParticle * jparticle = (TParticle *) particles->At(i);
Int_t ip=jparticle->GetPdgCode();
if (KinematicSelection(jparticle)&&SelectFlavor(ip)) {
- printf("\n selected ip %d %d %d ", ip, imin, imax);
selected=kTRUE; break;
}
if (DaughtersSelection(jparticle, particles)) {selected=kTRUE; break; }
return *this;
}
+#ifndef WIN32
+# define rluget_hijing rluget_hijing_
+# define rluset_hijing rluset_hijing_
+# define rlu_hijing rlu_hijing_
+# define type_of_call
+#else
+# define rluget_hijing RLUGET_HIJING
+# define rluset_hijing RLUSET_HIJING
+# define rlu_hijing RLU_HIJING
+# define type_of_call _stdcall
+#endif
+
+
+extern "C" {
+ void type_of_call rluget_hijing(Int_t & /*lfn*/, Int_t & /*move*/)
+ {printf("Dummy version of rluget_hijing reached\n");}
+
+ void type_of_call rluset_hijing(Int_t & /*lfn*/, Int_t & /*move*/)
+ {printf("Dummy version of rluset_hijing reached\n");}
+
+ Double_t type_of_call rlu_hijing(Int_t & /*idum*/)
+ {return sRandom->Rndm();}
+}
+