Public Member Functions | Private Attributes | List of all members
genie::alvarezruso::ARWavefunction Class Reference

Wave function class for AlvarezRuso Coherent pion production xsec. More...

#include <ARWavefunction.h>

Public Member Functions

 ARWavefunction (unsigned int sampling_in, bool debug=false)
 
 ~ARWavefunction ()
 
std::string print () const
 
const std::vector< std::complex< double > > & operator[] (unsigned int i) const
 
const std::complex< double > & operator() (unsigned int i, unsigned int j) const
 
std::complex< double > get (unsigned int i, unsigned int j) const
 
void set (unsigned int i, unsigned int j, const std::complex< double > &value)
 
unsigned int sampling () const
 

Private Attributes

bool debug_
 
unsigned int sampling_
 
std::vector< std::vector< std::complex< double > > > wavefunction_
 

Detailed Description

Wave function class for AlvarezRuso Coherent pion production xsec.

Author
Steve Dennis University of Warwick, Rutherford Appleton Laboratory

05/12/2013

Copyright (c) 2003-2020, The GENIE Collaboration For the full text of the license visit http://copyright.genie-mc.org

Definition at line 30 of file ARWavefunction.h.

Constructor & Destructor Documentation

genie::alvarezruso::ARWavefunction::ARWavefunction ( unsigned int  sampling_in,
bool  debug = false 
)

Definition at line 24 of file ARWavefunction.cxx.

25  : debug_(debug),
26  sampling_(2*sampling_in),
27  wavefunction_(sampling_, std::vector<std::complex<double> >(sampling_, std::complex<double> (0.0,0.0)) )
28 {
29  if(debug_) std::cerr << "WF@ Constructor" << std::endl;
30 }
struct vector vector
std::vector< std::vector< std::complex< double > > > wavefunction_
QTextStream & endl(QTextStream &s)
genie::alvarezruso::ARWavefunction::~ARWavefunction ( )

Definition at line 32 of file ARWavefunction.cxx.

32 {}

Member Function Documentation

std::complex< double > genie::alvarezruso::ARWavefunction::get ( unsigned int  i,
unsigned int  j 
) const

Definition at line 62 of file ARWavefunction.cxx.

63 {
64  return wavefunction_[i][j];
65 }
std::vector< std::vector< std::complex< double > > > wavefunction_
const std::complex< double > & genie::alvarezruso::ARWavefunction::operator() ( unsigned int  i,
unsigned int  j 
) const

Definition at line 57 of file ARWavefunction.cxx.

58 {
59  return wavefunction_[i][j];
60 }
std::vector< std::vector< std::complex< double > > > wavefunction_
const std::vector< std::complex< double > > & genie::alvarezruso::ARWavefunction::operator[] ( unsigned int  i) const

Definition at line 52 of file ARWavefunction.cxx.

53 {
54  return wavefunction_[i];
55 }
std::vector< std::vector< std::complex< double > > > wavefunction_
std::string genie::alvarezruso::ARWavefunction::print ( ) const

Definition at line 34 of file ARWavefunction.cxx.

35 {
36  std::ostringstream oss;
37  oss << "{";
38  for(unsigned int i = 0; i != sampling_; ++i)
39  {
40  oss << "[";
41  for(unsigned int j = 0; j != sampling_; ++j)
42  {
43  oss << ((*this)[i][j]);
44  if( j != (sampling_ - 1) ) oss << ", ";
45  }
46  oss << "]";
47  }
48  oss << "}";
49  return oss.str();
50 }
unsigned int genie::alvarezruso::ARWavefunction::sampling ( ) const

Definition at line 72 of file ARWavefunction.cxx.

72 { return sampling_; }
void genie::alvarezruso::ARWavefunction::set ( unsigned int  i,
unsigned int  j,
const std::complex< double > &  value 
)

Definition at line 67 of file ARWavefunction.cxx.

68 {
69  wavefunction_[i][j] = value;
70 }
std::vector< std::vector< std::complex< double > > > wavefunction_

Member Data Documentation

bool genie::alvarezruso::ARWavefunction::debug_
private

Definition at line 52 of file ARWavefunction.h.

unsigned int genie::alvarezruso::ARWavefunction::sampling_
private

Definition at line 53 of file ARWavefunction.h.

std::vector< std::vector<std::complex<double> > > genie::alvarezruso::ARWavefunction::wavefunction_
private

Definition at line 54 of file ARWavefunction.h.


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