CMS 3D CMS Logo

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

◆ JetPartonCalibrationParameterSet()

JetPartonNamespace::JetPartonCalibrationParameterSet::JetPartonCalibrationParameterSet ( string  tag)

Definition at line 115 of file JetPartonCorrector.cc.

References DeadROC_duringRun::f1, geometryDiff::file, recoMuon::in, mps_splice::line, AlCaHLTBitMon_QueryRunRegistry::string, and makeGlobalPositionRcd_cfg::tag.

115  {
116  std::string file = "JetMETCorrections/JetParton/data/" + tag + ".txt";
117 
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

◆ eta()

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

◆ neta()

int JetPartonNamespace::JetPartonCalibrationParameterSet::neta ( )
inline

Definition at line 103 of file JetPartonCorrector.cc.

◆ parameters()

const vector<double>& JetPartonNamespace::JetPartonCalibrationParameterSet::parameters ( int  ieta)
inline

◆ type()

int JetPartonNamespace::JetPartonCalibrationParameterSet::type ( int  ieta)
inline

◆ valid()

bool JetPartonNamespace::JetPartonCalibrationParameterSet::valid ( )
inline

Definition at line 107 of file JetPartonCorrector.cc.

107 { return !etavector.empty(); }

Member Data Documentation

◆ etavector

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

Definition at line 110 of file JetPartonCorrector.cc.

◆ pars

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

Definition at line 112 of file JetPartonCorrector.cc.

◆ typevector

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

Definition at line 111 of file JetPartonCorrector.cc.