BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSPSCellFlux4D.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 BDSPSCELLFLUX4D_H
19#define BDSPSCELLFLUX4D_H
20#include "BDSBH4DTypeDefs.hh"
21
22#include "G4PSCellFlux3D.hh"
23#include "G4String.hh"
24#include "G4Types.hh"
25
27
33class BDSPSCellFlux4D: public G4PSCellFlux3D
34{
35public:
36 BDSPSCellFlux4D(const G4String& name,
37 const BDSHistBinMapper* mapperIn,
38 G4int ni = 1, G4int nj = 1, G4int nk = 1,
39 G4int depi = 2, G4int depj = 1, G4int depk = 0);
40
41 BDSPSCellFlux4D(const G4String& name,
42 const BDSHistBinMapper* mapperIn,
43 const G4String& unit,
44 G4int ni = 1, G4int nj = 1, G4int nk = 1,
45 G4int depi = 2, G4int depj = 1, G4int depk = 0);
46
47 virtual ~BDSPSCellFlux4D() override {;}
48
49protected:
50 G4int GetIndex(G4Step* aStep) override;
51
52private:
53 G4int fDepthi;
54 G4int fDepthj;
55 G4int fDepthk;
56 const BDSHistBinMapper* mapper;
57};
58
59#endif
Mapping from axis indices to 1D index.
Primitive scorer for cell flux in a 4D mesh.