CMS 3D CMS Logo

Public Member Functions | Private Attributes

JetPartonNamespace::JetPartonCalibrationParameterSet Class Reference

List of all members.

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 connectstrParser::f1, mergeVDriftHistosByStation::file, edm::FileInPath::fullPath(), recoMuon::in, geometryCSVtoXML::line, and Gflash::par.

                                                                            {

  std::string file="JetMETCorrections/JetParton/data/"+tag+".txt";

  edm::FileInPath f1(file);

  std::ifstream in( (f1.fullPath()).c_str() );



  //  if ( f1.isLocal() ){
    string line;
    while( std::getline( in, line) ){
      if(!line.size() || line[0]=='#') continue;
      istringstream linestream(line);
      double par;
      int type;
      linestream>>par>>type;
      etavector.push_back(par);
      typevector.push_back(type);
      pars.push_back(vector<double>());
      while(linestream>>par)pars.back().push_back(par);
    }
    //  }
    //  else
    //    if (tag!="no") { cout<<"The file \""<<file<<"\" was not found in path \""<<f1.fullPath()<<"\"."<<endl; }
}

Member Function Documentation

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

Definition at line 105 of file JetPartonCorrector.cc.

Referenced by JetPartonCorrector::setParameters().

{return etavector[ieta];}
int JetPartonNamespace::JetPartonCalibrationParameterSet::neta ( ) [inline]

Definition at line 104 of file JetPartonCorrector.cc.

Referenced by JetPartonCorrector::setParameters().

{return etavector.size();}
const vector<double>& JetPartonNamespace::JetPartonCalibrationParameterSet::parameters ( int  ieta) [inline]

Definition at line 107 of file JetPartonCorrector.cc.

Referenced by JetPartonCorrector::setParameters().

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

Definition at line 106 of file JetPartonCorrector.cc.

Referenced by JetPartonCorrector::setParameters().

{return typevector[ieta];}
bool JetPartonNamespace::JetPartonCalibrationParameterSet::valid ( void  ) [inline]

Definition at line 108 of file JetPartonCorrector.cc.

Referenced by JetPartonCorrector::setParameters().

{return etavector.size();}

Member Data Documentation

Definition at line 112 of file JetPartonCorrector.cc.

Definition at line 114 of file JetPartonCorrector.cc.

Definition at line 113 of file JetPartonCorrector.cc.