BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Simulation/BOOST/GenSim/include/GenSim/BesPrimaryGeneratorAction.hh
Go to the documentation of this file.
1//---------------------------------------------------------------------------//
2// BOOST --- BESIII Object_Oriented Simulation Tool //
3//---------------------------------------------------------------------------//
4// Description: for generators, TESTER and GENBES
5// Author: Liuhm
6// Created: June, 2003
7// Modified:
8// Comment:
9//---------------------------------------------------------------------------//
10
11#ifndef BesPrimaryGeneratorAction_h
12#define BesPrimaryGeneratorAction_h 1
13
14#include "G4VUserPrimaryGeneratorAction.hh"
15#include "globals.hh"
16// #include "TFile.h"
17// #include "TNtuple.h"
18#include "TH1F.h"
19
20class G4ParticleGun;
21class G4Event;
22class G4ParticleTable;
24class G4VPrimaryGenerator;
25
26class BesPrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction {
27public:
30
31public:
32 void GeneratePrimaries( G4Event* anEvent );
33 // Getter and setters
34 G4String GetGeneratorName() { return generatorName; }
35 void SetGeneratorName( G4String genNew ) { generatorName = genNew; }
36 G4String GetGenbesName() { return genbesName; }
37 void SetGenbesName( G4String genbesNew ) { genbesName = genbesNew; }
38 void SetNParticle( G4int np ) { nParticle = np; }
39 void SetParticleName( G4String pname ) { particleName = pname; }
40 void SetMinCos( G4double min1 ) { minCos = min1; }
41 void SetMaxCos( G4double max1 ) { maxCos = max1; }
42 void SetPhiStart( G4double ps ) { phiStart = ps; }
43 void SetPhiEnd( G4double pe ) { phiEnd = pe; }
44 void SetMomentum( G4double pm ) { pMomentum = pm; }
45 void SetDeltaP( G4double dp ) { deltaP = dp; }
46 void SetPosX( G4double x ) { posX = x; }
47 void SetPosY( G4double y ) { posY = y; }
48 void SetPosZ( G4double z ) { posZ = z; }
49
50private:
51 G4ParticleGun* particleGun;
53 G4VPrimaryGenerator* HEPEvt;
54 G4String generatorName;
55 G4String genbesName;
56 G4bool isGenbes;
57
58 G4int nParticle;
59 G4String particleName;
60 G4double minCos;
61 G4double maxCos;
62 G4double phiStart;
63 G4double phiEnd;
64 G4double pMomentum;
65 G4double deltaP;
66 G4double posX;
67 G4double posY;
68 G4double posZ;
69 // TFile* ftest;
70 // TNtuple* tuple;
71 // G4int counter;
72 TH1F* h1;
73 TH1F* h2;
74 TH1F* h3;
75};
76
77#endif /*BesPrimaryGeneratorAction_h*/
void GeneratePrimaries(G4Event *anEvent)