fXingAngleY(0.),
fForceDecay(kAll),
fMaxLifeTime(1.e-15),
- fAProjectile(1),
- fZProjectile(1),
- fATarget(1),
- fZTarget(1),
- fProjectile("P"),
- fTarget("P"),
fDyBoost(0.),
fGeometryAcceptance(0),
fPdgCodeParticleforAcceptanceCut(0),
fNumberOfAcceptedParticles(0),
- fNprimaries(0),
- fEnergyCMS(0)
+ fNprimaries(0)
{
// Default Constructor
+ fAProjectile = 1;
+ fZProjectile = 1;
+ fATarget = 1;
+ fZTarget = 1;
+ fProjectile = "P";
+ fTarget = "P";
}
AliGenMC::AliGenMC(Int_t npart)
fXingAngleY(0.),
fForceDecay(kAll),
fMaxLifeTime(1.e-15),
- fAProjectile(1),
- fZProjectile(1),
- fATarget(1),
- fZTarget(1),
- fProjectile("P"),
- fTarget("P"),
fDyBoost(0.),
fGeometryAcceptance(0),
fPdgCodeParticleforAcceptanceCut(0),
fNumberOfAcceptedParticles(0),
- fNprimaries(0),
- fEnergyCMS(0)
+ fNprimaries(0)
{
// Constructor
//
- for (Int_t i=0; i<8; i++) fParentSelect[i]=fChildSelect[i]=0;
+ fAProjectile = 1;
+ fZProjectile = 1;
+ fATarget = 1;
+ fZTarget = 1;
+ fProjectile = "P";
+ fTarget = "P";
+ for (Int_t i=0; i<8; i++) fParentSelect[i]=fChildSelect[i]=0;
}
AliGenMC::~AliGenMC()
virtual void SetCrossingAngle(Float_t phiX, Float_t phiY) {fXingAngleX = phiX; fXingAngleY = phiY;}
virtual void Boost();
virtual void AddHeader(AliGenEventHeader* header);
- virtual void GetProjectile(TString& tar, Int_t& a, Int_t& z) const
- {tar = fProjectile; a = fAProjectile; z = fZProjectile;}
- virtual void GetTarget(TString& tar, Int_t& a, Int_t& z) const
- {tar = fTarget; a = fATarget; z = fZTarget;}
- virtual Float_t GetEnergyCMS() const { return fEnergyCMS; }
protected:
// check if particle is selected as parent particle
Float_t fXingAngleY; // Crossing angle Y
Decay_t fForceDecay; // Decay channel forced
Float_t fMaxLifeTime; // Maximum lifetime for unstable particles
- Int_t fAProjectile; // Projectile A
- Int_t fZProjectile; // Projectile Z
- Int_t fATarget; // Target A
- Int_t fZTarget; // Target Z
- TString fProjectile; // Projectile
- TString fTarget; // Target
Double_t fDyBoost; // dy for boost into lab frame
AliGeometry* fGeometryAcceptance; // Geometry to which particles must be simulated
Int_t fPdgCodeParticleforAcceptanceCut; // Abs(PDG Code) of the particle to which the GeometryAcceptance must be applied
Int_t fNumberOfAcceptedParticles; // Number of accepted particles in GeometryAcceptance with the right Abs(PdgCode)
Int_t fNprimaries; // Number of produced and stored particles
- Float_t fEnergyCMS; //Centre of mass energy
+
private:
AliGenMC(const AliGenMC &MC);
AliGenMC & operator=(const AliGenMC & rhs);
- ClassDef(AliGenMC,6) // AliGenerator implementation for generators using MC methods
+ ClassDef(AliGenMC,7) // AliGenerator implementation for generators using MC methods
};
#endif
{
// Default Constructor
- SetEnergyCMS(5500.);
+ fEnergyCMS = 5500.;
SetNuclei(0,0);
if (!AliPythiaRndm::GetPythiaRandom())
AliPythiaRndm::SetPythiaRandom(GetRandom());
// semimuonic decay
// structure function GRVHO
//
- SetEnergyCMS(5500.);
+ fEnergyCMS = 5500.;
fName = "Pythia";
fTitle= "Particle Generator using PYTHIA";
SetForceDecay();
{
// Default Constructor
- SetEnergyCMS(5500.);
+ fEnergyCMS = 5500.;
SetNuclei(0,0);
if (!AliPythiaRndm::GetPythiaRandom())
AliPythiaRndm::SetPythiaRandom(GetRandom());
// semimuonic decay
// structure function GRVHO
//
- SetEnergyCMS(5500.);
+ fEnergyCMS = 5500.;
fName = "Pythia";
fTitle= "Particle Generator using PYTHIA";
SetForceDecay();
fVertex(3),
fStack(0),
fContainer(0),
- fCollisionGeometry(0)
+ fCollisionGeometry(0),
+ fEnergyCMS(0),
+ fAProjectile(0),
+ fZProjectile(0),
+ fATarget(0),
+ fZTarget(0),
+ fProjectile(""),
+ fTarget("")
{
//
// Default constructor
fVertex(3),
fStack(0),
fContainer(0),
- fCollisionGeometry(0)
+ fCollisionGeometry(0),
+ fEnergyCMS(0),
+ fAProjectile(0),
+ fZProjectile(0),
+ fATarget(0),
+ fZTarget(0),
+ fProjectile(""),
+ fTarget("")
{
//
// Standard constructor
{
public:
+
AliGenerator();
AliGenerator(Int_t npart);
virtual ~AliGenerator();
virtual Bool_t NeedsCollisionGeometry() const {return kFALSE;}
virtual AliCollisionGeometry* CollisionGeometry() const {return fCollisionGeometry;}
virtual void SetCollisionGeometry(AliCollisionGeometry* geom) {fCollisionGeometry = geom;}
+
+ virtual Float_t GetEnergyCMS() const { return fEnergyCMS; }
+ virtual void SetEnergyCMS(Float_t energy = 0) { fEnergyCMS = energy; }
+ virtual void GetProjectile(TString& tar, Int_t& a, Int_t& z) const
+ {tar = fProjectile; a = fAProjectile; z = fZProjectile;}
+ virtual void GetTarget(TString& tar, Int_t& a, Int_t& z) const
+ {tar = fTarget; a = fATarget; z = fZTarget;}
+ virtual void SetProjectile(TString proj="", Int_t a = 0, Int_t z = 0)
+ {fProjectile = proj; fAProjectile = a; fZProjectile = z;}
+ virtual void SetTarget(TString tar="", Int_t a = 0, Int_t z = 0)
+ {fTarget = tar; fATarget = a; fZTarget = z;}
+
protected:
virtual void PushTrack(Int_t done, Int_t parent, Int_t pdg,
Float_t *pmom, Float_t *vpos, Float_t *polar,
TMCProcess mech, Int_t &ntr, Float_t weight = 1, Int_t is = 0);
virtual void KeepTrack(Int_t itrack);
virtual void SetHighWaterMark(Int_t nt);
-
+
protected:
TGenerator* fMCEvGen; //!Pointer to the generator
Float_t fThetaMin; //Minimum theta of generation in radians
kMomentumRange = BIT(19)
};
+ Float_t fEnergyCMS; // Centre of mass energy
+ Int_t fAProjectile; // Projectile A
+ Int_t fZProjectile; // Projectile Z
+ Int_t fATarget; // Target A
+ Int_t fZTarget; // Target Z
+ TString fProjectile; // Projectile
+ TString fTarget; // Target
+
private:
AliGenerator(const AliGenerator &gen);
AliGenerator & operator=(const AliGenerator &gen);
- ClassDef(AliGenerator,3) // Base class for event generators
+ ClassDef(AliGenerator,4) // Base class for event generators
};
#endif
#include "AliHLTSimulation.h"
#include "AliQADataMakerSteer.h"
#include "AliSysInfo.h"
-#include "AliGenMC.h"
#include "AliMagF.h"
ClassImp(AliSimulation)
grpMap->Add(new TObjString("fAliceStartTime"),new TObjString("0"));
grpMap->Add(new TObjString("fAliceStopTime"),new TObjString("9999"));
- const AliGenMC *gen = static_cast<const AliGenMC*>(gAlice->Generator());
+ const AliGenerator *gen = gAlice->Generator();
if (gen) {
grpMap->Add(new TObjString("fAliceBeamEnergy"),new TObjString(Form("%f",gen->GetEnergyCMS())));
TString projectile;
TString target;
gen->GetTarget(target,a,z);
TString beamType = projectile + "-" + target;
- grpMap->Add(new TObjString("fAliceBeamType"),new TObjString(beamType.Data()));
+ if (!beamType.CompareTo("-")) {
+ grpMap->Add(new TObjString("fAliceBeamType"),new TObjString("UNKNOWN"));
+ }
+ else {
+ grpMap->Add(new TObjString("fAliceBeamType"),new TObjString(beamType.Data()));
+ }
}
else {
AliWarning("Unknown beam type and energy!");
grpMap->Add(new TObjString("fAliceBeamEnergy"),new TObjString("UNKNOWN"));
- grpMap->Add(new TObjString("fAliceBeamType"),new TObjString("UNKNOWN"));
+ grpMap->Add(new TObjString("fAliceBeamType"),new TObjString("0"));
}
UInt_t detectorPattern = 0;
AliCDBId id("GRP/GRP/Data", man->GetRun(), man->GetRun());
AliCDBMetaData *metadata= new AliCDBMetaData();
- // Get root version
- const char* rootv = gROOT->GetVersion();
metadata->SetResponsible("alice-off@cern.ch");
metadata->SetComment("Automatically produced GRP entry for Monte Carlo");
fProcess(kDpmMb)
{
// Constructor
- SetEnergyCMS(5500.);
+ fEnergyCMS = 5500.;
AliDpmJetRndm::SetDpmJetRandom(GetRandom());
}
{
// Default PbPb collisions at 5. 5 TeV
//
- SetEnergyCMS(5500.);
+ fEnergyCMS = 5500.;
fName = "DPMJET";
fTitle= "Particle Generator using DPMJET";
SetTarget();
fProcess(kDpmMb)
{
// Dummy copy constructor
- SetEnergyCMS(5500.);
+ fEnergyCMS = 5500.;
}
//______________________________________________________________________________
fNoHeavyQuarks(kFALSE)
{
// Constructor
- SetEnergyCMS(5500.);
+ fEnergyCMS = 5500.;
AliHijingRndm::SetHijingRandom(GetRandom());
}
{
// Default PbPb collisions at 5. 5 TeV
//
- SetEnergyCMS(5500.);
+ fEnergyCMS = 5500.;
fName = "Hijing";
fTitle= "Particle Generator using HIJING";
//
AliGenHydjet::AliGenHydjet(Int_t npart) :
AliGenMC(npart),
//initial parameters
- fEnergyCMS(5500.), //Energy cms
fFrame("CMS"), // Reference frame
fAtomicWeigth(207), // Projectile-Target atomic weight
fIfbtype(0), // centrality type
{
// Default PbPb collisions at 5. 5 TeV
//
+ fEnergyCMS = 5500.; //Energy cms
fName = "Hydjet";
fTitle = "Particle Generator using Hydjet";
// Set random number generator