// Author: Ingo Froehlich
// Written: 24/04/2013

#ifndef _PDENSITYMATRIX_H_
#define _PDENSITYMATRIX_H_

#include "PEmbeddedParticles.h"
#include "PProjector.h"

#define DENSITYMATRIX_MAX_MATRICES 16
#define DENSITYMATRIX_MAX          1000

class PDensityMatrix: public PEmbeddedParticles {

 private:

    Double_t *matrix[DENSITYMATRIX_MAX_MATRICES], 
	*matrix_integral[DENSITYMATRIX_MAX_MATRICES];

    Double_t *axes[3];
    Int_t     axes_size[3];
    Int_t     dimension;
    Int_t     matrixsize;
    Int_t     current_matrix;

    Bool_t    IsBorder(Int_t bin);
    
    PProjector *projector;
    Double_t *x,*y,*z;
    
 public:
    
    PDensityMatrix();
    
    Bool_t Modify(PParticle **stack, int *decay_done, int *num, int stacksize);  //bulk interface
    
    Bool_t ReadDensityMatrix(const char *filename, Int_t dim, Bool_t use_bin_width,
			     Double_t min_selection, Double_t max_selection);

    Bool_t   GetBin(Double_t *x,    Int_t *bins);
    Bool_t   GetBin(Int_t     bin,  Int_t *bins);
    Double_t GetBinWidth(Int_t dim, Int_t bin);
    Int_t    GetRandomBin(Int_t num);

    void     SetMatrix(Int_t i) {current_matrix = i;};

    Bool_t   Do(const char *command);

    ClassDef(PDensityMatrix, 0) // Add particles from a density matrix
};
#endif 

















 PDensityMatrix.h:1
 PDensityMatrix.h:2
 PDensityMatrix.h:3
 PDensityMatrix.h:4
 PDensityMatrix.h:5
 PDensityMatrix.h:6
 PDensityMatrix.h:7
 PDensityMatrix.h:8
 PDensityMatrix.h:9
 PDensityMatrix.h:10
 PDensityMatrix.h:11
 PDensityMatrix.h:12
 PDensityMatrix.h:13
 PDensityMatrix.h:14
 PDensityMatrix.h:15
 PDensityMatrix.h:16
 PDensityMatrix.h:17
 PDensityMatrix.h:18
 PDensityMatrix.h:19
 PDensityMatrix.h:20
 PDensityMatrix.h:21
 PDensityMatrix.h:22
 PDensityMatrix.h:23
 PDensityMatrix.h:24
 PDensityMatrix.h:25
 PDensityMatrix.h:26
 PDensityMatrix.h:27
 PDensityMatrix.h:28
 PDensityMatrix.h:29
 PDensityMatrix.h:30
 PDensityMatrix.h:31
 PDensityMatrix.h:32
 PDensityMatrix.h:33
 PDensityMatrix.h:34
 PDensityMatrix.h:35
 PDensityMatrix.h:36
 PDensityMatrix.h:37
 PDensityMatrix.h:38
 PDensityMatrix.h:39
 PDensityMatrix.h:40
 PDensityMatrix.h:41
 PDensityMatrix.h:42
 PDensityMatrix.h:43
 PDensityMatrix.h:44
 PDensityMatrix.h:45
 PDensityMatrix.h:46
 PDensityMatrix.h:47
 PDensityMatrix.h:48
 PDensityMatrix.h:49
 PDensityMatrix.h:50
 PDensityMatrix.h:51
 PDensityMatrix.h:52
 PDensityMatrix.h:53
 PDensityMatrix.h:54
 PDensityMatrix.h:55
 PDensityMatrix.h:56
 PDensityMatrix.h:57
 PDensityMatrix.h:58
 PDensityMatrix.h:59
 PDensityMatrix.h:60
 PDensityMatrix.h:61
 PDensityMatrix.h:62
 PDensityMatrix.h:63
 PDensityMatrix.h:64
 PDensityMatrix.h:65
 PDensityMatrix.h:66
 PDensityMatrix.h:67
 PDensityMatrix.h:68