本文整理汇总了C++中AnalysisEnvironmentLoader::LoadSelection方法的典型用法代码示例。如果您正苦于以下问题:C++ AnalysisEnvironmentLoader::LoadSelection方法的具体用法?C++ AnalysisEnvironmentLoader::LoadSelection怎么用?C++ AnalysisEnvironmentLoader::LoadSelection使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AnalysisEnvironmentLoader
的用法示例。
在下文中一共展示了AnalysisEnvironmentLoader::LoadSelection方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main (int argc, char *argv[])
{
cout << endl;
cout << " ,-----------------------," << endl;
cout << " | Starting analysis |" << endl;
cout << " `-----------------------`" << endl;
cout << endl;
// ##################################
// # Some parameters for the user #
// ##################################
bool doHistoManager = false; // False will not produce histos
bool doLatexOutput = true; // False will not produce latex table
bool doPileUpReweigthing = false; // False will not use pileup reweighting
// (can be overwritten by argv[1])
string defaultConfiguration("../../config/TTbarMETAnalysis.xml");
// (can be overwritten by argv[2])
string defaultLatexTableName("CutflowTable");
// (can be overwritten by argv[3])
string defaultRootOutputName("TTbarMETanalysis.root");
// ############################
// # Initializing variables #
// ############################
INFO1_MSG << "Initializing variables..." << endl;
vector < Dataset > datasets;
TTbarMetSelection sel;
float Luminosity = 0;
float LumiError = 0.;
int DataType = 0; // DataType : 0: MC - 1: Data - 2 Data & MC
int verbosity = -1;
reweight::LumiReWeighting *LumiWeights;
IPHCTree::NTEvent * event = 0;
std::vector<std::string> dileptonCol;
dileptonCol.push_back("l+jets");
dileptonCol.push_back("ll");
dileptonCol.push_back("llHadrTau");
dileptonCol.push_back("llHadrTau3+");
std::vector<std::string> dileptonRow;
dileptonRow.push_back("baseline");
dileptonRow.push_back("MET");
dileptonRow.push_back("stdVeto");
dileptonRow.push_back("stdVetoEff");
dileptonRow.push_back("vetoTest0");
dileptonRow.push_back("vetoTest0Eff");
dileptonRow.push_back("vetoTest1");
dileptonRow.push_back("vetoTest1Eff");
dileptonRow.push_back("vetoTest2");
dileptonRow.push_back("vetoTest2Eff");
dileptonRow.push_back("vetoTest3");
dileptonRow.push_back("vetoTest3Eff");
// Reading parameters from argv
// -> configuration file
string xmlFileName;
if (argc > 1) xmlFileName = string(argv[1]);
else xmlFileName = defaultConfiguration;
// -> root output name
string rootOutputName;
if (argc > 2) rootOutputName = string(argv[2]);
else rootOutputName = defaultRootOutputName;
// -> latex table name
string latexTableName;
if (argc > 3) latexTableName = string(argv[3]);
else latexTableName = defaultLatexTableName;
// #############################
// # Loading configuration #
// #############################
cout << endl;
INFO1_MSG << "Loading configuration..." << endl;
cout << " (config : " << xmlFileName << ")" << endl;
AnalysisEnvironmentLoader anaEL (xmlFileName);
anaEL.LoadSamples (datasets); // now the list of datasets written in the xml file is known
anaEL.LoadSelection (sel); // now the parameters for the selection are given to the selection // no specific TTbarMET parameters
anaEL.LoadGeneralInfo (DataType, Luminosity, LumiError, verbosity);
// #########################################
// # Creating tables and histomanagers #
// #########################################
cout << endl;
INFO1_MSG << "Creating tables and histomanagers..." << endl;
// Stuff
TFile dileptonTreeFile("dileptonTree.root","RECREATE","Tree for Dilepton background study");
//.........这里部分代码省略.........