#include "TString.h" #include "TROOT.h" #include "TSystem.h" #include "TRandom.h" #include "TClonesArray.h" #include "TFile.h" #include "TTree.h" #include "TVector3.h" #include "TLorentzVector.h" #include "TDatabasePDG.h" #include "TParticlePDG.h" #include "TDecayChannel.h" #include #include #include #include #include #include #include #include #include #include using namespace std; #define WITHPLUTO // needed for option --pluto (decay the reconstructed mesons inline using PLUTO) #define VERSION 1.6 // 1.0 : initial commit to svn // 1.1 : added K0L K0_SS handling (50:50) // 1.2 : added reconstruction of rho,omega and phi mesons from decays products for external decay (PLUTO) // added convert UrQmd 14 files // added boost CM -> LAB // 1.3 : added decay of particle (PLUTO) , generic reaction build (leptons+hadrons)+ database input file // added geninfo, geninfo1, geninfo, weight to output (PLUTO to out put) // 1.4 : in case recoRho etc, check event after omega reco for remaining rho+- and remove them(putting org smash particles in place) // 1.5 : adding branching rations for weight calculations. added doSecondDecay option // 1.6 : -incSpec option (by default spectators are not not propagated to the output) //--------------------------------------------------------------------------------------------------------------- // helper structs + objects + conversion pid #include "pid_converters.h" #include "structs.h" #include "pid_converters_struct.h" //--------------------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------------------- // let pi0,eta,rho0,omega,phi inline decay with PLUTO #ifdef WITHPLUTO #include "pluto_decay.h" // InlineDecay Class + pointer : requires PLUTO #endif //--------------------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------------------- // event output + converters for UrQMD (f14), smash (ROOT,OSCAR13) #include "output.h" // event output format #include "convert_root.h" // convert smash ROOT file input #include "convert_urqmd.h" // convert UrQMD f14 file input #include "convert_oscar13.h" // convert smash OSCAR13 input //--------------------------------------------------------------------------------------------------------------- Int_t convert() { if(gSystem->AccessPathName(obj.input.Data())){ cerr<<"ERROR: input file : "<AccessPathName(gSystem->DirName(obj.output.Data()))){ cerr<<"ERROR: output dir : "<DirName(obj.output.Data())<<" not found!"<Branch("Particles", &obj.PLUTO_evt ,32000,99); obj.PLUTO_tree->Branch("Npart", &obj.PLUTO_npart , "Npart/I"); obj.PLUTO_tree->Branch("Impact", &obj.PLUTO_impact , "Impact/D"); obj.PLUTO_tree->Branch("Phi", &obj.PLUTO_evtplane, "Phi/D"); #endif } if(obj.input.EndsWith(".root")){ // only availbale for smash cerr<<"input file is in smash root format!"<Write(); obj.PLUTO_out -> Save(); obj.PLUTO_out -> Close(); #endif } obj.mDecay.printDecayMap(obj.PDG); return ret; } else if ( l.Contains("UQMD") && l.Contains("output_file 14")) { cerr<<"input file is in UQMD f14 format!"<initReactions(); } else inlineDecay = 0; #endif obj.evt.eBeam = -1.0; // for the moment obj.debug = params.verbose_flag; obj.input = params.infile; obj.output = params.outfile; obj.nEvts = params.nevents; obj.init(); //--------------------------------------------------------------------------------- // analyze the boostOption string if(params.doBoost == 1) { obj.evt.eBeam = params.boostConfig.Atof(); obj.evt.beta = obj.evt.calcBeta(obj.evt.eBeam); obj.evt.gamma = obj.evt.calcGamma(obj.evt.beta); cout<<"----------------------------------------------"< LAB"< pi+ p- 420807 100005 100003"< dipleton[e+,e-],g 75101 7501(e+,e-) or 7(g) 1"<