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.

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 }

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 JetCalibrationParameterSetTauJet::eta ( int  ieta)
inline

Definition at line 54 of file TauJetCorrector.cc.

54 { return etavector[ieta]; }

References LEDCalibrationChannels::ieta.

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

◆ 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.

56 { return pars[ieta]; }

References LEDCalibrationChannels::ieta.

◆ type()

int JetCalibrationParameterSetTauJet::type ( int  ieta)
inline

Definition at line 55 of file TauJetCorrector.cc.

55 { return typevector[ieta]; }

References LEDCalibrationChannels::ieta.

◆ 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.

JetCalibrationParameterSetTauJet::pars
vector< vector< double > > pars
Definition: TauJetCorrector.cc:62
JetCalibrationParameterSetTauJet::type
int type(int ieta)
Definition: TauJetCorrector.cc:55
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
JetCalibrationParameterSetTauJet::typevector
vector< int > typevector
Definition: TauJetCorrector.cc:61
FrontierConditions_GlobalTag_cff.file
file
Definition: FrontierConditions_GlobalTag_cff.py:13
JetCalibrationParameterSetTauJet::etavector
vector< double > etavector
Definition: TauJetCorrector.cc:60
DeadROC_duringRun.f1
f1
Definition: DeadROC_duringRun.py:219
mps_splice.line
line
Definition: mps_splice.py:76