/*
$Log$
+Revision 1.9 2001/07/27 17:09:36 morsch
+Use local SetTrack, KeepTrack and SetHighWaterMark methods
+to delegate either to local stack or to stack owned by AliRun.
+(Piotr Skowronski, A.M.)
+
+Revision 1.8 2001/07/20 11:03:58 morsch
+Issue warning message if used outside allowed eta range (-8 to 8).
+
+Revision 1.7 2001/07/17 12:41:01 morsch
+- Calculation of fraction of event corresponding to selected pt-range corrected
+(R. Turrisi)
+- Parent weight corrected.
+
Revision 1.6 2001/05/16 14:57:10 alibrary
New files for folders and Stack
///////////////////////////////////////////////////////////////////
#include "AliGenHIJINGpara.h"
-#include "TF1.h"
+#include "AliGenEventHeader.h"
#include "AliRun.h"
#include "AliConst.h"
#include "AliPDG.h"
+#include <TF1.h>
+#include <TArrayF.h>
+
ClassImp(AliGenHIJINGpara)
AliGenHIJINGpara::AliGenHIJINGpara(const AliGenHIJINGpara & para)
fPtka = 0;
fETApic = 0;
fETAkac = 0;
+ SetCutVertexZ();
}
//_____________________________________________________________________________
fPtka = 0;
fETApic = 0;
fETAkac = 0;
+ SetCutVertexZ();
}
//_____________________________________________________________________________
printf("%s: The number of particles in the selected kinematic region corresponds to %f percent of a full event\n ",
ClassName(),100.*fParentWeight);
-
+
+// Issue warning message if etaMin or etaMax are outside the alowed range
+// of the parametrization
+ if (etaMin < -8.001 || etaMax > 8.001) {
+ printf("\n \n WARNING FROM AliGenHIJINGPara !");
+ printf("\n YOU ARE USING THE PARAMETERISATION OUTSIDE ");
+ printf("\n THE ALLOWED PSEUDORAPIDITY RANGE (-8. - 8.)");
+ printf("\n YOUR LIMITS: %f %f \n \n ", etaMin, etaMax);
+ }
}
//_____________________________________________________________________________
Float_t random[6];
//
for (j=0;j<3;j++) origin[j]=fOrigin[j];
- if(fVertexSmear==kPerEvent) {
- Rndm(random,6);
- for (j=0;j<3;j++) {
- origin[j]+=fOsigma[j]*TMath::Cos(2*random[2*j]*TMath::Pi())*
- TMath::Sqrt(-2*TMath::Log(random[2*j+1]));
+
+ if(fVertexSmear == kPerEvent) {
+ Float_t dv[3];
+ dv[2] = 1.e10;
+ while(TMath::Abs(dv[2]) > fCutVertexZ*fOsigma[2]) {
+ Rndm(random,6);
+ for (j=0; j < 3; j++) {
+ dv[j] = fOsigma[j]*TMath::Cos(2*random[2*j]*TMath::Pi())*
+ TMath::Sqrt(-2*TMath::Log(random[2*j+1]));
+ }
}
- }
+ for (j=0; j < 3; j++) origin[j] += dv[j];
+ } // if kPerEvent
+ TArrayF eventVertex;
+ eventVertex.Set(3);
+ eventVertex[0] = origin[0];
+ eventVertex[1] = origin[1];
+ eventVertex[2] = origin[2];
+
for(i=0;i<fNpart;i++) {
while(1) {
Rndm(random,3);
TMath::Sqrt(-2*TMath::Log(random[2*j+1]));
}
}
- gAlice->SetTrack(fTrackIt,-1,part,p,origin,polar,0,kPPrimary,nt,fParentWeight);
+ SetTrack(fTrackIt,-1,part,p,origin,polar,0,kPPrimary,nt,fParentWeight);
break;
}
}
+// Header
+ AliGenEventHeader* header = new AliGenEventHeader("HIJINGparam");
+// Event Vertex
+ header->SetPrimaryVertex(eventVertex);
+ gAlice->SetGenEventHeader(header);
}
AliGenHIJINGpara& AliGenHIJINGpara::operator=(const AliGenHIJINGpara& rhs)