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, FrontierConditions_GlobalTag_cff::file, recoMuon::in, mps_splice::line, AlCaHLTBitMon_QueryRunRegistry::string, and GlobalPosition_Frontier_DevDB_cff::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:64
GlobalPosition_Frontier_DevDB_cff.tag
tag
Definition: GlobalPosition_Frontier_DevDB_cff.py:11
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
recoMuon::in
Definition: RecoMuonEnumerators.h:6
JetPartonNamespace::JetPartonCalibrationParameterSet::etavector
vector< double > etavector
Definition: JetPartonCorrector.cc:110
FrontierConditions_GlobalTag_cff.file
file
Definition: FrontierConditions_GlobalTag_cff.py:13
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