CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
JetPartonNamespace::JetPartonCalibrationParameterSet Class Reference

Public Member Functions

double eta (int ieta)
 
 JetPartonCalibrationParameterSet (string tag)
 
int neta ()
 
const vector< double > & parameters (int ieta)
 
int type (int ieta)
 
bool valid ()
 

Private Attributes

vector< double > etavector
 
vector< vector< double > > pars
 
vector< int > typevector
 

Detailed Description

Definition at line 100 of file JetPartonCorrector.cc.

Constructor & Destructor Documentation

JetPartonNamespace::JetPartonCalibrationParameterSet::JetPartonCalibrationParameterSet ( string  tag)

Definition at line 115 of file JetPartonCorrector.cc.

References validate-o2o-wbm::f1, mergeVDriftHistosByStation::file, edm::FileInPath::fullPath(), recoMuon::in, geometryCSVtoXML::line, and AlCaHLTBitMon_QueryRunRegistry::string.

115  {
116  std::string file = "JetMETCorrections/JetParton/data/" + tag + ".txt";
117 
118  edm::FileInPath f1(file);
119 
120  std::ifstream in((f1.fullPath()).c_str());
121 
122  // if ( f1.isLocal() ){
123  string line;
124  while (std::getline(in, line)) {
125  if (line.empty() || line[0] == '#')
126  continue;
127  istringstream linestream(line);
128  double par;
129  int type;
130  linestream >> par >> type;
131  etavector.push_back(par);
132  typevector.push_back(type);
133  pars.push_back(vector<double>());
134  while (linestream >> par)
135  pars.back().push_back(par);
136  }
137  // }
138  // else
139  // if (tag!="no") { cout<<"The file \""<<file<<"\" was not found in path \""<<f1.fullPath()<<"\"."<<endl; }
140  }

Member Function Documentation

double JetPartonNamespace::JetPartonCalibrationParameterSet::eta ( int  ieta)
inline
int JetPartonNamespace::JetPartonCalibrationParameterSet::neta ( )
inline

Definition at line 103 of file JetPartonCorrector.cc.

Referenced by JetPartonCorrector::setParameters().

103 { return etavector.size(); }
const vector<double>& JetPartonNamespace::JetPartonCalibrationParameterSet::parameters ( int  ieta)
inline

Definition at line 106 of file JetPartonCorrector.cc.

Referenced by JetPartonCorrector::setParameters().

106 { return pars[ieta]; }
int JetPartonNamespace::JetPartonCalibrationParameterSet::type ( int  ieta)
inline

Definition at line 105 of file JetPartonCorrector.cc.

Referenced by JetPartonCorrector::setParameters().

bool JetPartonNamespace::JetPartonCalibrationParameterSet::valid ( )
inline

Definition at line 107 of file JetPartonCorrector.cc.

Referenced by JetPartonCorrector::setParameters().

107 { return !etavector.empty(); }

Member Data Documentation

vector<double> JetPartonNamespace::JetPartonCalibrationParameterSet::etavector
private

Definition at line 110 of file JetPartonCorrector.cc.

vector<vector<double> > JetPartonNamespace::JetPartonCalibrationParameterSet::pars
private

Definition at line 112 of file JetPartonCorrector.cc.

vector<int> JetPartonNamespace::JetPartonCalibrationParameterSet::typevector
private

Definition at line 111 of file JetPartonCorrector.cc.