Class to store optical properties for cerenkov photon transport.
[u/mrichter/AliRoot.git] / TFluka / TFlukaCerenkov.h
1 #ifndef TFLUKACERENKOV
2 #define TFLUKACERENKOV
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 that gives access to optical properties for Cerenkov photon         //
13 // production and transport                                                  //
14 //                                                                           //
15 //                                                                           //
16 ///////////////////////////////////////////////////////////////////////////////
17
18
19 #include <TObject.h>
20 #include <TMath.h>
21
22 const Double_t khc = 2. * TMath::Pi() * 0.1973269602e-13; // GeV cm 
23
24
25 class TFlukaCerenkov : public TObject
26 {
27
28 public:
29    // constructors
30     TFlukaCerenkov();
31     TFlukaCerenkov(Int_t npckov, Float_t *ppckov, Float_t *absco, Float_t *effic, Float_t *rindex);
32     virtual Float_t   GetAbsorptionCoefficient(Float_t energy);
33     virtual Float_t   GetQuantumEfficiency(Float_t energy);
34     virtual Float_t   GetRefractionIndex(Float_t energy);
35     virtual Float_t   GetAbsorptionCoefficientByWaveLength(Float_t energy);
36     virtual Float_t   GetQuantumEfficiencyByWaveLength(Float_t energy);
37     virtual Float_t   GetRefractionIndexByWaveLength(Float_t energy);
38     virtual Float_t   GetMinimumEnergy()     {return fEnergy[0];}
39     virtual Float_t   GetMaximumEnergy()     {return fEnergy[fSamples-1];}
40     virtual Float_t   GetMinimumWavelength() {return khc / fEnergy[fSamples-1];}
41     virtual Float_t   GetMaximumWavelength() {return khc / fEnergy[0];}
42     virtual Int_t     GetNSamples()          {return fSamples;}
43     virtual Bool_t    IsMetal()              {return fIsMetal;}
44     
45  protected:
46     virtual Float_t  Interpolate(Float_t energy, Float_t* array1, Float_t* array2);
47     
48  protected:
49     Int_t        fSamples;               // Number of sampling points
50     Bool_t       fIsMetal;               // Flag for metals  
51     Float_t*     fEnergy;                // [fSamples] Energy                 (GeV) 
52     Float_t*     fWaveLength;            // [fSamples] Wafelength             (cm)
53     Float_t*     fAbsorptionCoefficient; // [fSamples] Absorption Coefficient (1/cm)
54     Float_t*     fQuantumEfficiency;     // [fSamples] Quantum efficiency
55     Float_t*     fRefractionIndex;       // [fSamples] Refraction Index    
56     
57     ClassDef(TFlukaCerenkov, 1)          // CerenkovProperties
58 };
59         
60 #endif
61