-/*
- *###################################################################
- *# EPOS 1.67 K. WERNER, T. PIEROG, S. PORTEBOEUF. #
- *# Contact: werner@subatech.in2p3.fr #
- *###################################################################
- *
- * TEpos.cxx
- *
- * Wraper class for interfacing EPOS model, derived from ROOT's TGenerator.
- * It generates temporary input file for the model, providing user with
- * ability to add his/hers own lines to the input.
- * Output is read directly from common blocks.
- *
- * Author: Piotr Ostrowski, postrow@if.pw.edu.pl
- */
+//
+//###################################################################
+//# EPOS 1.67 K. WERNER, T. PIEROG, S. PORTEBOEUF. #
+//# Contact: werner@subatech.in2p3.fr #
+//###################################################################
+//
+// TEpos.cxx
+//
+// Wraper class for interfacing EPOS model, derived from ROOT's TGenerator.
+// It generates temporary input file for the model, providing user with
+// ability to add his/hers own lines to the input.
+// Output is read directly from common blocks.
+//
+// Author: Piotr Ostrowski, postrow@if.pw.edu.pl
+//
#include <TClonesArray.h>
delete fIdConverter;
}
-TEpos& TEpos::operator=(const TEpos&) {
- if (!fIdConverter) {
- fIdConverter = new AliGenEposIsajetToPdgConverter();
- }
- return *this;
+TEpos& TEpos::operator=(const TEpos& epos) {
+ //operator=
+ if (this != &epos) {
+ if (fIdConverter) {
+ delete fIdConverter;
+ fIdConverter = new AliGenEposIsajetToPdgConverter(*epos.fIdConverter);
+ } else{
+ fIdConverter = 0;
+ }
+ fLaproj = epos.fLaproj;
+ fMaproj = epos.fMaproj;
+ fLatarg = epos.fLatarg;
+ fMatarg = epos.fMatarg;
+ fBminim = epos.fBminim;
+ fBmaxim = epos.fBmaxim;
+ fPhimin = epos.fPhimin;
+ fPhimax = epos.fPhimax;
+ fEcms = epos.fEcms;
+ fSplitting = epos.fSplitting;
+ for(UInt_t i = 0; i < epos.fNoDecays.size(); ++i) {
+ fNoDecays.push_back(epos.fNoDecays[i]);
+ }
+ for(UInt_t i = 0; i < epos.fExtraInputLines.size(); ++i) {
+ fExtraInputLines.push_back(epos.fExtraInputLines[i]);
+ }
+ }
+ return *this;
}
void TEpos::Initialize() {
+ // Generates input file and prepares EPOS to read from it.
Int_t nopeno = 0;
GenerateInputFile();
aaset(0);
}
Int_t TEpos::ImportParticles(TClonesArray *particles, Option_t *) {
+ //Fills provided ClonesArray with generated particles
particles->Clear();
if (!cevt.nevt) return 0;
Int_t numpart = cptl.nptl;
}
TObjArray* TEpos::ImportParticles(Option_t *) {
+ //Creates new particle array
fParticles->Clear();
if (!cevt.nevt) return NULL;
Int_t numpart = cptl.nptl;
}
void TEpos::GenerateInputFile() {
+ // Generate input file in EPOS format
ofstream file(GetInputFileName(), ios_base::out | ios_base::trunc);
char epo[256];
char *epoEnv = getenv("EPO");
if (epoEnv) {
- strcpy(epo, epoEnv);
+ strncpy(epo, epoEnv, 255);
} else {
- strcpy(epo, getenv("ALICE_ROOT"));
+ strncpy(epo, getenv("ALICE_ROOT"), 255);
}
- strcat(epo, "/EPOS/epos167");
+ strncat(epo, "/EPOS/epos167", 255);
file << "fname pathnx " << epo << "/" << endl;
file << "fname histo none" << endl;