#include "TVirtualMC.h"
+#include "TMCOptical.h"
#include "TFlukaCodes.h"
+#include "TFlukaMCGeometry.h"
+
//Forward declaration
class TGeoMCGeometry;
-class TFlukaMCGeometry;
+//class TFlukaMCGeometry;
class TGeoMaterial;
class TFluka : public TVirtualMC {
virtual ~TFluka();
virtual Bool_t IsRootGeometrySupported() const { return kTRUE;}
+ Int_t GetNstep() { return fGeom->GetNstep(); } // to be removed
+
//
// Methods for building/management of geometry
// ------------------------------------------------
virtual void SetCerenkov(Int_t itmed, Int_t npckov, Double_t *ppckov,
Double_t *absco, Double_t *effic, Double_t *rindex, Double_t *rfl);
+//
+ virtual void DefineOpSurface(const char* name, EMCOpSurfaceModel model, EMCOpSurfaceType surface,
+ EMCOpSurfaceFinish surfaceFinish, Double_t sigmaAlpha);
+
+ virtual void SetBorderSurface(const char* name, const char* vol1Name, int vol1CopyNo, const char* vol2Name, int vol2CopyNo,
+ const char* opSurfaceName);
+
+
+ virtual void SetSkinSurface(const char* name, const char* volName, const char* opSurfaceName);
+ virtual void SetMaterialProperty(Int_t itmed, const char* propertyName, Int_t np, Double_t* pp, Double_t* values);
+
+ virtual void SetMaterialProperty(Int_t itmed, const char* propertyName, Double_t value);
+
+ virtual void SetMaterialProperty(const char* surfaceName, const char* propertyName, Int_t np, Double_t* pp, Double_t* values);
+
// Functions for drawing
virtual void DrawOneSpec(const char* /*name*/)
{Warning("DrawOneSpec", "Not yet implemented !\n");}
// FLUKA Scoring specific methods
// ------------------------------
//
- virtual void SetUserScoring(const char* option, Int_t npr,char* outfile, Float_t* what);
- virtual void SetUserScoring(const char* option, Int_t npr,char* outfile, Float_t* what,
+ virtual void SetUserScoring(const char* option, const char* sdum, Int_t npr,char* outfile, Float_t* what);
+ virtual void SetUserScoring(const char* option, const char* sdum, Int_t npr,char* outfile, Float_t* what,
const char* det1, const char* det2, const char* det3);
//
// New Getter and Setters
Int_t GetVerbosityLevel() const {return fVerbosityLevel;}
void SetVerbosityLevel(Int_t l) {fVerbosityLevel = l;}
- // - Fluka Draw procedures identifiers
- // bxdraw = 1 inside
- // bxdraw = 11 entering
- // bxdraw = 12 exiting
- // eedraw = 2
- // endraw = 3
- // mgdraw = 4
- // sodraw = 5
- // usdraw = 6
+ //
+ // - Fluka Draw procedures identifiers, see TFlukaCodes.h
+ //
FlukaCallerCode_t GetCaller() const {return fCaller;}
- void SetCaller(FlukaCallerCode_t l) {fCaller = l;}
-
FlukaProcessCode_t GetIcode() const {return fIcode;}
- void SetIcode(FlukaProcessCode_t l) {fIcode = l;}
-
Int_t GetMreg() const {return fCurrentFlukaRegion;}
- void SetMreg(Int_t l, Int_t lttc);
-
Int_t GetNewreg() const {return fNewReg;}
- void SetNewreg(Int_t l, Int_t /*lttc*/) {fNewReg = l;}
-
Double_t GetRull() const {return fRull;}
- void SetRull(Double_t r) {fRull = r;}
-
Double_t GetXsco() const {return fXsco;}
- void SetXsco(Double_t x) {fXsco = x;}
-
Double_t GetYsco() const {return fYsco;}
- void SetYsco(Double_t y) {fYsco = y;}
-
Double_t GetZsco() const {return fZsco;}
- void SetZsco(Double_t z) {fZsco = z;}
-
- void SetCurrentFlukaRegion(Int_t reg) {fCurrentFlukaRegion=reg;}
- Int_t GetCurrentFlukaRegion() const {return fCurrentFlukaRegion;}
+ Int_t GetCurrentFlukaRegion() const {return fCurrentFlukaRegion;}
+ // - Fluka Draw Setters
+ void SetCurrentFlukaRegion(Int_t reg) {fCurrentFlukaRegion=reg;}
+ void SetCaller(FlukaCallerCode_t l) {fCaller = l;}
+ void SetIcode(FlukaProcessCode_t l) {fIcode = l;}
+ void SetMreg(Int_t l, Int_t lttc);
+ void SetNewreg(Int_t l, Int_t /*lttc*/) {fNewReg = l;}
+ void SetRull(Double_t r) {fRull = r;}
+ void SetXsco(Double_t x) {fXsco = x;}
+ void SetYsco(Double_t y) {fYsco = y;}
+ void SetZsco(Double_t z) {fZsco = z;}
+
+ void SetTrackIsEntering(){fTrackIsEntering = kTRUE; fTrackIsExiting = kFALSE;}
+ void SetTrackIsExiting() {fTrackIsExiting = kTRUE; fTrackIsEntering = kFALSE;}
+ void SetTrackIsInside() {fTrackIsExiting = kFALSE; fTrackIsEntering = kFALSE;}
+ void SetTrackIsNew(Bool_t flag = kTRUE);
void SetDummyBoundary(Int_t mode) {fDummyBoundary = mode;}
Int_t GetDummyBoundary() const {return fDummyBoundary;}
Bool_t IsDummyBoundary() const {return (fDummyBoundary==0)?kFALSE:kTRUE;}
+
void SetGeneratePemf(Bool_t flag = kTRUE) {fGeneratePemf = flag;}
Bool_t IsGeneratePemf() const {return fGeneratePemf;}
void EnableField(Bool_t flag=kTRUE) {fFieldFlag = flag;}
Bool_t IsFieldEnabled() const {return fFieldFlag;}
- void SetTrackIsEntering(){fTrackIsEntering = kTRUE; fTrackIsExiting = kFALSE;}
- void SetTrackIsExiting() {fTrackIsExiting = kTRUE; fTrackIsEntering = kFALSE;}
- void SetTrackIsInside() {fTrackIsExiting = kFALSE; fTrackIsEntering = kFALSE;}
- void SetTrackIsNew(Bool_t flag = kTRUE);
-
- Int_t GetMaterialIndex(Int_t idmat) const {return fMaterials[idmat];}
- TObjArray *GetFlukaMaterials();
- virtual void SetRootGeometry() {;} // Dummy
+
+ Int_t GetMaterialIndex(Int_t idmat) const {return fMaterials[idmat];}
+
+ TObjArray * GetFlukaMaterials();
+ virtual void SetRootGeometry() {;} // Dummy
virtual Int_t NofVolDaughters(const char* volName) const;
virtual const char* VolDaughterName(const char* volName, Int_t i) const;
virtual Int_t VolDaughterCopyNo(const char* volName, Int_t i) const;
virtual const char* CurrentVolPath();
virtual void ForceDecayTime(Float_t){;}
- private:
- void PrintHeader();
- void AddParticlesToPdgDataBase() const;
//
// Info about primary ionization electrons
Int_t GetNPrimaryElectrons();
- Double_t GetPrimaryElectronKineticEnergy(Int_t i);
- //
- TFluka(const TFluka &mc): TVirtualMC(mc) {;}
- TFluka & operator=(const TFluka &) {return (*this);}
+ Double_t GetPrimaryElectronKineticEnergy(Int_t i) const;
+ void GetPrimaryElectronPosition(Int_t i, Double_t& x, Double_t& y, Double_t& z) const;
+ void SetCurrentPrimaryElectronIndex(Int_t i) {fPrimaryElectronIndex = i;}
+ private:
+
+ // Copy constructor and operator= declared but not implemented (-Weff++ flag)
+ TFluka(const TFluka &mc); //: TVirtualMC(mc) {;}
+ TFluka & operator=(const TFluka &); // {return (*this);}
+
+ void PrintHeader();
+ void AddParticlesToPdgDataBase() const;
+ //
-
Int_t fVerbosityLevel; //Verbosity level (0 lowest - 3 highest)
Int_t fNEvent; //Current event number
TString fInputFileName; //Name of the real input file
TString fCoreInputFileName; //Name of the input file
- FlukaCallerCode_t fCaller; //Parameter to indicate who is the caller of the Fluka Draw
- FlukaProcessCode_t fIcode; //Fluka Draw procedures formal parameter
- Int_t fNewReg; //Fluka Draw procedures formal parameter
- Double_t fRull; //Fluka Draw procedures formal parameter
- Double_t fXsco; //Fluka Draw procedures formal parameter
- Double_t fYsco; //Fluka Draw procedures formal parameter
- Double_t fZsco; //Fluka Draw procedures formal parameter
- Bool_t fTrackIsEntering; // Flag for track entering
- Bool_t fTrackIsExiting; // Flag for track exiting
- Bool_t fTrackIsNew; // Flag for new track
- Bool_t fFieldFlag; // Flag for magnetic field
- Bool_t fGeneratePemf; // Flag for automatic .pemf generation
- Int_t fDummyBoundary; // Flag for crossing dummy boundaries
- Bool_t fStopped; // Flag for stopping
- Bool_t fStopEvent; // Flag for stopped event
- Bool_t fStopRun; // Flag for stopped run
+ FlukaCallerCode_t fCaller; // Parameter to indicate who is the caller of the Fluka Draw
+ FlukaProcessCode_t fIcode; // Fluka Draw procedures formal parameter
+ Int_t fNewReg; // Fluka Draw procedures formal parameter
+ Double_t fRull; // Fluka Draw procedures formal parameter
+ Double_t fXsco; // Fluka Draw procedures formal parameter
+ Double_t fYsco; // Fluka Draw procedures formal parameter
+ Double_t fZsco; // Fluka Draw procedures formal parameter
+ Bool_t fTrackIsEntering; // Flag for track entering
+ Bool_t fTrackIsExiting; // Flag for track exiting
+ Bool_t fTrackIsNew; // Flag for new track
+ Bool_t fFieldFlag; // Flag for magnetic field
+ Bool_t fGeneratePemf; // Flag for automatic .pemf generation
+ Int_t fDummyBoundary; // Flag for crossing dummy boundaries
+ Bool_t fStopped; // Flag for stopping
+ Bool_t fStopEvent; // Flag for stopped event
+ Bool_t fStopRun; // Flag for stopped run
+ Int_t fPrimaryElectronIndex; // Primary electron Index
//
//Geometry through TGeo
TObjArray* fUserConfig; // List of user physics configuration
TObjArray* fUserScore; // List of user scoring options
+
ClassDef(TFluka,1) //C++ interface to Fluka montecarlo
}
+inline void TFluka::DefineOpSurface(const char* /*name*/, EMCOpSurfaceModel /*model*/, EMCOpSurfaceType /*surface*/,
+ EMCOpSurfaceFinish /*surfaceFinish*/, Double_t /*sigmaAlpha*/)
+{
+ Warning("DefineOpSurface", "New function - not yet implemented.");
+}
+
+
+inline void TFluka::SetBorderSurface(const char* /*name*/, const char* /*vol1Name*/, int /*vol1CopyNo*/, const char* /*vol2Name*/,
+ int /*vol2CopyNo*/, const char* /*opSurfaceName*/)
+{
+ Warning("SetBorderSurface", "New function - not yet implemented.");
+}
+
+
+inline void TFluka::SetSkinSurface(const char* /*name*/, const char* /*volName*/, const char* /*opSurfaceName*/)
+{
+ Warning("SetSkinSurface", "New function - not yet implemented.");
+}
+
+
+inline void TFluka::SetMaterialProperty(Int_t /*itmed*/, const char* /*propertyName*/, Int_t /*np*/, Double_t* /*pp*/, Double_t* /*values*/)
+{
+ Warning("SetMaterialProperty", "New function - not yet implemented.");
+}
+
+
+inline void TFluka::SetMaterialProperty(Int_t /*itmed*/, const char* /*propertyName*/, Double_t /*value*/)
+{
+ Warning("SetMaterialProperty", "New function - not yet implemented.");
+}
+
+
+inline void TFluka::SetMaterialProperty(const char* /*surfaceName*/, const char* /*propertyName*/, Int_t /*np*/,
+ Double_t* /*pp*/, Double_t* /*values*/)
+{
+ Warning("SetMaterialProperty", "New function - not yet implemented.");
+}
+
+
#endif //TFLUKA