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;
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);
}
//______________________________________________________________________________
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);
}
while(!NextEvent()) {}
- Float_t v[17];
+ Float_t v[21];
v[0] = GetNpart();
v[1] = GetNcoll();
v[2] = fB_MC;
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);
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);
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;}
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();
}