#include "EnergyCorrections.h"#include <cmath>Go to the source code of this file.
Functions | |
| float | CorrectMomentumFromRange (float p, bool isdata, Detector::Detector_t det) |
| float | CorrectSignedMomentumFromCurvature (float p, bool, Detector::Detector_t) |
| float | CorrectEnergyFromRange (float E, bool isdata, Detector::Detector_t det) |
| float | CorrectShowerEnergyNear (float E, const CandShowerHandle::ShowerType_t &st, int mode, bool) |
| float | CorrectShowerEnergyFar (float E, const CandShowerHandle::ShowerType_t &st, int mode, bool isdata) |
| float | CorrectShowerEnergy (float E, const Detector::Detector_t &det, const CandShowerHandle::ShowerType_t &st, int mode, bool isdata) |
|
||||||||||||||||
|
Definition at line 94 of file MCNNAnalysis/EnergyCorrections.cxx. References CorrectMomentumFromRange(), and det. 00094 {
00095 const float m=0.1057;// mon mass
00096 float p = sqrt(E*E -m*m);
00097 float pcor = CorrectMomentumFromRange(p,isdata,det);
00098 return sqrt(pcor*pcor +m*m);
00099 }
|
|
||||||||||||||||
|
Definition at line 62 of file MCNNAnalysis/EnergyCorrections.cxx. References det. Referenced by CorrectEnergyFromRange(), MadMKAnalysis::CreatePAN(), NtpTools::FillRecoEInfo(), MicroDSTMaker::FillRecoInfo(), MadEvDisplay::RecoMKMuEnergy(), MadMKAnalysis::RecoMKMuEnergy(), MadScanDisplay::RecoMKMuEnergy(), ANtpTrackInfoAna::RecoMuEnergy(), and MadQuantities::RecoMuEnergy(). 00062 {
00063 static const float c[4]={1.01334,0.05563,-0.05346,0.01205};
00064
00065 // correction for difference in data mc steel density
00066 if(isdata){
00067 // inital correction, pre-Oxford 2006
00068 //static const float dcor=7.755/7.87;// data/mc density
00069 float dcor=1;
00070 if (det==Detector::kNear) dcor=(7.85*2.563)/(7.87*2.54);
00071 else if(det==Detector::kFar) dcor=(7.85*2.558)/(7.87*2.54);
00072
00073 p*=dcor;
00074 }
00075 //
00076 float pcor=p/(c[0] + c[1]*log(p) + c[2]*pow(log(p), 2) + c[3]*pow(log(p),3));
00077 return pcor;
00078 }
|
|
||||||||||||||||||||||||
|
Definition at line 163 of file MCNNAnalysis/EnergyCorrections.cxx. References CorrectShowerEnergyFar(), CorrectShowerEnergyNear(), and det. Referenced by MadScanDisplay::Display(), MadEvDisplay::DrawTextBox(), MadScanDisplay::DrawTextBox(), NtpTools::FillRecoEInfo(), NCAnalysisCuts::IsGoodShower(), ANtpShowerInfoAna::RecoShwEnergy(), and MadMKAnalysis::RecoShwEnergy(). 00165 {
00166 float ecor=E;
00167 if(det==Detector::kNear){
00168 ecor = CorrectShowerEnergyNear(E,st,mode,isdata);
00169 }
00170 else if(det==Detector::kFar){
00171 ecor = CorrectShowerEnergyFar(E,st,mode,isdata);
00172 }
00173
00174 return ecor;
00175
00176 }
|
|
||||||||||||||||||||
|
Definition at line 128 of file MCNNAnalysis/EnergyCorrections.cxx. Referenced by CorrectShowerEnergy(), ANtpShowerInfoAna::RecoShwEnergy(), MadBase::RecoShwEnergy(), and MadQuantities::RecoShwEnergy(). 00128 {
00129
00130 float ecor=E;
00131 if(st==CandShowerHandle::kCC){
00132 if(isdata) {
00133 // a correction for the FD MIP scale
00134 // for the beam data, one measured MIP
00135 // actually corresponds to 1.018 MIPs
00136 // so we must correct shower energy up
00137 const float mip_scale_correction=1.018;
00138 E*=mip_scale_correction;
00139 }
00140
00141 if(mode==1){
00142 // Niki Correction
00143 ecor=((E)*(1.-0.12*exp(-0.12*E)));
00144 }
00145 else if(mode==2){
00146 // Andy Correction
00147 // ecor=(E)*(1.-0.2*exp(-0.2*E));
00148 ecor=E*(0.99-0.035*E*exp(-0.25*E));
00149 }
00150 }
00151 else if(st==CandShowerHandle::kWtCC){
00152 if(mode==1){
00153 // Niki Correction
00154 ecor=((E)*(1.+0.18*exp(-0.35*E)));
00155 }
00156 else if(mode==2){
00157 // Andy Correction
00158 E=ecor;
00159 }
00160 }
00161 return ecor;
00162 }
|
|
||||||||||||||||||||
|
Definition at line 102 of file MCNNAnalysis/EnergyCorrections.cxx. Referenced by CorrectShowerEnergy(), ANtpShowerInfoAna::RecoShwEnergy(), MadBase::RecoShwEnergy(), and MadQuantities::RecoShwEnergy(). 00102 {
00103
00104 float ecor=E;
00105 if(st==CandShowerHandle::kCC){
00106 if(mode==1){
00107 // Niki Correction
00108 ecor=E/1.18;
00109 }
00110 else if(mode==2){
00111 // Andy Correction
00112 ecor=((E/1.05)*(1.-0.35*exp(-0.18*E/1.06)));
00113 }
00114 }
00115 else if(st==CandShowerHandle::kWtCC){
00116 if(mode==1){
00117 // Niki Correction
00118 ecor=((E)*(1.+0.50*exp(-1.00*E)));
00119 }
00120 else if(mode==2){
00121 // Andy Correction
00122 ecor=E/1.03;
00123 }
00124 }
00125 return ecor;
00126 }
|
|
||||||||||||||||
|
Definition at line 80 of file MCNNAnalysis/EnergyCorrections.cxx. Referenced by MadMKAnalysis::CreatePAN(), NtpTools::FillRecoEInfo(), MicroDSTMaker::FillRecoInfo(), MadMKAnalysis::RecoMKMuEnergy(), ANtpTrackInfoAna::RecoMuEnergy(), and MadQuantities::RecoMuEnergy(). 00080 {
00081 // input is the signed momentum (e.g. p/q)
00082 // isdata and det are not used... but maybe in the future
00083 float pcor=p;
00084 if(pcor!=0) {
00085 // correction advertised in 1430-v2, J. Musser
00086 // note: for 1/p < 0 C=1, so correction only matters for mu+
00087 float C = (1.01+0.1*fabs(1/p))/(1.01-0.1*(1/p));
00088 pcor*=(1.0/C);
00089 }
00090 return pcor;
00091 }
|
1.3.9.1