fStringB(0.9),
fEventTime(0.),
fHeader(new AliGenAmptEventHeader("Ampt")),
- fDecay(kTRUE)
+ fDecay(kTRUE),
+ fRotating(kFALSE)
{
// Constructor
fEnergyCMS = 2760.;
fStringB(0.9),
fEventTime(0.),
fHeader(new AliGenAmptEventHeader("Ampt")),
- fDecay(kTRUE)
+ fDecay(kTRUE),
+ fRotating(kFALSE)
{
// Default PbPb collisions at 2.76 TeV
fAmpt->Initialize();
if (fEvaluate)
EvaluateCrossSections();
+
+ fAmpt->SetReactionPlaneAngle(0.0);
+ fRotating=kFALSE;
}
void AliGenAmpt::Generate()
Float_t sign = (fRandomPz && (Rndm() < 0.5))? -1. : 1.;
while(1) {
+
+ // Generate random reaction plane angle if requested
+ if( fRotating ) {
+ TRandom *r=AliAmptRndm::GetAmptRandom();
+ fAmpt->SetReactionPlaneAngle(TMath::TwoPi()*r->Rndm());
+ }
+
// Generate one event
Int_t fpemask = gSystem->GetFPEMask();
gSystem->SetFPEMask(0);
gSystem->SetFPEMask(fpemask);
fTrials++;
fNprimaries = 0;
+
+
fAmpt->ImportParticles(&fParticles,"All");
Int_t np = fParticles.GetEntriesFast();
if (np == 0 )
fAmpt->GetN11());
fHeader->SetSpectators(fProjectileSpecn, fProjectileSpecp,
fTargetSpecn,fTargetSpecp);
- fHeader->SetReactionPlaneAngle(fAmpt->GetHINT1(20));
+ //fHeader->SetReactionPlaneAngle(fAmpt->GetHINT1(20));
+ fHeader->SetReactionPlaneAngle(fAmpt->GetReactionPlaneAngle());
//printf("Impact Parameter %13.3f \n", fAmpt->GetHINT1(19));
// 4-momentum vectors of the triggered jets.
fIat(208),
fIzt(82),
fBmin(0.),
- fBmax(5.)
+ fBmax(5.),
+ fPsi(0.)
{
// Default constructor
amptsetdef();
fIat(iat),
fIzt(izt),
fBmin(bmin),
- fBmax(bmax)
+ fBmax(bmax),
+ fPsi(0.)
{
// TAmpt constructor:
// Note that there may be only one functional TAmpt object
//Double_t vy = HBT.xlast[i][1]*1e-12;//mm
//Double_t vz = HBT.xlast[i][2]*1e-12;//mm
//Double_t vt = HBT.xlast[i][3]*1e-12;//mm/c
+
+ // Rotate xy components of vectors to new reaction plane:
+ Double_t pxp=TMath::Cos(fPsi)*px - TMath::Sin(fPsi)*py;
+ Double_t pyp=TMath::Sin(fPsi)*px + TMath::Cos(fPsi)*py;
+ Double_t vxp=TMath::Cos(fPsi)*vx - TMath::Sin(fPsi)*vy;
+ Double_t vyp=TMath::Sin(fPsi)*vx + TMath::Cos(fPsi)*vy;
+
Int_t pdg = invflv(HBT.lblast[i]);
TParticle *p = new TParticle(pdg,
status,
-1,
-1,
-1,
- px,
- py,
+ pxp,
+ pyp,
pz,
TMath::Sqrt(ma*ma+px*px+py*py+pz*pz),
- vx,
- vy,
+ vxp,
+ vyp,
vz,
vt);
if((px==0)&&(py==0)) {
Double_t py = HBT.plast[i][1];//GeV/c
Double_t pz = HBT.plast[i][2];//GeV/c
Double_t ma = HBT.plast[i][3];//GeV/c/c
-// Double_t vx = 0;//HBT.xlast[i][0]*1e-12;//mm
-// Double_t vy = 0;//HBT.xlast[i][1]*1e-12;//mm
-// Double_t vz = 0;//HBT.xlast[i][2]*1e-12;//mm
-// Double_t vt = 0;//HBT.xlast[i][3]*1e-12;//mm/c
- Double_t vx = HBT.xlast[i][0]*1e-12;//mm
- Double_t vy = HBT.xlast[i][1]*1e-12;//mm
- Double_t vz = HBT.xlast[i][2]*1e-12;//mm
- Double_t vt = HBT.xlast[i][3]*1e-12;//mm/c
+ Double_t vx = 0;//HBT.xlast[i][0]*1e-12;//mm
+ Double_t vy = 0;//HBT.xlast[i][1]*1e-12;//mm
+ Double_t vz = 0;//HBT.xlast[i][2]*1e-12;//mm
+ Double_t vt = 0;//HBT.xlast[i][3]*1e-12;//mm/c
+ //Double_t vx = HBT.xlast[i][0]*1e-12;//mm
+ //Double_t vy = HBT.xlast[i][1]*1e-12;//mm
+ //Double_t vz = HBT.xlast[i][2]*1e-12;//mm
+ //Double_t vt = HBT.xlast[i][3]*1e-12;//mm/c
+
+ // Rotate xy components of vectors to new reaction plane:
+ Double_t pxp=TMath::Cos(fPsi)*px - TMath::Sin(fPsi)*py;
+ Double_t pyp=TMath::Sin(fPsi)*px + TMath::Cos(fPsi)*py;
+ Double_t vxp=TMath::Cos(fPsi)*vx - TMath::Sin(fPsi)*vy;
+ Double_t vyp=TMath::Sin(fPsi)*vx + TMath::Cos(fPsi)*vy;
+
Int_t pdg = invflv(HBT.lblast[i]);
//printf("i %d pdg %d px %f py %f pz %f vx %f vy %f vz %f vt %f\n", i, pdg, px, py, pz, vx, vy, vz, vt);
new(particlesR[i]) TParticle(pdg,
-1,
-1,
-1,
- px,
- py,
+ pxp,
+ pyp,
pz,
TMath::Sqrt(ma*ma+px*px+py*py+pz*pz),
- vx,
- vy,
+ vxp,
+ vyp,
vz,
vt);
if((px==0)&&(py==0)){
Double_t x = HJCRDN.yp[i][0] + 0.5*GetBB();
Double_t y = HJCRDN.yp[i][1];
Double_t z = HJCRDN.yp[i][2];
+
+ // Rotate xy components of vectors to new reaction plane:
+ Double_t xp=TMath::Cos(fPsi)*x - TMath::Sin(fPsi)*y;
+ Double_t yp=TMath::Sin(fPsi)*x + TMath::Cos(fPsi)*y;
+
Int_t p = HSTRNG.nfp[3][i];
Int_t s = HSTRNG.nfp[4][i];
new(nucleonsR[i]) TParticle(p,
0,
0,
0,
- x,
- y,
+ xp,
+ yp,
z,
0);
nucleonsR[i]->SetUniqueID(1);
Double_t x = HJCRDN.yt[i][0] - 0.5*HPARNT.hint1[18];
Double_t y = HJCRDN.yt[i][1];
Double_t z = HJCRDN.yt[i][2];
+
+ // Rotate xy components of vectors to new reaction plane:
+ Double_t xp=TMath::Cos(fPsi)*x - TMath::Sin(fPsi)*y;
+ Double_t yp=TMath::Sin(fPsi)*x + TMath::Cos(fPsi)*y;
+
Int_t p = HSTRNG.nft[3][i];
Int_t s = HSTRNG.nft[4][i];
new(nucleonsR[nA+i]) TParticle(p,
0,
0,
0,
- x,
- y,
+ xp,
+ yp,
z,
0);
nucleonsR[nA+i]->SetUniqueID(-1);
virtual void SetXmu(Float_t m);
virtual void SetAlpha(Float_t alpha);
virtual void SetStringFrag(Float_t a, Float_t b);
+ virtual void SetReactionPlaneAngle(Double_t psi){fPsi=psi;}; // Set reaction plane angle
+ virtual Double_t GetReactionPlaneAngle(){return fPsi;}; // Get reaction plane angle
protected:
Double_t fEfrm; // Energy in the centre of mass (CMS) or lab-frame (LAB)
Int_t fIzt; // Charge number of target
Double_t fBmin; // Minimum impact parameter
Double_t fBmax; // Maximum impact parameter
-
- ClassDef(TAmpt,2) //Interface to Ampt Event Generator
+ Double_t fPsi; // Reaction plane angle
+ ClassDef(TAmpt,3) //Interface to Ampt Event Generator
};
#endif