Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4VMoleculeCounter.cc
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26// G4VMoleculeCounter.cc
27// Geant4
28//
29// Created by Mathieu Karamitros on 02/11/2016.
30// Modified by Christian Velten on 10/27/2024.
31//
32//
33
34#include "G4VMoleculeCounter.hh"
35
37#include "G4ios.hh"
38
39//------------------------------------------------------------------------------
40
42
43G4VMoleculeCounter::G4VMoleculeCounter(const G4String& name, MoleculeCounterType type)
45{}
46
47//------------------------------------------------------------------------------
48
50{
51 if (fType == MoleculeCounterType::Basic && flag) {
53 errMsg << "Cannot set a molecule counter of type 'Basic' to be sensitive to stepping!"
54 << G4endl;
55 G4Exception("G4VMoleculeCounter::SetSensitiveToStepping", "NOT_ALLOWED", FatalException, errMsg);
56 }
58}
59
60//------------------------------------------------------------------------------
61
66
67//------------------------------------------------------------------------------
68
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
bool G4bool
Definition G4Types.hh:86
#define G4endl
Definition G4ios.hh:67
std::set< const G4MoleculeDefinition * > fIgnoredMolecules
G4bool IsReactantIgnored(const G4MoleculeDefinition *) const
std::set< const G4MolecularConfiguration * > fIgnoredReactants
void SetSensitiveToStepping(G4bool=true)
MoleculeCounterType fType
const char * name(G4int ptype)
G4bool Contains(const std::set< T > &_set, const T &_value)