Subversion Repositories f9daq

Compare Revisions

Ignore whitespace Rev 72 → Rev 73

/lightguide/trunk/include/guide.h
39,14 → 39,14
public:
CRay() :
r(TVector3(0,0,0)),
n(TVector3(1,0,0)),
k(TVector3(1,0,0)),
//p(TVector3(0,1,0)),
p(TVector3(0,0,1)),
color(kBlack)
{};
CRay(TVector3 r0, TVector3 n0) :
CRay(TVector3 r0, TVector3 k0) :
r(r0),
n(n0.Unit()),
k(k0.Unit()),
//p(TVector3(0,1,0)),
p(TVector3(0,0,1)),
color(kBlack)
53,21 → 53,24
{};
CRay(double x0, double y0, double z0, double l0, double m0, double n0) :
r(TVector3(x0,y0,z0)),
n(TVector3(l0,m0,n0).Unit()),
k(TVector3(l0,m0,n0).Unit()),
//p(TVector3(0,1,0)),
p(TVector3(0,0,1)),
color(kBlack)
{};
 
void Set(TVector3 r0, TVector3 n0);
void Set(TVector3 r0, TVector3 k0);
//void Set(double x0, double y0, double z0, double l0, double m0, double n0);
void SetColor(int c){color = c;};
void SetPolarization(TVector3 p0) {p = p0.Unit();};
void setPolarization(TVector3 p0) {
p = p0.Unit();
if (p.Dot(k)>1e-3) printf("*** ERROR in CRay: E has component || with k\n");
};
 
//inline CRay & operator = (const CRay &);
 
TVector3 GetR() const {return r;};
TVector3 GetN() const {return n;};
TVector3 GetK() const {return k;};
TVector3 GetP() const {return p;};
 
void Print();
75,13 → 78,13
void Draw(double x_from, double x_to);
void DrawS(double x_from, double t);
 
//r = position, k = unit wave vector, p = polarization
private:
TVector3 r;
TVector3 n;
TVector3 p; //r = point on line, n = normal, p = polarization
TVector3 k;
TVector3 p;
int color;
};
//=================================================================================
 
 
//=================================================================================
141,7 → 144,6
TVector3 n, center;
double _r;
};
//=================================================================================
 
//=================================================================================
// ravna opticna povrsina: refractor, zrcalo ali povrsina s totalnim odbojem
188,7 → 190,6
 
int fresnel; // ali naj uposteva Fresnelove enacbe
};
//=================================================================================
 
 
//=================================================================================
363,9 → 364,7
TH1F *hfate, *hnodb_all, *hnodb_exit;
TH2F *hin, *hout;
};
//=================================================================================
 
//=============================================================================================================================== <<<<<<<<
 
 
class Plate
385,7 → 384,6
CSurface *sides[6];
};
 
// ================================================================================
 
class CDetector
{
511,5 → 509,4
 
 
 
//=================================================================================
#endif