CbmRoot
Loading...
Searching...
No Matches
CbmVMCSettings.h
Go to the documentation of this file.
1/* Copyright (C) 2020 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Florian Uhlig [committer] */
4
10#ifndef CBMVMCSETTINGS_H
11#define CBMVMCSETTINGS_H 1
12
20#include <Logger.h>
21
22#include <TObject.h>
23
24template<typename T>
25void CheckValueInRange(const T& value, const T& low, const T& high, std::string functionName)
26{
27 if ((value < low) || (value > high)) {
28 LOG(fatal) << "You try to set the value " << value << "which is out of the bounds(" << low << "," << high
29 << ") for the function " << functionName;
30 }
31}
32
33class TVirtualMC;
34
35class CbmVMCSettings : public TObject {
36
37public:
38 CbmVMCSettings() = default;
39 ~CbmVMCSettings() = default;
42
43
48 void Init(TVirtualMC*);
49
60 {
61 CheckValueInRange(val, 0, 2, "SetProcessPairProduction");
63 }
64
75 {
76 CheckValueInRange(val, 0, 2, "SetProcessComptonScattering");
78 }
79
89 void SetProcessPhotoEffect(Int_t val)
90 {
91 CheckValueInRange(val, 0, 2, "SetProcessPhotoEffect");
93 }
94
105 {
106 CheckValueInRange(val, 0, 2, "SetProcessPhotoFission");
108 }
109
119 void SetProcessDeltaRay(Int_t val)
120 {
121 CheckValueInRange(val, 0, 2, "SetProcessDeltaRay");
122 fProcessDeltaRay = val;
123 }
124
135 {
136 CheckValueInRange(val, 0, 2, "SetProcessAnnihilation");
138 }
139
150 {
151 CheckValueInRange(val, 0, 2, "SetProcessBremsstrahlung");
153 }
154
167 {
168 CheckValueInRange(val, 0, 5, "SetProcessHadronicInteraction");
170 }
171
182 {
183 CheckValueInRange(val, 0, 2, "SetProcessMuonNuclearInteraction");
185 }
186
196 void SetProcessDecay(Int_t val)
197 {
198 CheckValueInRange(val, 0, 2, "SetProcessDecay");
199 fProcessDecay = val;
200 }
201
217 {
218 CheckValueInRange(val, 0, 4, "SetProcessEnergyLossModel");
220 }
221
233 {
234 CheckValueInRange(val, 0, 3, "SetProcessMultipleScattering");
236 }
237
243 void SetEnergyCutGammas(Double_t val)
244 {
245 CheckValueInRange(val, 0., 100., "SetEnergyCutGammas");
246 fEnergyCutGammas = val;
247 }
248
254 void SetEnergyCutElectrons(Double_t val)
255 {
256 CheckValueInRange(val, 0., 100., "SetEnergyCutElectrons");
258 }
259
265 void SetEnergyCutNeutralHadrons(Double_t val)
266 {
267 CheckValueInRange(val, 0., 100., "SetEnergyCutNeutralHadrons");
269 }
270
276 void SetEnergyCutChargedHadrons(Double_t val)
277 {
278 CheckValueInRange(val, 0., 100., "SetEnergyCutChargedHadrons");
280 }
281
287 void SetEnergyCutMuons(Double_t val)
288 {
289 CheckValueInRange(val, 0., 100., "SetEnergyCutMuons");
290 fEnergyCutMuons = val;
291 }
292
299 {
300 CheckValueInRange(val, 0., 100., "SetEnergyCutElectronBremsstrahlung");
302 }
303
310 {
311 CheckValueInRange(val, 0., 100., "SetEnergyCutMuonHadronBremsstrahlung");
313 }
314
321 {
322 CheckValueInRange(val, 0., 100., "SetEnergyCutElectronDeltaRay");
324 }
325
331 void SetEnergyCutMuonDeltaRay(Double_t val)
332 {
333 CheckValueInRange(val, 0., 100., "SetEnergyCutMuonDeltaRay");
335 }
336
343 {
344 CheckValueInRange(val, 0., 100., "SetEnergyCutMuonPairProduction");
346 }
347
353 void SetTimeCutTof(Double_t val)
354 {
355 CheckValueInRange(val, 0., 2., "SetTimeCutTof");
356 fTimeCutTof = val;
357 }
358
359private:
369 Int_t fProcessDecay {1};
372
373 Double_t fEnergyCutGammas {1.e-3}; // GeV
374 Double_t fEnergyCutElectrons {1.e-3}; // GeV
375 Double_t fEnergyCutNeutralHadrons {1.e-3}; // GeV
376 Double_t fEnergyCutChargedHadrons {1.e-3}; // GeV
377 Double_t fEnergyCutMuons {1.e-3}; // GeV
378 Double_t fEnergyCutElectronBremsstrahlung {1.e-3}; // GeV
379 Double_t fEnergyCutMuonHadronBremsstrahlung {1.e-3}; // GeV
380 Double_t fEnergyCutElectronDeltaRay {1.e-3}; // GeV
381 Double_t fEnergyCutMuonDeltaRay {1.e-3}; // GeV
382 Double_t fEnergyCutMuonPairProduction {1.e-3}; // GeV
383
384 Double_t fTimeCutTof {1.0}; // s
385
387};
388
389#endif /* CBMVMCSETTINGS_H */
void CheckValueInRange(const T &value, const T &low, const T &high, std::string functionName)
User interface class to define the transport simulation settings which are common for both used trans...
void SetEnergyCutChargedHadrons(Double_t val)
Set the energy threshold for the transport of charged hadrons and ions.
Int_t fProcessComptonScattering
void SetTimeCutTof(Double_t val)
Set the time of flight threshold from the primary interaction time.
void Init(TVirtualMC *)
Set all parameters defined in this class.
void SetEnergyCutMuonDeltaRay(Double_t val)
Set the energy threshold for electrons produced by muon or hadron delta-rays.
ClassDef(CbmVMCSettings, 1)
Int_t fProcessBremsstrahlung
Double_t fEnergyCutElectronBremsstrahlung
void SetProcessPairProduction(Int_t val)
Control the pair production process.
void SetProcessMuonNuclearInteraction(Int_t val)
Control the muon-nucleus interaction.
void SetEnergyCutMuonHadronBremsstrahlung(Double_t val)
Set the energy threshold for photons produced by muon bremsstrahlung.
void SetProcessEnergyLossModel(Int_t val)
Control the continuous enery loss process.
~CbmVMCSettings()=default
void SetEnergyCutElectronBremsstrahlung(Double_t val)
Set the energy threshold for photons produced by electron bremsstrahlung.
void SetProcessAnnihilation(Int_t val)
Control the positron annihilation process.
void SetProcessComptonScattering(Int_t val)
Control the Compton scattering process.
Double_t fEnergyCutGammas
void SetProcessDecay(Int_t val)
Control the decay of particles in flight.
Double_t fEnergyCutMuonDeltaRay
void SetProcessMultipleScattering(Int_t val)
Control the multiple scattering process.
void SetEnergyCutMuonPairProduction(Double_t val)
Set the energy threshold for e+e- direct pair production by muons.
void SetProcessPhotoFission(Int_t val)
Control the process of nuclear fission induced by a photon.
Int_t fProcessEnergyLossModel
void SetEnergyCutNeutralHadrons(Double_t val)
Set the energy threshold for the transport of neutral hadrons.
Int_t fProcessMultipleScattering
void SetProcessPhotoEffect(Int_t val)
Control the photo-electric effect.
Double_t fEnergyCutChargedHadrons
Int_t fProcessHadronicInteraction
Double_t fEnergyCutMuonPairProduction
Int_t fProcessPairProduction
Double_t fEnergyCutMuons
void SetEnergyCutElectronDeltaRay(Double_t val)
Set the energy threshold for electrons produced by electron delta-rays.
void SetEnergyCutGammas(Double_t val)
Set the energy threshold for the transport of gammas.
void SetProcessDeltaRay(Int_t val)
Control the delta ray production.
Double_t fEnergyCutNeutralHadrons
Double_t fEnergyCutElectrons
Double_t fEnergyCutMuonHadronBremsstrahlung
CbmVMCSettings & operator=(const CbmVMCSettings &)=delete
Double_t fEnergyCutElectronDeltaRay
void SetProcessHadronicInteraction(Int_t val)
Control the hadronic interactions.
CbmVMCSettings(const CbmVMCSettings &)=delete
void SetEnergyCutElectrons(Double_t val)
Set the energy threshold for the transport of electros and positrons.
void SetProcessBremsstrahlung(Int_t val)
Control the process of bremsstrahlung.
Int_t fProcessMuonNuclearInteraction
CbmVMCSettings()=default
void SetEnergyCutMuons(Double_t val)
Set the energy threshold for the transport of muons.