BOSS
7.0.5
BESIII Offline Software System
Loading...
Searching...
No Matches
Generator/SingleParticleGun/SingleParticleGun-01-00-05/SingleParticleGun/SingleParticleGun.h
Go to the documentation of this file.
1
// --------------------------------------------------
2
//
3
// File: SingleParticleGun/SingleParticleGun.h
4
// Description:
5
// This code is used to generate a single particle or a poissonly
6
// distributed set of particles with pt, theta and phi selected as
7
// specified by the JobOptionsService. Three modes of generation are
8
// possible:
9
// FixedMode: Generation with a fixed value
10
// GaussianMode: Generation with a gaussian of specified mean and
11
// sigma
12
// FlatMode: Generation of a flat distribution between a specified
13
// minimum and maximum value
14
// The mode can be separately selected for pt, theta and phi.
15
// or for E, theta and phi
16
// in PtMode user specifies Pt theta and phi
17
// in EMode user specifies E, theta and phi
18
// The particle species can also be specified
19
//
20
// The output will be stored in the transient event store so it can be
21
// passed to the simulation.
22
23
24
#ifndef GENERATORMODULESSINGLEPARTICLEGUN_H
25
#define GENERATORMODULESSINGLEPARTICLEGUN_H
26
27
#include "GeneratorModule/GenModule.h"
28
29
#include "CLHEP/Random/RandFlat.h"
30
#include "CLHEP/Random/RandGauss.h"
31
#include "CLHEP/Vector/LorentzVector.h"
32
33
class
IBesRndmGenSvc
;
34
35
struct
SingleParticleGunGenMode
{
36
enum
{
FixedMode
= 1,
GaussMode
= 2,
FlatMode
= 3};
37
};
38
struct
SingleEnergyMode
{
39
enum
{
EMode
= 1,
PtMode
= 2};
40
};
41
42
class
SingleParticleGun
:
public
GenModule
{
43
public
:
44
SingleParticleGun
(
const
std::string& name, ISvcLocator* pSvcLocator);
45
virtual
~SingleParticleGun
();
46
virtual
StatusCode
genInitialize
();
47
virtual
StatusCode
callGenerator
();
48
virtual
StatusCode
genFinalize
();
49
virtual
StatusCode
fillEvt
(GenEvent* evt);
50
51
private
:
52
// Setable Properties:-
53
double
m_requestedPt;
54
double
m_requestedPhi;
55
double
m_requestedE;
56
double
m_requestedTheta;
57
double
m_requestedX;
58
double
m_requestedY;
59
double
m_requestedZ;
60
double
m_requestedT;
61
double
m_minPt;
62
double
m_minE;
63
double
m_minTheta;
64
double
m_minPhi;
65
double
m_maxE;
66
double
m_maxPt;
67
double
m_maxTheta;
68
double
m_maxPhi;
69
double
m_sigmaPt;
70
double
m_sigmaE;
71
double
m_sigmaTheta;
72
double
m_sigmaPhi;
73
int
m_PtGenMode;
74
int
m_EGenMode;
75
int
m_ThetaGenMode;
76
int
m_PhiGenMode;
77
int
m_pdgCode;
78
int
m_Emode;
79
// event counter
80
int
m_events ;
81
82
// Local Member Data:-
83
IBesRndmGenSvc
* p_BesRndmGenSvc;
84
std::vector<long int> m_seeds;
85
86
double
m_mass;
87
CLHEP::HepLorentzVector m_fourMom;
88
CLHEP::HepLorentzVector m_fourPos;
89
90
91
// Private Methods:=
92
double
generateValue(
int
mode,
double
val,
double
sigma
,
double
min
,
93
double
max
);
94
95
};
96
97
#endif
sigma
TTree * sigma
Definition:
CurConst_dEdXCal.cxx:6
min
#define min(a, b)
Definition:
Eepipi/Eepipi-00-00-06/src/ee2eepp/basesv5.1/f2c.h:153
max
#define max(a, b)
Definition:
Eepipi/Eepipi-00-00-06/src/ee2eepp/basesv5.1/f2c.h:154
GenModule
Definition:
Generator/GeneratorModule/GeneratorModule-00-01-05/GeneratorModule/GenModule.h:41
IBesRndmGenSvc
manage multiple CLHEP random engines as named streams
Definition:
Control/BesKernel/BesKernel-00-00-03/BesKernel/IBesRndmGenSvc.h:24
SingleParticleGun
Definition:
Generator/SingleParticleGun/SingleParticleGun-01-00-05/SingleParticleGun/SingleParticleGun.h:42
SingleParticleGun::fillEvt
virtual StatusCode fillEvt(GenEvent *evt)
Definition:
SingleParticleGun.cxx:223
SingleParticleGun::genFinalize
virtual StatusCode genFinalize()
Definition:
SingleParticleGun.cxx:217
SingleParticleGun::genInitialize
virtual StatusCode genInitialize()
Definition:
SingleParticleGun.cxx:86
SingleParticleGun::callGenerator
virtual StatusCode callGenerator()
Definition:
SingleParticleGun.cxx:156
SingleParticleGun::~SingleParticleGun
virtual ~SingleParticleGun()
Definition:
SingleParticleGun.cxx:79
SingleEnergyMode
Definition:
Generator/SingleParticleGun/SingleParticleGun-01-00-05/SingleParticleGun/SingleParticleGun.h:38
SingleEnergyMode::PtMode
@ PtMode
Definition:
Generator/SingleParticleGun/SingleParticleGun-01-00-05/SingleParticleGun/SingleParticleGun.h:39
SingleEnergyMode::EMode
@ EMode
Definition:
Generator/SingleParticleGun/SingleParticleGun-01-00-05/SingleParticleGun/SingleParticleGun.h:39
SingleParticleGunGenMode
Definition:
Generator/SingleParticleGun/SingleParticleGun-01-00-05/SingleParticleGun/SingleParticleGun.h:35
SingleParticleGunGenMode::GaussMode
@ GaussMode
Definition:
Generator/SingleParticleGun/SingleParticleGun-01-00-05/SingleParticleGun/SingleParticleGun.h:36
SingleParticleGunGenMode::FlatMode
@ FlatMode
Definition:
Generator/SingleParticleGun/SingleParticleGun-01-00-05/SingleParticleGun/SingleParticleGun.h:36
SingleParticleGunGenMode::FixedMode
@ FixedMode
Definition:
Generator/SingleParticleGun/SingleParticleGun-01-00-05/SingleParticleGun/SingleParticleGun.h:36
source
Generator
SingleParticleGun
SingleParticleGun-01-00-05
SingleParticleGun
SingleParticleGun.h
Generated by
1.9.6