// ------------------------------------------------------------------------- // ----- FairAsciiGenerator source file ----- // ----- Created 09/06/04 by V. Friese / D.Bertini ----- // ------------------------------------------------------------------------- #include "R3BAsciiUrQMDGen.h" #include "FairPrimaryGenerator.h" #include "TDatabasePDG.h" #include "TVirtualMC.h" #include "TMath.h" #include #include "TRandom2.h" using std::cout; using std::endl; // ----- Default constructor ------------------------------------------ R3BAsciiUrQMDGen::R3BAsciiUrQMDGen() : furqmd(NULL), fname("") { } //---------------------------------------------------------------------------- // ---------- Standard constructor --------------------------------------------- R3BAsciiUrQMDGen::R3BAsciiUrQMDGen(const char* filename) : furqmd(NULL), fname(filename) { char c[518]; furqmd =fopen(fname,"r"); if(fgets(c,200,furqmd )){;} cout<0.5){ innuc++; rmsx=rmsx+x[i]*x[i]; rmsy=rmsy+y[i]*y[i]; rmsz=rmsz+z[i]*z[i]; }//end on rms }//end on all particles //initialise event vectors sigx=rmsx/(1.0*innuc);//spread2 x sigy=rmsy/(1.0*innuc);//spread2 y sigz=rmsz/(1.0*innuc);//spread2 z //initialise cluster vectors for (j=0;j: Itype not specified in URQMD "<< imod[i]<<" taken as particle "<1&&nn[iclus[i]-1]==0)pdgID[iclus[i]-1]=0; }//end loop over all particles! for(k=0;k1){ // px_c[k]=pz_c[k]/nn[k]; // py_c[k]=py_c[k]/nn[k]; // pz_c[k]=pz_c[k]/nn[k]; //construct pdg code number for cluster pdgID[k]=1000000000 +10000*nz[k] +10*nn[k]; cout<<"nn= "<AddTrack(pdgID[k],p4tot[1][k],p4tot[2][k],p4tot[3][k],evx,evy,evz); }//end loop on clusters return kTRUE; }//end major if on event cout<<"end of file reached!"<