// Sept 09: added hadron pair composition probabilities via 2D histo (X.M. Zhang)
// Oct 09: added energy choice between 7, 10, 14 TeV (for p-p), 4 TeV (for Pb-Pb),
// 9 TeV (for p-Pb) and -9 TeV (for Pb-p) (S. Grigoryan)
+// April 10: removed "static" from definition of some variables (B. Vulpescu)
//-------------------------------------------------------------------------
// How it works (for the given flavor and p-p energy):
//
-// 1) Reads QQbar kinematical grid from the Input file and generates
+// 1) Reads QQbar kinematical grid (TTree) from the Input file and generates
// quark pairs according to the weights of the cells.
// It is a 5D grid in y1,y2,pt1,pt2 and deltaphi, with occupancy weights
// of the cells obtained from Pythia (see details in GetQuarkPair).
Double_t AliGenCorrHF::fgptbmin[12] = {0, 0.5, 1, 1.5, 2, 2.5, 3, 4, 5, 6, 7, 9};
Double_t AliGenCorrHF::fgptbmax[12] = {0.5, 1, 1.5, 2, 2.5, 3, 4, 5, 6, 7, 9, 100};
-Double_t* AliGenCorrHF::fgIntegral = 0;
-
//____________________________________________________________
AliGenCorrHF::AliGenCorrHF():
fFileName(0),
fEnergy(0),
fBias(0.),
fTrials(0),
- fDecayer(0)
+ fDecayer(0),
+ fgIntegral(0)
{
// Default constructor
}
fBias(0.),
fTrials(0),
// fDecayer(new AliDecayerPythia())
- fDecayer(0)
+ fDecayer(0),
+ fgIntegral(0)
{
// Constructor using particle number, quark type, energy & default InputFile
//
fBias(0.),
fTrials(0),
// fDecayer(new AliDecayerPythia())
- fDecayer(0)
+ fDecayer(0),
+ fgIntegral(0)
{
// Constructor using particle number, quark type, energy & user-defined InputFile
//
if (fQuark == 4) qm = 1.20;
else qm = 4.75;
- static TClonesArray *particles;
- //
- if(!particles) particles = new TClonesArray("TParticle",1000);
+ TClonesArray *particles = new TClonesArray("TParticle",1000);
TDatabasePDG *pDataBase = TDatabasePDG::Instance();
//
header->SetNProduced(fNprimaries);
AddHeader(header);
+ delete particles;
+
}
//____________________________________________________________________________________
void AliGenCorrHF::IpCharm(TH2F *hProbHH, Int_t &pdg3, Int_t &pdg4)
y3 = 0.5 * TMath::Log((e1 + pz3 + 1.e-13)/(e1 - pz3 + 1.e-13));
y4 = 0.5 * TMath::Log((e2 + pz4 + 1.e-13)/(e2 - pz4 + 1.e-13));
if(TMath::Abs(y3)<ycorr && TMath::Abs(y4)<ycorr && rand[0]>0.5) {
- ptemp = TMath::Sqrt(e1*e1 - pz3*pz3);
+ ptemp = TMath::Sqrt((e1-pz3)*(e1+pz3));
y3 = 4*(1 - 2*rand[1]);
pz3 = ptemp*TMath::SinH(y3);
pz4 = pz3;
}
}
+