当前位置: 首页>>代码示例>>C++>>正文


C++ AnalysisEnvironmentLoader::LoadPLRInformation方法代码示例

本文整理汇总了C++中AnalysisEnvironmentLoader::LoadPLRInformation方法的典型用法代码示例。如果您正苦于以下问题:C++ AnalysisEnvironmentLoader::LoadPLRInformation方法的具体用法?C++ AnalysisEnvironmentLoader::LoadPLRInformation怎么用?C++ AnalysisEnvironmentLoader::LoadPLRInformation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AnalysisEnvironmentLoader的用法示例。


在下文中一共展示了AnalysisEnvironmentLoader::LoadPLRInformation方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: main

int main (int argc, char *argv[])
{

 
  cout << "#########################" << endl;
  cout << "Beginning of the program" << endl;
  cout << "#########################" << endl;

  //////////////////////
  //Global variables
  //////////////////////
  vector < Dataset > datasets;
  DiLeptonSelection sel;
  float Lumi = 0;
  float LumiError = 0.;
  // 0: MC - 1: Data - 2 Data & MC
  int DataType = 0;
  int verbosity = 2;
  int doPseudoExp = 0;
  int NofPseudoExp = 0;
  //////////////////////

  //////////////////////
  // Initialisation
  //////////////////////
  string xmlFileName;
  cout<<"argc "<<argc<<" "<<argv[0]<<endl;
  if (argc>1 ) xmlFileName = string(argv[1]);
  else xmlFileName = string ("../../config/PLRMeas.xml");

  AnalysisEnvironmentLoader anaEL (xmlFileName);
  if(verbosity>1) cout<<" - Loading datasets ..."<<endl;
  anaEL.LoadSamples (datasets);	// now the list of datasets written in the xml file is known
  if(verbosity>1) cout<<" - Loading general info ..."<<endl;
  anaEL.LoadGeneralInfo (DataType, Lumi, LumiError, verbosity);

  if(verbosity>1) cout<<" - Initializing PLR ..."<<endl;
  PLRMeasurement plr;
  cout<<"a"<<endl;
  plr.LoadDatasets(datasets);
  cout<<"a"<<endl;
  plr.SetLumi(Lumi,LumiError);
  cout<<"a"<<endl;
  //Load additionnal spectific info
  if(verbosity>1) cout<<" - Loading PLRInformation ..."<<endl;
  anaEL.LoadPLRInformation(plr,doPseudoExp, NofPseudoExp);
  if(verbosity>1) if(doPseudoExp) cout<<"Wil perform "<<NofPseudoExp<<" pseudo experiments "<<endl;
  if(verbosity>1) cout<<" - Loading bkg info ..."<<endl;
  anaEL.LoadBgkInformation(plr);
  //Do this after loading the other info (datasets, backgrounds)
  if(verbosity>1) cout<<" - Loading histograms ..."<<endl;
  plr.LoadHistos();
  plr.AddBkgDeterminationParameter();
  if(verbosity>1) cout<<" - Loading Signal Systematics ..."<<endl;
  anaEL.LoadSystematicsEffect(plr);

 
  if(verbosity>1) cout<<" - Run the PLR ..."<<endl;
  plr.RunLikelihood(doPseudoExp,NofPseudoExp,false,true,true);
  //plr.RunLikelihood(false,1,false,true,true);
  //plr.RunLikelihood(true,10000,false,true,true);
  //plr.RunLikelihood(true,1,false,true,true);
 
  plr.TimingReport();
  
  if(verbosity>1) cout<<" - Write output tex file ..."<<endl;
  string ofoutname = string(argv[2])+".tex";
  ofstream ofout(ofoutname.c_str());
  plr.MinimizationTable(ofout);
  plr.UncertaintiesTable(ofout);
  plr.NumberOfEventsTable(ofout);

  if(verbosity>1) cout<<" - Write output root file ..."<<endl;
  TFile* fout = new TFile(argv[2],"RECREATE");
  //TFile* fout = new TFile("PLR.root","RECREATE");
  plr.Write(fout);
  fout->Close();
  delete fout;

 cout << "#########################" << endl;
  cout << "  End of the program" << endl;
  cout << "#########################" << endl;

}
开发者ID:fhoehle,项目名称:NTupleFWKIPHC,代码行数:84,代码来源:RunPLRMeas.C


注:本文中的AnalysisEnvironmentLoader::LoadPLRInformation方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。