CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 101 of file JetPartonCorrector.cc.

Constructor & Destructor Documentation

JetPartonNamespace::JetPartonCalibrationParameterSet::JetPartonCalibrationParameterSet ( string  tag)

Definition at line 117 of file JetPartonCorrector.cc.

References python.connectstrParser::f1, mergeVDriftHistosByStation::file, edm::FileInPath::fullPath(), recoMuon::in, geometryCSVtoXML::line, and AlCaHLTBitMon_QueryRunRegistry::string.

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

Member Function Documentation

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

Definition at line 104 of file JetPartonCorrector.cc.

Referenced by JetPartonCorrector::setParameters().

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

Definition at line 107 of file JetPartonCorrector.cc.

Referenced by JetPartonCorrector::setParameters().

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

Definition at line 108 of file JetPartonCorrector.cc.

Referenced by JetPartonCorrector::setParameters().

Member Data Documentation

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

Definition at line 112 of file JetPartonCorrector.cc.

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

Definition at line 114 of file JetPartonCorrector.cc.

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

Definition at line 113 of file JetPartonCorrector.cc.