// Header file listing the routines for virtual detector. The object
// 'detector' adds up the Stokes vectors of the detected photons
// according to their wavelength. It then can save the stored data to
// a disk.
//
// STOKES, version 1.0, Nov 2004


#ifndef detector_h
#define detector_h


#include <fstream.h>
#include "model-stokes-v1.0.h"
#include "photon-stokes-v1.0.h"


// type definition for a detector
class Screen
{


public:


  // initialize detector by setting all channels to zero
  Screen();


  // register a photon according to its wavelength and add its
  // Stokes parameters
  void RegisterPhoton(Photon p,Model M);


  // save the data of the detector to the disk
  void SaveCurve(ofstream out_stream, int n, Model M);


  // define the array of channels for I
  double I[ResMax];


  // define the array of channels for Q
  double Q[ResMax];


  // define the array of channels for U
  double U[ResMax];


  // define the array of channels for V
  double V[ResMax];


};


#endif
