]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TFluka/TFluka.h
Code causing warning messages during compilation corrected.
[u/mrichter/AliRoot.git] / TFluka / TFluka.h
index 4453520fe71e2b98de85b08743ee7e0136d53d5d..9cb257fbb23bc82262b65bf93e3ef6c6a03ccfe2 100644 (file)
@@ -29,7 +29,7 @@ class TClonesArray;
 class TFluka : public TVirtualMC {
   
  public:
-  TFluka(const char *title, Int_t verbosity = 0);
+  TFluka(const char *title, Int_t verbosity = 0,  Bool_t isRootGeometrySupported = 0);
   TFluka();
   virtual ~TFluka();
   
@@ -102,13 +102,13 @@ class TFluka : public TVirtualMC {
   
   
   // functions for drawing
-  virtual void  DrawOneSpec(const char* name)
+  virtual void  DrawOneSpec(const char* /*name*/)
     {printf("WARNING: DrawOneSpec not yet implemented !\n");}
-  virtual void  Gsatt(const char* name, const char* att, Int_t val)
+  virtual void  Gsatt(const char* /*name*/, const char* /*att*/, Int_t /*val*/)
     {printf("WARNING: Gsatt not yet implemented !\n");}
-  virtual void  Gdraw(const char*,Double_t theta = 30, Double_t phi = 30,
-                     Double_t psi = 0, Double_t u0 = 10, Double_t v0 = 10,
-                     Double_t ul = 0.01, Double_t vl = 0.01)
+  virtual void  Gdraw(const char*,Double_t /*theta = 30*/, Double_t /*phi = 30*/,
+                     Double_t /*psi = 0*/, Double_t /*u0 = 10*/, Double_t /*v0 = 10*/,
+                     Double_t /*ul = 0.01*/, Double_t /*vl = 0.01*/)
     {printf("WARNING: Gdraw not yet implemented !\n");}
   
   // Euclid
@@ -125,12 +125,9 @@ class TFluka : public TVirtualMC {
   //
   
   // set methods
-  virtual void     SetCut(const char* cutName, Double_t cutValue)
-    {printf("WARNING: SetCut not yet implemented !\n");}
-  virtual void     SetProcess(const char* flagName, Int_t flagValue)
-    {printf("WARNING: SetProcess not yet implemented !\n");}
-  virtual Double_t Xsec(char*, Double_t, Int_t, Int_t)
-    {printf("WARNING: Xsec not yet implemented !\n"); return -1.;}
+  virtual void     SetProcess(const char* flagName, Int_t flagValue);
+  virtual void     SetCut(const char* cutName, Double_t cutValue);
+  virtual Double_t Xsec(char*, Double_t, Int_t, Int_t);
   
   // particle table usage         
   virtual Int_t   IdFromPDG(Int_t id) const;
@@ -181,7 +178,9 @@ class TFluka : public TVirtualMC {
   // tracking particle 
   // dynamic properties
   virtual void     TrackPosition(TLorentzVector& position) const;
+  virtual void     TrackPosition(Double_t& x, Double_t& y, Double_t& z) const;
   virtual void     TrackMomentum(TLorentzVector& momentum) const;
+  virtual void     TrackMomentum(Double_t& px, Double_t& py, Double_t& pz, Double_t& e) const;
   virtual Double_t TrackStep() const;
   virtual Double_t TrackLength() const;
   virtual Double_t TrackTime() const;
@@ -205,8 +204,8 @@ class TFluka : public TVirtualMC {
   virtual Int_t    NSecondaries() const ;
   virtual void     GetSecondary(Int_t isec, Int_t& particleId, 
                        TLorentzVector& position, TLorentzVector& momentum);
-  virtual TMCProcess ProdProcess(Int_t isec) const ;
-  virtual Int_t    StepProcesses(TArrayI &proc) const
+  virtual TMCProcess ProdProcess() const ;
+  virtual Int_t    StepProcesses(TArrayI &/*proc*/) const
     {printf("WARNING: StepProcesses not yet implemented !\n"); return -1;}
   
   
@@ -246,6 +245,7 @@ class TFluka : public TVirtualMC {
   //
   
   virtual void Init();
+  virtual void InitPhysics();
   virtual void FinishGeometry();
   virtual void BuildPhysics();
   virtual void ProcessEvent();
@@ -256,22 +256,46 @@ class TFluka : public TVirtualMC {
   //New Getter and Setters
   // ------------------------------------------------
   //
+  // - Core input file name
+  TString GetCoreInputFileName() const {return sCoreInputFileName;}
+  void SetCoreInputFileName(const char* n) {sCoreInputFileName = n;}
+
   // - Input file name
-  TString GetInputFileName() const {return fInputFileName;}
-  void SetInputFileName(const char* n) {fInputFileName = n;}
+  TString GetInputFileName() const {return sInputFileName;}
+  void SetInputFileName(const char* n) {sInputFileName = n;}
+
+  // - SetProcess and SetCut
+  Int_t GetProcessNb() const {return iNbOfProc;}
+  void SetProcessNb(Int_t l) {iNbOfProc = l;}
+  Int_t GetCutNb() const {return iNbOfProc;}
+  void SetCutNb(Int_t l) {iNbOfCut = l;}
+
   // - Verbosity level
   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
+  Int_t GetCaller() const {return fCaller;}
+  void SetCaller(Int_t l) {fCaller = l;}
+  
   // - Fluka Draw procedures formal parameters
   Int_t GetIcode() const {return fIcode;}
   void SetIcode(Int_t l) {fIcode = l;}
+  // in the case of sodraw fIcode=0
 
   Int_t GetMreg() const {return fCurrentFlukaRegion;}
   void SetMreg(Int_t l) {fCurrentFlukaRegion = l;}
 
-  Int_t GetNewreg() const {return fNewreg;}
-  void SetNewreg(Int_t l) {fNewreg = l;}
+  Int_t GetNewreg() const {return iNewreg;}
+  void SetNewreg(Int_t l) {iNewreg = l;}
 
   Double_t GetRull() const {return fRull;}
   void SetRull(Double_t r) {fRull = r;}
@@ -299,16 +323,18 @@ class TFluka : public TVirtualMC {
   virtual void     FutoTest() ;
 
  private:
-  TFluka(const TFluka &mc){}
+  TFluka(const TFluka &mc): TVirtualMC(mc) {;}
   TFluka & operator=(const TFluka &) {return (*this);}
 
  protected:
   Int_t   fVerbosityLevel; //Verbosity level (0 lowest - 3 highest)
 
-  TString fInputFileName; //Name of the input file (f.e. mu.inp)
+  TString sInputFileName;     //Name of the real input file (e.g. alice.inp)
+  TString sCoreInputFileName; //Name of the input file (e.g. corealice.inp)
 
+  Int_t    fCaller; //Parameter to indicate who is the caller of the Fluka Draw
   Int_t    fIcode;  //Fluka Draw procedures formal parameter 
-  Int_t    fNewreg; //Fluka Draw procedures formal parameter
+  Int_t    iNewreg; //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
@@ -316,6 +342,14 @@ class TFluka : public TVirtualMC {
   Bool_t   fTrackIsEntering;  // Flag for track entering
   Bool_t   fTrackIsExiting;   // Flag for track exiting  
 
+  //variables for SetProcess and SetCut
+  Int_t    iNbOfProc;
+  Int_t    iProcessValue[100];
+  Char_t   sProcessFlag[100][5];
+  Int_t    iNbOfCut;
+  Double_t fCutValue[100];
+  Char_t   sCutFlag[100][7];
+
 
   //Geometry through Geant4 for the time being!!!
   TG4GeometryManager*  fGeometryManager; //Geometry manager