Skip to content
This repository was archived by the owner on May 6, 2024. It is now read-only.

Commit d62991d

Browse files
committed
Add a model that prevents PN reactions
1 parent 6a2552b commit d62991d

3 files changed

Lines changed: 46 additions & 0 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#ifndef NOPHOTONUCLEARMODEL_H
2+
#define NOPHOTONUCLEARMODEL_H
3+
4+
#include <G4ProcessManager.hh>
5+
6+
#include "Framework/Configure/Parameters.h"
7+
#include "SimCore/PhotoNuclearModel.h"
8+
9+
namespace simcore {
10+
11+
class NoPhotoNuclearModel : public PhotoNuclearModel {
12+
public:
13+
NoPhotoNuclearModel(const std::string& name,
14+
const framework::config::Parameters& parameters)
15+
: PhotoNuclearModel{name, parameters} {}
16+
virtual ~NoPhotoNuclearModel() = default;
17+
void ConstructGammaProcess(G4ProcessManager* processManager) override;
18+
};
19+
20+
} // namespace simcore
21+
22+
#endif /* NOPHOTONUCLEARMODEL_H */

python/photonuclear_models.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,3 +125,16 @@ def kaon(min_products = 1, hard_particle_threshold=200.):
125125
]
126126
model.min_products = min_products
127127
return model
128+
129+
130+
class NoPhotoNuclearModel(simcfg.PhotoNuclearModel):
131+
"""A PhotoNuclear model that disables the photonuclear process entirely.
132+
133+
Make sure that no biasing operators for photonuclear reactions are enabled
134+
when using this model.
135+
136+
"""
137+
def __init__(self):
138+
super().__init__('NoPhotoNuclearModel',
139+
'simcore::NoPhotoNuclearModel',
140+
'SimCore_PhotoNuclearModels')
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#include "SimCore/PhotoNuclearModels/NoPhotoNuclearModel.h"
2+
3+
namespace simcore {
4+
5+
void NoPhotoNuclearModel::ConstructGammaProcess(
6+
G4ProcessManager* processManager) {
7+
// Do nothing
8+
}
9+
} // namespace simcore
10+
11+
DECLARE_PHOTONUCLEAR_MODEL(simcore::NoPhotoNuclearModel);

0 commit comments

Comments
 (0)