]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
added multiplicity
authorsnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 17 Nov 2009 13:48:55 +0000 (13:48 +0000)
committersnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 17 Nov 2009 13:48:55 +0000 (13:48 +0000)
PWG2/FLOW/Tools/glauberMC/AliGlauberMC.cxx
PWG2/FLOW/Tools/glauberMC/AliGlauberMC.h
PWG2/FLOW/Tools/glauberMC/plotGlauberMCexample.C

index d8667441b6ce35b6270877b198c1a8f112a08210..36d8b222522961a859f35f2131b06a2a479ecc5e 100644 (file)
@@ -45,7 +45,7 @@ AliGlauberMC::AliGlauberMC(Option_t* NA, Option_t* NB, Double_t xsect) :
    fMeanYParts(0),fMeanXSystem(0),fMeanYSystem(0),  
    fMeanX_A(0),fMeanY_A(0),fMeanX_B(0),fMeanY_B(0),fB_MC(0),
    fEvents(0),fTotalEvents(0),fBMin(0),fBMax(0),fMaxNpartFound(0),
-   fNpart(0),fNcoll(0),fSx2(0),fSy2(0),fSxy(0)
+   fNpart(0),fNcoll(0),fSx2(0),fSy2(0),fSxy(0), fX(0.13), fNpp(8.)
 {
    fBMin = 0;
    fBMax = 20;
@@ -251,13 +251,35 @@ TObjArray *AliGlauberMC::GetNucleons()
    return allnucleons;
 }
 
+//______________________________________________________________________________
+Double_t AliGlauberMC::GetdNdEta() const
+{
+  //Get particle density per unit of rapidity
+  //using the two component model
+  return (fNpp*((1.-fX)*fNpart/2.)+fX*fNcoll);
+}
+
+//______________________________________________________________________________
+Double_t AliGlauberMC::GetEccentricityPart() const
+{
+  //get participant eccentricity
+  return (TMath::Sqrt((fSy2-fSx2)*(fSy2-fSx2)+4*fSxy*fSxy)/(fSy2+fSx2));
+}
+
+//______________________________________________________________________________
+Double_t AliGlauberMC::GetEccentricity() const
+{
+  //get standard eccentricity
+  return ((fSy2-fSx2)/(fSy2+fSx2));
+}
 //______________________________________________________________________________
 Bool_t AliGlauberMC::NextEvent(Double_t bgen)
 {
-   if(bgen<0) 
-      bgen = TMath::Sqrt((fBMax*fBMax-fBMin*fBMin)*gRandom->Rndm()+fBMin*fBMin);
+  //Make a new event
+  if(bgen<0) 
+     bgen = TMath::Sqrt((fBMax*fBMax-fBMin*fBMin)*gRandom->Rndm()+fBMin*fBMin);
 
-   return CalcEvent(bgen);
+  return CalcEvent(bgen);
 }
 
 //______________________________________________________________________________
@@ -267,7 +289,7 @@ void AliGlauberMC::Run(Int_t nevents)
    TString title(Form("%s + %s (x-sect = %d mb)",fANucleus.GetName(),fBNucleus.GetName(),(Int_t) fXSect));
    if (fnt == 0) {
       fnt = new TNtuple(name,title,
-                        "Npart:Ncoll:B:MeanX:MeanY:MeanX2:MeanY2:MeanXY:VarX:VarY:VarXY:MeanXSystem:MeanYSystem:MeanXA:MeanYA:MeanXB:MeanYB");
+                        "Npart:Ncoll:B:MeanX:MeanY:MeanX2:MeanY2:MeanXY:VarX:VarY:VarXY:MeanXSystem:MeanYSystem:MeanXA:MeanYA:MeanXB:MeanYB:VarE:VarEpart:Mult");
       fnt->SetDirectory(0);
    }
 
@@ -275,7 +297,7 @@ void AliGlauberMC::Run(Int_t nevents)
 
       while(!NextEvent()) {}
 
-      Float_t v[17];
+      Float_t v[21];
       v[0]  = GetNpart();
       v[1]  = GetNcoll();
       v[2]  = fB_MC;
@@ -291,8 +313,11 @@ void AliGlauberMC::Run(Int_t nevents)
       v[12] = fMeanYSystem;
       v[13] = fMeanX_A;
       v[14] = fMeanY_A;
-      v[16] = fMeanX_B;
-      v[17] = fMeanY_B;
+      v[15] = fMeanX_B;
+      v[16] = fMeanY_B;
+      v[17] = GetEccentricity();
+      v[18] = GetEccentricityPart();
+      v[19] = GetdNdEta();
 
       fnt->Fill(v);
 
index 8e786b0a96f9e83e7678fe3723791143eeb19177..209f3d063efcca3610e0601fbf667a9918084c84 100644 (file)
@@ -51,6 +51,8 @@ private:
    Double_t     fSx2;            //Variance of x of wounded nucleons
    Double_t     fSy2;            //Variance of y of wounded nucleons
    Double_t     fSxy;            //Covariance of x and y of wounded nucleons
+   Double_t     fX;              //hard particle production fraction
+   Double_t     fNpp;            //Multiplicity normalization
 
    Bool_t       CalcResults(Double_t bgen);
    Bool_t       CalcEvent(Double_t bgen);
@@ -60,6 +62,13 @@ public:
    virtual     ~AliGlauberMC() {Reset();}
 
    void         Draw(Option_t* option);
+   Double_t     GetdNdEta()          const;
+   Double_t     GetEccentricity()    const;
+   Double_t     GetEccentricityPart()const;
+   Double_t     GetX()               const {return fX;}
+   Double_t     GetNpp()             const {return fNpp;}
+   void SetX( const Double_t x ) {fX = x;}
+   void SetNpp( const Double_t n ) {fNpp = n;}
    Double_t     GetB()               const {return fB_MC;}
    Double_t     GetBMin()            const {return fBMin;}
    Double_t     GetBMax()            const {return fBMax;}
index 71ed360192ea6b70561cf805b7b5ae931b950f36..98f54668ea957832c502144867f18b6bfd824619 100644 (file)
@@ -11,7 +11,7 @@
   gStyle->SetPalette(1);
 
   TCanvas* c = new TCanvas("GlauberMC","GlauberMC");
-  c->Divide(2,2);
+  c->Divide(2,4);
   c->cd(1);
   // plot number of collisions
   t->Draw("Ncoll:B","","prof");
   c->cd(4);
   // plot participant eccentricity
   t->Draw("sqrt((VarY-VarX)*(VarY-VarX)+4*VarXY*VarXY)/(VarY+VarX):Npart","","prof");
+  c->cd(5);
+  t->Draw("VarE:Npart","","prof");
+  c->cd(6);
+  t->Draw("VarEpart:Npart","","prof");
+  c->cd(7);
+  t->Draw("Mult");
 
   c->Update();
 }