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 53 of file TauJetCorrector.cc.

Constructor & Destructor Documentation

JetCalibrationParameterSetTauJet::JetCalibrationParameterSetTauJet ( string  tag)

Definition at line 68 of file TauJetCorrector.cc.

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

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

Member Function Documentation

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

Definition at line 56 of file TauJetCorrector.cc.

Referenced by TauJetCorrector::setParameters().

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

Definition at line 59 of file TauJetCorrector.cc.

Referenced by TauJetCorrector::setParameters().

59 {return pars[ieta];}
vector< vector< double > > pars
int JetCalibrationParameterSetTauJet::type ( int  ieta)
inline

Definition at line 58 of file TauJetCorrector.cc.

Referenced by TauJetCorrector::setParameters().

58 {return typevector[ieta];}
bool JetCalibrationParameterSetTauJet::valid ( )
inline

Definition at line 60 of file TauJetCorrector.cc.

Referenced by TauJetCorrector::setParameters().

60 {return etavector.size();}

Member Data Documentation

vector<double> JetCalibrationParameterSetTauJet::etavector
private

Definition at line 64 of file TauJetCorrector.cc.

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

Definition at line 66 of file TauJetCorrector.cc.

vector<int> JetCalibrationParameterSetTauJet::typevector
private

Definition at line 65 of file TauJetCorrector.cc.