Go to the documentation of this file.00001 #include "RecoEcal/EgammaCoreTools/plugins/EcalClusterEnergyUncertainty.h"
00002
00003
00004 float EcalClusterEnergyUncertainty::getValue( const reco::SuperCluster & superCluster, const int mode ) const
00005 {
00006 checkInit();
00007
00008
00009
00010 float en = superCluster.energy();
00011 float eta = fabs(superCluster.eta());
00012 float et = en/cosh(eta);
00013 float brem = superCluster.phiWidth()/superCluster.etaWidth();
00014
00015 int offset = 0;
00016
00017
00018
00019
00020 if ( eta < 1.5 ) offset = 0;
00021 else if ( eta >= 1.5 ) offset = 36;
00022 else {
00023
00024
00025
00026
00027
00028 return -1;
00029 }
00030 if ( mode == 0 ) offset += 0;
00031 else if ( mode == -1 ) offset += 12;
00032 else if ( mode == 1 ) offset += 24;
00033 else {
00034
00035 return 0;
00036 }
00037
00038 float br0_0 = (params_->params())[offset + 0];
00039 float br0_1 = (params_->params())[offset + 1];
00040 float br0_2 = (params_->params())[offset + 2];
00041 float br0_3 = (params_->params())[offset + 3];
00042
00043 float br1_0 = (params_->params())[offset + 4];
00044 float br1_1 = (params_->params())[offset + 5];
00045 float br1_2 = (params_->params())[offset + 6];
00046 float br1_3 = (params_->params())[offset + 7];
00047
00048 float br2_0 = (params_->params())[offset + 8];
00049 float br2_1 = (params_->params())[offset + 9];
00050 float br2_2 = (params_->params())[offset + 10];
00051 float br2_3 = (params_->params())[offset + 11];
00052
00053 float p0 = (br0_0 + br0_1*brem) + (br0_2 + br0_3*brem)/et;
00054 float p1 = (br1_0 + br1_1*brem) + (br1_2 + br1_3*brem)/et;
00055 float p2 = (br2_0 + br2_1*brem) + (br2_2 + br2_3*brem)/et;
00056
00057
00058
00059 float uncertainty = en*(p0 + p1*fabs(eta) + p2*eta*eta);
00060
00061
00062 return uncertainty;
00063
00064
00065 }
00066
00067 #include "RecoEcal/EgammaCoreTools/interface/EcalClusterFunctionFactory.h"
00068 DEFINE_EDM_PLUGIN( EcalClusterFunctionFactory, EcalClusterEnergyUncertainty, "EcalClusterEnergyUncertainty");