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::PFEnergyCalibrationHF ( )

Definition at line 10 of file PFEnergyCalibrationHF.cc.

References mps_fire::i.

10  {
11 
12  calibHF_use_ = false;
13  calibHF_eta_step_.push_back(0.00);
14  calibHF_eta_step_.push_back(2.90);
15  calibHF_eta_step_.push_back(3.00);
16  calibHF_eta_step_.push_back(3.20);
17  calibHF_eta_step_.push_back(4.20);
18  calibHF_eta_step_.push_back(4.40);
19  calibHF_eta_step_.push_back(4.60);
20  calibHF_eta_step_.push_back(4.80);
21  calibHF_eta_step_.push_back(5.20);
22  calibHF_eta_step_.push_back(5.40);
23  for(unsigned int i=0;i< calibHF_eta_step_.size();++i){
24  calibHF_a_EMonly_.push_back(1.00);
25  calibHF_b_HADonly_.push_back(1.00);
26  calibHF_a_EMHAD_.push_back(1.00);
27  calibHF_b_EMHAD_.push_back(1.00);
28  }
29 
30 }
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::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 32 of file PFEnergyCalibrationHF.cc.

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

PFEnergyCalibrationHF::~PFEnergyCalibrationHF ( )

Definition at line 52 of file PFEnergyCalibrationHF.cc.

53 {
54 //--- nothing to be done yet
55 }

Member Function Documentation

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

Definition at line 58 of file PFEnergyCalibrationHF.cc.

References mps_fire::i.

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

Definition at line 94 of file PFEnergyCalibrationHF.cc.

References mps_fire::i.

96  {
97 
98  double calibrated = 0.0;
99  //find eta bin. default : 0.00;2.90;3.00;3.20;4.20;4.40;4.60;4.80;5.20;5.40+;
100  int ietabin = 0;
101  for(unsigned int i=0;i< calibHF_eta_step_.size();++i){
102  if((fabs(eta))>=calibHF_eta_step_[i]){
103  ietabin = i;
104  }
105  }
106  calibrated = uncalibratedEnergyECAL * calibHF_a_EMHAD_[ietabin] + uncalibratedEnergyHCAL * calibHF_b_EMHAD_[ietabin];
107  return calibrated;
108 }
std::vector< double > calibHF_eta_step_
std::vector< double > calibHF_b_EMHAD_
std::vector< double > calibHF_a_EMHAD_
double PFEnergyCalibrationHF::energyHad ( double  uncalibratedEnergyHCAL,
double  eta,
double  phi 
)

Definition at line 79 of file PFEnergyCalibrationHF.cc.

References mps_fire::i.

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

Definition at line 65 of file PFEnergyCalibrationHF.h.

References calibHF_a_EMHAD_.

Referenced by operator<<().

66  {return calibHF_a_EMHAD_;}
std::vector< double > calibHF_a_EMHAD_
const std::vector<double>& PFEnergyCalibrationHF::getcalibHF_a_EMonly ( ) const
inline

Definition at line 61 of file PFEnergyCalibrationHF.h.

References calibHF_a_EMonly_.

Referenced by operator<<().

62  {return calibHF_a_EMonly_;}
std::vector< double > calibHF_a_EMonly_
const std::vector<double>& PFEnergyCalibrationHF::getcalibHF_b_EMHAD ( ) const
inline

Definition at line 67 of file PFEnergyCalibrationHF.h.

References calibHF_b_EMHAD_.

Referenced by operator<<().

68  {return calibHF_b_EMHAD_;}
std::vector< double > calibHF_b_EMHAD_
const std::vector<double>& PFEnergyCalibrationHF::getcalibHF_b_HADonly ( ) const
inline

Definition at line 63 of file PFEnergyCalibrationHF.h.

References calibHF_b_HADonly_.

Referenced by operator<<().

64  {return calibHF_b_HADonly_;}
std::vector< double > calibHF_b_HADonly_
const std::vector<double>& PFEnergyCalibrationHF::getcalibHF_eta_step ( ) const
inline

Definition at line 59 of file PFEnergyCalibrationHF.h.

References calibHF_eta_step_.

Referenced by operator<<().

60  {return calibHF_eta_step_;}
std::vector< double > calibHF_eta_step_
const bool& PFEnergyCalibrationHF::getcalibHF_use ( ) const
inline

Definition at line 57 of file PFEnergyCalibrationHF.h.

References calibHF_use_.

Referenced by operator<<().

Friends And Related Function Documentation

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

Definition at line 110 of file PFEnergyCalibrationHF.cc.

111  {
112 
113 
114  if(!out ) return out;
115  out<<"PFEnergyCalibrationHF -- "<<endl;
116  int ii = 0;
117  for(std::vector<double>::const_iterator iteta =(calib.getcalibHF_eta_step()).begin();
118  iteta !=(calib.getcalibHF_eta_step()).end() ;++iteta){
119  //double currenteta = *iteta;
120  out<<" i "<<ii<<",";
121  out<<"use "<<calib.getcalibHF_use()<<",";
122  out<<"currenteta "<<calib.getcalibHF_eta_step()[ii]<<",";
123  out<<"calibHF_a_EMonly_ "<<calib.getcalibHF_a_EMonly()[ii]<<",";
124  out<<"calibHF_b_HADonly_ "<<calib.getcalibHF_b_HADonly()[ii]<<",";
125  out<<"calibHF_a_EMHAD_ "<<calib.getcalibHF_a_EMHAD()[ii]<<",";
126  out<<"calibHF_b_EMHAD_ "<<calib.getcalibHF_b_EMHAD()[ii]<<",";
127  out<<endl;
128  ii++;
129  }
130 
131 
132 
133  return out;
134 }
const std::vector< double > & getcalibHF_a_EMonly() const
const std::vector< double > & getcalibHF_eta_step() const
const std::vector< double > & getcalibHF_b_EMHAD() const
const std::vector< double > & getcalibHF_a_EMHAD() const
#define end
Definition: vmac.h:37
const bool & getcalibHF_use() const
ii
Definition: cuy.py:588
#define begin
Definition: vmac.h:30
const std::vector< double > & getcalibHF_b_HADonly() const

Member Data Documentation

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

Definition at line 78 of file PFEnergyCalibrationHF.h.

Referenced by getcalibHF_a_EMHAD().

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

Definition at line 76 of file PFEnergyCalibrationHF.h.

Referenced by getcalibHF_a_EMonly().

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

Definition at line 79 of file PFEnergyCalibrationHF.h.

Referenced by getcalibHF_b_EMHAD().

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

Definition at line 77 of file PFEnergyCalibrationHF.h.

Referenced by getcalibHF_b_HADonly().

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

Definition at line 75 of file PFEnergyCalibrationHF.h.

Referenced by getcalibHF_eta_step().

bool PFEnergyCalibrationHF::calibHF_use_
private

Definition at line 74 of file PFEnergyCalibrationHF.h.

Referenced by getcalibHF_use().