#include <CaloHadDMCoeff.h>
|
| CaloHadDMCoeff () |
| Default Constructor. More...
|
|
| CaloHadDMCoeff (const CaloHadDMCoeff &other) |
|
CaloHadDMCoeff & | operator= (const CaloHadDMCoeff &other) |
|
const HadDMCoeff * | getHadDMCoeff (const int &dm_area, const float &cls_emfrac, const float &cls_ener, const float &cls_eta) const |
|
const HadDMCoeff * | getHadDMCoeff (const int &iBin) const |
|
const HadDMArea * | getHadDMArea (int n_area) const |
|
void | addHadDMCoeff (const HadDMCoeff &theData) |
|
void | setHadDMCoeff (const int iBin, const HadDMCoeff &theData) |
|
void | addHadDMArea (const HadDMArea &theArea) |
|
void | setHadDMArea (const int n_area, const HadDMArea &theArea) |
|
void | PrintData (FILE *fout=stdout) const |
|
int | getSizeDMAreaSet () const |
|
int | getSizeDMCoeffSet () const |
|
int | getBinFrac (const int dm_area, const float &cls_frac) const |
|
int | getBinEner (const int dm_area, const float &cls_ener) const |
|
int | getBinEta (const int dm_area, const float &cls_eta) const |
|
int | getBin (const int &n_dm_area, const float &cls_frac, const float &cls_ener, const float &cls_eta) const |
|
int | getBin (const int &n_dm_area, const int &ifrac, const int &iener, const int &ieta) const |
|
Definition at line 23 of file CaloHadDMCoeff.h.
◆ HadDMCoeff
◆ CaloHadDMCoeff() [1/2]
CaloHadDMCoeff::CaloHadDMCoeff |
( |
| ) |
|
|
default |
◆ CaloHadDMCoeff() [2/2]
◆ addHadDMArea()
◆ addHadDMCoeff()
◆ getBin() [1/2]
int CaloHadDMCoeff::getBin |
( |
const int & |
n_dm_area, |
|
|
const float & |
cls_frac, |
|
|
const float & |
cls_ener, |
|
|
const float & |
cls_eta |
|
) |
| const |
Definition at line 120 of file CaloHadDMCoeff.cxx.
122 if(n_dm_area < 0 || n_dm_area >= (
int)
m_DMAreaSet.size()) {
123 std::cout <<
" WARNING CaloHadDMCoeff::getBin -> wrong n_area: " << n_dm_area << std::endl;
126 int ifrac =
getBinFrac(n_dm_area, cls_emfrac);
128 int ieta =
getBinEta(n_dm_area, cls_eta);
129 int iBin =
getBin(n_dm_area, ifrac, iener, ieta);
◆ getBin() [2/2]
int CaloHadDMCoeff::getBin |
( |
const int & |
n_dm_area, |
|
|
const int & |
ifrac, |
|
|
const int & |
iener, |
|
|
const int & |
ieta |
|
) |
| const |
Definition at line 134 of file CaloHadDMCoeff.cxx.
138 if(ifrac!=-1 && iener !=-1 && ieta!=-1) {
139 iBin = ieta + iener*(
int)dmArea->m_EtaBins.size() + ifrac*(
int)dmArea->m_EnerBins.size()*(
int)dmArea->m_EtaBins.size() + dmArea->m_offset;
◆ getBinEner()
int CaloHadDMCoeff::getBinEner |
( |
const int |
dm_area, |
|
|
const float & |
cls_ener |
|
) |
| const |
Definition at line 90 of file CaloHadDMCoeff.cxx.
93 if(cls_ener < dmArea->m_MinEner || cls_ener >= dmArea->m_MaxEner)
return (-1);
95 int nener = (
int)dmArea->m_EnerBins.size();
96 for (iener=0; iener<nener; iener++) {
97 if( cls_ener < dmArea->m_EnerBins[iener] )
break;
98 if( cls_ener >= dmArea->m_EnerBins[iener] && (iener == nener-1 || cls_ener < dmArea->m_EnerBins[iener+1]) )
break;
◆ getBinEta()
int CaloHadDMCoeff::getBinEta |
( |
const int |
dm_area, |
|
|
const float & |
cls_eta |
|
) |
| const |
Definition at line 107 of file CaloHadDMCoeff.cxx.
110 if(cls_eta < dmArea->m_MinEta || cls_eta >= dmArea->m_MaxEta)
return (-1);
111 int neta = (
int)dmArea->m_EtaBins.size();
112 int ieta = (
int)((cls_eta - dmArea->m_MinEta)/(dmArea->m_MaxEta - dmArea->m_MinEta)*neta);
◆ getBinFrac()
int CaloHadDMCoeff::getBinFrac |
( |
const int |
dm_area, |
|
|
const float & |
cls_frac |
|
) |
| const |
Definition at line 73 of file CaloHadDMCoeff.cxx.
76 if(cls_emfrac < dmArea->m_MinFrac || cls_emfrac >= dmArea->m_MaxFrac)
return -1;
78 int nfrac = dmArea->m_FracBins.size();
79 for (ifrac=0; ifrac<nfrac; ifrac++) {
80 if( cls_emfrac < dmArea->m_FracBins[ifrac] )
break;
81 if( cls_emfrac >= dmArea->m_FracBins[ifrac] && (ifrac == nfrac-1 || cls_emfrac < dmArea->m_FracBins[ifrac+1]) )
break;
◆ getHadDMArea()
◆ getHadDMCoeff() [1/2]
◆ getHadDMCoeff() [2/2]
◆ getSizeDMAreaSet()
int CaloHadDMCoeff::getSizeDMAreaSet |
( |
| ) |
const |
|
inline |
◆ getSizeDMCoeffSet()
int CaloHadDMCoeff::getSizeDMCoeffSet |
( |
| ) |
const |
|
inline |
◆ operator=()
◆ PrintData()
void CaloHadDMCoeff::PrintData |
( |
FILE * |
fout = stdout | ) |
const |
Definition at line 145 of file CaloHadDMCoeff.cxx.
149 "# Coeffs for Dead Material corrections in CaloClusterLocalCalib algorithm.\n"
150 "# Author: Guennadi Pospelov <pospelov@mppmu.mpg.de>\n"
153 "# dm_id is_ON dm_title\n"
154 "# nFrac FracMin FracMax\n"
155 "# nEner EnerMin EnerMax\n"
156 "# nEta EtaMin EtaMax\n"
158 "# indx ifrac iener ieta frac ener eta pars[]\n"
164 fprintf(
fout,
" %d %d %s\n",
area->m_indx,
area->m_is_on,
area->m_title.data());
165 fprintf(
fout,
"%2d %6.3f %6.3f\n", (
int)
area->m_FracBins.size(),
area->m_MinFrac,
area->m_MaxFrac);
166 fprintf(
fout,
"%2d %6.3g %6.3g\n", (
int)
area->m_EnerBins.size(),
area->m_MinEner,
area->m_MaxEner);
167 fprintf(
fout,
"%2d %6.3f %6.3f\n", (
int)
area->m_EtaBins.size(),
area->m_MinEta,
area->m_MaxEta);
168 fprintf(
fout,
"%2d\n",
area->m_nPars);
169 for(
int i_frac=0; i_frac<(
int)
area->m_FracBins.size(); i_frac++){
170 for(
int i_ener=0; i_ener<(
int)
area->m_EnerBins.size(); i_ener++){
171 for(
int i_eta=0; i_eta<(
int)
area->m_EtaBins.size(); i_eta++){
172 float cls_emfrac =
area->m_FracBins[i_frac];
173 float cls_ener =
area->m_EnerBins[i_ener];
174 float cls_eta =
area->m_EtaBins[i_eta]+0.01;
176 fprintf(
fout,
"%4d %2d %2d %2d %6.3f %6.3g %6.3f ",
177 indx, i_frac,i_ener, i_eta,
area->m_FracBins[i_frac],
area->m_EnerBins[i_ener],
area->m_EtaBins[i_eta]);
178 for(
int i_par=0; i_par<
area->m_nPars; i_par++){
179 if(
area->m_indx!=10) {
180 fprintf(
fout,
"%10.4f ",(*
vv)[i_par]);
182 fprintf(
fout,
"%10.7f ",(*
vv)[i_par]);
◆ setHadDMArea()
◆ setHadDMCoeff()
◆ m_DMAreaSet
std::vector<HadDMArea> CaloHadDMCoeff::m_DMAreaSet |
|
private |
◆ m_DMCoeffSet
std::vector<HadDMCoeff> CaloHadDMCoeff::m_DMCoeffSet |
|
private |
The documentation for this class was generated from the following files: