// ESAF : Euso Simulation and Analysis Framework
// $Id: MeteoriteGenerator.cc,v 1.7 2004/06/15 18:01:24 thea Exp $
// Alessandro Thea created Nov, 23 2003
#include "MeteoriteGenerator.hh"
#include "MeteoriteTrack.hh"
#include "MCTruth.hh"
ClassImp(MeteoriteGenerator)
// ctor
MeteoriteGenerator::MeteoriteGenerator(): EventGenerator("meteorite"), fTrack(0), fTruth(0) {
}
// dtor
MeteoriteGenerator::~MeteoriteGenerator() {
if(fTrack) delete fTrack;
if(fTruth) delete fTruth;
fTrack = 0;
fTruth = 0;
}
// get a new event
PhysicsData *MeteoriteGenerator::Get() {
if ( !fTrack )
fTrack = new MeteoriteTrack;
return fTrack;
}
// get pointer to MonteCarlo Truth
MCTruth *MeteoriteGenerator::GetTruth() {
if ( !fTruth ) {
fTruth = new MCTruth;
}
return fTruth;
}