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


C++ ConfigReader::getFloat方法代码示例

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


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

示例1: jets_RA5

bool jets_RA5(EasyChain* tree,vector<int>& goodJets){

	static ConfigReader config;
	// static since we read only once
	static float jet_pt_min  = config.getFloat("jet_pt_min",   30);
	static float jet_eta_max = config.getDouble("jet_eta_max",2.4);
	static bool  quick       = config.getBool("quick");

	// static to get the cut flow for all events
	static CutSet jetFlow("good jet selection");
	// print at end of program and dump into histogram file
	jetFlow.autoprint=true;
	jetFlow.autodump=true;

	vector<int>&       JetID = tree->Get(&JetID,"ak5JetPFPFJetIDloosePat");
	vector<LorentzM>&   Jets = tree->Get(&Jets, "ak5JetPFCorrectedP4Pat");
	int cntJets=0;

	for(int k = 0; k<Jets.size(); k++){
		if( !jetFlow.keepIf("pt>=jet_min",              Jets[k].pt()   >= jet_pt_min  ) && quick) continue;
		if( !jetFlow.keepIf("eta<=eta_max",        fabs(Jets[k].eta()) <= jet_eta_max ) && quick) continue;
		if( !jetFlow.keepIf("ak5JetPFPFJetIDloosePat", JetID[k]!=0 )                    && quick) continue;
		goodJets.push_back(k);
	}

	return goodJets.size() >= 2;
}
开发者ID:DESY-CMS-SUS,项目名称:DesySusy,代码行数:27,代码来源:jets_RA5.cpp

示例2: METconsistency

bool cleaningFilters::METconsistency( LorentzM& caloMET, LorentzM& pfMET){

  ConfigReader config;
  static float DPhi_Max = config.getFloat( "METconsistency_DPhiMax", 1.5);

  return fabs( DeltaPhi( caloMET, pfMET)) < DPhi_Max;
};
开发者ID:DESY-CMS-SUS,项目名称:DesySusy,代码行数:7,代码来源:CleaningFilters.cpp

示例3: anomalousRho

bool cleaningFilters::anomalousRho( EasyChain* tree){

  ConfigReader config;
  static float rho_Max = config.getFloat( "Rho_Max", 40.);

  float rho = tree->Get( rho, "rho");
  return rho <= rho_Max;
};
开发者ID:DESY-CMS-SUS,项目名称:DesySusy,代码行数:8,代码来源:CleaningFilters.cpp

示例4: goodVertices

bool cleaningFilters::goodVertices(EasyChain* tree, vector<int>& goodVert){

  ConfigReader config;
  bool isData=config.getBool("isData");

  float Z_Data    = config.getFloat( "VertexZ_Data",   24.);
  float Rho_Data  = config.getFloat( "VertexRho_Data",  2.);
  float NDOF_Data = config.getFloat( "VertexNDOF_Data", 4.);

  float Z_MC    = config.getFloat( "VertexZ_MC",   24.);
  float Rho_MC  = config.getFloat( "VertexRho_MC",  2.);
  float NDOF_MC = config.getFloat( "VertexNDOF_MC", 4.);

  if(pcp)cout<<"================INSIDE THE VERTICES PROGRAM===================="<<endl;
  if(pcp)cout<<"getting the Vertices from the tree"<<endl;

  vector<XYZPointF>& vertices       = tree->Get( &vertices,      "vertexPosition");
  vector<int>&       vertex_isFake  = tree->Get( &vertex_isFake, "vertexIsFake"  );
  vector<float>&     vertex_ndof    = tree->Get( &vertex_ndof,   "vertexNdof"    );
  vector<int>&       vertex_nTracks = tree->Get( &vertex_nTracks,"vertexNtrks"   );

  if( vertices.size() == 0 ) return false;

  if(pcp)cout<<"loop over the vertices"<<endl;
  for( unsigned vx=0; vx < vertices.size(); ++vx ) {

    if( vertex_isFake.at(vx) ) continue;

    if( isData ){
      // data
      if( fabs(vertices.at(vx).z()) > Z_Data )     continue;
      if( fabs(vertices.at(vx).rho()) > Rho_Data ) continue;
      if( vertex_ndof.at(vx) <= NDOF_Data )        continue;
      goodVert.push_back(vx);
    } else {
      // MC
      if( fabs(vertices.at(vx).z()) > Z_MC ) continue;
      if( vertices.at(vx).rho() > Rho_MC )   continue;
      if( vertex_ndof.at(vx) <= NDOF_MC )    continue;
      goodVert.push_back(vx);
    }
  }

  return goodVert.size()>0;
}
开发者ID:DESY-CMS-SUS,项目名称:DesySusy,代码行数:45,代码来源:CleaningFilters.cpp


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