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::JetCalibrationParameterSetTauJet ( string  tag)

Definition at line 64 of file TauJetCorrector.cc.

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

64  {
65  std::string file = "JetMETCorrections/TauJet/data/" + tag + ".txt";
66 
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

◆ eta()

double JetCalibrationParameterSetTauJet::eta ( int  ieta)
inline

◆ neta()

int JetCalibrationParameterSetTauJet::neta ( )
inline

Definition at line 53 of file TauJetCorrector.cc.

53 { return etavector.size(); }

◆ parameters()

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

Definition at line 56 of file TauJetCorrector.cc.

References LEDCalibrationChannels::ieta.

◆ type()

int JetCalibrationParameterSetTauJet::type ( int  ieta)
inline

◆ valid()

bool JetCalibrationParameterSetTauJet::valid ( )
inline

Definition at line 57 of file TauJetCorrector.cc.

57 { return !etavector.empty(); }

Member Data Documentation

◆ etavector

vector<double> JetCalibrationParameterSetTauJet::etavector
private

Definition at line 60 of file TauJetCorrector.cc.

◆ pars

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

Definition at line 62 of file TauJetCorrector.cc.

◆ typevector

vector<int> JetCalibrationParameterSetTauJet::typevector
private

Definition at line 61 of file TauJetCorrector.cc.