forked from alisw/AliRoot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Including (anti-)neutrons to tuned MC
- Loading branch information
Showing
2 changed files
with
64 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ | |
/* $Id: AliGenTunedOnPbPb.cxx 51126 2013-08-19 13:37:49Z fnoferin $ */ | ||
|
||
// Parameterisation based on 5.5 ATeV PbPb data | ||
// pi,K, p , K0, lambda, phi, Xi, Omega spectra, v2, v3 (no jets!) | ||
// pi, K, p, neutron, K0, lambda, phi, Xi, Omega spectra, v2, v3 (no jets!) | ||
// Author: [email protected] | ||
|
||
#include <TArrayF.h> | ||
|
@@ -39,10 +39,10 @@ | |
#include "AliGenTunedOnPbPb.h" | ||
|
||
ClassImp(AliGenTunedOnPbPb) | ||
// set default parameters for 10-20% centrality | ||
Int_t AliGenTunedOnPbPb::fgPdgInput[fgNspecies] = {211,-211,111,321,-321,2212,-2212,310,3122,-3122,333,3312,-3312,3334,-3334}; | ||
Float_t AliGenTunedOnPbPb::fgMult[fgNspecies] = {450,450,450,70,70,21,21,70,20,20,8,2.4,2.4,0.4,0.4}; | ||
|
||
// set default parameters for 10-20% centrality | ||
Int_t AliGenTunedOnPbPb::fgPdgInput[fgNspecies] = {211,-211,111,321,-321,2212,-2212,310,3122,-3122,333,3312,-3312,3334,-3334,2112,-2112}; | ||
Float_t AliGenTunedOnPbPb::fgMult[fgNspecies] = {450,450,450,70,70,21,21,70,20,20,8,2.4,2.4,0.4,0.4,21,21}; | ||
|
||
Float_t AliGenTunedOnPbPb::fgV3Overv2 = 6.25000000000000000e-01; | ||
Float_t AliGenTunedOnPbPb::fgEventplane=0; | ||
|
@@ -52,24 +52,24 @@ TF1 *AliGenTunedOnPbPb::fgV2 = NULL; | |
//_____________________________________________________________________________ | ||
AliGenTunedOnPbPb::AliGenTunedOnPbPb() | ||
:AliGenerator(), | ||
fCmin(0.), | ||
fCmax(100.), | ||
fChangeWithCentrality(kFALSE), | ||
fYMaxValue(2.0), | ||
fYlimitForFlatness(2.0), | ||
fYdecreaseSp(0.2), | ||
fYdecreaseV2(0.2) | ||
fCmin(0.), | ||
fCmax(100.), | ||
fChangeWithCentrality(kFALSE), | ||
fYMaxValue(2.0), | ||
fYlimitForFlatness(2.0), | ||
fYdecreaseSp(0.2), | ||
fYdecreaseV2(0.2) | ||
{ | ||
// | ||
// Default constructor | ||
// | ||
SetCutVertexZ(); | ||
SetPtRange(); | ||
// | ||
// Default constructor | ||
// | ||
SetCutVertexZ(); | ||
SetPtRange(); | ||
|
||
for(Int_t i=0;i < fgNspecies;i++){ | ||
fgHSpectrum[i] = NULL; | ||
fgHv2[i] = NULL; | ||
} | ||
for(Int_t i=0;i < fgNspecies;i++){ | ||
fgHSpectrum[i] = NULL; | ||
fgHv2[i] = NULL; | ||
} | ||
} | ||
|
||
//_____________________________________________________________________________ | ||
|
@@ -111,18 +111,18 @@ void AliGenTunedOnPbPb::Generate() | |
for(Int_t i=0;i < fgNspecies;i++){ | ||
in=0; | ||
if(fgHSpectrum[i]){ | ||
for(Int_t j=1;j<=fgHSpectrum[i]->GetNbinsX();j++){ | ||
in += fgHSpectrum[i]->GetBinContent(j)*fgHSpectrum[i]->GetBinWidth(j); | ||
} | ||
for(Int_t j=1;j<=fgHSpectrum[i]->GetNbinsX();j++){ | ||
in += fgHSpectrum[i]->GetBinContent(j)*fgHSpectrum[i]->GetBinWidth(j); | ||
} | ||
} | ||
|
||
// replace n-particles with the one in input file if centralidy dependece was disable | ||
fgMult[i] = in; | ||
} | ||
} | ||
|
||
|
||
TMCProcess statusPdg[fgNspecies] = {kPPrimary,kPPrimary,kPPrimary,kPPrimary,kPPrimary,kPPrimary,kPPrimary,kPPrimary,kPPrimary,kPPrimary,kPPrimary,kPPrimary,kPPrimary,kPPrimary,kPPrimary}; | ||
|
||
TMCProcess statusPdg[fgNspecies] = {kPPrimary,kPPrimary,kPPrimary,kPPrimary,kPPrimary,kPPrimary,kPPrimary,kPPrimary,kPPrimary,kPPrimary,kPPrimary,kPPrimary,kPPrimary,kPPrimary,kPPrimary,kPPrimary,kPPrimary}; | ||
|
||
Float_t parV2scaling[3] = {1,0.202538,-0.00214468}; | ||
|
||
|
@@ -159,17 +159,17 @@ void AliGenTunedOnPbPb::Generate() | |
} // if kPerEvent | ||
|
||
printf("Generate event with centrality = %3.1f%c, |y|<%4.1f\n",centrality,'%',fYMaxValue); | ||
|
||
for(Int_t isp=0;isp < fgNspecies;isp++){ | ||
if(! fgHSpectrum[isp]) continue; | ||
|
||
Int_t npartSp = Int_t(fgMult[isp]*2*fYMaxValue + gRandom->Rndm()); | ||
|
||
printf("Total number of %i = %i\n",fgPdgInput[isp],npartSp); | ||
|
||
for(Int_t ipart =0; ipart < npartSp; ipart++){ | ||
Int_t pdg = fgPdgInput[isp]; | ||
|
||
Double_t y = gRandom->Rndm()*2*fYMaxValue - fYMaxValue; | ||
Double_t ytanh = TMath::TanH(y); | ||
Double_t pt = fgHSpectrum[isp]->GetRandom(); | ||
|
@@ -178,7 +178,7 @@ void AliGenTunedOnPbPb::Generate() | |
Double_t pz = ytanh*TMath::Sqrt(mt2)/TMath::Sqrt(1-ytanh*ytanh); | ||
Double_t etot = TMath::Sqrt(mt2 + pz*pz); | ||
TLorentzVector tempVect(pt,0,pz,etot); | ||
// Double_t eta = tempVect.PseudoRapidity(); | ||
// Double_t eta = tempVect.PseudoRapidity(); | ||
Double_t scaleEtaV2 = 1; // set the eta dependence | ||
if(TMath::Abs(y)> fYlimitForFlatness) scaleEtaV2 = 1 - fYdecreaseV2*(TMath::Abs(y) - fYlimitForFlatness); | ||
|
||
|
@@ -189,14 +189,14 @@ void AliGenTunedOnPbPb::Generate() | |
Double_t py = pt*TMath::Sin(phi); | ||
Float_t p[3] = {static_cast<Float_t>(px),static_cast<Float_t>(py),static_cast<Float_t>(pz)}; | ||
Float_t polar[3] = {0.,0.,0.}; | ||
|
||
if(TMath::Abs(y)< fYlimitForFlatness || gRandom->Rndm() < 1 - fYdecreaseSp*(TMath::Abs(y) - fYlimitForFlatness)){// check on pseudorapidity distribution | ||
// printf("%f %f\n",eta,phi - psi); // for debugging | ||
// printf("%f %f\n",eta,phi - psi); // for debugging | ||
PushTrack(1, -1, pdg, p, origin0, polar, time, statusPdg[isp], npart, 1., 1); | ||
KeepTrack(npart); | ||
npart++; | ||
} | ||
} | ||
} | ||
} | ||
|
||
TArrayF eventVertex; | ||
|
@@ -205,21 +205,21 @@ void AliGenTunedOnPbPb::Generate() | |
eventVertex[1] = origin0[1]; | ||
eventVertex[2] = origin0[2]; | ||
|
||
// Header | ||
AliGenEventHeaderTunedPbPb* header = new AliGenEventHeaderTunedPbPb("tunedOnPbPb"); | ||
// Event Vertex | ||
header->SetPrimaryVertex(eventVertex); | ||
header->SetInteractionTime(time); | ||
header->SetNProduced(npart); | ||
header->SetCentrality(centrality); | ||
header->SetPsi2(psi); | ||
header->SetPsi3(psi3); | ||
header->SetPsi4(psi4); | ||
gAlice->SetGenEventHeader(header); | ||
// Header | ||
AliGenEventHeaderTunedPbPb* header = new AliGenEventHeaderTunedPbPb("tunedOnPbPb"); | ||
// Event Vertex | ||
header->SetPrimaryVertex(eventVertex); | ||
header->SetInteractionTime(time); | ||
header->SetNProduced(npart); | ||
header->SetCentrality(centrality); | ||
header->SetPsi2(psi); | ||
header->SetPsi3(psi3); | ||
header->SetPsi4(psi4); | ||
gAlice->SetGenEventHeader(header); | ||
} | ||
|
||
void AliGenTunedOnPbPb::SetPtRange(Float_t ptmin, Float_t ptmax) { | ||
AliGenerator::SetPtRange(ptmin, ptmax); | ||
AliGenerator::SetPtRange(ptmin, ptmax); | ||
} | ||
//_____________________________________________________________________________ | ||
TH1F *AliGenTunedOnPbPb::GetMultVsCentrality(Int_t species){ | ||
|
@@ -279,21 +279,23 @@ void AliGenTunedOnPbPb::SetParameters(Float_t centrality){ | |
} | ||
|
||
// parameters as a function of centrality | ||
Float_t multCent[9*fgNspecies] = {733.,733.,733.,109.,109.,34.,34.,109.,28.,28.,11.5,3.1,3.1,0.5,0.5, | ||
606.,606.,606.,91.,91.,28.,28.,91.,24.,24.,9.,2.7,2.7,0.45,0.45, | ||
455.,455.,455.,68.,68.,21.,21.,68.,20.,20.,8.,2.4,2.4,0.4,0.4, | ||
307.,307.,307.,46.,46.,14.5,14.5,46.,14.,14.,5.5,1.5,1.5,0.2,0.2, | ||
201.,201.,201.,30.,30.,9.6,9.6,30.,9.,9.,3.5,0.9,0.9,0.08,0.08, | ||
124.,124.,124.,18.3,18.3,6.1,6.1,18.3,5.1,5.1,2.2,0.6,0.6,0.055,0.055, | ||
71.,71.,71.,10.2,10.2,3.6,3.6,10.2,2.6,2.6,1.4,0.36,0.36,0.035,0.035, | ||
37.,37.,37.,5.1,5.1,2.,2.,5.1,1.5,1.5,0.5,0.02,0.02,0.015,0.015, | ||
17.,17.,17.,2.3,2.3,0.9,0.9,2.3,0.6,0.6,0.16,0.006,0.006,0.005,0.005}; | ||
Float_t multCent[9*fgNspecies] = { | ||
733.,733.,733.,109.,109.,34.0,34.0,109.,28.,28.,11.5,3.1 ,3.1 ,0.5 ,0.5 ,34.0,34.0, | ||
606.,606.,606.,91.0,91.0,28.0,28.0,91. ,24.,24.,9. ,2.7 ,2.7 ,0.45 ,0.45 ,28.0,28.0, | ||
455.,455.,455.,68.0,68.0,21.0,21.0,68. ,20.,20.,8. ,2.4 ,2.4 ,0.40 ,0.40 ,21.0,21.0, | ||
307.,307.,307.,46.0,46.0,14.5,14.5,46. ,14.,14.,5.5 ,1.5 ,1.5 ,0.2 ,0.2 ,14.5,14.5, | ||
201.,201.,201.,30.0,30.0,9.60,9.60,30. ,9. ,9. ,3.5 ,0.9 ,0.9 ,0.08 ,0.08 ,9.60,9.60, | ||
124.,124.,124.,18.3,18.3,6.10,6.10,18.3,5.1,5.1,2.2 ,0.6 ,0.6 ,0.055,0.055,6.10,6.10, | ||
71.0,71.0,71.0,10.2,10.2,3.60,3.60,10.2,2.6,2.6,1.4 ,0.36 ,0.36 ,0.035,0.035,3.60,3.60, | ||
37.0,37.0,37.0,5.10,5.10,2.00,2.00,5.10,1.5,1.5,0.50,0.020,0.020,0.015,0.015,2.00,2.00, | ||
17.0,17.0,17.0,2.30,2.30,0.90,0.90,2.30,0.6,0.6,0.16,0.006,0.006,0.005,0.005,0.90,0.90 | ||
}; | ||
|
||
Float_t v3Overv2Cent[9] = {1.2,0.82,0.625,0.5,0.45,0.4,0.37,0.3,0.3}; | ||
|
||
fgV3Overv2 = 0; | ||
for(Int_t j=0;j < 9;j++) | ||
fgV3Overv2 += fr[j]*v3Overv2Cent[j]; | ||
fgV3Overv2 += fr[j]*v3Overv2Cent[j]; | ||
|
||
// set parameters for current centrality | ||
for(Int_t i=0;i < fgNspecies;i++){ | ||
|
@@ -303,7 +305,7 @@ void AliGenTunedOnPbPb::SetParameters(Float_t centrality){ | |
fgMult[i] += fr[j]*multCent[i+j*fgNspecies]; | ||
} | ||
} | ||
|
||
if(centrality > 80){ | ||
for(Int_t i=0;i < fgNspecies;i++) | ||
fgMult[i] /= TMath::Log(centrality-77.); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters