FlavorMod_Random Class Reference

A simple neutrino flavor modifier. More...

#include <FlavorMod_Random.h>

Inheritance diagram for FlavorMod_Random:
FlavorModifier

List of all members.

Public Member Functions

 FlavorMod_Random ()
virtual ~FlavorMod_Random ()
virtual void Configure (const char *option="")
 Configure the generator from a text string.
virtual TParticle ModifyFlavor (const TParticle &nu, double distance) const
virtual std::vector< int > FlavorList (const std::vector< int > &flvin)
 We need to know the potential final states.

Private Attributes

TRandom * fRandom
std::vector< int > fFlavorsOut

Detailed Description

A simple neutrino flavor modifier.

Author:
(last to touch it)
Author
rhatcher
Version:
Revision
1.1
Date:
Date
2006/06/06 05:06:26

Contact: rhatcher@fnal.gov

Created on: Wed Apr 13 18:16:24 2005

Id
FlavorMod_Random.h,v 1.1 2006/06/06 05:06:26 rhatcher Exp

Definition at line 28 of file FlavorMod_Random.h.


Constructor & Destructor Documentation

FlavorMod_Random::FlavorMod_Random (  ) 

Definition at line 11 of file FlavorMod_Random.cxx.

References Msg::kDebug, and MSG.

00012     : fRandom(new TRandom3)
00013 {
00014   MSG("EvtKin",Msg::kDebug) << "FlavorMod_Random ctor" << endl;
00015 
00016   fFlavorsOut.push_back( 12);
00017   fFlavorsOut.push_back(-12);
00018   fFlavorsOut.push_back( 14);
00019   fFlavorsOut.push_back(-14);
00020   fFlavorsOut.push_back( 16);
00021   fFlavorsOut.push_back(-16);
00022 
00023 }

FlavorMod_Random::~FlavorMod_Random (  )  [virtual]

Definition at line 26 of file FlavorMod_Random.cxx.

References fRandom, Msg::kDebug, and MSG.

00027 {
00028   MSG("EvtKin",Msg::kDebug) << "FlavorMod_Random dtor" << endl;
00029   if (fRandom) delete fRandom;
00030 }


Member Function Documentation

void FlavorMod_Random::Configure ( const char *  option = ""  )  [virtual]

Configure the generator from a text string.

Public interface:- Each generator that inherits from this interface must supply the following methods:

Implements FlavorModifier.

Definition at line 33 of file FlavorMod_Random.cxx.

References Msg::kDebug, Msg::kWarning, and MSG.

00034 {
00035   MSG("EvtKin",Msg::kDebug)
00036     << "FlavorMod_Random::Configure()" << endl
00037     <<"   '" << option << "'" << endl;
00038   MSG("EvtKin",Msg::kWarning)
00039     << "no configuration method implemented" << endl;
00040 }

std::vector< int > FlavorMod_Random::FlavorList ( const std::vector< int > &  flvin  )  [virtual]

We need to know the potential final states.

Implements FlavorModifier.

Definition at line 53 of file FlavorMod_Random.cxx.

References fFlavorsOut.

00054 {
00055   return fFlavorsOut;
00056 }

TParticle FlavorMod_Random::ModifyFlavor ( const TParticle &  nu,
double  distance 
) const [virtual]

Return a new particle with different flavor Users must be aware that the particle might be weighted (see TParticle::GetWeight()).

Implements FlavorModifier.

Definition at line 43 of file FlavorMod_Random.cxx.

References fFlavorsOut, and fRandom.

00045 {
00046   TParticle newnu(nu);
00047   size_t indx = fRandom->Integer(fFlavorsOut.size());
00048   newnu.SetPdgCode(fFlavorsOut[indx]);
00049   return newnu;
00050 }


Member Data Documentation

std::vector<int> FlavorMod_Random::fFlavorsOut [private]

Definition at line 51 of file FlavorMod_Random.h.

Referenced by FlavorList(), and ModifyFlavor().

TRandom* FlavorMod_Random::fRandom [private]

Definition at line 50 of file FlavorMod_Random.h.

Referenced by ModifyFlavor(), and ~FlavorMod_Random().


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1