MCTrueAna Class Reference

#include <MCTrueAna.h>

List of all members.

Public Member Functions

 MCTrueAna ()
 ~MCTrueAna ()
void ana (ParticleObjectHolder *poh, MCTrue *e, ParticleBeamMon *bmon)
double OscillationProb (TF1 *f2, int ntype, double NuE, double sinth23, double sin2th13)

Static Public Attributes

static TF1 * osceq = 0
static SKZPWeightCalculatorskzpCalc = 0

Private Attributes

double osc_dm2
double osc_L
double osc_sinth23
double osc_sin2th13

Detailed Description

Definition at line 20 of file MCTrueAna.h.


Constructor & Destructor Documentation

MCTrueAna::MCTrueAna (  ) 

Definition at line 8 of file MCTrueAna.cxx.

References osc_dm2, osc_L, osc_sin2th13, osc_sinth23, osceq, and skzpCalc.

00009 {
00010         osc_dm2=0.0024;
00011         osc_L=735.; 
00012         osc_sinth23=sin(3.1415926535/4.0);
00013         osc_sin2th13=0.15;
00014 
00015 
00016         if(!osceq)
00017         {
00018                 osceq = new TF1("f2","sin(1.267*[0]*[1]/x)*sin(1.267*[0]*[1]/x)",0.,120.);
00019 
00020                 osceq->SetParameters(osc_dm2,osc_L);
00021         }
00022         
00023         if(!skzpCalc)skzpCalc=new SKZPWeightCalculator("DetXs",true);
00024 }

MCTrueAna::~MCTrueAna (  ) 

Definition at line 26 of file MCTrueAna.cxx.

00027 {
00028 }


Member Function Documentation

void MCTrueAna::ana ( ParticleObjectHolder poh,
MCTrue e,
ParticleBeamMon bmon 
)

Definition at line 31 of file MCTrueAna.cxx.

References ParticleBeamMon::beamtype, det, MCTrue::flux, SKZPWeightCalculator::GetBeamWeight(), VldContext::GetDetector(), RecRecordImp< T >::GetHeader(), VldContext::GetSimFlag(), RecHeader::GetVldContext(), MCTrue::iaction, MCTrue::inu, MCTrue::inunoosc, MCTrue::iresonance, Detector::kFar, SimFlag::kMC, ParticleObjectHolder::mctrue, MCTrue::nuenergy, osc_dm2, MCTrue::osc_dm2, osc_L, MCTrue::osc_L, osc_sin2th13, MCTrue::osc_sin2th13, MCTrue::osc_sinth23, osc_sinth23, osceq, OscillationProb(), MCTrue::oscprob, skzpCalc, MCTrue::totbeamweight, BeamType::ToZarko(), NtpMCFluxInfo::tpz, MCTrue::type, MCTrue::vtx_u, MCTrue::vtx_v, and MCTrue::vtx_z.

00032 {
00033 
00035         int ismc=bmon->GetHeader().GetVldContext().GetSimFlag() == SimFlag::kMC;
00036         if(!ismc)return; //can't do anything with data!
00037 
00038         VldContext evt_vldc = poh->GetHeader().GetVldContext();
00039         int det=evt_vldc.GetDetector(); 
00040 
00041         e->vtx_u=poh->mctrue.vtx_u;
00042         e->vtx_v=poh->mctrue.vtx_v;
00043         e->vtx_z=poh->mctrue.vtx_z;
00044                         
00045         e->inu=poh->mctrue.inu;
00046         e->iresonance=poh->mctrue.iresonance;
00047         e->iaction=poh->mctrue.iaction;
00048         e->inunoosc=poh->mctrue.inunoosc;
00049                 
00050         e->nuenergy=poh->mctrue.nuenergy;
00051 //      e->visenergy=poh->mctrue.visenergy;
00052                         
00053         
00054 
00055 
00056         
00058         //only in far!
00059 
00060         if(det==Detector::kFar)
00061         {
00062         int otype=0;
00063         if(e->iaction==1)
00064         {
00065                 if(abs(e->inu)==12)
00066                 {
00067                         if(abs(e->inunoosc)==12) otype=4;
00068                         else otype=2;
00069                 }       
00070                 if(abs(e->inu)==14)
00071                 {
00072                         if(abs(e->inunoosc)==12) otype=6;
00073                         else otype=1;
00074                 }       
00075                 if(abs(e->inu)==16)
00076                 {
00077                         if(abs(e->inunoosc)==12) otype=5;
00078                         if(abs(e->inunoosc)==14) otype=3;
00079                 }       
00080         }
00081 
00082         e->oscprob=OscillationProb(osceq, otype, e->nuenergy, osc_sinth23, osc_sin2th13); 
00083         e->osc_L=osc_L;
00084         e->osc_dm2=osc_dm2;
00085         e->osc_sinth23=osc_sinth23;
00086         e->osc_sin2th13=osc_sin2th13;
00087         }
00089         
00090         
00091         e->type = e->iaction * (abs(e->inu)/2-5);
00092         if(e->type==1 && (e->inu == e ->inunoosc)) e->type=4; //bnue
00093         
00094 
00095 
00096         
00097         
00098 
00099         BeamType::BeamType_t beam=bmon->beamtype;
00100     NtpMCFluxInfo fi= poh->mctrue.flux;
00101         double pt = sqrt(fi.tpx*fi.tpx+fi.tpy*fi.tpy);
00102         double pz = 1.*fi.tpz;
00103         int tptype = fi.tptype;
00104         int zbeam = BeamType::ToZarko(beam);
00105         e->totbeamweight = skzpCalc->GetBeamWeight(det,zbeam,tptype,pt,pz,e->nuenergy,e->inu);
00106 
00108 
00109         //e->trainweight = e->oscprob * e->totbeamweight ;
00110 
00111 
00112 
00113 }

double MCTrueAna::OscillationProb ( TF1 *  f2,
int  ntype,
double  NuE,
double  sinth23,
double  sin2th13 
)

Definition at line 122 of file MCTrueAna.cxx.

References osceq, and UtilMisc::OscProb().

Referenced by ana().

00122                                                                                                  {
00123 
00124  // sinth23 : sine square theta 23
00125  // sin2th13 : sine square 2 theta 13
00126  //
00127  double OscProb = 0 ;
00128  double NumuToNutau ;
00129  double NumuToNue ;
00130  double NueSurvival ;
00131  double NumuSurvival ;
00132  double NueToNutau  ;
00133  double NueToNumu;
00134 
00135  NumuToNutau = 4.*sinth23*(1.-sinth23)*pow(1-sin2th13/4,2) ;
00136  NumuToNutau *= osceq->Eval(TMath::Abs(NuE)) ;
00137 
00138  NumuToNue = sinth23*sin2th13*f2->Eval(TMath::Abs(NuE)) ;
00139 
00140  NueSurvival = 1.- sin2th13*f2->Eval(TMath::Abs(NuE)) ;
00141  //NueSurvival = 1.;
00142 
00143  NumuSurvival = 1. - NumuToNutau - NumuToNue ;
00144  //NumuSurvival = 1.;
00145 
00146  NueToNutau = (1.-sinth23)*sin2th13*f2->Eval(TMath::Abs(NuE)) ;
00147 
00148  NueToNumu = NumuToNue;
00149 
00150  if (ntype==0) OscProb = 1 ;
00151  else if (ntype==1) OscProb = NumuSurvival ;
00152  else if (ntype==2) OscProb = NumuToNue ;
00153  else if (ntype==3) OscProb = NumuToNutau ;
00154  else if (ntype==4) OscProb = NueSurvival ;
00155  else if (ntype==5) OscProb = NueToNutau ;
00156  else if (ntype==6) OscProb = NueToNumu;
00157 //  cout<<"Period = "<<f2->Eval(TMath::Abs(NuE))<<endl ;
00158 //  cout<<"Oscillation probability = "<<OscProb<<endl ;
00159 
00160  return OscProb ;
00161 } 


Member Data Documentation

double MCTrueAna::osc_dm2 [private]

Definition at line 38 of file MCTrueAna.h.

Referenced by ana(), and MCTrueAna().

double MCTrueAna::osc_L [private]

Definition at line 39 of file MCTrueAna.h.

Referenced by ana(), and MCTrueAna().

double MCTrueAna::osc_sin2th13 [private]

Definition at line 41 of file MCTrueAna.h.

Referenced by ana(), and MCTrueAna().

double MCTrueAna::osc_sinth23 [private]

Definition at line 40 of file MCTrueAna.h.

Referenced by ana(), and MCTrueAna().

TF1 * MCTrueAna::osceq = 0 [static]

Definition at line 32 of file MCTrueAna.h.

Referenced by ana(), MCTrueAna(), and OscillationProb().

Definition at line 33 of file MCTrueAna.h.

Referenced by ana(), and MCTrueAna().


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1