#include <PUResidual3DCorrection.h>
|
| ~PU3DCorrectionHelper () |
|
float | correctedPt (float pt, float eta, float area, float rho, float mu, int NPV) const |
| Main function which returns the corrected pT. More...
|
|
float | correctionFactor (float pt, float eta, float area, float rho, float mu, int NPV) const |
| same as above but returns the ration pT_corrected/pT_uncorrected More...
|
|
float | correction3D (float pt, float eta, float mu, int NPV) const |
| calculate the mu,NPV dependent part of the correction. More...
|
|
float | deltaPtCorrection (float pt, float eta) const |
| IMPORTANT : the pt must be given in GeV. More...
|
|
void | loadParameters (const std::string &fileName, const std::string ¶m3D_name="param3D", const std::string ¶mDelta_name="paramDeltaPt", const std::string &etaBins_name="etaBins") |
| Loads the calib constants from histograms in TFile named fileName. More...
|
|
void | setupClosestNonEmptyBins () |
|
float | correction3D_noextrap (float pt, float eta, float mu, int NPV) const |
| calculate the mu,NPV dependent part of the correction (this is only used for tests and validation)
IMPORTANT : the pt must be given in GeV
More...
|
|
float | correction3D_interp (float pt, float eta, float mu, int NPV) const |
|
Definition at line 28 of file PUResidual3DCorrection.h.
◆ ~PU3DCorrectionHelper()
PUCorrection::PU3DCorrectionHelper::~PU3DCorrectionHelper |
( |
| ) |
|
|
inline |
◆ correctedPt()
float PUCorrection::PU3DCorrectionHelper::correctedPt |
( |
float |
pt, |
|
|
float |
eta, |
|
|
float |
area, |
|
|
float |
rho, |
|
|
float |
mu, |
|
|
int |
NPV |
|
) |
| const |
|
inline |
Main function which returns the corrected pT.
Definition at line 35 of file PUResidual3DCorrection.h.
43 pt_ref = pt_ref - areaCorr - calibration3D;
◆ correction3D()
float PUCorrection::PU3DCorrectionHelper::correction3D |
( |
float |
pt, |
|
|
float |
eta, |
|
|
float |
mu, |
|
|
int |
NPV |
|
) |
| const |
|
inline |
calculate the mu,NPV dependent part of the correction.
IMPORTANT : the pt must be given in GeV
Definition at line 62 of file PUResidual3DCorrection.h.
◆ correction3D_interp()
float PUCorrection::PU3DCorrectionHelper::correction3D_interp |
( |
float |
pt, |
|
|
float |
eta, |
|
|
float |
mu, |
|
|
int |
NPV |
|
) |
| const |
|
inline |
◆ correction3D_noextrap()
float PUCorrection::PU3DCorrectionHelper::correction3D_noextrap |
( |
float |
pt, |
|
|
float |
eta, |
|
|
float |
mu, |
|
|
int |
NPV |
|
) |
| const |
|
inline |
calculate the mu,NPV dependent part of the correction (this is only used for tests and validation)
IMPORTANT : the pt must be given in GeV
Definition at line 227 of file PUResidual3DCorrection.h.
234 if ( (
p0<= -999.9) || (
p1<=-999.9) )
return 0;
238 if (
p2<=-999.9 )
return 0;
◆ correctionFactor()
float PUCorrection::PU3DCorrectionHelper::correctionFactor |
( |
float |
pt, |
|
|
float |
eta, |
|
|
float |
area, |
|
|
float |
rho, |
|
|
float |
mu, |
|
|
int |
NPV |
|
) |
| const |
|
inline |
◆ deltaPtCorrection()
float PUCorrection::PU3DCorrectionHelper::deltaPtCorrection |
( |
float |
pt, |
|
|
float |
eta |
|
) |
| const |
|
inline |
◆ loadParameters()
void PUCorrection::PU3DCorrectionHelper::loadParameters |
( |
const std::string & |
fileName, |
|
|
const std::string & |
param3D_name = "param3D" , |
|
|
const std::string & |
paramDelta_name = "paramDeltaPt" , |
|
|
const std::string & |
etaBins_name = "etaBins" |
|
) |
| |
|
inline |
Loads the calib constants from histograms in TFile named fileName.
Definition at line 94 of file PUResidual3DCorrection.h.
99 std::unique_ptr<TFile> tmpF(TFile::Open(
fileName.c_str() ));
100 std::vector<float> * etaBins_v = (std::vector<float>*)tmpF->Get(etaBins_name.c_str());
101 std::vector<double>
tmp(etaBins_v->begin(), etaBins_v->end() );
103 TList *param3D_l = (TList*) tmpF->Get(param3D_name.c_str());
105 TList *param3D_p0 = (TList*) param3D_l->At(0);
107 TList *param3D_p1 = (TList*) param3D_l->At(1);
110 TList *param3D_p2 =
nullptr;
112 param3D_p2 = (TList*) param3D_l->At(2);
116 for(
size_t i=0 ;
i<(etaBins_v->size()-1);
i++){
128 TList* paramDelta_l = (TList*) tmpF->Get(paramDelta_name.c_str());
◆ setupClosestNonEmptyBins()
void PUCorrection::PU3DCorrectionHelper::setupClosestNonEmptyBins |
( |
| ) |
|
|
inline |
Definition at line 138 of file PUResidual3DCorrection.h.
146 int nTot = refHisto->GetNcells();
147 TAxis * xax = refHisto->GetXaxis();
148 TAxis * yax = refHisto->GetYaxis();
149 float xscale = 1./(xax->GetXmax()-xax->GetXmin()); xscale *= xscale;
150 float yscale = 1./(yax->GetXmax()-yax->GetXmin()); yscale *= yscale;
151 int nbinX = xax->GetNbins();
152 int nbinY = yax->GetNbins();
157 for(
int xi=1;xi<nbinX+1;xi++)
for(
int yi=1;yi<nbinY+1;yi++) {
158 int bi = refHisto->GetBin(xi,yi);
159 if(refHisto->GetBinContent( bi ) >-999.)
continue;
162 float x0 = xax->GetBinCenter(xi);
163 float y0 = yax->GetBinCenter(yi);
166 for(
int xj=1;xj<nbinX+1;xj++)
for(
int yj=1;yj<nbinY+1;yj++) {
167 int bj = refHisto->GetBin(xj,yj);
168 if(refHisto->GetBinContent( bj ) <=-999.)
continue;
169 float x = xax->GetBinCenter(xj);
170 float y = yax->GetBinCenter(yj);
171 float dr2 = (
x0-
x)*(x0-
x)*xscale+(
y0-
y)*(y0-
y)*yscale;
172 if(dr2<minDr2){ minDr2 = dr2; clBin = bj;}
◆ m_3Dp0_vs_muNPV
std::vector<std::unique_ptr<TH2D> > PUCorrection::PU3DCorrectionHelper::m_3Dp0_vs_muNPV |
◆ m_3Dp1_vs_muNPV
std::vector<std::unique_ptr<TH2D> > PUCorrection::PU3DCorrectionHelper::m_3Dp1_vs_muNPV |
◆ m_3Dp2_vs_muNPV
std::vector<std::unique_ptr<TH2D> > PUCorrection::PU3DCorrectionHelper::m_3Dp2_vs_muNPV |
◆ m_applyDeltaPtTerm
bool PUCorrection::PU3DCorrectionHelper::m_applyDeltaPtTerm = true |
◆ m_closestNonEmpty
std::vector< std::vector<int> > PUCorrection::PU3DCorrectionHelper::m_closestNonEmpty |
◆ m_Dptp0_vs_eta
std::unique_ptr<TH1F> PUCorrection::PU3DCorrectionHelper::m_Dptp0_vs_eta =nullptr |
◆ m_Dptp1_vs_eta
std::unique_ptr<TH1F> PUCorrection::PU3DCorrectionHelper::m_Dptp1_vs_eta =nullptr |
◆ m_etaBins
std::unique_ptr<TAxis> PUCorrection::PU3DCorrectionHelper::m_etaBins |
◆ m_maxPt
float PUCorrection::PU3DCorrectionHelper::m_maxPt =170.0 |
◆ m_pTEnergyScale
float PUCorrection::PU3DCorrectionHelper::m_pTEnergyScale = 0.001 |
◆ m_ref3DHisto
TH2D* PUCorrection::PU3DCorrectionHelper::m_ref3DHisto = nullptr |
◆ m_rhoEnergyScale
float PUCorrection::PU3DCorrectionHelper::m_rhoEnergyScale = 0.001 |
◆ m_use3Dp2
bool PUCorrection::PU3DCorrectionHelper::m_use3Dp2 =true |
The documentation for this struct was generated from the following file:
float correctedPt(float pt, float eta, float area, float rho, float mu, int NPV) const
Main function which returns the corrected pT.