X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=TFluka%2FTFluka.h;h=de67f50f90b39d10aaab7bef54e839e8b30bd6ab;hb=01e832c75a95050062d083bddd45b11e403c8db1;hp=512b4ce2d3bc53fd7af1a9b342e70e3063576835;hpb=4aba9d6684dcd328324c2a566c85c85f7ca45774;p=u%2Fmrichter%2FAliRoot.git diff --git a/TFluka/TFluka.h b/TFluka/TFluka.h index 512b4ce2d3b..de67f50f90b 100644 --- a/TFluka/TFluka.h +++ b/TFluka/TFluka.h @@ -15,6 +15,7 @@ #include "TVirtualMC.h" +#include "TMCOptical.h" #include "TFlukaCodes.h" #include "TFlukaMCGeometry.h" @@ -132,7 +133,22 @@ class TFluka : public TVirtualMC { 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");} @@ -152,6 +168,9 @@ class TFluka : public TVirtualMC { virtual const char* VolName(Int_t id) const; virtual Int_t NofVolumes() const {return fNVolumes;} virtual Int_t VolId2Mate(Int_t id) const; + // Return the unique numeric identifier for medium name mediumName + virtual Int_t MediumId(const Text_t* mediumName) const; + // // Methods for physics management // ------------------------------------------------ @@ -165,8 +184,8 @@ class TFluka : public TVirtualMC { virtual void SetModelParameter(const char* parName, Double_t parValue, Int_t imed); virtual TObjArray* GetListOfUserConfigs() {return fUserConfig;} virtual Double_t Xsec(char*, Double_t, Int_t, Int_t); - - + virtual void SetLowEnergyNeutronTransport(Bool_t flag) {fLowEnergyNeutronTransport = flag;} + virtual Bool_t LowEnergyNeutronTransport() {return fLowEnergyNeutronTransport;} // Particle table usage virtual Int_t IdFromPDG(Int_t id) const; virtual Int_t PDGFromId(Int_t pdg) const; @@ -286,7 +305,10 @@ class TFluka : public TVirtualMC { // Particle Properties // ------------------- // - virtual Bool_t DefineParticle(int, const char*, TMCParticleType, double, double, double) {return kFALSE;} + virtual Bool_t DefineParticle(Int_t, const char*, TMCParticleType, Double_t, Double_t, Double_t) {return kFALSE;} + virtual Bool_t DefineParticle(Int_t, const char*, TMCParticleType, Double_t, Double_t, Double_t, + const TString&, Double_t, Int_t, Int_t, Int_t, Int_t, Int_t, Int_t, Int_t, Int_t, + Bool_t, Bool_t = kFALSE, const TString& = "", Int_t = 0, Double_t = 0.0, Double_t = 0.0) {return kFALSE;} virtual Bool_t DefineIon(const char*, int, int, int, double, double) {return kFALSE;} virtual TString ParticleName(int pdg) const; virtual Double_t ParticleMass(int pdg) const; @@ -311,8 +333,8 @@ class TFluka : public TVirtualMC { // 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 @@ -351,8 +373,8 @@ class TFluka : public TVirtualMC { 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 SetZsco(Double_t z) {fZsco = z;} + void SetPint(Double_t px, Double_t py, Double_t pz, Double_t e) {fPint[0] = px; fPint[1] = py; fPint[2] = pz; fPint[3] = e;} void SetTrackIsEntering(){fTrackIsEntering = kTRUE; fTrackIsExiting = kFALSE;} void SetTrackIsExiting() {fTrackIsExiting = kTRUE; fTrackIsEntering = kFALSE;} void SetTrackIsInside() {fTrackIsExiting = kFALSE; fTrackIsEntering = kFALSE;} @@ -362,37 +384,42 @@ class TFluka : public TVirtualMC { 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;} - Int_t GetMaterialIndex(Int_t idmat) const {return fMaterials[idmat];} + Int_t GetMaterialIndex(Int_t idmat) const {return fMaterials[idmat];} TObjArray * GetFlukaMaterials(); - virtual void SetRootGeometry() {;} // Dummy + 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: + // + // Info about primary ionization electrons + Int_t GetNPrimaryElectrons(); + Double_t GetPrimaryElectronKineticEnergy(Int_t i) const; + void GetPrimaryElectronPosition(Int_t i, Double_t& x, Double_t& y, Double_t& z, Double_t& t) const; + void SetCurrentPrimaryElectronIndex(Int_t i) {fPrimaryElectronIndex = i;} + void PrimaryIonisationStepping(Int_t nprim); + void CalcPrimaryIonisationTime(); + void AddIon(Int_t a, Int_t z) const; + Int_t GetIonPdg(Int_t z, Int_t a, Int_t i = 0) const; + 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; - // - // Info about primary ionization electrons - Int_t GetNPrimaryElectrons(); - Double_t GetPrimaryElectronKineticEnergy(Int_t i); - // + void PrintHeader(); + void AddParticlesToPdgDataBase() const; + Int_t GetSpecialPdg(Int_t number) const; + + Float_t* CreateFloatArray(Double_t* array, Int_t size) const; + + // Int_t fVerbosityLevel; //Verbosity level (0 lowest - 3 highest) Int_t fNEvent; //Current event number TString fInputFileName; //Name of the real input file @@ -405,15 +432,20 @@ class TFluka : public TVirtualMC { 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 + Double_t fPint[4]; // 4-vector of particle after interaction + Double_t* fPItime; // Time distribution of primary ionisations + Double_t* fPIlength; // Track length distribution of primary ionisations + Int_t fNPI; // Number of primary ionisation steps + 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 + 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 + Bool_t fLowEnergyNeutronTransport; // Flag to force low energy neutron transport // //Geometry through TGeo @@ -452,6 +484,45 @@ class TFluka : public TVirtualMC { } +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