#include <TDatabasePDG.h>
#include <TParticle.h>
#include <TClonesArray.h>
+#include <TClass.h>
ReadPar *sRPInstance;
STR sRPFileName;
fPartDB = new ParticleDB();
}
TTherminator::TTherminator(const TTherminator & therm) :
- TGenerator(therm),
+ TGenerator(therm),
fCalka(0),
fEvent(0),
fPartDB(0)
{
// Copy constructor
+ // fPartDB = new ParticleDB();
+ if (fCalka) delete fCalka;
+ fCalka = new Integrator(*therm.fCalka);
+ if (fEvent) delete fEvent;
+ fEvent = new Event(*therm.fEvent);
+ if (fPartDB) delete fPartDB;
fPartDB = new ParticleDB();
}
+TTherminator& TTherminator::operator=(const TTherminator & therm)
+{
+ if (this != &therm) {
+ fCalka = therm.fCalka;
+ fEvent = therm.fEvent;
+ delete fPartDB;
+ fPartDB = new ParticleDB();
+ }
+
+ return *this;
+}
+
TTherminator::~TTherminator()
{
// Destructor
}
in.close();
}
+
+ delete tParser;
}
void TTherminator::GenerateEvent()
Int_t nump = 0;
if (!fEvent) return 0;
Int_t numpart = fEvent->GetParticleCount();
- printf("\n TTherminator: Therminator stack contains %d particles.", numpart);
+ printf("\n TTherminator: Therminator stack contains %d particles.\n", numpart);
for (Int_t iPart=0; iPart<numpart; iPart++) {
Particle *tPart = fEvent->GetParticleOfCount(iPart);
Int_t tFather;
nump++;
// printf("Putting %d %d %lf %d\n", tPart->GetParticleType()->GetPDGCode(), iPart, tPart->px, tPart);
new (particlesR[iPart]) TParticle(tPart->GetParticleType()->GetPDGCode(), tPart->HadDecayed(),
- tFather, -1, -1, -1,
- tPart->px, tPart->py, tPart->pz, tPart->GetEnergy() ,
- tPart->rx*1.e-13*kFmToGev, tPart->ry*1.e-13*kFmToGev, tPart->rz*1.e-13*kFmToGev, tPart->rt*1.e-13*kFmToGev/3e10);
+ tFather, -1, -1, -1,
+ tPart->px, tPart->py, tPart->pz, tPart->GetEnergy() ,
+ tPart->rx*1.e-13*kFmToGev, tPart->ry*1.e-13*kFmToGev, tPart->rz*1.e-13*kFmToGev, tPart->rt*1.e-13*kFmToGev/3e10);
particlesR[iPart]->SetUniqueID(iPart);
}