Common blocks to access material properties and
[u/mrichter/AliRoot.git] / TFluka / TFlukaScoringOption.h
1 #ifndef TFLUKASCORINGOPTION
2 #define TFLUKASCORINGOPTION
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 /* $Id$ */
8
9 ///////////////////////////////////////////////////////////////////////////////
10 //                                                                           //
11 //                                                                           //
12 // Class to store FLUKA specific scoring options                             //
13 //                                                                           //
14 //                                                                           //
15 // Authors: Andreas Morsch <andreas.morsch@cern.ch>                          //
16 //          Barbara Dalena <Barbara.Dalena@ba.infn.it>                       //
17 //                                                                           // 
18 ///////////////////////////////////////////////////////////////////////////////
19
20
21 #include <TNamed.h>
22 class TFlukaMCGeometry;
23
24
25 class TFlukaScoringOption : public TNamed
26 {
27 public:
28    // Constructors
29     TFlukaScoringOption();
30     TFlukaScoringOption(const char* name, const char* sdum, Int_t nopfl, char* outfile, Float_t* what);
31     TFlukaScoringOption(const char* name, const char* sdum, Int_t nopfl, char* outfile, Float_t* what,
32                         const char* det1, const char* det2, const char* det3);
33     // Getters
34     Float_t     What(Int_t indi) const       {return fWhat[indi - 1];}
35     Int_t       Par() const                  {return fNopfl;}
36     char*       GetFileName() const          {return fOutFile;}
37     Float_t     GetLun()  const              {return fLun;}
38     const char* GetRegName(Int_t ndet);
39     void        SetPar(Int_t val)            {fNopfl   = val;}
40     void        SetFileName(char* outfile)   {fOutFile = outfile;}
41     void        SetLun(Float_t lun)          {fLun     = lun;}
42  
43 //
44     void        WriteFlukaInputCards();
45     void        WriteOpenFlukaFile();
46     Int_t       GetRegionByName(const char* detname);
47
48     static void SetStaticInfo(FILE* file, TFlukaMCGeometry* geom)
49                 {fgFile = file; fgGeom = geom;}
50
51  protected:
52     Int_t         fNopfl;        // Number of paramters
53     Float_t       fWhat[12];     // WHAT()
54     const char*   fName[3];      // Region Name
55     char*         fOutFile;      // Output file
56     Float_t       fLun;          // Logical Unit Number for Fluka output
57
58     // Static
59     static FILE*             fgFile;      // Output file
60     static TFlukaMCGeometry* fgGeom;      // Pointer to geometry
61  
62  private:
63     // Copy constructor and operator= declared but not implemented (-Weff++ flag)
64     TFlukaScoringOption(const TFlukaScoringOption&);
65     TFlukaScoringOption& operator=(const TFlukaScoringOption&);
66
67     ClassDef(TFlukaScoringOption, 1)  // Fluka Scoring Option
68 };
69         
70 #endif
71