LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
pyMedicalBeam.cc File Reference
#include <boost/python.hpp>
#include "MedicalBeam.hh"
#include "G4ParticleTable.hh"
#include "G4RunManager.hh"

Go to the source code of this file.

Namespaces

 pyMedicalBeam
 

Functions

MedicalBeampyMedicalBeam::Construct ()
 
void pyMedicalBeam::SetParticleByName (MedicalBeam *beam, const std::string &pname)
 
std::string pyMedicalBeam::GetParticleByName (MedicalBeam *beam)
 
void pyMedicalBeam::f_SetFieldXY (MedicalBeam *beam, const list &listXY)
 
list pyMedicalBeam::f_GetFieldXY (MedicalBeam *beam)
 
 BOOST_PYTHON_MODULE (MedicalBeam)
 

Function Documentation

BOOST_PYTHON_MODULE ( MedicalBeam  )

Definition at line 114 of file pyMedicalBeam.cc.

References MedicalBeam::CIRCLE, pyMedicalBeam::Construct(), pyMedicalBeam::f_GetFieldXY(), pyMedicalBeam::f_SetFieldXY(), MedicalBeam::GetFieldR(), MedicalBeam::GetFieldShape(), MedicalBeam::GetFieldX(), MedicalBeam::GetFieldY(), MedicalBeam::GetKineticE(), pyMedicalBeam::GetParticleByName(), MedicalBeam::GetSourcePosition(), MedicalBeam::GetSSD(), MedicalBeam::SetFieldR(), MedicalBeam::SetFieldShape(), MedicalBeam::SetKineticE(), pyMedicalBeam::SetParticleByName(), MedicalBeam::SetSourcePosition(), MedicalBeam::SetSSD(), MedicalBeam::SQUARE, and fhicl::detail::atom::value().

114  {
115  class_<MedicalBeam, MedicalBeam*,
116  bases<G4VUserPrimaryGeneratorAction> >
117  ("MedicalBeam", "primary generator action with medical beam")
118  // ---
119  .add_property("particle", GetParticleByName, SetParticleByName)
120  .def("SetParticleByName", SetParticleByName)
121  .def("GetParticleByName", GetParticleByName)
122  // ---
123  .add_property("kineticE", &MedicalBeam::GetKineticE,
125  .def("SetKineticE", &MedicalBeam::SetKineticE)
126  .def("GetKineticE", &MedicalBeam::GetKineticE)
127  // ---
128  .add_property("sourcePosition", &MedicalBeam::GetSourcePosition,
130  .def("SetSourcePosition", &MedicalBeam::SetSourcePosition)
131  .def("GetSourcePosition", &MedicalBeam::GetSourcePosition)
132  // ---
133  .add_property("fieldShape", &MedicalBeam::GetFieldShape,
135  .def("SetFieldShape", &MedicalBeam::SetFieldShape)
136  .def("GetFieldShape", &MedicalBeam::GetFieldShape)
137  // ---
138  .add_property("SSD", &MedicalBeam::GetSSD, &MedicalBeam::SetSSD)
139  .def("SetSSD", &MedicalBeam::SetSSD)
140  .def("GetSSD", &MedicalBeam::GetSSD)
141  // ----
142  .add_property("fieldXY", f_GetFieldXY, f_SetFieldXY)
143  .def("SetFieldXY", f_SetFieldXY)
144  .def("GetFieldXY", f_GetFieldXY)
145  .def("GetFieldX", &MedicalBeam::GetFieldX)
146  .def("GetFieldY", &MedicalBeam::GetFieldY)
147  // ---
148  .add_property("fieldR", &MedicalBeam::GetFieldR, &MedicalBeam::SetFieldR)
149  .def("SetFieldR", &MedicalBeam::SetFieldR)
150  .def("GetFieldR", &MedicalBeam::GetFieldR)
151  ;
152 
153  // enums...
154  enum_<MedicalBeam::FieldShape>("FieldShape")
155  .value("SQUARE", MedicalBeam::SQUARE)
156  .value("CIRCLE", MedicalBeam::CIRCLE)
157  ;
158 
159  // ---
160  def("Construct", Construct,
161  return_value_policy<reference_existing_object>());
162 }
G4double GetFieldR() const
Definition: MedicalBeam.hh:140
G4double GetKineticE() const
Definition: MedicalBeam.hh:107
MedicalBeam * Construct()
void SetFieldShape(FieldShape shape)
Definition: MedicalBeam.hh:116
std::string GetParticleByName(MedicalBeam *beam)
void SetFieldR(G4double r)
Definition: MedicalBeam.hh:137
void SetSourcePosition(const G4ThreeVector &pos)
Definition: MedicalBeam.hh:110
void SetSSD(G4double ssd)
Definition: MedicalBeam.hh:122
list f_GetFieldXY(MedicalBeam *beam)
G4double GetFieldX() const
Definition: MedicalBeam.hh:131
std::string value(boost::any const &)
G4double GetSSD() const
Definition: MedicalBeam.hh:125
FieldShape GetFieldShape() const
Definition: MedicalBeam.hh:119
void SetParticleByName(MedicalBeam *beam, const std::string &pname)
void SetKineticE(G4double e)
Definition: MedicalBeam.hh:104
G4ThreeVector GetSourcePosition() const
Definition: MedicalBeam.hh:113
G4double GetFieldY() const
Definition: MedicalBeam.hh:134
void f_SetFieldXY(MedicalBeam *beam, const list &listXY)