NueRW Class Reference

#include <NueRW.h>

List of all members.

Public Types

enum  EFileType {
  kUnknown = 0, kBEAM = 1, kNUE = 2, kTAU = 3,
  kAGG = 4
}
typedef enum NueRW::EFileType FileType_t

Public Member Functions

 NueRW ()
virtual ~NueRW ()
virtual std::ostream & Print (std::ostream &os) const
virtual void Print (Option_t *option="") const
void Reset ()
int FindEBin (float E)
const NueRW operator+ (const NueRW &rw2) const
const NueRW operator/ (const float s) const

Static Public Member Functions

static const char * AsString (FileType_t t)

Public Attributes

int fRun
int fSubRun
Detector::Detector_t fDet
FileType_t fFileType
int ftgt
float qel_ma
float res_ma
float coh_ma
float qel_fa0
float qel_eta
float res_omega
float res_z
float coh_r0
float coh_rei
float kno_a1
float kno_a2
float kno_a3
float kno_a4
float kno_b
float kno_r112
float kno_r122
float kno_r132
float kno_r142
float kno_r113
float kno_r123
float kno_r133
float kno_r143
float dm2
float ss2th
float UE32
int randrow
int nfiles
int nsnarls
int nevents
int neventswpid
int nacc
float nsig
float nbg
float nnueb
float nnumu
float nnutau
float nnc
int EBINS
float EBINW
float * nsigE
float * nbgE
float * nnuebE
float * nnumuE
float * nnutauE
float * nncE

Detailed Description

Definition at line 7 of file NueRW.h.


Member Typedef Documentation


Member Enumeration Documentation

Enumerator:
kUnknown 
kBEAM 
kNUE 
kTAU 
kAGG 

Definition at line 13 of file NueRW.h.

00013                           {
00014       kUnknown = 0,
00015       kBEAM = 1,
00016       kNUE = 2,
00017       kTAU = 3,
00018       kAGG = 4
00019    } FileType_t;


Constructor & Destructor Documentation

NueRW::NueRW (  ) 

Definition at line 20 of file NueRW.cxx.

References EBINS, nbgE, nncE, nnuebE, nnumuE, nnutauE, and nsigE.

00020             :
00021    fRun(0),
00022    fSubRun(0),
00023    fDet(Detector::kUnknown),
00024    fFileType(NueRW::kUnknown),
00025    ftgt(0),
00026    qel_ma(0.),
00027    res_ma(0.),
00028    coh_ma(0.),
00029    qel_fa0(0.),
00030    qel_eta(0.),
00031    res_omega(0.),
00032    res_z(0.),
00033    coh_r0(0.),
00034    coh_rei(0.),
00035    kno_a1(0.),
00036    kno_a2(0.),
00037    kno_a3(0.),
00038    kno_a4(0.),
00039    kno_b(0.),
00040    kno_r112(0.),
00041    kno_r122(0.),
00042    kno_r132(0.),
00043    kno_r142(0.),
00044    kno_r113(0.),
00045    kno_r123(0.),
00046    kno_r133(0.),
00047    kno_r143(0.),
00048 
00049    dm2(0.),
00050    ss2th(0.),
00051    UE32(0.0),
00052 
00053    randrow(-1),
00054    nfiles(0),
00055    nsnarls(0),
00056    nevents(0),
00057    neventswpid(0),
00058    nacc(0),
00059    nsig(0.),
00060    nbg(0.),
00061    nnueb(0.),
00062    nnumu(0.),
00063    nnutau(0.),
00064    nnc(0.),
00065    EBINS(20),
00066    EBINW(1.)
00067 
00068 {
00069 
00070     nsigE=new float[EBINS];
00071     nbgE=new float[EBINS];
00072     nnuebE=new float[EBINS];
00073     nnumuE=new float[EBINS];
00074     nnutauE=new float[EBINS];
00075     nncE=new float[EBINS];
00076   
00077 
00078   for(int i=0;i<EBINS;i++){
00079     nsigE[i]=0.;
00080     nbgE[i]=0.;
00081     nnuebE[i]=0.;
00082     nnumuE[i]=0.;
00083     nnutauE[i]=0.;
00084     nncE[i]=0.;
00085   }
00086 }

NueRW::~NueRW (  )  [virtual]

Definition at line 88 of file NueRW.cxx.

00089 {}


Member Function Documentation

const char * NueRW::AsString ( FileType_t  t  )  [static]

Definition at line 8 of file NueRW.cxx.

References kUnknown.

Referenced by Print().

00008                                         {
00009   switch(t){
00010   case kUnknown: return "Unknown"; break;
00011   case kBEAM: return "Beam"; break;
00012   case kNUE: return "Nue"; break;
00013   case kTAU: return "Tau"; break;
00014   case kAGG: return "Aggregate"; break;
00015   default: return "Unknown"; break;
00016   }
00017   return "Unknown";
00018 }

int NueRW::FindEBin ( float  E  ) 

Definition at line 142 of file NueRW.cxx.

References EBINS, and EBINW.

Referenced by NueReweight::Reco().

00143 {
00144   if(E>1.e10){
00145     return EBINS-1;
00146   }
00147   int bin = (int)(fabs(E)/EBINW);
00148   if(bin>=EBINS){
00149     bin=EBINS-1;
00150   }
00151   return bin;
00152 
00153 }

const NueRW NueRW::operator+ ( const NueRW rw2  )  const [inline]

Definition at line 88 of file NueRW.h.

References MuELoss::a, coh_ma, coh_r0, coh_rei, dm2, EBINS, fDet, fFileType, kAGG, kno_a1, kno_a2, kno_a3, kno_a4, kno_b, kno_r112, kno_r113, kno_r122, kno_r123, kno_r132, kno_r133, kno_r142, kno_r143, nacc, nbg, nbgE, nevents, neventswpid, nfiles, nnc, nncE, nnueb, nnuebE, nnumu, nnumuE, nnutau, nnutauE, nsig, nsigE, nsnarls, qel_eta, qel_fa0, qel_ma, randrow, res_ma, res_omega, res_z, ss2th, and UE32.

00088                                                    {
00089       NueRW a;
00090       if(fDet!=rw2.fDet||randrow!=rw2.randrow){
00091          a.randrow=-99;
00092          return a;
00093       }
00094       a.fDet=fDet;
00095       a.randrow=randrow;
00096       a.fFileType=kAGG;
00097 
00098       a.qel_ma=qel_ma;
00099       a.res_ma=res_ma;
00100       a.coh_ma=coh_ma;
00101       a.qel_fa0=qel_fa0;
00102       a.qel_eta=qel_eta;
00103       a.res_omega=res_omega;
00104       a.res_z=res_z;
00105       a.coh_r0=coh_r0;
00106       a.coh_rei=coh_rei;
00107       a.kno_a1=kno_a1;
00108       a.kno_a2=kno_a2;
00109       a.kno_a3=kno_a3;
00110       a.kno_a4=kno_a4;
00111       a.kno_b=kno_b;
00112       a.kno_r112=kno_r112;
00113       a.kno_r122=kno_r122;
00114       a.kno_r132=kno_r132;
00115       a.kno_r142=kno_r142;
00116       a.kno_r113=kno_r113;
00117       a.kno_r123=kno_r123;
00118       a.kno_r133=kno_r133;
00119       a.kno_r143=kno_r143;
00120       a.dm2=dm2;
00121       a.ss2th=ss2th;
00122       a.UE32=UE32;
00123 
00124       a.nfiles=nfiles+rw2.nfiles;
00125       a.nsnarls=nsnarls+rw2.nsnarls;      
00126       a.nevents=nevents+rw2.nevents;
00127       a.neventswpid=neventswpid+rw2.neventswpid;
00128       a.nacc=nacc+rw2.nacc;
00129       a.nsig=nsig+rw2.nsig;
00130       a.nbg=nbg+rw2.nbg;
00131       a.nnueb=nnueb+rw2.nnueb;
00132       a.nnumu=nnumu+rw2.nnumu;
00133       a.nnutau=nnutau+rw2.nnutau;
00134       a.nnc=nnc+rw2.nnc;
00135       
00136       for(int i=0;i<EBINS;i++){
00137         a.nsigE[i]=nsigE[i]+rw2.nsigE[i];
00138         a.nbgE[i]=nbgE[i]+rw2.nbgE[i];
00139         a.nnuebE[i]=nnuebE[i]+rw2.nnuebE[i];
00140         a.nnumuE[i]=nnumuE[i]+rw2.nnumuE[i];
00141         a.nnutauE[i]=nnutauE[i]+rw2.nnutauE[i];
00142         a.nncE[i]=nncE[i]+rw2.nncE[i];
00143       }
00144       return a;
00145    }

const NueRW NueRW::operator/ ( const float  s  )  const [inline]

Definition at line 148 of file NueRW.h.

References MuELoss::a, coh_ma, coh_r0, coh_rei, dm2, EBINS, EBINW, fDet, fFileType, fRun, fSubRun, ftgt, kno_a1, kno_a2, kno_a3, kno_a4, kno_b, kno_r112, kno_r113, kno_r122, kno_r123, kno_r132, kno_r133, kno_r142, kno_r143, nacc, nbg, nbgE, nevents, neventswpid, nfiles, nnc, nncE, nnueb, nnuebE, nnumu, nnumuE, nnutau, nnutauE, nsig, nsigE, nsnarls, qel_eta, qel_fa0, qel_ma, randrow, res_ma, res_omega, res_z, ss2th, and UE32.

00148                                                 {
00149       NueRW a;
00150       a.fRun=fRun;
00151       a.fSubRun=fSubRun;
00152       a.fDet=fDet;
00153       a.fFileType=fFileType;
00154       a.ftgt=ftgt;
00155       a.qel_ma=qel_ma;
00156       a.res_ma=res_ma;
00157       a.coh_ma=coh_ma;
00158       a.qel_fa0=qel_fa0;
00159       a.qel_eta=qel_eta;
00160       a.res_omega=res_omega;
00161       a.res_z=res_z;
00162       a.coh_r0=coh_r0;
00163       a.coh_rei=coh_rei;
00164       a.kno_a1=kno_a1;
00165       a.kno_a2=kno_a2;
00166       a.kno_a3=kno_a3;
00167       a.kno_a4=kno_a4;
00168       a.kno_b=kno_b;
00169       a.kno_r112=kno_r112;
00170       a.kno_r122=kno_r122;
00171       a.kno_r132=kno_r132;
00172       a.kno_r142=kno_r142;
00173       a.kno_r113=kno_r113;
00174       a.kno_r123=kno_r123;
00175       a.kno_r133=kno_r133;
00176       a.kno_r143=kno_r143;      
00177       a.dm2=dm2;
00178       a.ss2th=ss2th;
00179       a.UE32=UE32;
00180 
00181       a.randrow=randrow;
00182       a.nfiles=nfiles;
00183       a.nsnarls=nsnarls;
00184       a.nevents=nevents;
00185       a.neventswpid=neventswpid;
00186       a.nacc=nacc;
00187 
00188       a.EBINS=EBINS;
00189       a.EBINW=EBINW;
00190       
00191       a.nsig=nsig/s;
00192       a.nbg=nbg/s;
00193       a.nnueb=nnueb/s;
00194       a.nnumu=nnumu/s;
00195       a.nnutau=nnutau/s;
00196       a.nnc=nnc/s;
00197 
00198       for(int i=0;i<EBINS;i++){
00199         a.nsigE[i]=nsigE[i]/s;
00200         a.nbgE[i]=nbgE[i]/s;
00201         a.nnuebE[i]=nnuebE[i]/s;
00202         a.nnumuE[i]=nnumuE[i]/s;
00203         a.nnutauE[i]=nnutauE[i]/s;
00204         a.nncE[i]=nncE[i]/s;
00205       }
00206       return a;
00207    }

void NueRW::Print ( Option_t *  option = ""  )  const [virtual]

Definition at line 91 of file NueRW.cxx.

References Print().

00092 {
00093    NueRW::Print(std::cout);
00094    return;
00095 }

std::ostream & NueRW::Print ( std::ostream &  os  )  const [virtual]

Definition at line 97 of file NueRW.cxx.

References AsString(), fDet, fFileType, fRun, fSubRun, ftgt, nacc, nbg, nevents, neventswpid, nnc, nnueb, nnumu, nnutau, nsig, nsnarls, and randrow.

Referenced by Print().

00098 {
00099    os<<"Run: "<<fRun<<" SubRun "<<fSubRun<<std::endl;
00100    os<<"Det "<<Detector::AsString(fDet)
00101      <<" File "<<AsString(fFileType)
00102      <<" itgt "<<ftgt<<std::endl
00103      <<"Rand Row: "<<randrow<<std::endl
00104      <<"NSnarls: "<<nsnarls<<" NEvents "<<nevents<<" NEvents w/PID "<<neventswpid<<std::endl
00105      <<"NAccepted: "<<nacc<<std::endl
00106      <<"Signal: "<<nsig<<" Total BG: "<<nbg<<std::endl
00107      <<"N nue beam "<<nnueb<<" N numu "<<nnumu<<" N nutau "<<nnutau<<" N NC "<<nnc<<std::endl;
00108    return os;
00109 }

void NueRW::Reset (  ) 

Definition at line 111 of file NueRW.cxx.

References EBINS, fDet, fFileType, fRun, fSubRun, ftgt, Detector::kUnknown, kUnknown, nacc, nbg, nbgE, nevents, neventswpid, nnc, nncE, nnueb, nnuebE, nnumu, nnumuE, nnutau, nnutauE, nsig, nsigE, nsnarls, and randrow.

Referenced by NueReweight::Reco(), and NueReweight::Reset().

00112 {
00113    fRun=0;
00114    fSubRun=0;
00115    fDet=Detector::kUnknown;
00116    fFileType=kUnknown;
00117    ftgt=0;
00118    randrow=0;
00119    nsnarls=0,
00120    nevents=0,
00121    neventswpid=0,
00122    nacc=0;
00123    nsig=0.;
00124    nbg=0.;
00125    nnueb=0.;
00126    nnumu=0.;
00127    nnutau=0.;
00128    nnc=0.;
00129 
00130    for(int i=0;i<EBINS;i++){
00131     nsigE[i]=0.;
00132     nbgE[i]=0.;
00133     nnuebE[i]=0.;
00134     nnumuE[i]=0.;
00135     nnutauE[i]=0.;
00136     nncE[i]=0.;
00137   }
00138      
00139 
00140 }


Member Data Documentation

Definition at line 37 of file NueRW.h.

Referenced by operator+(), operator/(), and NueReweight::ReadRandom().

Definition at line 42 of file NueRW.h.

Referenced by operator+(), operator/(), and NueReweight::ReadRandom().

Definition at line 43 of file NueRW.h.

Referenced by operator+(), operator/(), and NueReweight::ReadRandom().

float NueRW::dm2

Definition at line 58 of file NueRW.h.

Referenced by operator+(), operator/(), NueReweight::ReadRandom(), and NueReweight::Reco().

Definition at line 76 of file NueRW.h.

Referenced by FindEBin(), NueRW(), operator+(), operator/(), and Reset().

float NueRW::EBINW

Definition at line 77 of file NueRW.h.

Referenced by FindEBin(), and operator/().

Definition at line 31 of file NueRW.h.

Referenced by operator+(), operator/(), Print(), NueReweight::Reco(), and Reset().

Definition at line 32 of file NueRW.h.

Referenced by operator+(), operator/(), Print(), NueReweight::Reco(), and Reset().

Definition at line 29 of file NueRW.h.

Referenced by operator/(), Print(), NueReweight::Reco(), and Reset().

Definition at line 30 of file NueRW.h.

Referenced by operator/(), Print(), NueReweight::Reco(), and Reset().

Definition at line 33 of file NueRW.h.

Referenced by operator/(), Print(), and Reset().

Definition at line 44 of file NueRW.h.

Referenced by operator+(), operator/(), and NueReweight::ReadRandom().

Definition at line 45 of file NueRW.h.

Referenced by operator+(), operator/(), and NueReweight::ReadRandom().

Definition at line 46 of file NueRW.h.

Referenced by operator+(), operator/(), and NueReweight::ReadRandom().

Definition at line 47 of file NueRW.h.

Referenced by operator+(), operator/(), and NueReweight::ReadRandom().

float NueRW::kno_b

Definition at line 48 of file NueRW.h.

Referenced by operator+(), operator/(), and NueReweight::ReadRandom().

Definition at line 49 of file NueRW.h.

Referenced by operator+(), operator/(), NueReweight::ReadRandom(), and NueReweight::Reco().

Definition at line 53 of file NueRW.h.

Referenced by operator+(), operator/(), NueReweight::ReadRandom(), and NueReweight::Reco().

Definition at line 50 of file NueRW.h.

Referenced by operator+(), operator/(), NueReweight::ReadRandom(), and NueReweight::Reco().

Definition at line 54 of file NueRW.h.

Referenced by operator+(), operator/(), NueReweight::ReadRandom(), and NueReweight::Reco().

Definition at line 51 of file NueRW.h.

Referenced by operator+(), operator/(), NueReweight::ReadRandom(), and NueReweight::Reco().

Definition at line 55 of file NueRW.h.

Referenced by operator+(), operator/(), NueReweight::ReadRandom(), and NueReweight::Reco().

Definition at line 52 of file NueRW.h.

Referenced by operator+(), operator/(), NueReweight::ReadRandom(), and NueReweight::Reco().

Definition at line 56 of file NueRW.h.

Referenced by operator+(), operator/(), NueReweight::ReadRandom(), and NueReweight::Reco().

Definition at line 67 of file NueRW.h.

Referenced by operator+(), operator/(), Print(), NueReweight::Reco(), and Reset().

float NueRW::nbg

Definition at line 70 of file NueRW.h.

Referenced by operator+(), operator/(), Print(), NueReweight::Reco(), and Reset().

float* NueRW::nbgE

Definition at line 80 of file NueRW.h.

Referenced by NueRW(), operator+(), operator/(), NueReweight::Reco(), and Reset().

Definition at line 65 of file NueRW.h.

Referenced by operator+(), operator/(), Print(), NueReweight::Reco(), and Reset().

Definition at line 66 of file NueRW.h.

Referenced by operator+(), operator/(), Print(), and Reset().

Definition at line 63 of file NueRW.h.

Referenced by operator+(), and operator/().

float NueRW::nnc

Definition at line 74 of file NueRW.h.

Referenced by operator+(), operator/(), Print(), NueReweight::Reco(), and Reset().

float* NueRW::nncE

Definition at line 84 of file NueRW.h.

Referenced by NueRW(), operator+(), operator/(), NueReweight::Reco(), and Reset().

float NueRW::nnueb

Definition at line 71 of file NueRW.h.

Referenced by operator+(), operator/(), Print(), NueReweight::Reco(), and Reset().

float* NueRW::nnuebE

Definition at line 81 of file NueRW.h.

Referenced by NueRW(), operator+(), operator/(), NueReweight::Reco(), and Reset().

float NueRW::nnumu

Definition at line 72 of file NueRW.h.

Referenced by operator+(), operator/(), Print(), NueReweight::Reco(), and Reset().

float* NueRW::nnumuE

Definition at line 82 of file NueRW.h.

Referenced by NueRW(), operator+(), operator/(), NueReweight::Reco(), and Reset().

Definition at line 73 of file NueRW.h.

Referenced by operator+(), operator/(), Print(), NueReweight::Reco(), and Reset().

Definition at line 83 of file NueRW.h.

Referenced by NueRW(), operator+(), operator/(), NueReweight::Reco(), and Reset().

float NueRW::nsig

Definition at line 69 of file NueRW.h.

Referenced by operator+(), operator/(), Print(), NueReweight::Reco(), and Reset().

float* NueRW::nsigE

Definition at line 79 of file NueRW.h.

Referenced by NueRW(), operator+(), operator/(), NueReweight::Reco(), and Reset().

Definition at line 64 of file NueRW.h.

Referenced by operator+(), operator/(), Print(), NueReweight::Reco(), and Reset().

Definition at line 39 of file NueRW.h.

Referenced by operator+(), operator/(), and NueReweight::ReadRandom().

Definition at line 38 of file NueRW.h.

Referenced by operator+(), operator/(), and NueReweight::ReadRandom().

Definition at line 35 of file NueRW.h.

Referenced by operator+(), operator/(), NueReweight::ReadRandom(), and NueReweight::Reco().

Definition at line 62 of file NueRW.h.

Referenced by operator+(), operator/(), Print(), NueReweight::ReadRandom(), NueReweight::Reco(), and Reset().

Definition at line 36 of file NueRW.h.

Referenced by operator+(), operator/(), NueReweight::ReadRandom(), and NueReweight::Reco().

Definition at line 40 of file NueRW.h.

Referenced by operator+(), operator/(), and NueReweight::ReadRandom().

float NueRW::res_z

Definition at line 41 of file NueRW.h.

Referenced by operator+(), operator/(), and NueReweight::ReadRandom().

float NueRW::ss2th

Definition at line 59 of file NueRW.h.

Referenced by operator+(), operator/(), NueReweight::ReadRandom(), and NueReweight::Reco().

float NueRW::UE32

Definition at line 60 of file NueRW.h.

Referenced by operator+(), operator/(), NueReweight::ReadRandom(), and NueReweight::Reco().


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1