ROBAST logo
/******************************************************************************
 * Copyright (C) 2006-, Akira Okumura                                         *
 * All rights reserved.                                                       *
 *****************************************************************************/

///////////////////////////////////////////////////////////////////////////////
//
// ARefractiveIndex
//
// Abstract class for refractive index
//
///////////////////////////////////////////////////////////////////////////////

#include "ARefractiveIndex.h"
#include "AOpticsManager.h"

ClassImp(ARefractiveIndex);

ARefractiveIndex::ARefractiveIndex(Double_t n, Double_t k) {
  fRefractiveIndex = std::make_shared<TGraph>();
  fRefractiveIndex->SetPoint(0, 0, n);

  if (k > 0) {
    fExtinctionCoefficient = std::make_shared<TGraph>();
    fExtinctionCoefficient->SetPoint(0, 0, k);
  }
}

//______________________________________________________________________________
Double_t ARefractiveIndex::GetAbbeNumber() const {
  static Double_t nm = AOpticsManager::nm();

  Double_t nC = GetRefractiveIndex(656.2725 * nm);
  Double_t nD = GetRefractiveIndex(589.2938 * nm);
  Double_t nF = GetRefractiveIndex(486.1327 * nm);

  return (nD - 1.) / (nF - nC);
}
 ARefractiveIndex.cxx:1
 ARefractiveIndex.cxx:2
 ARefractiveIndex.cxx:3
 ARefractiveIndex.cxx:4
 ARefractiveIndex.cxx:5
 ARefractiveIndex.cxx:6
 ARefractiveIndex.cxx:7
 ARefractiveIndex.cxx:8
 ARefractiveIndex.cxx:9
 ARefractiveIndex.cxx:10
 ARefractiveIndex.cxx:11
 ARefractiveIndex.cxx:12
 ARefractiveIndex.cxx:13
 ARefractiveIndex.cxx:14
 ARefractiveIndex.cxx:15
 ARefractiveIndex.cxx:16
 ARefractiveIndex.cxx:17
 ARefractiveIndex.cxx:18
 ARefractiveIndex.cxx:19
 ARefractiveIndex.cxx:20
 ARefractiveIndex.cxx:21
 ARefractiveIndex.cxx:22
 ARefractiveIndex.cxx:23
 ARefractiveIndex.cxx:24
 ARefractiveIndex.cxx:25
 ARefractiveIndex.cxx:26
 ARefractiveIndex.cxx:27
 ARefractiveIndex.cxx:28
 ARefractiveIndex.cxx:29
 ARefractiveIndex.cxx:30
 ARefractiveIndex.cxx:31
 ARefractiveIndex.cxx:32
 ARefractiveIndex.cxx:33
 ARefractiveIndex.cxx:34
 ARefractiveIndex.cxx:35
 ARefractiveIndex.cxx:36
 ARefractiveIndex.cxx:37
 ARefractiveIndex.cxx:38