BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSScorerFactory.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 BDSSCORERFACTORY_H
19#define BDSSCORERFACTORY_H
20
21#include "BDSScorerType.hh"
22
23#include "G4String.hh"
24#include "G4Types.hh"
25
27class BDSScorerInfo;
28class BDSSDFilterAnd;
29
30class G4LogicalVolume;
31class G4Material;
32class G4VPrimitiveScorer;
33
41{
42public:
45
47 G4VPrimitiveScorer* CreateScorer(const BDSScorerInfo* info,
48 const BDSHistBinMapper* mapper,
49 G4double* unit = nullptr,
50 G4LogicalVolume* worldLV = nullptr);
51
52private:
57
59 G4VPrimitiveScorer* GetAppropriateScorer(const BDSScorerInfo& info,
60 const BDSHistBinMapper* mapper,
61 G4double* unit = nullptr);
62
64 BDSSDFilterAnd* CreateFilter(const G4String& name,
65 const BDSScorerInfo* info,
66 G4LogicalVolume* worldLV = nullptr) const;
67};
68
69#endif
Mapping from axis indices to 1D index.
Filter that applies AND to a vector of filters.
Create primitive scorers on demand.
BDSSDFilterAnd * CreateFilter(const G4String &name, const BDSScorerInfo *info, G4LogicalVolume *worldLV=nullptr) const
Create a combined filter with AND logic for the scorer.
BDSScorerFactory(const BDSScorerFactory &)=delete
Unused default constructors.
BDSScorerFactory & operator=(const BDSScorerFactory &)=delete
Unused default constructors.
G4VPrimitiveScorer * CreateScorer(const BDSScorerInfo *info, const BDSHistBinMapper *mapper, G4double *unit=nullptr, G4LogicalVolume *worldLV=nullptr)
Main function to create a scorer.
G4VPrimitiveScorer * GetAppropriateScorer(const BDSScorerInfo &info, const BDSHistBinMapper *mapper, G4double *unit=nullptr)
Construct the primitive scorer required.
Recipe class for scorer. Checks values.