/*
$Log$
+Revision 1.2 2001/03/28 07:31:48 hristov
+Loop variables declared only once (HP,Sun)
+
Revision 1.1 2001/03/24 10:04:44 morsch
MevSim interfaced through AliGenerator, first commit (Sylwester Radomski et al.)
-
+//Piotr Skowronski Line 104: fThetaMin-->fThetaMax
*/
//
//
fConfig = new AliMevSimConfig();
- fgMCEvGen = new TMevSim();
+ fMevSim = new TMevSim();
sRandom = fRandom;
}
AliGenMevSim::AliGenMevSim(AliMevSimConfig *config): AliGenerator(-1) {
fConfig = config;
- fgMCEvGen = new TMevSim();
+ fMevSim = new TMevSim();
sRandom = fRandom;
}
//
// Standard destructor
//
- if (fgMCEvGen) delete fgMCEvGen;
+ if (fMevSim) delete fMevSim;
}
//____________________________________________________________________________
void AliGenMevSim::SetConfig(AliMevSimConfig *config) {
//____________________________________________________________________________
void AliGenMevSim::AddParticleType(AliMevSimParticle *type) {
- ((TMevSim*)fgMCEvGen)->AddPartTypeParams((TMevSimPartTypeParams*)type);
+ fMevSim->AddPartTypeParams((TMevSimPartTypeParams*)type);
}
//____________________________________________________________________________
void AliGenMevSim::Init()
// fill data from AliMevSimConfig;
- TMevSim *mevsim = (TMevSim*)fgMCEvGen;
+ TMevSim *mevsim = fMevSim;
// geometry & momentum cut
mevsim->SetPhiCutRange( fPhiMin * 180 / TMath::Pi() , fPhiMax * 180 / TMath::Pi() );
if (TestBit(kThetaRange)) // from theta to eta
- mevsim->SetEtaCutRange( -TMath::Log( TMath::Tan(fThetaMin/2)) , - TMath::Log( TMath::Tan(fThetaMin/2)) );
-
+ {
+ mevsim->SetEtaCutRange( -TMath::Log( TMath::Tan(fThetaMax/2)) , -TMath::Log( TMath::Tan(fThetaMin/2)) );
+ }
// mevsim specyfic parameters
TClonesArray *particles = new TClonesArray("TParticle");
TParticle *particle;
- ((TMevSim*)fgMCEvGen)->GenerateEvent();
- nParticles = ((TMevSim*)fgMCEvGen)->ImportParticles(particles,"");
-
- cout << "Found " << nParticles << " particles ..." << endl;
+ fMevSim->GenerateEvent();
+ fNpart= fMevSim->ImportParticles(particles,"");
+ cout << "Found " << fNpart << " particles ..." << endl;
+ nParticles = fNpart;
for (i=0; i<nParticles; i++) {
p[1] = particle->Py();
p[2] = particle->Pz();
- gAlice->SetTrack(fTrackIt, parent, pdg, p, orgin, polar, time, kPPrimary, id);
+ SetTrack(fTrackIt, parent, pdg, p, orgin, polar, time, kPPrimary, id);
}