#include "AliRun.h"
#include "AliDpmJetRndm.h"
- ClassImp(AliGenDPMjet)
-
+ClassImp(AliGenDPMjet)
//______________________________________________________________________________
AliGenDPMjet::AliGenDPMjet()
- :AliGenMC()
+ :AliGenMC(),
+ fBeamEn(2750.),
+ fEnergyCMS(5500.),
+ fMinImpactParam(0.),
+ fMaxImpactParam(5.),
+ fICentr(0),
+ fSelectAll(0),
+ fFlavor(0),
+ fTrials(0),
+ fSpectators(1),
+ fSpecn(0),
+ fSpecp(0),
+ fDPMjet(0),
+ fParticles(0),
+ fNoGammas(0),
+ fLHC(0),
+ fPi0Decay(0),
+ fGenImpPar(0.),
+ fProcess(kDpmMb)
{
// Constructor
- fParticles = 0;
- fDPMjet = 0;
AliDpmJetRndm::SetDpmJetRandom(GetRandom());
}
//______________________________________________________________________________
AliGenDPMjet::AliGenDPMjet(Int_t npart)
- :AliGenMC(npart)
+ :AliGenMC(npart),
+ fBeamEn(2750.),
+ fEnergyCMS(5500.),
+ fMinImpactParam(0.),
+ fMaxImpactParam(5.),
+ fICentr(0),
+ fSelectAll(0),
+ fFlavor(0),
+ fTrials(0),
+ fSpectators(1),
+ fSpecn(0),
+ fSpecp(0),
+ fDPMjet(0),
+ fParticles(new TClonesArray("TParticle",10000)),
+ fNoGammas(0),
+ fLHC(0),
+ fPi0Decay(0),
+ fGenImpPar(0.),
+ fProcess(kDpmMb)
{
// Default PbPb collisions at 5. 5 TeV
//
fName = "DPMJET";
fTitle= "Particle Generator using DPMJET";
-
- SetEnergyCMS();
SetTarget();
SetProjectile();
- SetCentral();
- SetImpactParameterRange();
- SetBoostLHC();
-
- fKeep = 0;
- fDecaysOff = 1;
- fEvaluate = 0;
- fSelectAll = 0;
- fFlavor = 0;
- fSpectators = 1;
fVertex.Set(3);
-
- fParticles = new TClonesArray("TParticle",10000);
-
- // Set random number generator
- fDPMjet = 0;
// Instance AliPythia
AliPythia::Instance();
AliDpmJetRndm::SetDpmJetRandom(GetRandom());
}
AliGenDPMjet::AliGenDPMjet(const AliGenDPMjet &/*Dpmjet*/)
-:AliGenMC()
+ :AliGenMC(),
+ fBeamEn(2750.),
+ fEnergyCMS(5500.),
+ fMinImpactParam(0.),
+ fMaxImpactParam(5.),
+ fICentr(0),
+ fSelectAll(0),
+ fFlavor(0),
+ fTrials(0),
+ fSpectators(1),
+ fSpecn(0),
+ fSpecp(0),
+ fDPMjet(0),
+ fParticles(0),
+ fNoGammas(0),
+ fLHC(0),
+ fPi0Decay(0),
+ fGenImpPar(0.),
+ fProcess(kDpmMb)
{
+ // Dummy copy constructor
}
//______________________________________________________________________________
// Destructor
delete fParticles;
}
-
-
//______________________________________________________________________________
void AliGenDPMjet::Init()
{
fDPMjet->SetfFCentr(fICentr);
fDPMjet->SetbRange(fMinImpactParam, fMaxImpactParam);
-
+ fDPMjet->SetPi0Decay(fPi0Decay);
//
// Initialize DPMjet
//
SetHighWaterMark(nt);
}
-
-//______________________________________________________________________________
-void AliGenDPMjet::KeepFullEvent()
-{
- fKeep=1;
-}
-
-
-//______________________________________________________________________________
-/*void AliGenDPMjet::EvaluateCrossSections()
-{
-// Glauber Calculation of geometrical x-section
-//
- Float_t xTot = 0.; // barn
- Float_t xTotHard = 0.; // barn
- Float_t xPart = 0.; // barn
- Float_t xPartHard = 0.; // barn
- Float_t sigmaHard = 0.1; // mbarn
- Float_t bMin = 0.;
- Float_t bMax = fDPMjet->GetProjRadius()+fDPMjet->GetTargRadius();
- const Float_t kdib = 0.2;
- Int_t kMax = Int_t((bMax-bMin)/kdib)+1;
-
-
- printf("\n Projectile Radius (fm): %f \n",fDPMjet->GetProjRadius());
- printf("\n Target Radius (fm): %f \n",fDPMjet->GetTargRadius());
- Int_t i;
- Float_t oldvalue= 0.;
-
- Float_t* b = new Float_t[kMax];
- Float_t* si1 = new Float_t[kMax];
- Float_t* si2 = new Float_t[kMax];
-
- for (i = 0; i < kMax; i++)
- {
- Float_t xb = bMin+i*kdib;
- Float_t ov;
- ov=fDPMjet->Profile(xb);
- // ATT!->Manca la x-sec anel. nucleone-nucleone
- Float_t gb = 2.*0.01*fDPMjet->TMath::Pi()*kdib*xb*(1.-TMath::Exp(-fDPMjet->GetXSFrac()*ov));
- Float_t gbh = 2.*0.01*fDPMjet->TMath::Pi()*kdib*xb*sigmaHard*ov;
- xTot+=gb;
- xTotHard += gbh;
- if (xb > fMinImpactParam && xb < fMaxImpactParam)
- {
- xPart += gb;
- xPartHard += gbh;
- }
-
- if(oldvalue) if ((xTot-oldvalue)/oldvalue<0.0001) break;
- oldvalue = xTot;
- printf("\n Total cross section (barn): %d %f %f \n",i, xb, xTot);
- printf("\n Hard cross section (barn): %d %f %f \n\n",i, xb, xTotHard);
- if (i>0) {
- si1[i] = gb/kdib;
- si2[i] = gbh/gb;
- b[i] = xb;
- }
- }
-
- printf("\n Total cross section (barn): %f \n",xTot);
- printf("\n Hard cross section (barn): %f \n \n",xTotHard);
- printf("\n Partial cross section (barn): %f %f \n",xPart, xPart/xTot*100.);
- printf("\n Partial hard cross section (barn): %f %f \n",xPartHard, xPartHard/xTotHard*100.);
-
-// Store result as a graph
- b[0] = 0;
- si1[0] = 0;
- si2[0]=si2[1];
-
- fDsigmaDb = new TGraph(i, b, si1);
- fDnDb = new TGraph(i, b, si2);
-}*/
-
-
//______________________________________________________________________________
Bool_t AliGenDPMjet::DaughtersSelection(TParticle* iparticle)
{
{fMinImpactParam=bmin; fMaxImpactParam=bmax;}
virtual void SetProcess(DpmProcess_t iproc) {fProcess = iproc;}
virtual void SetCentral(Int_t icentr=-2) {fICentr = icentr;}
- virtual void KeepFullEvent();
- virtual void SetDecaysOff(Int_t flag=1) {fDecaysOff = flag;}
virtual void SetFlavor(Int_t flag=0) {fFlavor = flag;}
- virtual void SetEvaluate(Int_t flag=0) {fEvaluate = flag;}
virtual void SetSelectAll(Int_t flag=0) {fSelectAll = flag;}
virtual void SetSpectators(Int_t spects=1) {fSpectators = spects;}
virtual void SetBoostLHC(Int_t flag=0) {fLHC = flag;}
-
+ virtual void SetPi0Decay(Int_t iPi0) {fPi0Decay = iPi0;}
virtual Float_t GetEnergyCMS() {return fEnergyCMS;}
virtual void GetProjectile(Int_t& a, Int_t& z)
{a = fAProjectile; z = fZProjectile;}
Float_t fMinImpactParam; // minimum impact parameter
Float_t fMaxImpactParam; // maximum impact parameter
Int_t fICentr; // Flag to force central production
- Float_t fCrossSec; // Fraction of x-section
- Int_t fKeep; // Flag to keep full event information
- Int_t fDecaysOff; // Flag to turn off decays of pi0, K_s, D, Lambda, sigma
- Int_t fEvaluate; // Evaluate total and partial cross-sections
Int_t fSelectAll; // Flag to write the full event
Int_t fFlavor; // Selected particle flavor 4: charm+beauty 5: beauty
Int_t fTrials; // Number of trials
- TArrayI fParentSelect; // Parent particles to be selected
- TArrayI fChildSelect; // Decay products to be selected
- Float_t fXsection; // Cross-section
Int_t fSpectators; // put spectators on stack
Int_t fSpecn; // Num. of spectator neutrons
Int_t fSpecp; // Num. of spectator protons
TDPMjet *fDPMjet; // DPMjet
- TGraph* fDsigmaDb; // dSigma/db for the system
- TGraph* fDnDb; // dNBinaryCollisions/db
TClonesArray *fParticles; // Particle List
Int_t fNoGammas; // Don't write gammas if flag "on"
Int_t fLHC; // Assume LHC as lab frame
- // Temporaneo!
+ Int_t fPi0Decay; // Flag for pi0 decays
Float_t fGenImpPar; // GeneratedImpactParameter
DpmProcess_t fProcess; // Process type
ClassImp(TDPMjet)
+
//______________________________________________________________________________
-TDPMjet::TDPMjet() : TGenerator("dpmjet","dpmjet")
+ TDPMjet::TDPMjet() :
+ TGenerator("dpmjet","dpmjet"),
+ fNEvent(0),
+ fIp(0),
+ fIpz(0),
+ fIt(0),
+ fItz(0),
+ fEpn(0.),
+ fPpn(0.),
+ fCMEn(0.),
+ fIdp(0),
+ fBmin(0.),
+ fBmax(0.),
+ fFCentr(0),
+ fPi0Decay(0),
+ fProcess(kDpmMb)
{
- fNEvent = 0;
- fIp = 0;
- fIpz = 0;
- fIt = 0;
- fItz = 0;
- fEpn = 0;
- fCMEn = 0;
- fIdp = 0;
- fProcess = kDpmMb;
+// Default Constructor
}
//______________________________________________________________________________
TDPMjet::TDPMjet(DpmProcess_t iproc, Int_t Ip=208, Int_t Ipz=82, Int_t It=208, Int_t Itz=82,
- Double_t Epn=2700., Double_t CMEn=5400.)
- : TGenerator("dpmjet","dpmjet")
+ Double_t Epn=2700., Double_t CMEn=5400.)
+ : TGenerator("dpmjet","dpmjet"),
+ fNEvent(0),
+ fIp(Ip),
+ fIpz(Ipz),
+ fIt(It),
+ fItz(Itz),
+ fEpn(Epn),
+ fCMEn(CMEn),
+ fIdp(0),
+ fBmin(0.),
+ fBmax(0.),
+ fFCentr(0),
+ fPi0Decay(0),
+ fProcess(iproc)
{
printf("TDPMJet Constructor %d %d %d %d \n", Ip, Ipz, It, Itz);
-
- fNEvent = 0;
- fIp = Ip;
- fIpz = Ipz;
- fIt = It;
- fItz = Itz;
- fEpn = Epn;
- fCMEn = CMEn;
- fIdp = 0;
- fProcess = iproc;
}
fprintf(out, "BEAM %10.1f%10.1f%10.1f%10.1f%10.1f%10.1f\n",fEpn, fEpn, 0., 0., 0., 0.);
// Centrality
fprintf(out, "CENTRAL %10.1f%10.1f%10.1f%10.1f%10.1f%10.1f\n",-1., fBmin, fBmax, 0., 0., 0.);
-
+// Particle decays
+ if (fPi0Decay)
+ fprintf(out, "PARDECAY %10.1f%10.1f%10.1f%10.1f%10.1f%10.1f\n", 2., 0., 0., 0., 0., 0.);
//
// PHOJET specific
fprintf(out, "PHOINPUT\n");
virtual void SetbRange(Double_t bmin, Double_t bmax)
{fBmin = bmin; fBmax = bmax;}
virtual Double_t GetMinImpactParameter() const {return fBmin;}
- virtual Double_t GetMaxImpactParameter() const {return fBmax;}
-
+ virtual Double_t GetMaxImpactParameter() const {return fBmax;}
+
virtual void SetfFCentr(Int_t icentr) {fFCentr = icentr;}
virtual Int_t GetfFCentr() const {return fFCentr;}
+ virtual void SetPi0Decay(Int_t iPi0) {fPi0Decay = iPi0;}
+
+
// Access to DPMJET common blocks:
virtual Int_t GetEvNum() const;
virtual Int_t GetEntriesNum() const;
Float_t fBmin; // Minimum impact parameter
Float_t fBmax; // Maximum impact parameter
Int_t fFCentr; // Flag to force central collisions
+ Int_t fPi0Decay;// Flag for pi0 decays
DpmProcess_t fProcess; // Process type
ClassDef(TDPMjet,2) //Interface to DPMJET Event Generator
#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
-
+
+#pragma link C++ enum DpmProcess_t;
#pragma link C++ class TDPMjet+;
#pragma link C++ class AliGenDPMjet+;
#pragma link C++ class AliGenDPMjetEventHeader+;