CMS 3D CMS Logo

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 100 of file JetPartonCorrector.cc.

Constructor & Destructor Documentation

◆ JetPartonCalibrationParameterSet()

JetPartonNamespace::JetPartonCalibrationParameterSet::JetPartonCalibrationParameterSet ( string  tag)

Definition at line 115 of file JetPartonCorrector.cc.

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

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

Member Function Documentation

◆ eta()

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

Definition at line 104 of file JetPartonCorrector.cc.

104 { return etavector[ieta]; }

References LEDCalibrationChannels::ieta.

Referenced by Particle.Particle::__str__(), Jet.Jet::jetID(), and Jet.Jet::puJetId().

◆ neta()

int JetPartonNamespace::JetPartonCalibrationParameterSet::neta ( )
inline

Definition at line 103 of file JetPartonCorrector.cc.

103 { return etavector.size(); }

◆ parameters()

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

Definition at line 106 of file JetPartonCorrector.cc.

106 { return pars[ieta]; }

References LEDCalibrationChannels::ieta.

◆ type()

int JetPartonNamespace::JetPartonCalibrationParameterSet::type ( int  ieta)
inline

Definition at line 105 of file JetPartonCorrector.cc.

105 { return typevector[ieta]; }

References LEDCalibrationChannels::ieta.

◆ valid()

bool JetPartonNamespace::JetPartonCalibrationParameterSet::valid ( )
inline

Definition at line 107 of file JetPartonCorrector.cc.

107 { return !etavector.empty(); }

Member Data Documentation

◆ etavector

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

Definition at line 110 of file JetPartonCorrector.cc.

◆ pars

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

Definition at line 112 of file JetPartonCorrector.cc.

◆ typevector

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

Definition at line 111 of file JetPartonCorrector.cc.

JetPartonNamespace::JetPartonCalibrationParameterSet::pars
vector< vector< double > > pars
Definition: JetPartonCorrector.cc:112
JetPartonNamespace::JetPartonCalibrationParameterSet::typevector
vector< int > typevector
Definition: JetPartonCorrector.cc:111
edm::FileInPath
Definition: FileInPath.h:61
geometryDiff.file
file
Definition: geometryDiff.py:13
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
makeGlobalPositionRcd_cfg.tag
tag
Definition: makeGlobalPositionRcd_cfg.py:6
type
type
Definition: SiPixelVCal_PayloadInspector.cc:39
recoMuon::in
Definition: RecoMuonEnumerators.h:6
JetPartonNamespace::JetPartonCalibrationParameterSet::etavector
vector< double > etavector
Definition: JetPartonCorrector.cc:110
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
JetPartonNamespace::JetPartonCalibrationParameterSet::type
int type(int ieta)
Definition: JetPartonCorrector.cc:105
DeadROC_duringRun.f1
f1
Definition: DeadROC_duringRun.py:219
mps_splice.line
line
Definition: mps_splice.py:76