CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes | Friends
PFEnergyCalibrationHF Class Reference

#include <PFEnergyCalibrationHF.h>

Public Member Functions

double energyEm (double uncalibratedEnergyECAL, double eta, double phi)
 
double energyEmHad (double uncalibratedEnergyECAL, double uncalibratedEnergyHCAL, double eta, double phi)
 
double energyHad (double uncalibratedEnergyHCAL, double eta, double phi)
 
const std::vector< double > & getcalibHF_a_EMHAD () const
 
const std::vector< double > & getcalibHF_a_EMonly () const
 
const std::vector< double > & getcalibHF_b_EMHAD () const
 
const std::vector< double > & getcalibHF_b_HADonly () const
 
const std::vector< double > & getcalibHF_eta_step () const
 
const bool & getcalibHF_use () const
 
 PFEnergyCalibrationHF ()
 
 PFEnergyCalibrationHF (bool calibHF_use, const std::vector< double > &calibHF_eta_step, const std::vector< double > &calibHF_a_EMonly, const std::vector< double > &calibHF_b_HADonly, const std::vector< double > &calibHF_a_EMHAD, const std::vector< double > &calibHF_b_EMHAD)
 
 ~PFEnergyCalibrationHF ()
 

Private Attributes

std::vector< double > calibHF_a_EMHAD_
 
std::vector< double > calibHF_a_EMonly_
 
std::vector< double > calibHF_b_EMHAD_
 
std::vector< double > calibHF_b_HADonly_
 
std::vector< double > calibHF_eta_step_
 
bool calibHF_use_
 

Friends

std::ostream & operator<< (std::ostream &out, const PFEnergyCalibrationHF &calib)
 

Detailed Description

Definition at line 24 of file PFEnergyCalibrationHF.h.

Constructor & Destructor Documentation

◆ PFEnergyCalibrationHF() [1/2]

PFEnergyCalibrationHF::PFEnergyCalibrationHF ( )

Definition at line 10 of file PFEnergyCalibrationHF.cc.

References mps_fire::i.

10  {
11  calibHF_use_ = false;
12  calibHF_eta_step_.push_back(0.00);
13  calibHF_eta_step_.push_back(2.90);
14  calibHF_eta_step_.push_back(3.00);
15  calibHF_eta_step_.push_back(3.20);
16  calibHF_eta_step_.push_back(4.20);
17  calibHF_eta_step_.push_back(4.40);
18  calibHF_eta_step_.push_back(4.60);
19  calibHF_eta_step_.push_back(4.80);
20  calibHF_eta_step_.push_back(5.20);
21  calibHF_eta_step_.push_back(5.40);
22  for (unsigned int i = 0; i < calibHF_eta_step_.size(); ++i) {
23  calibHF_a_EMonly_.push_back(1.00);
24  calibHF_b_HADonly_.push_back(1.00);
25  calibHF_a_EMHAD_.push_back(1.00);
26  calibHF_b_EMHAD_.push_back(1.00);
27  }
28 }
std::vector< double > calibHF_eta_step_
std::vector< double > calibHF_a_EMonly_
std::vector< double > calibHF_b_EMHAD_
std::vector< double > calibHF_a_EMHAD_
std::vector< double > calibHF_b_HADonly_

◆ PFEnergyCalibrationHF() [2/2]

PFEnergyCalibrationHF::PFEnergyCalibrationHF ( bool  calibHF_use,
const std::vector< double > &  calibHF_eta_step,
const std::vector< double > &  calibHF_a_EMonly,
const std::vector< double > &  calibHF_b_HADonly,
const std::vector< double > &  calibHF_a_EMHAD,
const std::vector< double > &  calibHF_b_EMHAD 
)
explicit

Definition at line 30 of file PFEnergyCalibrationHF.cc.

References HLT_2022v15_cff::calibHF_a_EMHAD, HLT_2022v15_cff::calibHF_a_EMonly, HLT_2022v15_cff::calibHF_b_EMHAD, HLT_2022v15_cff::calibHF_b_HADonly, HLT_2022v15_cff::calibHF_eta_step, and HLT_2022v15_cff::calibHF_use.

◆ ~PFEnergyCalibrationHF()

PFEnergyCalibrationHF::~PFEnergyCalibrationHF ( )

Definition at line 44 of file PFEnergyCalibrationHF.cc.

44  {
45  //--- nothing to be done yet
46 }

Member Function Documentation

◆ energyEm()

double PFEnergyCalibrationHF::energyEm ( double  uncalibratedEnergyECAL,
double  eta,
double  phi 
)

Definition at line 48 of file PFEnergyCalibrationHF.cc.

References PVValHelper::eta, and mps_fire::i.

Referenced by PFAlgo::createCandidatesHF().

48  {
49  double calibrated = 0.0;
50  //find eta bin. default : 0.00;2.90;3.00;3.20;4.20;4.40;4.60;4.80;5.20;5.40;
51  int ietabin = 0;
52  for (unsigned int i = 0; i < calibHF_eta_step_.size(); ++i) {
53  if ((fabs(eta)) >= calibHF_eta_step_[i]) {
54  ietabin = i;
55  }
56  }
57  calibrated = uncalibratedEnergyECAL * calibHF_a_EMonly_[ietabin];
58  return calibrated;
59 
60  // return calibrated;
61 }
std::vector< double > calibHF_eta_step_
std::vector< double > calibHF_a_EMonly_

◆ energyEmHad()

double PFEnergyCalibrationHF::energyEmHad ( double  uncalibratedEnergyECAL,
double  uncalibratedEnergyHCAL,
double  eta,
double  phi 
)

Definition at line 76 of file PFEnergyCalibrationHF.cc.

References PVValHelper::eta, and mps_fire::i.

Referenced by PFAlgo::createCandidatesHF().

79  {
80  double calibrated = 0.0;
81  //find eta bin. default : 0.00;2.90;3.00;3.20;4.20;4.40;4.60;4.80;5.20;5.40+;
82  int ietabin = 0;
83  for (unsigned int i = 0; i < calibHF_eta_step_.size(); ++i) {
84  if ((fabs(eta)) >= calibHF_eta_step_[i]) {
85  ietabin = i;
86  }
87  }
88  calibrated = uncalibratedEnergyECAL * calibHF_a_EMHAD_[ietabin] + uncalibratedEnergyHCAL * calibHF_b_EMHAD_[ietabin];
89  return calibrated;
90 }
std::vector< double > calibHF_eta_step_
std::vector< double > calibHF_b_EMHAD_
std::vector< double > calibHF_a_EMHAD_

◆ energyHad()

double PFEnergyCalibrationHF::energyHad ( double  uncalibratedEnergyHCAL,
double  eta,
double  phi 
)

Definition at line 63 of file PFEnergyCalibrationHF.cc.

References PVValHelper::eta, and mps_fire::i.

Referenced by PFAlgo::createCandidatesHF().

63  {
64  double calibrated = 0.0;
65  //find eta bin. default : 0.00;2.90;3.00;3.20;4.20;4.40;4.60;4.80;5.20;5.40;
66  int ietabin = 0;
67  for (unsigned int i = 0; i < calibHF_eta_step_.size(); ++i) {
68  if ((fabs(eta)) >= calibHF_eta_step_[i]) {
69  ietabin = i;
70  }
71  }
72  calibrated = uncalibratedEnergyHCAL * calibHF_b_HADonly_[ietabin];
73  return calibrated;
74 }
std::vector< double > calibHF_eta_step_
std::vector< double > calibHF_b_HADonly_

◆ getcalibHF_a_EMHAD()

const std::vector<double>& PFEnergyCalibrationHF::getcalibHF_a_EMHAD ( ) const
inline

Definition at line 51 of file PFEnergyCalibrationHF.h.

References calibHF_a_EMHAD_.

51 { return calibHF_a_EMHAD_; }
std::vector< double > calibHF_a_EMHAD_

◆ getcalibHF_a_EMonly()

const std::vector<double>& PFEnergyCalibrationHF::getcalibHF_a_EMonly ( ) const
inline

Definition at line 49 of file PFEnergyCalibrationHF.h.

References calibHF_a_EMonly_.

49 { return calibHF_a_EMonly_; }
std::vector< double > calibHF_a_EMonly_

◆ getcalibHF_b_EMHAD()

const std::vector<double>& PFEnergyCalibrationHF::getcalibHF_b_EMHAD ( ) const
inline

Definition at line 52 of file PFEnergyCalibrationHF.h.

References calibHF_b_EMHAD_.

52 { return calibHF_b_EMHAD_; }
std::vector< double > calibHF_b_EMHAD_

◆ getcalibHF_b_HADonly()

const std::vector<double>& PFEnergyCalibrationHF::getcalibHF_b_HADonly ( ) const
inline

Definition at line 50 of file PFEnergyCalibrationHF.h.

References calibHF_b_HADonly_.

50 { return calibHF_b_HADonly_; }
std::vector< double > calibHF_b_HADonly_

◆ getcalibHF_eta_step()

const std::vector<double>& PFEnergyCalibrationHF::getcalibHF_eta_step ( ) const
inline

Definition at line 48 of file PFEnergyCalibrationHF.h.

References calibHF_eta_step_.

48 { return calibHF_eta_step_; }
std::vector< double > calibHF_eta_step_

◆ getcalibHF_use()

const bool& PFEnergyCalibrationHF::getcalibHF_use ( ) const
inline

Definition at line 47 of file PFEnergyCalibrationHF.h.

References calibHF_use_.

Referenced by PFAlgo::createCandidatesHF().

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const PFEnergyCalibrationHF calib 
)
friend

Definition at line 92 of file PFEnergyCalibrationHF.cc.

92  {
93  if (!out)
94  return out;
95  out << "PFEnergyCalibrationHF -- " << endl;
96  int ii = 0;
97  for (std::vector<double>::const_iterator iteta = (calib.getcalibHF_eta_step()).begin();
98  iteta != (calib.getcalibHF_eta_step()).end();
99  ++iteta) {
100  //double currenteta = *iteta;
101  out << " i " << ii << ",";
102  out << "use " << calib.getcalibHF_use() << ",";
103  out << "currenteta " << calib.getcalibHF_eta_step()[ii] << ",";
104  out << "calibHF_a_EMonly_ " << calib.getcalibHF_a_EMonly()[ii] << ",";
105  out << "calibHF_b_HADonly_ " << calib.getcalibHF_b_HADonly()[ii] << ",";
106  out << "calibHF_a_EMHAD_ " << calib.getcalibHF_a_EMHAD()[ii] << ",";
107  out << "calibHF_b_EMHAD_ " << calib.getcalibHF_b_EMHAD()[ii] << ",";
108  out << endl;
109  ii++;
110  }
111 
112  return out;
113 }
ii
Definition: cuy.py:589

Member Data Documentation

◆ calibHF_a_EMHAD_

std::vector<double> PFEnergyCalibrationHF::calibHF_a_EMHAD_
private

Definition at line 60 of file PFEnergyCalibrationHF.h.

Referenced by getcalibHF_a_EMHAD().

◆ calibHF_a_EMonly_

std::vector<double> PFEnergyCalibrationHF::calibHF_a_EMonly_
private

Definition at line 58 of file PFEnergyCalibrationHF.h.

Referenced by getcalibHF_a_EMonly().

◆ calibHF_b_EMHAD_

std::vector<double> PFEnergyCalibrationHF::calibHF_b_EMHAD_
private

Definition at line 61 of file PFEnergyCalibrationHF.h.

Referenced by getcalibHF_b_EMHAD().

◆ calibHF_b_HADonly_

std::vector<double> PFEnergyCalibrationHF::calibHF_b_HADonly_
private

Definition at line 59 of file PFEnergyCalibrationHF.h.

Referenced by getcalibHF_b_HADonly().

◆ calibHF_eta_step_

std::vector<double> PFEnergyCalibrationHF::calibHF_eta_step_
private

Definition at line 57 of file PFEnergyCalibrationHF.h.

Referenced by getcalibHF_eta_step().

◆ calibHF_use_

bool PFEnergyCalibrationHF::calibHF_use_
private

Definition at line 56 of file PFEnergyCalibrationHF.h.

Referenced by getcalibHF_use().