CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
JetCalibrationParameterSetTauJet Class Reference

Public Member Functions

double eta (int ieta)
 
 JetCalibrationParameterSetTauJet (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 50 of file TauJetCorrector.cc.

Constructor & Destructor Documentation

JetCalibrationParameterSetTauJet::JetCalibrationParameterSetTauJet ( string  tag)

Definition at line 64 of file TauJetCorrector.cc.

References DeadROC_duringRun::f1, FrontierConditions_GlobalTag_cff::file, edm::FileInPath::fullPath(), recoMuon::in, mps_splice::line, and AlCaHLTBitMon_QueryRunRegistry::string.

64  {
65  std::string file = "JetMETCorrections/TauJet/data/" + tag + ".txt";
66 
67  edm::FileInPath f1(file);
68 
69  std::ifstream in((f1.fullPath()).c_str());
70 
71  // if ( f1.isLocal() ){
72  //cout << " Start to read file "<<file<<endl;
73  string line;
74  while (std::getline(in, line)) {
75  if (line.empty() || line[0] == '#')
76  continue;
77  istringstream linestream(line);
78  double par;
79  int type;
80  linestream >> par >> type;
81 
82  //cout<<" Parameter eta = "<<par<<" Type= "<<type<<endl;
83 
84  etavector.push_back(par);
85  typevector.push_back(type);
86  pars.push_back(vector<double>());
87  while (linestream >> par)
88  pars.back().push_back(par);
89  }
90  // }
91  // else
92  // cout<<"The file \""<<file<<"\" was not found in path \""<<f1.fullPath()<<"\"."<<endl;
93 }
vector< vector< double > > pars

Member Function Documentation

double JetCalibrationParameterSetTauJet::eta ( int  ieta)
inline
int JetCalibrationParameterSetTauJet::neta ( )
inline

Definition at line 53 of file TauJetCorrector.cc.

Referenced by TauJetCorrector::setParameters().

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

Definition at line 56 of file TauJetCorrector.cc.

References LEDCalibrationChannels::ieta.

Referenced by TauJetCorrector::setParameters().

int JetCalibrationParameterSetTauJet::type ( int  ieta)
inline
bool JetCalibrationParameterSetTauJet::valid ( )
inline

Definition at line 57 of file TauJetCorrector.cc.

Referenced by TauJetCorrector::setParameters().

57 { return !etavector.empty(); }

Member Data Documentation

vector<double> JetCalibrationParameterSetTauJet::etavector
private

Definition at line 60 of file TauJetCorrector.cc.

vector<vector<double> > JetCalibrationParameterSetTauJet::pars
private

Definition at line 62 of file TauJetCorrector.cc.

vector<int> JetCalibrationParameterSetTauJet::typevector
private

Definition at line 61 of file TauJetCorrector.cc.