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


C++ Var::SetRange方法代码示例

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


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

示例1: compare_iso

void compare_iso()
{
  Sample ttbar, DY;

  
  DY.SetParameters("Drell-Yan");
  DY.SetFileNames("/afs/cern.ch/work/i/ishvetso/EgammaWork/my_puppi_test/CMSSW_7_3_3/src/EgammaWork/ElectronNtupler/test/crab_projects/crab_Electron-Isolation_CITK_validation_DY_miniAOD_PUPPI_with_NoLeptons_update11May2015/results/DY.root");
  
  ttbar.SetParameters("ttbar");
  ttbar.SetFileNames("/afs/cern.ch/work/i/ishvetso/EgammaWork/my_puppi_test/CMSSW_7_3_3/src/EgammaWork/ElectronNtupler/test/crab_projects/crab_Electron-Isolation_CITK_validation_ttbar_miniAOD_PUPPI_with_NoLeptons_update11May2015/results/ttbar.root");
    
  vector <Var> Vars_CH, Vars_NH, Vars_Gamma;
  Var var;
  
  //charged hadrons
  var.VarName = "sumChargedHadronPt_CITK";
  var.color = kBlue;
  var.SetRange(0., 1.5, 30);
  Vars_CH.push_back(var);
  
  var.VarName = "sumChargedHadronPt_PUPPI";
  var.color = kGreen;
  var.SetRange(0., 1.5, 30);
  Vars_CH.push_back(var);
  
  var.VarName = "sumChargedHadronPt_PUPPI_NoLeptons";
  var.color = kRed;
  var.SetRange(0., 1.5, 30);
  Vars_CH.push_back(var);
  
  //neutral hadrons
  var.VarName = "sumNeutralHadronPt_CITK";
  var.color = kBlue;
  var.SetRange(0., 1.5, 30);
  Vars_NH.push_back(var);
  
  var.VarName = "sumNeutralHadronPt_PUPPI";
  var.color = kGreen;
  var.SetRange(0., 1.5, 30);
  Vars_NH.push_back(var);
  
  var.VarName = "sumNeutralHadronPt_PUPPI_NoLeptons";
  var.color = kRed;
  var.SetRange(0., 1.5, 30);
  Vars_NH.push_back(var);
  
  //photons
  var.VarName = "sumPhotonPt_CITK";
  var.color = kBlue;
  var.SetRange(0., 1.5, 30);
  Vars_Gamma.push_back(var);
  
  var.VarName = "sumPhotonPt_PUPPI";
  var.color = kGreen;
  var.SetRange(0., 1.5, 30);
  Vars_Gamma.push_back(var);
  
  var.VarName = "sumPhotonPt_PUPPI_NoLeptons";
  var.color = kRed;
  var.SetRange(0., 1.5, 30);
  Vars_Gamma.push_back(var);

  
  setTDRStyle();
  draw(Vars_CH, ttbar, "ch", "barrel",  "isEB == 1", "iso_matching");
  draw(Vars_CH, ttbar, "ch", "endcap",  "isEB != 1", "iso_matching");
  draw(Vars_CH, DY, "ch", "endcap",  "isEB != 1", "iso_matching");
  draw(Vars_CH, DY, "ch", "barrel",  "isEB == 1", "iso_matching");
  
  draw(Vars_NH, ttbar, "nh", "barrel",  "isEB == 1", "iso_matching");
  draw(Vars_NH, ttbar, "nh", "endcap",  "isEB != 1", "iso_matching");
  draw(Vars_NH, DY, "nh", "endcap",  "isEB != 1", "iso_matching");
  draw(Vars_NH, DY, "nh", "barrel",  "isEB == 1", "iso_matching");
  
  draw(Vars_Gamma  , ttbar, "gamma", "barrel",  "isEB == 1", "iso_matching");
  draw(Vars_Gamma, ttbar, "gamma", "endcap",  "isEB != 1", "iso_matching");
  draw(Vars_Gamma, DY, "gamma", "endcap",  "isEB != 1", "iso_matching");
  draw(Vars_Gamma, DY, "gamma", "barrel",  "isEB == 1", "iso_matching");
 
 
  
   
}
开发者ID:ald77,项目名称:EgammaWork,代码行数:83,代码来源:compare_iso.cpp


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