/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
GtGunGenTool Class Reference

#include <GtGunGenTool.h>

Inheritance diagram for GtGunGenTool:
Inheritance graph
[legend]
Collaboration diagram for GtGunGenTool:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 GtGunGenTool (const std::string &type, const std::string &name, const IInterface *parent)
virtual ~GtGunGenTool ()
virtual StatusCode initialize ()
virtual StatusCode finalize ()
virtual StatusCode mutate (HepMC::GenEvent &event)
 Modify the event.

Static Public Member Functions

static const InterfaceID & interfaceID ()
 Retrieve interface ID.

Private Member Functions

double generateNumber (const std::string &mode, double mean, double spread)
StatusCode oneVertex (HepMC::GenEvent &event)

Private Attributes

std::string m_particleName
 The PDG name for the particle.
int m_particlesPerEvent
 Number of particles per event to generate, default = 1.
std::string m_momentumInterpretation
 * Momentum (default) TotalEnergy KineticEnergy This allows the user to conveniently specify either the momentum or kinetic energy or total energy of the initial particles.
std::string m_momentumMode
 In what momentum mode to operate.
DoubleProperty m_momentum
 Momentum (Fixed mode) or mean momentum (Smeared/Uniform mode) of particles.
double m_momentumSpread
 Gaussian/Uniform momentum spread for Smeared/Uniform mode.
std::string m_directionMode
 In what direction mode to operate.
std::vector< double > m_direction
 Direction vector (Fixed mode) or mean direction vector (Smeared/Uniform mode) of particles.
double m_directionSpread
 Gaussian/Uniform angular spread for Smeared/Uniform mode.
std::string m_polarizeMode
 PolarizeMode : what method to use to select polarization.
Rndm::Numbers m_uni
Rndm::Numbers m_gauss
int m_pid
double m_mass

Detailed Description

Definition at line 32 of file GtGunGenTool.h.


Constructor & Destructor Documentation

GtGunGenTool::GtGunGenTool ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Definition at line 31 of file GtGunGenTool.cc.

    : GaudiTool(type,name,parent)
    , m_direction(3,0)
    , m_pid(0)
    , m_mass(0)
{
    declareInterface<IHepMCEventMutator>(this);

    declareProperty("ParticleName", m_particleName = "", 
                    "PDG particle name");
    declareProperty("ParticlesPerEvent",m_particlesPerEvent = 1,
                    "Number of particles per event to generate.");
    declareProperty("MomentumMode", m_momentumMode = "Fixed","Momentum mode");
    declareProperty("Momentum", m_momentum = 1.0*MeV,"Particle momentum");
    m_momentum.verifier().setLower(0.*eV);
    declareProperty("MomentumSpread", m_momentumSpread = 0,"Momentum spread");
    declareProperty("MomentumInterpretation",m_momentumInterpretation = "Momentum","Valid interpretation values are Momentum(default), KineticEnergy, TotalEnergy") ;
    declareProperty("DirectionMode", m_directionMode = "Fixed","Direction mode");
    m_direction[2] = 1.0;
    declareProperty("Direction", m_direction,"Direction");
    declareProperty("DirectionSpread",  m_directionSpread = 0,"Direction spread for cos(zenith angle)");
    declareProperty("PolarizeMode", m_polarizeMode = "None",
                    "Type of polarization of the particle.");
}
GtGunGenTool::~GtGunGenTool ( ) [virtual]

Definition at line 58 of file GtGunGenTool.cc.

{
}

Member Function Documentation

virtual StatusCode GtGunGenTool::initialize ( ) [virtual]
virtual StatusCode GtGunGenTool::finalize ( ) [virtual]
virtual StatusCode GtGunGenTool::mutate ( HepMC::GenEvent event) [virtual]

Modify the event.

Implements IHepMCEventMutator.

double GtGunGenTool::generateNumber ( const std::string &  mode,
double  mean,
double  spread 
) [private]

Definition at line 221 of file GtGunGenTool.cc.

{
    if (mode == "Smeared") {
        return m_gauss() * spread + mean;
    }
    if (mode == "Uniform") {
        return (m_uni()*2-1) * spread +mean ;
    }
    return mean;
}
StatusCode GtGunGenTool::oneVertex ( HepMC::GenEvent event) [private]
const InterfaceID & IHepMCEventMutator::interfaceID ( ) [static, inherited]

Retrieve interface ID.

Definition at line 8 of file IHepMCEventMutator.cc.

{ 
    return IID_IHepMCEventMutator; 
}

Member Data Documentation

std::string GtGunGenTool::m_particleName [private]

The PDG name for the particle.

Definition at line 53 of file GtGunGenTool.h.

Number of particles per event to generate, default = 1.

Definition at line 56 of file GtGunGenTool.h.

* Momentum (default) TotalEnergy KineticEnergy This allows the user to conveniently specify either the momentum or kinetic energy or total energy of the initial particles.

Definition at line 66 of file GtGunGenTool.h.

std::string GtGunGenTool::m_momentumMode [private]

In what momentum mode to operate.

Modes: Fixed - fixed momentum (default) Smeared - Gaussian momentum spread Uniform - Uniform spread (uniform over mean +/- spread)

Definition at line 72 of file GtGunGenTool.h.

DoubleProperty GtGunGenTool::m_momentum [private]

Momentum (Fixed mode) or mean momentum (Smeared/Uniform mode) of particles.

Default is 1 MeV

Definition at line 77 of file GtGunGenTool.h.

Gaussian/Uniform momentum spread for Smeared/Uniform mode.

Definition at line 80 of file GtGunGenTool.h.

std::string GtGunGenTool::m_directionMode [private]

In what direction mode to operate.

Modes: Fixed - fixed direction (default) Smeared - Gaussian angular spread Uniform - Uniform spread (uniform over mean +/- spread)

Definition at line 86 of file GtGunGenTool.h.

std::vector<double> GtGunGenTool::m_direction [private]

Direction vector (Fixed mode) or mean direction vector (Smeared/Uniform mode) of particles.

Vector is assume Cartesian. Default is along Z axis.

Definition at line 91 of file GtGunGenTool.h.

Gaussian/Uniform angular spread for Smeared/Uniform mode.

Definition at line 94 of file GtGunGenTool.h.

std::string GtGunGenTool::m_polarizeMode [private]

PolarizeMode : what method to use to select polarization.

None = no polarization, Random = random polarization. Default is None.

Definition at line 99 of file GtGunGenTool.h.

Rndm::Numbers GtGunGenTool::m_uni [private]

Definition at line 101 of file GtGunGenTool.h.

Rndm::Numbers GtGunGenTool::m_gauss [private]

Definition at line 101 of file GtGunGenTool.h.

int GtGunGenTool::m_pid [private]

Definition at line 102 of file GtGunGenTool.h.

double GtGunGenTool::m_mass [private]

Definition at line 103 of file GtGunGenTool.h.


The documentation for this class was generated from the following files:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 10:18:51 for GenTools by doxygen 1.7.4