/*
$Log$
+Revision 1.3 2003/04/21 09:35:53 morsch
+Protection against division by 0 in Binaries().
+
Revision 1.2 2003/04/14 14:23:44 morsch
Correction in Binaries().
Double_t AliFastGlauber::WSbinary(Double_t* x, Double_t* par)
{
//
-// Geometrical Cross-Section
+// Number of binary collisions
//
Double_t b = x[0];
Double_t sigma = par[0];
Double_t AliFastGlauber::WSN(Double_t* x, Double_t* par)
{
//
-// Geometrical Cross-Section
+// Number of hard processes per event
//
Double_t b = x[0];
Double_t y;
mult = 6000./fWSN->Eval(0.) * mu;
}
+void AliFastGlauber::GetRandom(Int_t& bin, Bool_t& hard)
+{
+ //
+ // Gives back a random impact parameter bin, and hard trigger decission
+ //
+ Float_t b = fWSgeo->GetRandom();
+ Float_t mu = fWSN->Eval(b) * fSigmaHard;
+ Float_t p = 1.-TMath::Exp(-mu);
+ if (b < 5.) {
+ bin = 1;
+ } else if (b < 8.6) {
+ bin = 2;
+ } else if (b < 11.2) {
+ bin = 3;
+ } else if (b < 13.2) {
+ bin = 4;
+ } else {
+ bin = 5;
+ }
+
+ hard = kFALSE;
+
+ Float_t r = gRandom->Rndm();
+
+ if (r < p) hard = kTRUE;
+}
+
+
Float_t AliFastGlauber::GetRandomImpactParameter(Float_t bmin, Float_t bmax)
{
//
TF1* Overlap() {return fWStaa;}
void SimulateTrigger(Int_t n);
void GetRandom(Float_t& b, Float_t& p, Float_t& mult);
+ void GetRandom(Int_t& bin, Bool_t& hard);
Float_t GetRandomImpactParameter(Float_t bmin, Float_t bmax);
protected:
static TF1* fWSb; // Wood-Saxon Function (b)