#include "PHASIC++/Channels/FSR_Channels.H" #include "PHASIC++/Main/Phase_Space_Handler.H" #include "PHASIC++/Main/Process_Integrator.H" #include "PHASIC++/Channels/Channel_Generator.H" #include "PHASIC++/Process/ME_Generator_Base.H" #include "ATOOLS/Org/Library_Loader.H" #include "ATOOLS/Org/Run_Parameter.H" #include "ATOOLS/Org/Scoped_Settings.H" #include "ATOOLS/Org/Data_Reader.H" using namespace PHASIC; using namespace ATOOLS; bool FSR_Channels::Initialize() { Settings& s = Settings::GetMainSettings(); std::vector inttypes{ s["INTEGRATOR"].SetDefault("Default").GetVector() }; if (p_psh->Process()->Process()->Info().m_integrator!="") { Data_Reader reader(" ", ";", "#", "="); reader.AddComment("!"); reader.AddWordSeparator("\t"); reader.SetString(p_psh->Process()->Process()->Info().m_integrator); reader.VectorFromString(inttypes, ""); } nin=p_psh->Process()->NIn(); nout=p_psh->Process()->NOut(); int sintegrator=0; for (size_t i(0);iProcess()->Process(),this)); if (cg==NULL) { s_loader->AddPath(rpa->gen.Variable("SHERPA_LIB_PATH")); if (s_loader->LoadLibrary("Proc_"+inttypes[i])) { cg=Channel_Generator::Getter_Function::GetObject (inttypes[i],Channel_Generator_Key (inttypes[i],p_psh->Process()->Process(),this)); } if (cg==NULL) { THROW(fatal_error,"Channel generator '" +inttypes[i]+"' not found."); } } sintegrator|=cg->GenerateChannels(); delete cg; } if (!p_psh->Process()->Process()->InitIntegrator(p_psh)) THROW(critical_error,"InitIntegrator failed"); return sintegrator; } void FSR_Channels::DropRedundantChannels() { Reset(); int number = Number(); if (number<2) return; int *marker = new int[number]; for (short int i=0;iGet(); // Init markers for deletion and results to compare. double * res = new double[number]; for (short int i=0;igen.Ecms()/2.,0.,0.,rpa->gen.Ecms()/2.); perm_vec[i][1] = Vec4D(rpa->gen.Ecms()/2.,0.,0.,-rpa->gen.Ecms()/2.); p_fsrchannels->GeneratePoint(i,perm_vec[i],p_process->Cuts(),rans); p_fsrchannels->GenerateWeight(i,perm_vec[i],p_process->Cuts()); res[i] = p_fsrchannels->Weight(); if (res[i]==0.) marker[i] = 1; } delete[] rans;*/ // kick identicals & permutations for (short int i=0;iCountResonances(i,fl_res); if (reson[i]!=0) { //shorten int hit = 0; for (short int j=0;jycut*sqr(rpa->gen.Ecms()) && sqr(fl_res[j].Mass())gen.Ecms())) hit++; } reson[i] = hit; if (reson[i]>max_reson) max_reson = reson[i]; } else reson[i] = -1; } else reson[i] = -1; } //Drop them for (short int i=0;iProcess()->NIn()); int m_nout(p_psh->Process()->NOut()); if (m_nout==2) { for (short int i=0;i=0;j--) { if ((perm[j]+1)