ROBAST logo
// Author: Akira Okumura <mailto:oxon@mac.com>
/******************************************************************************
 * Copyright (C) 2006-, Akira Okumura                                         *
 * All rights reserved.                                                       *
 *****************************************************************************/

#ifndef A_MIRROR_H
#define A_MIRROR_H

#include "TGraph.h"
#include "TGraph2D.h"
#include "TH2.h"

#include "AOpticalComponent.h"

///////////////////////////////////////////////////////////////////////////////
//
// AMirror
//
// Mirror class
//
///////////////////////////////////////////////////////////////////////////////

class AMirror : public AOpticalComponent {
 private:
  Double_t fReflectance;
  std::shared_ptr<const TGraph>
      fReflectance1D;  // Reflectance data (ref v.s. wavelength)
  std::shared_ptr<TGraph2D>
      fReflectance2D;  // Reflectance data (ref v.s. angle v.s. wavelength)
  std::shared_ptr<TH2>
      fReflectanceTH2;  // Reflectance data (ref v.s. angle v.s. wavelength)

 public:
  AMirror();
  AMirror(const char* name, const TGeoShape* shape, const TGeoMedium* med = 0);
  virtual ~AMirror();

  Double_t GetReflectance(Double_t lambda, Double_t angle /* (rad) */);
  void SetReflectance(Double_t ref) { fReflectance = ref; }
  void SetReflectance(std::shared_ptr<const TGraph> ref) { fReflectance1D = ref; }
  void SetReflectance(std::shared_ptr<TH2> ref) { fReflectanceTH2 = ref; }
  void SetReflectance(std::shared_ptr<TGraph2D> ref) { fReflectance2D = ref; }

  ClassDef(AMirror, 1)
};

#endif  // A_MIRROR_H
 AMirror.h:1
 AMirror.h:2
 AMirror.h:3
 AMirror.h:4
 AMirror.h:5
 AMirror.h:6
 AMirror.h:7
 AMirror.h:8
 AMirror.h:9
 AMirror.h:10
 AMirror.h:11
 AMirror.h:12
 AMirror.h:13
 AMirror.h:14
 AMirror.h:15
 AMirror.h:16
 AMirror.h:17
 AMirror.h:18
 AMirror.h:19
 AMirror.h:20
 AMirror.h:21
 AMirror.h:22
 AMirror.h:23
 AMirror.h:24
 AMirror.h:25
 AMirror.h:26
 AMirror.h:27
 AMirror.h:28
 AMirror.h:29
 AMirror.h:30
 AMirror.h:31
 AMirror.h:32
 AMirror.h:33
 AMirror.h:34
 AMirror.h:35
 AMirror.h:36
 AMirror.h:37
 AMirror.h:38
 AMirror.h:39
 AMirror.h:40
 AMirror.h:41
 AMirror.h:42
 AMirror.h:43
 AMirror.h:44
 AMirror.h:45
 AMirror.h:46
 AMirror.h:47
 AMirror.h:48