BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
BDSScorerFactory.hh
1/*
2Beam Delivery Simulation (BDSIM) Copyright (C) Royal Holloway,
3University of London 2001 - 2022.
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 BDSSCORERFACTORY_H
20#define BDSSCORERFACTORY_H
21
22#include "BDSScorerType.hh"
23
24#include "G4String.hh"
25#include "G4Types.hh"
26
28class BDSScorerInfo;
29class BDSSDFilterAnd;
30
31class G4LogicalVolume;
32class G4Material;
33class G4VPrimitiveScorer;
34
42{
43public:
46
48 G4VPrimitiveScorer* CreateScorer(const BDSScorerInfo* info,
49 const BDSHistBinMapper* mapper,
50 G4double* unit = nullptr,
51 G4LogicalVolume* worldLV = nullptr);
52
53private:
58
60 G4VPrimitiveScorer* GetAppropriateScorer(const BDSScorerInfo& info,
61 const BDSHistBinMapper* mapper,
62 G4double* unit = nullptr);
63
65 BDSSDFilterAnd* CreateFilter(const G4String& name,
66 const BDSScorerInfo* info,
67 G4LogicalVolume* worldLV = nullptr) const;
68};
69
70#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.