本文整理汇总了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;
}
示例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;
};
示例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;
};
示例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;
}