CbmRoot
CbmVMCSettings.h
Go to the documentation of this file.
1 
6 #ifndef CBMVMCSETTINGS_H
7 #define CBMVMCSETTINGS_H 1
8 
16 #include <TObject.h>
17 
18 #include "FairLogger.h"
19 
20 template<typename T>
21 void CheckValueInRange(const T& value,
22  const T& low,
23  const T& high,
24  std::string functionName) {
25  if ((value < low) || (value > high)) {
26  LOG(fatal) << "You try to set the value " << value
27  << "which is out of the bounds(" << low << "," << high
28  << ") for the function " << functionName;
29  }
30 }
31 
32 class TVirtualMC;
33 
34 class CbmVMCSettings : public TObject {
35 
36 public:
37  CbmVMCSettings() = default;
38  ~CbmVMCSettings() = default;
39  CbmVMCSettings(const CbmVMCSettings&) = delete;
41 
42 
47  void Init(TVirtualMC*);
48 
58  void SetProcessPairProduction(Int_t val) {
59  CheckValueInRange(val, 0, 2, "SetProcessPairProduction");
61  }
62 
72  void SetProcessComptonScattering(Int_t val) {
73  CheckValueInRange(val, 0, 2, "SetProcessComptonScattering");
75  }
76 
86  void SetProcessPhotoEffect(Int_t val) {
87  CheckValueInRange(val, 0, 2, "SetProcessPhotoEffect");
88  fProcessPhotoEffect = val;
89  }
90 
100  void SetProcessPhotoFission(Int_t val) {
101  CheckValueInRange(val, 0, 2, "SetProcessPhotoFission");
102  fProcessPhotoFission = val;
103  }
104 
114  void SetProcessDeltaRay(Int_t val) {
115  CheckValueInRange(val, 0, 2, "SetProcessDeltaRay");
116  fProcessDeltaRay = val;
117  }
118 
128  void SetProcessAnnihilation(Int_t val) {
129  CheckValueInRange(val, 0, 2, "SetProcessAnnihilation");
130  fProcessAnnihilation = val;
131  }
132 
142  void SetProcessBremsstrahlung(Int_t val) {
143  CheckValueInRange(val, 0, 2, "SetProcessBremsstrahlung");
145  }
146 
159  CheckValueInRange(val, 0, 5, "SetProcessHadronicInteraction");
161  }
162 
173  CheckValueInRange(val, 0, 2, "SetProcessMuonNuclearInteraction");
175  }
176 
186  void SetProcessDecay(Int_t val) {
187  CheckValueInRange(val, 0, 2, "SetProcessDecay");
188  fProcessDecay = val;
189  }
190 
205  void SetProcessEnergyLossModel(Int_t val) {
206  CheckValueInRange(val, 0, 4, "SetProcessEnergyLossModel");
208  }
209 
221  CheckValueInRange(val, 0, 3, "SetProcessMultipleScattering");
223  }
224 
230  void SetEnergyCutGammas(Double_t val) {
231  CheckValueInRange(val, 0., 100., "SetEnergyCutGammas");
232  fEnergyCutGammas = val;
233  }
234 
240  void SetEnergyCutElectrons(Double_t val) {
241  CheckValueInRange(val, 0., 100., "SetEnergyCutElectrons");
242  fEnergyCutElectrons = val;
243  }
244 
250  void SetEnergyCutNeutralHadrons(Double_t val) {
251  CheckValueInRange(val, 0., 100., "SetEnergyCutNeutralHadrons");
253  }
254 
260  void SetEnergyCutChargedHadrons(Double_t val) {
261  CheckValueInRange(val, 0., 100., "SetEnergyCutChargedHadrons");
263  }
264 
270  void SetEnergyCutMuons(Double_t val) {
271  CheckValueInRange(val, 0., 100., "SetEnergyCutMuons");
272  fEnergyCutMuons = val;
273  }
274 
281  CheckValueInRange(val, 0., 100., "SetEnergyCutElectronBremsstrahlung");
283  }
284 
291  CheckValueInRange(val, 0., 100., "SetEnergyCutMuonHadronBremsstrahlung");
293  }
294 
300  void SetEnergyCutElectronDeltaRay(Double_t val) {
301  CheckValueInRange(val, 0., 100., "SetEnergyCutElectronDeltaRay");
303  }
304 
310  void SetEnergyCutMuonDeltaRay(Double_t val) {
311  CheckValueInRange(val, 0., 100., "SetEnergyCutMuonDeltaRay");
313  }
314 
320  void SetEnergyCutMuonPairProduction(Double_t val) {
321  CheckValueInRange(val, 0., 100., "SetEnergyCutMuonPairProduction");
323  }
324 
330  void SetTimeCutTof(Double_t val) {
331  CheckValueInRange(val, 0., 2., "SetTimeCutTof");
332  fTimeCutTof = val;
333  }
334 
335 private:
340  Int_t fProcessDeltaRay {1};
345  Int_t fProcessDecay {1};
348 
349  Double_t fEnergyCutGammas {1.e-3}; // GeV
350  Double_t fEnergyCutElectrons {1.e-3}; // GeV
351  Double_t fEnergyCutNeutralHadrons {1.e-3}; // GeV
352  Double_t fEnergyCutChargedHadrons {1.e-3}; // GeV
353  Double_t fEnergyCutMuons {1.e-3}; // GeV
354  Double_t fEnergyCutElectronBremsstrahlung {1.e-3}; // GeV
355  Double_t fEnergyCutMuonHadronBremsstrahlung {1.e-3}; // GeV
356  Double_t fEnergyCutElectronDeltaRay {1.e-3}; // GeV
357  Double_t fEnergyCutMuonDeltaRay {1.e-3}; // GeV
358  Double_t fEnergyCutMuonPairProduction {1.e-3}; // GeV
359 
360  Double_t fTimeCutTof {1.0}; // s
361 
363 };
364 
365 #endif /* CBMVMCSETTINGS_H */
CbmVMCSettings::SetEnergyCutMuons
void SetEnergyCutMuons(Double_t val)
Set the energy threshold for the transport of muons.
Definition: CbmVMCSettings.h:270
CbmVMCSettings::fProcessBremsstrahlung
Int_t fProcessBremsstrahlung
Definition: CbmVMCSettings.h:342
CbmVMCSettings::SetProcessBremsstrahlung
void SetProcessBremsstrahlung(Int_t val)
Control the process of bremsstrahlung.
Definition: CbmVMCSettings.h:142
CbmVMCSettings::SetEnergyCutElectrons
void SetEnergyCutElectrons(Double_t val)
Set the energy threshold for the transport of electros and positrons.
Definition: CbmVMCSettings.h:240
CbmVMCSettings::fProcessEnergyLossModel
Int_t fProcessEnergyLossModel
Definition: CbmVMCSettings.h:346
CbmVMCSettings::CbmVMCSettings
CbmVMCSettings()=default
CbmVMCSettings::fProcessAnnihilation
Int_t fProcessAnnihilation
Definition: CbmVMCSettings.h:341
CbmVMCSettings::fEnergyCutChargedHadrons
Double_t fEnergyCutChargedHadrons
Definition: CbmVMCSettings.h:352
CbmVMCSettings::SetProcessPhotoEffect
void SetProcessPhotoEffect(Int_t val)
Control the photo-electric effect.
Definition: CbmVMCSettings.h:86
CbmVMCSettings::SetProcessMultipleScattering
void SetProcessMultipleScattering(Int_t val)
Control the multiple scattering process.
Definition: CbmVMCSettings.h:220
CbmVMCSettings::fProcessMultipleScattering
Int_t fProcessMultipleScattering
Definition: CbmVMCSettings.h:347
CbmVMCSettings::fProcessDeltaRay
Int_t fProcessDeltaRay
Definition: CbmVMCSettings.h:340
CbmVMCSettings::Init
void Init(TVirtualMC *)
Set all parameters defined in this class.
Definition: CbmVMCSettings.cxx:7
CbmVMCSettings::fTimeCutTof
Double_t fTimeCutTof
Definition: CbmVMCSettings.h:360
CbmVMCSettings::SetProcessDeltaRay
void SetProcessDeltaRay(Int_t val)
Control the delta ray production.
Definition: CbmVMCSettings.h:114
CbmVMCSettings::SetProcessDecay
void SetProcessDecay(Int_t val)
Control the decay of particles in flight.
Definition: CbmVMCSettings.h:186
CbmVMCSettings::ClassDef
ClassDef(CbmVMCSettings, 1)
CheckValueInRange
void CheckValueInRange(const T &value, const T &low, const T &high, std::string functionName)
Definition: CbmVMCSettings.h:21
CbmVMCSettings::SetProcessMuonNuclearInteraction
void SetProcessMuonNuclearInteraction(Int_t val)
Control the muon-nucleus interaction.
Definition: CbmVMCSettings.h:172
CbmVMCSettings::SetEnergyCutElectronDeltaRay
void SetEnergyCutElectronDeltaRay(Double_t val)
Set the energy threshold for electrons produced by electron delta-rays.
Definition: CbmVMCSettings.h:300
CbmVMCSettings::SetEnergyCutGammas
void SetEnergyCutGammas(Double_t val)
Set the energy threshold for the transport of gammas.
Definition: CbmVMCSettings.h:230
CbmVMCSettings::~CbmVMCSettings
~CbmVMCSettings()=default
CbmVMCSettings::SetProcessHadronicInteraction
void SetProcessHadronicInteraction(Int_t val)
Control the hadronic interactions.
Definition: CbmVMCSettings.h:158
CbmVMCSettings::fEnergyCutMuons
Double_t fEnergyCutMuons
Definition: CbmVMCSettings.h:353
CbmVMCSettings::fEnergyCutElectrons
Double_t fEnergyCutElectrons
Definition: CbmVMCSettings.h:350
CbmVMCSettings::fEnergyCutElectronDeltaRay
Double_t fEnergyCutElectronDeltaRay
Definition: CbmVMCSettings.h:356
CbmVMCSettings::SetProcessEnergyLossModel
void SetProcessEnergyLossModel(Int_t val)
Control the continuous enery loss process.
Definition: CbmVMCSettings.h:205
CbmVMCSettings::fEnergyCutElectronBremsstrahlung
Double_t fEnergyCutElectronBremsstrahlung
Definition: CbmVMCSettings.h:354
CbmVMCSettings::SetEnergyCutElectronBremsstrahlung
void SetEnergyCutElectronBremsstrahlung(Double_t val)
Set the energy threshold for photons produced by electron bremsstrahlung.
Definition: CbmVMCSettings.h:280
CbmVMCSettings::fEnergyCutGammas
Double_t fEnergyCutGammas
Definition: CbmVMCSettings.h:349
CbmVMCSettings::SetEnergyCutChargedHadrons
void SetEnergyCutChargedHadrons(Double_t val)
Set the energy threshold for the transport of charged hadrons and ions.
Definition: CbmVMCSettings.h:260
CbmVMCSettings::SetEnergyCutNeutralHadrons
void SetEnergyCutNeutralHadrons(Double_t val)
Set the energy threshold for the transport of neutral hadrons.
Definition: CbmVMCSettings.h:250
CbmVMCSettings::fProcessHadronicInteraction
Int_t fProcessHadronicInteraction
Definition: CbmVMCSettings.h:343
CbmVMCSettings::CbmVMCSettings
CbmVMCSettings(const CbmVMCSettings &)=delete
CbmVMCSettings::SetEnergyCutMuonPairProduction
void SetEnergyCutMuonPairProduction(Double_t val)
Set the energy threshold for e+e- direct pair production by muons.
Definition: CbmVMCSettings.h:320
CbmVMCSettings::fProcessPhotoEffect
Int_t fProcessPhotoEffect
Definition: CbmVMCSettings.h:338
CbmVMCSettings::SetTimeCutTof
void SetTimeCutTof(Double_t val)
Set the time of flight threshold from the primary interaction time.
Definition: CbmVMCSettings.h:330
CbmVMCSettings::fProcessPairProduction
Int_t fProcessPairProduction
Definition: CbmVMCSettings.h:336
CbmVMCSettings::operator=
CbmVMCSettings & operator=(const CbmVMCSettings &)=delete
CbmVMCSettings::SetProcessAnnihilation
void SetProcessAnnihilation(Int_t val)
Control the positron annihilation process.
Definition: CbmVMCSettings.h:128
CbmVMCSettings::fProcessDecay
Int_t fProcessDecay
Definition: CbmVMCSettings.h:345
CbmVMCSettings::fEnergyCutMuonDeltaRay
Double_t fEnergyCutMuonDeltaRay
Definition: CbmVMCSettings.h:357
CbmVMCSettings::SetEnergyCutMuonHadronBremsstrahlung
void SetEnergyCutMuonHadronBremsstrahlung(Double_t val)
Set the energy threshold for photons produced by muon bremsstrahlung.
Definition: CbmVMCSettings.h:290
CbmVMCSettings
User interface class to define the transport simulation settings which are common for both used trans...
Definition: CbmVMCSettings.h:34
CbmVMCSettings::fProcessComptonScattering
Int_t fProcessComptonScattering
Definition: CbmVMCSettings.h:337
CbmVMCSettings::fEnergyCutMuonHadronBremsstrahlung
Double_t fEnergyCutMuonHadronBremsstrahlung
Definition: CbmVMCSettings.h:355
CbmVMCSettings::SetEnergyCutMuonDeltaRay
void SetEnergyCutMuonDeltaRay(Double_t val)
Set the energy threshold for electrons produced by muon or hadron delta-rays.
Definition: CbmVMCSettings.h:310
CbmVMCSettings::SetProcessPhotoFission
void SetProcessPhotoFission(Int_t val)
Control the process of nuclear fission induced by a photon.
Definition: CbmVMCSettings.h:100
CbmVMCSettings::SetProcessComptonScattering
void SetProcessComptonScattering(Int_t val)
Control the Compton scattering process.
Definition: CbmVMCSettings.h:72
CbmVMCSettings::SetProcessPairProduction
void SetProcessPairProduction(Int_t val)
Control the pair production process.
Definition: CbmVMCSettings.h:58
CbmVMCSettings::fEnergyCutNeutralHadrons
Double_t fEnergyCutNeutralHadrons
Definition: CbmVMCSettings.h:351
CbmVMCSettings::fProcessPhotoFission
Int_t fProcessPhotoFission
Definition: CbmVMCSettings.h:339
CbmVMCSettings::fEnergyCutMuonPairProduction
Double_t fEnergyCutMuonPairProduction
Definition: CbmVMCSettings.h:358
CbmVMCSettings::fProcessMuonNuclearInteraction
Int_t fProcessMuonNuclearInteraction
Definition: CbmVMCSettings.h:344