TF2* AliFastGlauber::fgWKParticipants = NULL;
TF1* AliFastGlauber::fgWParticipants = NULL;
TF2* AliFastGlauber::fgWAlmondCurrent = NULL;
-TF2 AliFastGlauber::fgWAlmondFixedB[40];
+TF2* AliFastGlauber::fgWAlmondFixedB[40];
const Int_t AliFastGlauber::fgkMCInts = 100000;
Int_t AliFastGlauber::fgCounter = 0;
AliFastGlauber::~AliFastGlauber()
{
fgCounter--;
+ for(Int_t k=0; k<40; k++) delete fgWAlmondFixedB[k];
//if(fgCounter==0) Reset();
}
for(Int_t k=0; k<40; k++) {
sprintf(almondName,"WAlmondFixedB%d",k);
fgWAlmondCurrent = (TF2*)ff->Get(almondName);
- new(&fgWAlmondFixedB[k]) TF2(*fgWAlmondCurrent);
+ fgWAlmondFixedB[k] = fgWAlmondCurrent;
}
delete ff;
}
b = fgWSbinary->GetRandom();
Int_t bin = 2*(Int_t)b;
if( (b-(Int_t)b) > 0.5) bin++;
- fgWAlmondCurrent = &fgWAlmondFixedB[bin];
+ fgWAlmondCurrent = fgWAlmondFixedB[bin];
return;
}
gStyle->SetPalette(1,0);
c->Divide(2,2);
c->cd(1);
- fgWAlmondFixedB[0].Draw("cont1");
+ fgWAlmondFixedB[0]->Draw("cont1");
c->cd(2);
- fgWAlmondFixedB[10].Draw("cont1");
+ fgWAlmondFixedB[10]->Draw("cont1");
c->cd(3);
- fgWAlmondFixedB[20].Draw("cont1");
+ fgWAlmondFixedB[20]->Draw("cont1");
c->cd(4);
- fgWAlmondFixedB[30].Draw("cont1");
+ fgWAlmondFixedB[30]->Draw("cont1");
return;
}
const TF1* GetWSbinary() const {return fgWSbinary;}
const TF1* GetWSN() const {return fgWSN;}
const TF1* GetWEnergyDensity() const {return fgWEnergyDensity;}
- const TF2* GetWAlmondFixedB(Int_t i) const {return &fgWAlmondFixedB[i];}
+ const TF2* GetWAlmondFixedB(Int_t i) const {return fgWAlmondFixedB[i];}
Float_t GetWr0() const {return fWSr0;}
Float_t GetWSd() const {return fWSd;}
static TF1* fgWSbinary; // dSigma/db binary
static TF1* fgWSN; // dN/db binary
static TF1* fgWEnergyDensity; // Energy density as a function of impact parameter
- static TF2 fgWAlmondFixedB[40]; // Interaction Almonds read from file
+ static TF2* fgWAlmondFixedB[40]; // Interaction Almonds read from file
static TF2* fgWAlmondCurrent; // Interaction Almond used for length
Float_t fWSr0; // Wood-Saxon Parameter r0
Int_t fEllDef; // definition of length (see CalculateLength())
TString fName; // filename of stored distributions
- ClassDef(AliFastGlauber,1) // Event geometry simulation in the Glauber Model
+ ClassDef(AliFastGlauber,2) // Event geometry simulation in the Glauber Model
};
#endif