/*
$Log$
+Revision 1.30 2001/10/21 18:35:56 hristov
+Several pointers were set to zero in the default constructors to avoid memory management problems
+
Revision 1.29 2001/10/15 08:12:24 morsch
- Vertex smearing with truncated gaussian.
- Store triggered jet info before and after final state radiation into mc-heade
SetImpactParameterRange();
SetTarget();
SetProjectile();
+ SetBoostLHC();
fKeep = 0;
fQuench = 1;
fShadowing = 1;
fHijing->GenerateEvent();
fTrials++;
fHijing->ImportParticles(particles,"All");
+ if (fLHC) Boost(particles);
+
Int_t np = particles->GetEntriesFast();
printf("\n **************************************************%d\n",np);
Int_t nc = 0;
}
}
+
+void AliGenHijing::Boost(TClonesArray* particles)
+{
+//
+// Boost cms into LHC lab frame
+//
+ Double_t dy = - 0.5 * TMath::Log(Double_t(fZProjectile) * Double_t(fATarget) /
+ (Double_t(fZTarget) * Double_t(fAProjectile)));
+ Double_t beta = TMath::TanH(dy);
+ Double_t gamma = 1./TMath::Sqrt(1.-beta*beta);
+ Double_t gb = gamma * beta;
+
+ printf("\n Boosting particles to lab frame %f %f %f", dy, beta, gamma);
+
+ Int_t i;
+ Int_t np = particles->GetEntriesFast();
+ for (i = 0; i < np; i++)
+ {
+ TParticle* iparticle = (TParticle*) particles->At(i);
+
+ Double_t e = iparticle->Energy();
+ Double_t px = iparticle->Px();
+ Double_t py = iparticle->Py();
+ Double_t pz = iparticle->Pz();
+
+ Double_t eb = gamma * e - gb * pz;
+ Double_t pzb = -gb * e + gamma * pz;
+
+ iparticle->SetMomentum(px, py, pzb, eb);
+ }
+}
+
+
void AliGenHijing::MakeHeader()
{
// Builds the event header, to be called after each event
gAlice->SetGenEventHeader(header);
}
+
AliGenHijing& AliGenHijing::operator=(const AliGenHijing& rhs)
{
// Assignment operator
virtual void SetRadiation(Int_t flag=3) {fRadiation = flag;}
virtual void SetSpectators(Int_t spects=1) {fSpectators = spects;}
virtual void SetPtMinJet(Float_t ptmin) {fPtMinJet = ptmin;}
+ virtual void SetBoostLHC(Int_t flag=0) {fLHC = flag;}
+
+
AliGenHijing & operator=(const AliGenHijing & rhs);
// Physics Routines
virtual void EvaluateCrossSections();
+ virtual void Boost(TClonesArray* particles);
virtual TGraph* CrossSection() {return fDsigmaDb;}
virtual TGraph* BinaryCollisions() {return fDnDb;}
protected:
// ZDC proposal (by Chiara) to store num. of SPECTATORS protons and neutrons
Int_t fSpecn; // Num. of spectator neutrons
Int_t fSpecp; // Num. of spectator protons
-
+ Int_t fLHC; // Assume LHC as lab frame
+
private:
// adjust the weight from kinematic cuts
void AdjustWeights();