1 | // ESAF : Euso Simulation and Analysis Framework |
---|
2 | // $Id: RecoCellInfo.hh 3012 2012-02-02 09:47:23Z fenu $ |
---|
3 | // Marco Pallavicini created Nov, 18 2003 |
---|
4 | // description of macrocell data |
---|
5 | // each object of this kind describes data handled by a single macrocell |
---|
6 | // |
---|
7 | |
---|
8 | #ifndef __RECOCELLINFO_HH_ |
---|
9 | #define __RECOCELLINFO_HH_ |
---|
10 | |
---|
11 | #include "euso.hh" |
---|
12 | #include <vector> |
---|
13 | |
---|
14 | class RecoCellHit; |
---|
15 | |
---|
16 | class RecoCellInfo { |
---|
17 | public: |
---|
18 | // ctor |
---|
19 | RecoCellInfo(Int_t cell); |
---|
20 | |
---|
21 | // dtor |
---|
22 | virtual ~RecoCellInfo(); |
---|
23 | |
---|
24 | // get id |
---|
25 | inline Int_t GetCellId() const { return fCellId; } |
---|
26 | |
---|
27 | // trigger |
---|
28 | inline Bool_t HasTriggered() const { return fTriggered; } |
---|
29 | |
---|
30 | // trigger types |
---|
31 | inline Int_t TriggerWord() const { return fTriggerWord; } |
---|
32 | |
---|
33 | // get number of hits |
---|
34 | inline Int_t GetNumberofHits() const { return fHits.size(); } |
---|
35 | |
---|
36 | inline Int_t GetGTUTriggerCCB() const { return fGTUTriggerCCB; } |
---|
37 | inline Int_t GetDirTriggerCCB() const { return fDirTriggerCCB; } |
---|
38 | inline Int_t GetECRowTriggerCCB() const { return fECRowTriggerCCB; } |
---|
39 | inline Int_t GetECColTriggerCCB() const { return fECColTriggerCCB; } |
---|
40 | inline Int_t GetChipIDTriggerCCB() const { return fChipIDTriggerCCB; } |
---|
41 | inline Int_t GetPdmIDTriggerCCB() const { return fPdmIDTriggerCCB; } |
---|
42 | inline Int_t GetMaxCountsTriggerCCB() const { return fMaxCountsTriggerCCB; } |
---|
43 | |
---|
44 | // return hits in 3 different modes |
---|
45 | |
---|
46 | // function |
---|
47 | const RecoCellHit* GetHit(UInt_t i) const; |
---|
48 | |
---|
49 | // operator |
---|
50 | inline const RecoCellHit* operator[] (Int_t i) const { return GetHit(i);} |
---|
51 | |
---|
52 | // reference to whole vector |
---|
53 | inline const vector<RecoCellHit*> &Hits() const { return fHits; } |
---|
54 | |
---|
55 | // return number of photoelectrons in the pixels of macrocell |
---|
56 | Int_t GetNumberofCounts() const; |
---|
57 | |
---|
58 | // return Gtu id of first photoelectron detected in macrocell |
---|
59 | Int_t GetFirstGtu() const; |
---|
60 | |
---|
61 | // return Gtu id of last photoelectron detected in macrocell |
---|
62 | Int_t GetLastGtu() const; |
---|
63 | |
---|
64 | |
---|
65 | private: |
---|
66 | // cell id |
---|
67 | Int_t fCellId; |
---|
68 | |
---|
69 | Bool_t fTriggered;// trigger flag |
---|
70 | // PAY ATTENTION! TRIGGER FLAG IS 1 IF ANY(!) TRIGGER TRIGGERS |
---|
71 | // ALWAYS CHECK WITH fTriggerWord IF CCB_LTT IS TRIGGERING! |
---|
72 | // CCB_LTT IS THE LAST TRIGGER OF THE CHAIN! |
---|
73 | |
---|
74 | // trigger word |
---|
75 | Int_t fTriggerWord;//8192 identifies CCB_LTT use bitwise and to decide wether CCB has triggered or not. |
---|
76 | |
---|
77 | Int_t fGTUTriggerCCB;//GTU of the trigger |
---|
78 | Int_t fDirTriggerCCB;// Direction under which maximum trigger occured |
---|
79 | Int_t fECRowTriggerCCB;//EC row where the trigger took place |
---|
80 | Int_t fECColTriggerCCB;//EC column where the trigger took place |
---|
81 | Int_t fChipIDTriggerCCB;//Elementary Cell (Chip) identifier where the trigger took place |
---|
82 | Int_t fPdmIDTriggerCCB;//PDM identifier where the trigger took place |
---|
83 | Int_t fMaxCountsTriggerCCB;// Maximum integrated value in case of trigger |
---|
84 | |
---|
85 | // macrocell hits |
---|
86 | vector<RecoCellHit*> fHits; |
---|
87 | |
---|
88 | // add a hit; can only be done by root input module |
---|
89 | void AddHit(Int_t,Int_t,Int_t); |
---|
90 | |
---|
91 | friend class RootInputModule; |
---|
92 | |
---|
93 | ClassDef(RecoCellInfo,0) |
---|
94 | }; |
---|
95 | |
---|
96 | #endif /* __RECOCELLINFO_HH_ */ |
---|
97 | |
---|