source: JEM-EUSO/esaf_lal/tags/v1_r0/esaf/packages/common/root/include/ESimpDetPhoton.hh @ 117

Last change on this file since 117 was 117, checked in by moretto, 11 years ago

ESAF version compilable on mac OS

File size: 4.5 KB
Line 
1// $Id: ESimpDetPhoton.hh 2620 2006-03-24 16:27:06Z moreggia $
2// Author: Sylvain Moreggia   2006/03/21
3
4/*****************************************************************************
5 * ESAF: Euso Simulation and Analysis Framework                              *
6 *                                                                           *
7 *  Id: ESimpDetPhoton                                                           *
8 *  Package: <packagename>                                                   *
9 *  Coordinator: <coordinator>                                               *
10 *                                                                           *
11 *****************************************************************************/
12
13#ifndef __ESIMPDETPHOTON_HH__
14#define __ESIMPDETPHOTON_HH__
15
16#include "EPhoton.hh"
17#include "EFillable.hh"
18
19////////////////////////////////////////////////////////////////////////////////
20//                                                                            //
21// ESimpDetPhoton                                                                 //
22//                                                                            // 
23// <brief class description>                                                  // 
24//                                                                            // 
25////////////////////////////////////////////////////////////////////////////////
26
27class ESimpDetPhoton : public EPhoton {
28public:
29   
30    // ctors
31    ESimpDetPhoton();
32    ESimpDetPhoton(const EPhoton&);
33    ESimpDetPhoton(const ESimpDetPhoton&);
34   
35    // dtor
36    virtual ~ESimpDetPhoton();
37   
38    virtual void Copy( TObject& ) const;
39    virtual void Clear( Option_t* = "");
40   
41    // getters
42    inline Float_t  GetShowerPos( Int_t ) const;                   
43    inline UChar_t  GetAtmoHistory() { return fAtmoHistory; }
44    inline Int_t    GetFate() const { return fFate;}
45    inline TVector3 GetShowerPos() const;
46
47   
48    // setters
49    inline void SetShowerPos( Int_t,  Float_t );                   
50    inline void SetShowerPos( const TVector3& );
51    inline void SetHistory( UChar_t h ) { fAtmoHistory = h; }
52    inline void SetFate( Int_t f ) { fFate = f;}
53
54private:
55   
56    Float_t fShowerPosX;       // x position in the atmosphere
57    Float_t fShowerPosY;       // y position in the atmosphere
58    Float_t fShowerPosZ;       // z position in the atmosphere
59
60    Int_t fAtmoHistory;        // last process undergone in atmosphere
61                               // -1: none
62                               //  0: direct
63                               //  1: reflected
64                               //  2: rayleigh scat
65                               //  3: clouds scat
66                               //  4: aerosols scat
67                               
68    Int_t fFate;               // fate in detector
69                               // -1: outFoV
70                               //  0: alive
71                               //  1: absorbed by optics
72                               //  2: absorbed by BG3
73                               //  3: absorbed by DQE
74                               
75    Int_t fAtmoNbinter;        // nb of interactions in atmosphere
76
77    SetEVisitable()
78
79    ClassDef(ESimpDetPhoton,1)
80};
81
82//_____________________________________________________________________________
83inline TVector3 ESimpDetPhoton::GetShowerPos() const {
84    // return ShowerPos
85    return TVector3( fShowerPosX, fShowerPosY, fShowerPosZ );
86}
87
88//_____________________________________________________________________________
89inline void ESimpDetPhoton::SetShowerPos( const TVector3& v ) {
90    fShowerPosX = v.X();
91    fShowerPosY = v.Y();
92    fShowerPosZ = v.Z();
93}
94
95//_____________________________________________________________________________
96inline Float_t ESimpDetPhoton::GetShowerPos( Int_t i) const {
97    // return ShowerPos component by index
98
99    switch(i) {
100        case 0:
101            return fShowerPosX;
102        case 1:
103            return fShowerPosY;
104        case 2:
105            return fShowerPosZ;
106        default:
107            Error("GetShowerPos(i)", "bad index (%d) returning 0",i);
108    }
109    return 0.;
110}
111
112//_____________________________________________________________________________
113inline void ESimpDetPhoton::SetShowerPos( Int_t i, Float_t x ) {
114    // ShowerPos component by index
115
116    switch(i) {
117        case 0:
118            fShowerPosX = x;
119        case 1:
120            fShowerPosY = x;
121        case 2:
122            fShowerPosZ = x;
123        default:
124            Error("SetShowerPos(i)", "bad index (%d)",i);
125    }
126}
127
128
129#endif  /* __ESIMPDETPHOTON_HH__ */
130
Note: See TracBrowser for help on using the repository browser.