Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

sim::MCTruth Class Reference

Event generator information. More...

#include <MCTruth.h>

List of all members.

Public Member Functions

 MCTruth ()
 ~MCTruth ()
int NuType () const
int CCNC () const
int Mode () const
double Enu () const
double Flux (int pdgcode, int which=0) const
int NParticles () const
const TParticle & GetParticle (int i) const
void Add (TParticle &part)
void SetNeutrino (int id, double enu)
void SetCCNC (int type)
void SetMode (int type)
void SetFluxPos (double nue, double nuebar, double numu, double numubar, double nutau, double nutaubar)
void SetFluxNeg (double nue, double nuebar, double numu, double numubar, double nutau, double nutaubar)
void SetFluxGen (double nue, double nuebar, double numu, double numubar, double nutau, double nutaubar)
void Print ()

Private Member Functions

 ClassDef (MCTruth, 3)

Private Attributes

std::vector< TParticle > fPartList
int fNuType
 PDG code of incident neutrino.

int fMode
 Interaction mode (QE/1-pi/DIS...).

int fCCNC
 CC or NC interaction?

float fEnu
 Incident neutrino energy.

float fFluxPos [6]
 e,ebar,mu,mubar,tau,taubar flux, +horn focus

float fFluxNeg [6]
 Fluxes as aboce, for negative horn focus.

float fFluxGen [6]
 Fluxes as above, assumed by generator.


Detailed Description

Event generator information.

Definition at line 39 of file MCTruth.h.


Constructor & Destructor Documentation

MCTruth::MCTruth  ) 
 

Definition at line 15 of file MCTruth.cxx.

References fFluxGen, fFluxNeg, and fFluxPos.

00015                  :
00016   fPartList(0),
00017   fNuType(0),
00018   fMode(0),
00019   fCCNC(0),
00020   fEnu(0)
00021 { 
00022   for (int i=0; i<6; ++i) fFluxGen[i]=fFluxPos[i]=fFluxNeg[i]= 0;
00023 }

MCTruth::~MCTruth  ) 
 

Definition at line 102 of file MCTruth.cxx.

00102 { }


Member Function Documentation

void sim::MCTruth::Add TParticle &  part  )  [inline]
 

Definition at line 56 of file MCTruth.h.

References fPartList.

Referenced by main(), and evgen::CRYGen::Sample().

00056 { fPartList.push_back(part); }

int sim::MCTruth::CCNC  )  const [inline]
 

Definition at line 46 of file MCTruth.h.

References fCCNC.

Referenced by mcchk::GenCheck::Ana().

00046 { return fCCNC;   }

sim::MCTruth::ClassDef MCTruth  ,
[private]
 

double sim::MCTruth::Enu  )  const [inline]
 

Definition at line 49 of file MCTruth.h.

References fEnu.

Referenced by mcchk::GenCheck::Ana().

00049 { return fEnu; }

double MCTruth::Flux int  pdgcode,
int  which = 0
const
 

Flux of neutrinos at the same energy

Parameters:
pdgcode : PDG code of neutrino flavor
which : Which flux (generated, plus focus, minus focus)
Returns:
: #neutrinos/cm^2/10^20 POT

Definition at line 33 of file MCTruth.cxx.

References fFluxGen, fFluxNeg, fFluxPos, sim::kGenerator, sim::kMinusFocus, and sim::kPlusFocus.

Referenced by mcchk::GenCheck::Ana().

00034 {
00035   const float* flux = 0;
00036   if (which==kGenerator)  flux = fFluxGen;
00037   if (which==kPlusFocus)  flux = fFluxPos;
00038   if (which==kMinusFocus) flux = fFluxNeg;
00039   if (pdgcode== 12) return flux[0];
00040   if (pdgcode==-12) return flux[1];
00041   if (pdgcode== 14) return flux[2];
00042   if (pdgcode==-14) return flux[3];
00043   if (pdgcode== 16) return flux[4];
00044   if (pdgcode==-16) return flux[5];
00045   return 0.0;
00046 }

const TParticle& sim::MCTruth::GetParticle int  i  )  const [inline]
 

Definition at line 53 of file MCTruth.h.

References fPartList.

00053 {return fPartList[i]; }

int sim::MCTruth::Mode  )  const [inline]
 

Definition at line 47 of file MCTruth.h.

References fMode.

00047 { return fMode;   }

int sim::MCTruth::NParticles  )  const [inline]
 

Definition at line 52 of file MCTruth.h.

References fPartList.

00052 { return (int)fPartList.size(); }

int sim::MCTruth::NuType  )  const [inline]
 

Definition at line 45 of file MCTruth.h.

References fNuType.

Referenced by mcchk::GenCheck::Ana().

00045 { return fNuType; }

void MCTruth::Print  ) 
 

Definition at line 83 of file MCTruth.cxx.

References fPartList.

Referenced by main().

00084 {
00085   for (unsigned int i=0; i<fPartList.size(); ++i) {
00086     std::cout << i << ") " 
00087               << fPartList[i].GetName() << "\t"
00088               << "["
00089               << fPartList[i].Vx() << ","
00090               << fPartList[i].Vy() << ","
00091               << fPartList[i].Vz() << ","
00092               << fPartList[i].T() 
00093               <<  "] ["
00094               << fPartList[i].Px() << ","
00095               << fPartList[i].Py() << ","
00096               << fPartList[i].Pz() 
00097               << "]"
00098               << std::endl;
00099   }
00100 }

void sim::MCTruth::SetCCNC int  type  )  [inline]
 

Definition at line 58 of file MCTruth.h.

References fCCNC.

00058 { fCCNC = type; }

void MCTruth::SetFluxGen double  nue,
double  nuebar,
double  numu,
double  numubar,
double  nutau,
double  nutaubar
 

Definition at line 72 of file MCTruth.cxx.

References fFluxGen.

00075 {
00076   fFluxGen[0] = nue;   fFluxGen[1] = nuebar;
00077   fFluxGen[2] = numu;  fFluxGen[3] = numubar;
00078   fFluxGen[4] = nutau; fFluxGen[5] = nutaubar;
00079 }

void MCTruth::SetFluxNeg double  nue,
double  nuebar,
double  numu,
double  numubar,
double  nutau,
double  nutaubar
 

Definition at line 61 of file MCTruth.cxx.

References fFluxNeg.

00064 {
00065   fFluxNeg[0] = nue;   fFluxNeg[1] = nuebar;
00066   fFluxNeg[2] = numu;  fFluxNeg[3] = numubar;
00067   fFluxNeg[4] = nutau; fFluxNeg[5] = nutaubar;
00068 }

void MCTruth::SetFluxPos double  nue,
double  nuebar,
double  numu,
double  numubar,
double  nutau,
double  nutaubar
 

Definition at line 50 of file MCTruth.cxx.

References fFluxPos.

00053 {
00054   fFluxPos[0] = nue;   fFluxPos[1] = nuebar;
00055   fFluxPos[2] = numu;  fFluxPos[3] = numubar;
00056   fFluxPos[4] = nutau; fFluxPos[5] = nutaubar;
00057 }

void sim::MCTruth::SetMode int  type  )  [inline]
 

Definition at line 59 of file MCTruth.h.

References fMode.

00059 { fMode = type; }

void sim::MCTruth::SetNeutrino int  id,
double  enu
[inline]
 

Definition at line 57 of file MCTruth.h.

References fEnu, and fNuType.

00057 { fNuType=id; fEnu = enu; }


Member Data Documentation

int sim::MCTruth::fCCNC [private]
 

CC or NC interaction?

Definition at line 77 of file MCTruth.h.

Referenced by CCNC(), and SetCCNC().

float sim::MCTruth::fEnu [private]
 

Incident neutrino energy.

Definition at line 78 of file MCTruth.h.

Referenced by Enu(), and SetNeutrino().

float sim::MCTruth::fFluxGen[6] [private]
 

Fluxes as above, assumed by generator.

Definition at line 82 of file MCTruth.h.

Referenced by Flux(), MCTruth(), and SetFluxGen().

float sim::MCTruth::fFluxNeg[6] [private]
 

Fluxes as aboce, for negative horn focus.

Definition at line 81 of file MCTruth.h.

Referenced by Flux(), MCTruth(), and SetFluxNeg().

float sim::MCTruth::fFluxPos[6] [private]
 

e,ebar,mu,mubar,tau,taubar flux, +horn focus

Definition at line 80 of file MCTruth.h.

Referenced by Flux(), MCTruth(), and SetFluxPos().

int sim::MCTruth::fMode [private]
 

Interaction mode (QE/1-pi/DIS...).

Definition at line 76 of file MCTruth.h.

Referenced by Mode(), and SetMode().

int sim::MCTruth::fNuType [private]
 

PDG code of incident neutrino.

Definition at line 75 of file MCTruth.h.

Referenced by NuType(), and SetNeutrino().

std::vector<TParticle> sim::MCTruth::fPartList [private]
 

Definition at line 73 of file MCTruth.h.

Referenced by Add(), GetParticle(), NParticles(), and Print().


The documentation for this class was generated from the following files:
Generated on Thu Sep 4 02:05:35 2008 for NOvA Offline by doxygen 1.3.5