Ticket #120: ExampleModel.patch
File ExampleModel.patch, 2.2 KB (added by , 14 years ago) |
---|
-
AddOns/ExampleModel/SM_Zprime.C
12 12 13 13 namespace MODEL { 14 14 15 class SM_Zprime : public Standard_Model { 16 protected : 15 class SM_Zprime : public Model_Base { 16 protected : 17 MODEL::Model_Base * p_sm; 18 17 19 void ParticleInit(); 18 20 void FillSpectrum(); 21 bool ModelInit(); 22 19 23 public : 20 24 SM_Zprime(std::string,std::string,bool); 21 25 }; 22 26 23 27 24 28 SM_Zprime::SM_Zprime(std::string dir, std::string file, bool elementary) : 25 Standard_Model(dir, file, false)29 Model_Base(dir,file,elementary) 26 30 { 27 m_elementary=elementary; 28 if (m_elementary) { 29 msg_Info()<<"Initialize the Standard Model plus dummy Zprime from " 30 <<m_dir<<" / "<<m_file<<std::endl; 31 } 32 m_name = std::string("SM+Zprime"); 31 p_sm = new Standard_Model(m_dir,m_file,false); 33 32 34 33 ParticleInit(); 35 FillSpectrum();36 34 if (m_elementary) { 37 35 ATOOLS::OutputParticles(msg->Info()); 38 36 ATOOLS::OutputContainers(msg->Info()); … … 58 56 p_dataread->AddWordSeparator("\t"); 59 57 p_dataread->SetInputPath(m_dir); 60 58 p_dataread->SetInputFile(m_file); 59 PRINT_INFO(p_constants); 61 60 p_constants->insert(make_pair(string("Zp_cpl_L"), 62 61 p_dataread->GetValue<double>("Zp_cpl_L",1.))); 63 62 p_constants->insert(make_pair(string("Zp_cpl_R"), 64 63 p_dataread->GetValue<double>("Zp_cpl_R",1.))); 65 64 } 65 66 bool SM_Zprime::ModelInit() 67 { 68 if (m_elementary) { 69 msg_Info()<<"Initialize the Standard Model plus dummy Zprime from " 70 <<m_dir<<" / "<<m_file<<std::endl; 71 } 72 m_name = std::string("SM+Zprime"); 73 74 p_sm->ModelInit(); 75 p_numbers = p_sm->ExtractScalarNumbers(); 76 p_constants = p_sm->ExtractScalarConstants(); 77 p_functions = p_sm->ExtractScalarFunctions(); 78 p_matrices = p_sm->ExtractComplexMatrices(); 79 PRINT_INFO("inited SM::ModelInit"); 80 81 FillSpectrum(); 82 PRINT_INFO("filled spectrum"); 83 84 return true; 85 } 66 86 } 67 87 68 88