Inelastic_Event_Generator::~Inelastic_Event_Generator() { msg_Info()<<"In "<<METHOD<<"(out = "<<m_output<<")\n"; if (m_output) { if (m_analyse) { msg_Info() <<"Mean number of number of ladders: " <<"naive = "<<m_histograms[string("N_ladder_naive")]->Average()<<", " <<"start = "<<m_histograms[string("N_ladder_start")]->Average()<<", " <<"prim = "<<m_histograms[string("N_ladder_prim")]->Average()<<", " <<"true = "<<m_histograms[string("N_ladder_true")]->Average()<<".\n"; } msg_Info()<<"Errors: \n" <<" Not able to connect blobs "<<m_connectblobs<<";\n" <<" Wrong colours from ladder "<<m_laddercols<<";\n" <<" Not able to update colours in event "<<m_updatecols<<".\n"; } if (m_histograms.empty() || !m_analyse) return; Histogram * histo; string name; for (map<string,Histogram *>::iterator hit=m_histograms.begin(); hit!=m_histograms.end();hit++) { histo = hit->second; name = string("Ladder_Analysis/")+hit->first+string(".dat"); histo->Finalize(); histo->Output(name); delete histo; } m_histograms.clear(); }
int main(){ SetOutput("tunel.out"); RandomSeed(time(NULL)); Init(0, 120*60); (new Generator)->Activate(); Run(); generator_h.Output(); return EXIT_SUCCESS; }
Cluster_Decay_Analysis::~Cluster_Decay_Analysis() { return; Histogram * histo; string name; for (map<string,Histogram *>::iterator hit=m_histograms.begin(); hit!=m_histograms.end();hit++) { histo = hit->second; name = string("Fragmentation_Analysis/")+hit->first+string(".dat"); histo->Output(name); delete histo; } m_histograms.clear(); }
Soft_Cluster_Handler::~Soft_Cluster_Handler() { msg_Tracking()<<"@@@ "<<METHOD<<": " <<m_transitions<<" transitions, " <<m_dtransitions<<" double transitions, " <<m_decays<<" decays,\n" <<m_update<<" calls to UpdateTransitions, and " <<m_forceddecays<<" forced decays.\n" <<"@@@ "<<METHOD<<": " <<m_lists<<" transitions from original dipole list.\n"; if (m_ana) { Histogram * histo; string name; for (map<string,Histogram *>::iterator hit=m_histograms.begin(); hit!=m_histograms.end();hit++) { histo = hit->second; name = string("Fragmentation_Analysis/")+hit->first+string(".dat"); histo->Output(name); delete histo; } m_histograms.clear(); } }
Histogram * ResonanceFlavour::CreateGHistogram( ResonanceFlavour res1, ResonanceFlavour res2, double beta, kf_code out ) { // create file name char fn[512]; sprintf(fn, "GQ2_Mres=%.3f_Gres=%.3f_MresP=%.3f_GresP=%.3f_beta=%.3f_Mout=%.3f.dat", res1.Mass(), res1.Width(), res2.Mass(), res2.Width(), beta, Flavour(out).HadMass() ); // look if file already exists My_In_File f("",m_path+"PhaseSpaceFunctions/"+fn); if( !f.Open() ) { // if file does not exist // create histogram (i.e. table of values) msg_Out()<<"Create necessary phase space function for chosen parameters.\n" <<"This may take some time. Please wait..."<<endl; msg_Tracking()<<"HADRONS::Tau_Three_Pseudo::KS::CreateGHistogram : \n" <<" Create G(q2) in "<<fn<<"."<<endl; double low (0.), up (3.2); int nbins (50); double step = (up-low)/nbins; Histogram* myHist = new Histogram( 0, low, up+step, nbins+1 ); double q2 (low), phi (0.); while( q2<=up+step ) { phi = IntegralG(q2,res1,res2,beta,out); // get G value myHist->Insert( q2, phi ); // insert into histogram q2 += step; } myHist->Output(m_path+"PhaseSpaceFunctions/"+fn); // write into file return myHist; } else { // read table and create histogram msg_Tracking()<<"HADRONS::Tau_Three_Pseudo::KS::CreateGHistogram : \n" <<" Read G(q2) from "<<fn<<"."<<endl; std::string found_file_name = f.Path()+f.File(); f.Close(); return new Histogram( found_file_name ); } }