1 | // $Id: RecoShowerTrackData.hh 2796 2008-02-11 13:08:54Z naumov $ |
---|
2 | // Author: Sylvain Moreggia 2005/11/16 |
---|
3 | |
---|
4 | /***************************************************************************** |
---|
5 | * ESAF: Euso Simulation and Analysis Framework * |
---|
6 | * * |
---|
7 | * Id: RecoShowerTrackData * |
---|
8 | * Package: <packagename> * |
---|
9 | * Coordinator: <coordinator> * |
---|
10 | * * |
---|
11 | *****************************************************************************/ |
---|
12 | |
---|
13 | #ifndef __RECOSHOWERTRACKDATA_HH__ |
---|
14 | #define __RECOSHOWERTRACKDATA_HH__ |
---|
15 | |
---|
16 | #include "euso.hh" |
---|
17 | #include "EarthVector.hh" |
---|
18 | #include <vector> |
---|
19 | class RecoShowerStepData; |
---|
20 | |
---|
21 | //////////////////////////////////////////////////////////////////////////////// |
---|
22 | // // |
---|
23 | // RecoShowerTrackData // |
---|
24 | // // |
---|
25 | // <brief class description> // |
---|
26 | // // |
---|
27 | //////////////////////////////////////////////////////////////////////////////// |
---|
28 | |
---|
29 | class RecoShowerTrackData { |
---|
30 | public: |
---|
31 | |
---|
32 | // ctor |
---|
33 | RecoShowerTrackData(); |
---|
34 | |
---|
35 | // dtor |
---|
36 | virtual ~RecoShowerTrackData(); |
---|
37 | |
---|
38 | // getters |
---|
39 | inline Float_t GetNemax() const {return fNemax;} |
---|
40 | inline Float_t GetXmax() const {return fXmax;} |
---|
41 | inline Float_t GetX1() const {return fX1;} |
---|
42 | inline const EarthVector& GetDir() const {return fDirVers;} |
---|
43 | inline const EarthVector& GetInitPos() const {return fInitPos;} |
---|
44 | inline const EarthVector& GetEarthImpact() const {return fEarthImpact;} |
---|
45 | inline const EarthVector& GetTOAImpact() const {return fTOAImpact;} |
---|
46 | inline const EarthVector& GetShowerMaxPos() const {return fShowerMaxPos;} |
---|
47 | inline Int_t GetNumSteps() const {return fNumSteps;} |
---|
48 | inline const vector<RecoShowerStepData*> GetSteps() const {return fSteps;}; |
---|
49 | inline const RecoShowerStepData* GetStep(Int_t) const; |
---|
50 | |
---|
51 | // setters |
---|
52 | inline void SetNemax(Float_t nemax) {fNemax = nemax;} |
---|
53 | inline void SetXmax(Float_t xmax) {fXmax = xmax;} |
---|
54 | inline void SetX1(Float_t t) {fX1 = t;} |
---|
55 | inline void SetDir(const EarthVector& dir) {fDirVers = dir;} |
---|
56 | inline void SetInitPos(const EarthVector& pos) {fInitPos = pos;} |
---|
57 | inline void SetEarthImpact(const EarthVector& impact) {fEarthImpact = impact;} |
---|
58 | inline void SetShowerMaxPos(const EarthVector& maxpos) {fShowerMaxPos = maxpos;} |
---|
59 | inline void SetTOAImpact(const EarthVector& impact) {fTOAImpact = impact;} |
---|
60 | inline void AddStep(RecoShowerStepData* step) {fSteps.push_back(step);} |
---|
61 | inline void SetNumSteps(Int_t nb); |
---|
62 | |
---|
63 | private: |
---|
64 | |
---|
65 | // global features |
---|
66 | Float_t fNemax; |
---|
67 | Float_t fXmax; |
---|
68 | Float_t fX1; |
---|
69 | EarthVector fDirVers; // track direction in the MES |
---|
70 | EarthVector fInitPos; // first interaction point (3D coord, meters) in MES |
---|
71 | EarthVector fEarthImpact; // Impact point on the Earth if any, else (0,0,HUGE) |
---|
72 | EarthVector fTOAImpact; // Impact point on Top of Atmosphere |
---|
73 | EarthVector fShowerMaxPos; // True shower max position |
---|
74 | |
---|
75 | // shower profile details |
---|
76 | vector<RecoShowerStepData*> fSteps; |
---|
77 | Int_t fNumSteps; |
---|
78 | |
---|
79 | ClassDef(RecoShowerTrackData,0) |
---|
80 | }; |
---|
81 | |
---|
82 | //_____________________________________________________________________________ |
---|
83 | inline const RecoShowerStepData* RecoShowerTrackData::GetStep(Int_t i) const { |
---|
84 | // |
---|
85 | // returns NULL when reaches end of the list |
---|
86 | // |
---|
87 | |
---|
88 | if(size_t(i) < fSteps.size()) return fSteps[i]; |
---|
89 | else return (RecoShowerStepData*)0; |
---|
90 | } |
---|
91 | |
---|
92 | //_____________________________________________________________________________ |
---|
93 | inline void RecoShowerTrackData::SetNumSteps(Int_t nb) { |
---|
94 | // |
---|
95 | // |
---|
96 | // |
---|
97 | |
---|
98 | fNumSteps = nb; |
---|
99 | if(!fSteps.size()) fSteps.reserve(nb+1); |
---|
100 | } |
---|
101 | |
---|
102 | |
---|
103 | #endif /* __RECOSHOWERTRACKDATA_HH__ */ |
---|
104 | |
---|