Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
genie::supernova::GFluxWindow Class Reference

A squre window, where neutrinos appear towards the origin (0,0,0) More...

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-12-02/GenieSNova/src/GFluxWindow.h"

Public Member Functions

 GFluxWindow (TVector3 pos, double size)
 
void GenerateNext (GenParticle &)
 
TVector3 Direction ()
 
double Area ()
 

Protected Member Functions

TVector3 GenPosition ()
 
void CalculateBasis ()
 

Protected Attributes

TVector3 fPosition
 
TVector3 fDirection
 
double fSize
 
TVector3 fBasisX
 
TVector3 fBasisY
 basis vectors in X for position generation More...
 

Detailed Description

A squre window, where neutrinos appear towards the origin (0,0,0)

Definition at line 12 of file GFluxWindow.h.

Constructor & Destructor Documentation

GFluxWindow::GFluxWindow ( TVector3  pos,
double  size 
)

Definition at line 16 of file GFluxWindow.cxx.

References CalculateBasis().

Member Function Documentation

double GFluxWindow::Area ( )

Definition at line 41 of file GFluxWindow.cxx.

References fSize.

Referenced by genie::supernova::GFluxSNova::Charge().

42 {
43  return fSize * fSize;
44 }
void GFluxWindow::CalculateBasis ( )
protected

Definition at line 58 of file GFluxWindow.cxx.

References fBasisX, fBasisY, fDirection, and fSize.

Referenced by GFluxWindow().

59 {
60  // Calculate Basis vectors
61  fBasisX = fDirection.Cross(TVector3(0, 1, 0));
62  if (fBasisX.Mag2() == 0)
63  fBasisX = fDirection.Cross(TVector3(0, 0, 1));
64 
65  fBasisY = fBasisX.Cross(fDirection);
66 
67  //normalize basis
68  fBasisX = fBasisX.Unit() * fSize;
69  fBasisY = fBasisY.Unit() * fSize;
70 }
TVector3 fBasisY
basis vectors in X for position generation
Definition: GFluxWindow.h:29
TVector3 GFluxWindow::Direction ( )

Definition at line 34 of file GFluxWindow.cxx.

References fDirection.

35 {
36  return fDirection;
37 }
void GFluxWindow::GenerateNext ( GenParticle particle)
TVector3 GFluxWindow::GenPosition ( )
protected

Definition at line 48 of file GFluxWindow.cxx.

References fBasisX, fBasisY, fPosition, genie::RandomGen::Instance(), generate_hists::rnd, genie::RandomGen::RndFlux(), submit_syst::x, and submit_syst::y.

Referenced by GenerateNext().

49 {
51  double x = rnd->RndFlux().Uniform(-0.5, 0.5);
52  double y = rnd->RndFlux().Uniform(-0.5, 0.5);
53  return (fBasisX * x) + (fBasisY * y) + fPosition;
54 }
static RandomGen * Instance()
Access instance.
Definition: RandomGen.cxx:79
A singleton holding random number generator classes. All random number generation in GENIE should tak...
Definition: RandomGen.h:30
TVector3 fBasisY
basis vectors in X for position generation
Definition: GFluxWindow.h:29
TRandom3 & RndFlux(void) const
rnd number generator used by flux drivers
Definition: RandomGen.h:72

Member Data Documentation

TVector3 genie::supernova::GFluxWindow::fBasisX
protected

Definition at line 28 of file GFluxWindow.h.

Referenced by CalculateBasis(), and GenPosition().

TVector3 genie::supernova::GFluxWindow::fBasisY
protected

basis vectors in X for position generation

Definition at line 29 of file GFluxWindow.h.

Referenced by CalculateBasis(), and GenPosition().

TVector3 genie::supernova::GFluxWindow::fDirection
protected

Definition at line 25 of file GFluxWindow.h.

Referenced by CalculateBasis(), Direction(), and GenerateNext().

TVector3 genie::supernova::GFluxWindow::fPosition
protected

Definition at line 24 of file GFluxWindow.h.

Referenced by GenPosition().

double genie::supernova::GFluxWindow::fSize
protected

Definition at line 26 of file GFluxWindow.h.

Referenced by Area(), and CalculateBasis().


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