BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSBunchSixTrackLink.hh
1/*
2Beam Delivery Simulation (BDSIM) Copyright (C) Royal Holloway,
3University of London 2001 - 2023.
4
5This file is part of BDSIM.
6
7BDSIM is free software: you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published
9by the Free Software Foundation version 3 of the License.
10
11BDSIM is distributed in the hope that it will be useful, but
12WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with BDSIM. If not, see <http://www.gnu.org/licenses/>.
18*/
19#ifndef BDSBUNCHSIXTRACKLINK_H
20#define BDSBUNCHSIXTRACKLINK_H
21
22#include "BDSBunch.hh"
23#include "BDSParticleExternal.hh"
24
25#include <vector>
26
29
43{
44public:
46 virtual ~BDSBunchSixTrackLink();
47
50
52 void AddParticle(BDSParticleDefinition* particleDefinitionIn,
53 const BDSParticleCoordsFull& coordsIn,
54 int externalParticleID,
55 int externalParentID);
56
58 void ClearParticles();
59
61 inline size_t Size() const {return particles.size();}
62 inline int CurrentExternalParticleID() const {return currentExternalParticleID;}
63 inline int CurrentExternalParentID() const {return currentExternalParentID;}
65
67 inline virtual const BDSParticleDefinition* ParticleDefinition() const {return currentParticleDefinition;}
68
70 void UpdateGeant4ParticleDefinition(G4int pdgID);
71
73 virtual void UpdateIonDefinition();
74
75private:
76 G4int currentIndex;
77 G4int currentExternalParticleID;
78 G4int currentExternalParentID;
79 BDSParticleDefinition* currentParticleDefinition;
80
81 G4int size;
82 std::vector<BDSParticleExternal*> particles;
83};
84#endif
The base class for bunch distribution generators.
Definition: BDSBunch.hh:47
A set of particle coordinates including energy and weight.
Wrapper for particle definition.