TYHadronWeight.h File Reference

#include "NueAna/NueRecord.h"

Go to the source code of this file.

Functions

double TYHadronWeight (double w2, double totpt, int npi0, int res, double *par)
double TYHadronWeight (NueRecord *nr, double *par)
double TYHadronWeight (NueRecord *nr)
double TYHadronWeight (double w2, double totpt, int npi0, int res)

Function Documentation

double TYHadronWeight ( double  w2,
double  totpt,
int  npi0,
int  res 
)

Definition at line 51 of file TYHadronWeight.cxx.

References TYDefPar, and TYHadronWeight().

00052 {
00053   return TYHadronWeight(w2,totpt,npi0,res, TYDefPar);
00054 }

double TYHadronWeight ( NueRecord nr  ) 

Definition at line 46 of file TYHadronWeight.cxx.

References TYDefPar, and TYHadronWeight().

00047 {
00048   return TYHadronWeight(nr, TYDefPar);
00049 }

double TYHadronWeight ( NueRecord nr,
double *  par 
)

Definition at line 38 of file TYHadronWeight.cxx.

References NueRecord::mctrue, StdHepInfo::npi0, ANtpTruthInfoBeam::resonanceCode, NueRecord::shi, StdHepInfo::totpt, TYHadronWeight(), and ANtpTruthInfoBeam::w2.

00039 {
00040    double w2 = double(nr->mctrue.w2);
00041 
00042    return TYHadronWeight(w2, nr->shi.totpt, nr->shi.npi0, 
00043                     nr->mctrue.resonanceCode, par);
00044 }

double TYHadronWeight ( double  w2,
double  totpt,
int  npi0,
int  res,
double *  par 
)

Definition at line 6 of file TYHadronWeight.cxx.

References MuELoss::e.

Referenced by TYHadronWeight().

00007 {
00008   //Params:
00009   //par[0] =  offset for A
00010   //par[1] =  slope for A
00011   //par[2] =  offset for B
00012   //par[3] =  slope for B
00013   //par[4] =  scale factor for npi0
00014  
00015   double wei = 1.0;
00016   if ( res != 1003) return wei;
00017 
00018   double A = 0.2289*TMath::Power(w2+18.14,-1.17)*(1+32.51*w2); //mean
00019   double B = 0.1886*TMath::Power(w2,0.3501);   //sigma
00020 
00021   double Ap = (par[0]+w2*par[1])*A;
00022   double Bp = (par[2]+w2*par[3])*B;
00023 
00024   double ExpTerm = -TMath::Power((totpt-Ap)/Bp,2)+TMath::Power((totpt-A)/B,2); 
00025   wei =wei*B/Bp*TMath::Exp(ExpTerm/2.0);
00026 
00027   double C = 0.01951+0.5909*TMath::Log(w2);
00028   double Cp = (par[4])*C;
00029   wei = wei*TMath::Exp(-(Cp-C))*TMath::Power(Cp/C,npi0);
00030 
00031   if (wei<0) wei = 1;
00032   if (wei<1e-5) wei = 0;
00033   if (wei>10) wei = 10;
00034 
00035   return wei;
00036 }


Generated on 2 Nov 2017 for loon by  doxygen 1.6.1