AtNuResEnergyPdf Class Reference

#include <AtNuResEnergyPdf.h>

List of all members.

Public Member Functions

 AtNuResEnergyPdf ()
 ~AtNuResEnergyPdf ()
Double_t GetShowerWeight (Double_t ereco, Double_t etrue, Bool_t isQE=0)
Double_t GetMuonRangeWeight (Double_t ereco, Double_t etrue)
Double_t GetMuonCurveWeight (Double_t ereco, Double_t etrue, Double_t err)
Double_t GetShowerWeightCorrected (Double_t ereco, Double_t etrue, Bool_t isQE=0)
Double_t GetMuonRangeWeightCorrected (Double_t ereco, Double_t etrue)
Double_t GetMuonCurveWeightCorrected (Double_t ereco, Double_t etrue, Double_t err)
Double_t GetShowerWeightCorrected (Double_t ereco, Double_t etrue, Int_t inu, Bool_t isQE=0)
Double_t GetShowerWeightCorrectedNu (Double_t ereco, Double_t etrue, Bool_t isQE=0)
Double_t GetShowerWeightCorrectedNuBar (Double_t ereco, Double_t etrue, Bool_t isQE=0)

Detailed Description

Definition at line 6 of file AtNuResEnergyPdf.h.


Constructor & Destructor Documentation

AtNuResEnergyPdf::AtNuResEnergyPdf (  ) 

Definition at line 8 of file AtNuResEnergyPdf.cxx.

00009 {
00010 
00011 }

AtNuResEnergyPdf::~AtNuResEnergyPdf (  ) 

Definition at line 13 of file AtNuResEnergyPdf.cxx.

00014 {
00015 
00016 }


Member Function Documentation

Double_t AtNuResEnergyPdf::GetMuonCurveWeight ( Double_t  ereco,
Double_t  etrue,
Double_t  err 
)

Definition at line 90 of file AtNuResEnergyPdf.cxx.

00091 {
00092   // sanity check
00093   if( etrue<=0 || ereco<=0 ) return 0.0;
00094 
00095   Double_t frac = 1.0;
00096   Double_t invfrac = 1.0;
00097   Double_t sigma = ereco;
00098   Double_t delta = ereco-etrue;
00099   
00100   if( err>0.0 ){
00101     frac = err/ereco;
00102     invfrac = ereco/err;
00103     sigma = ereco*frac/(frac+0.45);
00104     delta = ereco*(1.0-exp(-invfrac))-etrue;
00105   }
00106     
00107   Double_t weight = exp(-(delta*delta)/(2.0*sigma*sigma));
00108   
00109   return weight;
00110 }

Double_t AtNuResEnergyPdf::GetMuonCurveWeightCorrected ( Double_t  ereco,
Double_t  etrue,
Double_t  err 
)

Definition at line 178 of file AtNuResEnergyPdf.cxx.

Referenced by AtNuResolution::AddToBayesPdf().

00179 {
00180   // sanity check
00181   if( etrue<=0 || ereco<=0 ) return 0.0;
00182 
00183   Double_t frac = 1.0;
00184   Double_t invfrac = 1.0;
00185   Double_t shift = 1.0;
00186   Double_t delta = ereco-etrue;
00187   Double_t sigma = ereco;
00188 
00189   Double_t E = 0.50*ereco+0.50*etrue;  
00190   Double_t E0 = 0.70-0.35/(0.0125*ereco*ereco+1.0);
00191   Double_t F0 = 1.00+0.10/(0.0125*ereco*ereco+1.0);
00192 
00193   if( err>0.0 ){
00194     frac = err/ereco;
00195     invfrac = ereco/err;
00196     sigma = E*F0*frac/(frac+E0);
00197     shift = 1.075-0.100/(0.05*ereco*ereco+1.0);
00198     delta = shift*ereco*(1.0-exp(-invfrac))-etrue;
00199   }
00200     
00201   Double_t weight = exp(-(delta*delta)/(2.0*sigma*sigma));
00202 
00203   return weight;
00204 }  

Double_t AtNuResEnergyPdf::GetMuonRangeWeight ( Double_t  ereco,
Double_t  etrue 
)

Definition at line 70 of file AtNuResEnergyPdf.cxx.

00071 {
00072   // sanity check
00073   if( etrue<=0 || ereco<=0 ) return 0.0;
00074 
00075   // resolution of momentum from range
00076   //  given by: sigma = A*E + B*sqrt(E) + C  [quadrature sum]
00077   //  from MC:  A=0.040, B=0.083, C=0.0
00078   
00079   Double_t A = 0.040;
00080   Double_t B = 0.083;
00081   Double_t C = 0.0;
00082 
00083   Double_t E = 0.50*ereco+0.50*etrue;
00084   Double_t sigmasigma = A*A*E*E+B*B*E+C*C;
00085   Double_t weight = exp(-(ereco-etrue)*(ereco-etrue)/(2.0*sigmasigma));
00086              
00087   return weight;
00088 }

Double_t AtNuResEnergyPdf::GetMuonRangeWeightCorrected ( Double_t  ereco,
Double_t  etrue 
)

Definition at line 158 of file AtNuResEnergyPdf.cxx.

Referenced by AtNuResolution::AddToBayesPdf().

00159 {
00160   // sanity check
00161   if( etrue<=0 || ereco<=0 ) return 0.0;
00162 
00163   // resolution of momentum from range
00164   //  given by: sigma = A*E + B*sqrt(E) + C  [quadrature sum]
00165   //  from MC:  A=0.040, B=0.083, C=0.0
00166 
00167   Double_t A = 0.040;
00168   Double_t B = 0.083;
00169   Double_t C = 0.0;
00170 
00171   Double_t E = 0.33*ereco+0.66*etrue;
00172   Double_t sigmasigma = A*A*E*E+B*B*E+C*C;
00173   Double_t weight = exp(-(ereco-etrue)*(ereco-etrue)/(2.0*sigmasigma));
00174 
00175   return weight;
00176 }

Double_t AtNuResEnergyPdf::GetShowerWeight ( Double_t  ereco,
Double_t  etrue,
Bool_t  isQE = 0 
)

Definition at line 19 of file AtNuResEnergyPdf.cxx.

00020 {  
00021   // sanity check
00022   if( etrue<=0 || ereco<0 ) return 0.0;
00023 
00024   // resolution of shower energy
00025   //  given by: sigma = A*E + B*sqrt(E) + C  [quadrature sum]
00026   //  from MC:  A=0.15, B=0.39, C=0.15
00027 
00028   if( isQE==0 ){
00029     Double_t A = 0.15;
00030     Double_t B = 0.39;
00031     Double_t C = 0.15;
00032   
00033     Double_t E = 0.66*ereco+0.33*etrue;  
00034     Double_t e0 = 0.22*(ereco*ereco-0.44*0.44)/(ereco*ereco+0.44*0.44);
00035     Double_t sigmasigma = (A*A*E*E+B*B*E+C*C)/((1.0+exp(-(ereco-0.25)/0.15))*(1.0+exp(-(etrue-0.40)/0.20)));
00036     Double_t nonqe_weight = exp(-(ereco-etrue-e0)*(ereco-etrue-e0)/(2.0*sigmasigma));
00037 
00038     return nonqe_weight;
00039   }
00040 
00041   else{ 
00042     Double_t elow = 0.055+0.33*(ereco-0.25);
00043     Double_t ehigh = 0.30+ereco;
00044     Double_t elowslope = 0.095+1.00*(ereco-0.25); 
00045     Double_t ehighslope = 0.175+0.175*(ereco-0.25);
00046     Double_t qe_weight = 1.0;
00047 
00048     if( elow<0.0 ) elow = 0.0;
00049     if( ehigh<elow ) ehigh = elow;
00050     if( elowslope<0.09 ) elowslope = 0.09;
00051     if( ehighslope<0.16 ) ehighslope = 0.16;
00052 
00053     qe_weight *= 1.0/(1.0+exp(-(etrue-0.04)/(0.02*ereco)));
00054 
00055     if( etrue<elow ){
00056       qe_weight *= 2.0*elow*etrue/(etrue*etrue+elow*elow);
00057     }
00058     else{
00059       qe_weight *= 1.0/(1.0+(etrue-elow)*(etrue-elow)/(elowslope*elowslope));
00060     }
00061 
00062     qe_weight *= (exp(-(etrue-ehigh)/ehighslope))/(1.0+exp(-(etrue-ehigh)/ehighslope));
00063 
00064     return qe_weight;
00065   }
00066 
00067   return 0.0;
00068 }

Double_t AtNuResEnergyPdf::GetShowerWeightCorrected ( Double_t  ereco,
Double_t  etrue,
Int_t  inu,
Bool_t  isQE = 0 
)

Definition at line 207 of file AtNuResEnergyPdf.cxx.

References GetShowerWeightCorrectedNu(), and GetShowerWeightCorrectedNuBar().

00208 {
00209   if( inu==+14 ) return this->GetShowerWeightCorrectedNu(ereco,etrue,isQE);
00210   if( inu==-14 ) return this->GetShowerWeightCorrectedNuBar(ereco,etrue,isQE);
00211   return 0.0;
00212 }

Double_t AtNuResEnergyPdf::GetShowerWeightCorrected ( Double_t  ereco,
Double_t  etrue,
Bool_t  isQE = 0 
)

Definition at line 115 of file AtNuResEnergyPdf.cxx.

Referenced by AtNuResolution::AddToBayesPdf().

00116 {  
00117   // sanity check
00118   if( etrue<=0 || ereco<0 ) return 0.0;
00119 
00120   // resolution of shower energy
00121   //  given by: sigma = A*E + B*sqrt(E) + C  [quadrature sum]
00122   //  from MC:  A=0.15, B=0.39, C=0.15
00123 
00124   if( isQE==0 ){
00125     Double_t A = 0.15;
00126     Double_t B = 0.39;
00127     Double_t C = 0.19;
00128 
00129     Double_t E = 0.50*ereco+0.50*etrue;  
00130     Double_t e0 = -0.35+0.25/(0.2*ereco*ereco+1.0);
00131     Double_t sigmasigma = A*A*E*E+B*B*E+C*C;
00132     Double_t nonqe_weight = exp(-(ereco-etrue-e0)*(ereco-etrue-e0)/(2.0*sigmasigma));
00133 
00134     return nonqe_weight;
00135   }
00136 
00137   else{
00138     Double_t A = 0.13;
00139     Double_t B = 0.37;
00140     Double_t C = 0.23;
00141 
00142     Double_t f = 0.0;
00143     if( ereco>=0.25 ){
00144       f += 0.25*(1.0-1.0/(1.5*(ereco-0.25)*(ereco-0.25)+1.0));
00145     }
00146 
00147     Double_t E = (0.25+f)*ereco+(0.75-f)*etrue;  
00148     Double_t e0 = -0.45+0.80/(4.5*ereco*ereco+1.0);
00149     Double_t sigmasigma = (A*A*E*E+B*B*E+C*C)/(1.0+exp(-(etrue-0.01)/(0.02+0.04*ereco)));
00150     Double_t qe_weight = exp(-(ereco-etrue-e0)*(ereco-etrue-e0)/(2.0*sigmasigma));
00151 
00152     return qe_weight;
00153   }
00154 
00155   return 0.0; 
00156 }

Double_t AtNuResEnergyPdf::GetShowerWeightCorrectedNu ( Double_t  ereco,
Double_t  etrue,
Bool_t  isQE = 0 
)

Definition at line 214 of file AtNuResEnergyPdf.cxx.

Referenced by GetShowerWeightCorrected().

00215 {
00216   // sanity check
00217   if( etrue<=0 || ereco<0 ) return 0.0;
00218 
00219   // resolution of shower energy
00220   //  given by: sigma = A*E + B*sqrt(E) + C  [quadrature sum]
00221   //  from MC:  A=0.15, B=0.39, C=0.15
00222 
00223   if( isQE==0 ){
00224     Double_t A = 0.15;
00225     Double_t B = 0.39;
00226     Double_t C = 0.19;
00227 
00228     Double_t E = 0.45*ereco+0.55*etrue;  
00229     Double_t e0 = -0.28+0.14/(1.2*ereco*ereco+1.0);
00230     Double_t sigmasigma = A*A*E*E+B*B*E+C*C;
00231     Double_t nonqe_weight = exp(-(ereco-etrue-e0)*(ereco-etrue-e0)/(2.0*sigmasigma));
00232 
00233     return nonqe_weight;
00234   }
00235 
00236   else{
00237     Double_t A = 0.13;
00238     Double_t B = 0.37;
00239     Double_t C = 0.23;
00240 
00241     Double_t f = 0.0;
00242     if( ereco>=0.25 ){
00243       f += 0.225*(1.0-1.0/(1.5*(ereco-0.25)*(ereco-0.25)+1.0));
00244     }
00245 
00246     Double_t E = (0.25+f)*ereco+(0.75-f)*etrue;  
00247     Double_t e0 = -0.45+0.90/(6.5*ereco*ereco+1.0);
00248     Double_t sigmasigma = (A*A*E*E+B*B*E+C*C)/(1.0+exp(-(etrue-0.01)/(0.02+0.12*ereco)));
00249     Double_t qe_weight = exp(-(ereco-etrue-e0)*(ereco-etrue-e0)/(2.0*sigmasigma));
00250 
00251     return qe_weight;
00252   }
00253 
00254   return 0.0; 
00255 }

Double_t AtNuResEnergyPdf::GetShowerWeightCorrectedNuBar ( Double_t  ereco,
Double_t  etrue,
Bool_t  isQE = 0 
)

Definition at line 257 of file AtNuResEnergyPdf.cxx.

Referenced by GetShowerWeightCorrected().

00258 {
00259   // sanity check
00260   if( etrue<=0 || ereco<0 ) return 0.0;
00261 
00262   // resolution of shower energy
00263   //  given by: sigma = A*E + B*sqrt(E) + C  [quadrature sum]
00264   //  from MC:  A=0.15, B=0.39, C=0.15
00265 
00266   if( isQE==0 ){
00267     Double_t A = 0.15;
00268     Double_t B = 0.39;
00269     Double_t C = 0.19;
00270 
00271     Double_t E = 0.55*ereco+0.45*etrue;  
00272     Double_t e0 = -0.18+0.12/(0.5*ereco*ereco+1.0);
00273     Double_t sigmasigma = A*A*E*E+B*B*E+C*C;
00274     Double_t nonqe_weight = exp(-(ereco-etrue-e0)*(ereco-etrue-e0)/(2.0*sigmasigma));
00275 
00276     return nonqe_weight;
00277   }
00278 
00279   else{
00280     Double_t A = 0.13;
00281     Double_t B = 0.37;
00282     Double_t C = 0.23;
00283 
00284     Double_t f = 0.0;
00285     if( ereco>=0.25 ){
00286       f += 0.275*(1.0-1.0/(7.5*(ereco-0.25)*(ereco-0.25)+1.0));
00287     }
00288 
00289     Double_t E = (0.25+f)*ereco+(0.75-f)*etrue;  
00290     Double_t e0 = -0.50+0.90/(3.5*ereco*ereco+1.0);
00291     Double_t sigmasigma = (A*A*E*E+B*B*E+C*C)/(1.0+exp(-(etrue-0.01)/(0.04+0.04*ereco)));
00292     Double_t qe_weight = exp(-(ereco-etrue-e0)*(ereco-etrue-e0)/(2.0*sigmasigma));
00293 
00294     return qe_weight;
00295   }
00296 
00297   return 0.0; 
00298 }


The documentation for this class was generated from the following files:

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1