1 | // $Id: Baffle.cc 1669 2005-04-08 17:40:25Z thea $ |
---|
2 | // Author: A.Thea Oct, 10 2003 |
---|
3 | |
---|
4 | /***************************************************************************** |
---|
5 | * ESAF: Euso Simulation and Analysis Framework * |
---|
6 | * * |
---|
7 | * Id: Baffle * |
---|
8 | * Package: Optics * |
---|
9 | * Coordinator: Alessandro.Thea * |
---|
10 | * * |
---|
11 | *****************************************************************************/ |
---|
12 | |
---|
13 | #include "Baffle.hh" |
---|
14 | |
---|
15 | ClassImp(Baffle) |
---|
16 | ClassImp(TestBaffle) |
---|
17 | |
---|
18 | //______________________________________________________________________________ |
---|
19 | Baffle::Baffle(): fRTop(0) { |
---|
20 | // |
---|
21 | // Constructor |
---|
22 | // |
---|
23 | } |
---|
24 | |
---|
25 | //______________________________________________________________________________ |
---|
26 | Baffle::~Baffle() { |
---|
27 | // |
---|
28 | // Destructor |
---|
29 | // |
---|
30 | } |
---|
31 | |
---|
32 | //______________________________________________________________________________ |
---|
33 | //Double_t Baffle::IntersectCone(Photon* p, Double_t rUp, Double_t rDown, |
---|
34 | // Double_t zUp, Double_t zDown){ |
---|
35 | // return -1; |
---|
36 | // |
---|
37 | //} |
---|
38 | |
---|
39 | //______________________________________________________________________________ |
---|
40 | //Double_t Baffle::IntersectCone(Photon* p) { |
---|
41 | // return IntersectCone(p, fRTop, fR, fPos[Z]+fDZup, fPos[Z]-fDZdown); |
---|
42 | //} |
---|
43 | |
---|
44 | //______________________________________________________________________________ |
---|
45 | TestBaffle::TestBaffle(): Baffle() { |
---|
46 | // |
---|
47 | // Constructor |
---|
48 | // |
---|
49 | fR = fRTop=Conf()->GetNum("TestBaffle.fR"); |
---|
50 | fDZup = 0; |
---|
51 | fDZdown = Conf()->GetNum("TestBaffle.DZdown"); |
---|
52 | fPos=EVector(0,0,Conf()->GetNum("TestBaffle.fPos.Z")); |
---|
53 | } |
---|
54 | |
---|
55 | //______________________________________________________________________________ |
---|
56 | TestBaffle::~TestBaffle() { |
---|
57 | // |
---|
58 | // Destructor |
---|
59 | // |
---|
60 | } |
---|
61 | |
---|
62 | //______________________________________________________________________________ |
---|
63 | Photon* TestBaffle::Transport(Photon *p) const { |
---|
64 | Double_t DL; |
---|
65 | if ( (DL=CylinderIntersection(p)) < 0 ) return 0; |
---|
66 | p->pos+=p->dir.Unit()*DL; |
---|
67 | return 0; |
---|
68 | } |
---|