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) BDSIM Collaboration, 2001 - 2026.
3
4This file is part of BDSIM.
5
6BDSIM is free software: you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published
8by the Free Software Foundation version 3 of the License.
9
10BDSIM is distributed in the hope that it will be useful, but
11WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with BDSIM. If not, see <http://www.gnu.org/licenses/>.
17*/
18#ifndef BDSBUNCHSIXTRACKLINK_H
19#define BDSBUNCHSIXTRACKLINK_H
20
21#include "BDSBunch.hh"
22#include "BDSParticleExternal.hh"
23
24#include <vector>
25
28
42{
43public:
45 virtual ~BDSBunchSixTrackLink();
46
49
51 void AddParticle(BDSParticleDefinition* particleDefinitionIn,
52 const BDSParticleCoordsFull& coordsIn,
53 int externalParticleID,
54 int externalParentID);
55
57 void ClearParticles();
58
60 inline size_t Size() const {return particles.size();}
61 inline int CurrentExternalParticleID() const {return currentExternalParticleID;}
62 inline int CurrentExternalParentID() const {return currentExternalParentID;}
64
66 inline virtual const BDSParticleDefinition* ParticleDefinition() const {return currentParticleDefinition;}
67
69 void UpdateGeant4ParticleDefinition(G4int pdgID);
70
72 virtual void UpdateIonDefinition();
73
74private:
75 G4int currentIndex;
76 G4int currentExternalParticleID;
77 G4int currentExternalParentID;
78 BDSParticleDefinition* currentParticleDefinition;
79
80 G4int size;
81 std::vector<BDSParticleExternal*> particles;
82};
83#endif
The base class for bunch distribution generators.
Definition BDSBunch.hh:46
A set of particle coordinates including energy and weight.
Wrapper for particle definition.