16#ifndef RestCore_TRestGeant4BiasingVolume
17#define RestCore_TRestGeant4BiasingVolume
27 TVector3 fVolumePosition;
29 TString fBiasingVolumeType;
30 Double_t fBiasingFactor;
31 TVector2 fEnergyRange;
35 inline Double_t GetBiasingFactor()
const {
return fBiasingFactor; }
36 inline Double_t GetBiasingVolumeSize()
const {
return fVolumeSize; }
37 inline TString GetBiasingVolumeType()
const {
return fVolumeType; }
38 inline TVector3 GetBiasingVolumePosition()
const {
return fVolumePosition; }
39 inline TVector2 GetEnergyRange()
const {
return fEnergyRange; }
40 inline Double_t GetMaxEnergy()
const {
return fEnergyRange.Y(); }
41 inline Double_t GetMinEnergy()
const {
return fEnergyRange.X(); }
43 void SetBiasingVolumeSize(Double_t size) { fVolumeSize = size; }
44 void SetBiasingVolumeType(TString type) { fVolumeType = type; }
45 void SetBiasingVolumePosition(TVector3 pos) { fVolumePosition = pos; }
46 void SetBiasingFactor(Double_t factor) { fBiasingFactor = factor; }
47 void SetEnergyRange(TVector2 eRange) { fEnergyRange = eRange; }
50 Int_t isInside(Double_t x, Double_t y, Double_t z) {
51 if (fVolumeType ==
"virtualBox") {
52 if (x < fVolumeSize / 2. && x > -fVolumeSize / 2.)
53 if (y < fVolumeSize / 2. && y > -fVolumeSize / 2.)
54 if (z < fVolumeSize / 2. && z > -fVolumeSize / 2.)
return 1;
57 if (fVolumeType ==
"virtualSphere") {
58 Double_t r2 = x * x + y * y + z * z;
59 if (r2 < fVolumeSize * fVolumeSize)
return 1;
64 void PrintBiasingVolume();