d810d0de |
1 | // $Id$ |
2 | // Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007 |
3 | |
4 | /************************************************************************** |
5 | * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. * |
6 | * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for * |
51346b82 |
7 | * full copyright notice. * |
d810d0de |
8 | **************************************************************************/ |
5a5a1232 |
9 | |
a15e6d7d |
10 | #ifndef AliEveITSDigitsInfo_H |
11 | #define AliEveITSDigitsInfo_H |
5a5a1232 |
12 | |
84aff7a4 |
13 | #include <TEveUtil.h> |
a15e6d7d |
14 | #include <TObject.h> |
5a5a1232 |
15 | |
16 | #include <map> |
3d598e88 |
17 | #include <vector> |
5a5a1232 |
18 | |
a15e6d7d |
19 | class TClonesArray; |
20 | class TTree; |
5a5a1232 |
21 | |
0879c50b |
22 | class AliITSsegmentationSPD; |
23 | class AliITSsegmentationSDD; |
24 | class AliITSsegmentationSSD; |
25 | class AliITSDDLModuleMapSDD; |
5a5a1232 |
26 | |
b3bc5327 |
27 | class AliRawReader; |
5a5a1232 |
28 | |
57ffa5fb |
29 | /******************************************************************************/ |
d810d0de |
30 | // AliEveITSModuleSelection |
57ffa5fb |
31 | /******************************************************************************/ |
4516a822 |
32 | |
d810d0de |
33 | class AliEveITSModuleSelection |
3d598e88 |
34 | { |
54f770b4 |
35 | public: |
d810d0de |
36 | AliEveITSModuleSelection(); |
37 | virtual ~AliEveITSModuleSelection() {} |
3d598e88 |
38 | |
54f770b4 |
39 | Int_t GetType() const { return fType; } |
40 | void SetType(Int_t x) { fType = x; } |
41 | Int_t GetLayer() const { return fLayer; } |
42 | void SetLayer(Int_t x) { fLayer = x; } |
43 | Float_t GetMinPhi() const { return fMinPhi; } |
44 | void SetMinPhi(Float_t x) { fMinPhi = x; } |
45 | Float_t GetMaxPhi() const { return fMaxPhi; } |
46 | void SetMaxPhi(Float_t x) { fMaxPhi = x; } |
47 | Float_t GetMinTheta() const { return fMinTheta; } |
48 | void SetMinTheta(Float_t x) { fMinTheta = x; } |
49 | Float_t GetMaxTheta() const { return fMaxTheta; } |
50 | void SetMaxTheta(Float_t x) { fMaxTheta = x; } |
51 | |
52 | void SetPhiRange (Float_t x, Float_t y) { fMinPhi = x; fMaxPhi = y; } |
53 | void SetThetaRange(Float_t x, Float_t y) { fMinTheta = x; fMaxTheta = y; } |
54 | |
4b456ebb |
55 | protected: |
56 | Int_t fType; // Type of modules: 0 - SPD, 1 - SDD, 2 - SSD. |
57 | Int_t fLayer; // Layer, 0 - inner SPD, 5 - outer SSD. |
58 | Float_t fMinPhi; // Min phi. |
59 | Float_t fMaxPhi; // Max phi. |
60 | Float_t fMinTheta; // Min theta. |
61 | Float_t fMaxTheta; // Max theta. |
62 | |
63 | ClassDef(AliEveITSModuleSelection, 0); // Helper for selecting a range of ITS modules by type, layer, phi and theta. |
3d598e88 |
64 | }; |
65 | |
4516a822 |
66 | |
57ffa5fb |
67 | /******************************************************************************/ |
d810d0de |
68 | // AliEveITSDigitsInfo |
57ffa5fb |
69 | /******************************************************************************/ |
54f770b4 |
70 | |
d810d0de |
71 | class AliEveITSDigitsInfo : public TObject, public TEveRefCnt |
5a5a1232 |
72 | { |
5a5a1232 |
73 | public: |
54f770b4 |
74 | TTree* fTree; // Tree from which the digits are read. |
75 | |
54f770b4 |
76 | AliITSsegmentationSPD* fSegSPD; // Segmentation of SPD. |
77 | AliITSsegmentationSDD* fSegSDD; // Segmentation of SDD. |
78 | AliITSsegmentationSSD* fSegSSD; // Segmentation of SSD. |
79 | |
20807c14 |
80 | Int_t fSPDMinVal; // Default low limit for display of SPD digits. |
81 | Int_t fSSDMinVal; // Default low limit for display of SSD digits. |
82 | Int_t fSDDMinVal; // Default low limit for display of SDD digits. |
83 | Int_t fSPDMaxVal; // Default high limit for display of SPD digits. |
84 | Int_t fSSDMaxVal; // Default high limit for display of SSD digits. |
85 | Int_t fSDDMaxVal; // Default high limit for display of SDD digits. |
54f770b4 |
86 | |
87 | Int_t fSPDHighLim; // Maximum value of SPD digits. |
88 | Int_t fSDDHighLim; // Maximum value of SDD digits. |
89 | Int_t fSSDHighLim; // Maximum value of SSD digits. |
90 | |
91 | Int_t fSPDScaleX[5]; // SPD cell-sizes along X for display of scaled-digits. |
92 | Int_t fSPDScaleZ[5]; // SPD cell-sizes along Z for display of scaled-digits. |
93 | Int_t fSDDScaleX[5]; // SDD cell-sizes along X for display of scaled-digits. |
94 | Int_t fSDDScaleZ[5]; // SDD cell-sizes along Z for display of scaled-digits. |
95 | Int_t fSSDScale [5]; // SSD cell-sizes for display of scaled-digits. |
d4b6a94c |
96 | |
fe6798e0 |
97 | static AliITSDDLModuleMapSDD *fgDDLMapSDD; // Mapping DDL/module to SDD-module number. |
98 | |
99 | static TObjArray *fgDeadModSPD; // Dead modules of SPD. |
105fb267 |
100 | static TObjArray *fgDeadModSDD; // Dead modules of SDD. |
101 | static TObjArray *fgDeadModSSD; // Dead modules of SSD. |
4516a822 |
102 | |
d810d0de |
103 | AliEveITSDigitsInfo(); |
104 | virtual ~AliEveITSDigitsInfo(); |
5a5a1232 |
105 | |
106 | void SetTree(TTree* tree); |
540e156e |
107 | void ReadRaw(AliRawReader* raw, Int_t mode); |
b3bc5327 |
108 | |
fe6798e0 |
109 | TClonesArray* GetDigits(Int_t moduleID, Int_t detector) const; |
5a5a1232 |
110 | |
a15e6d7d |
111 | void GetSPDLocalZ(Int_t j, Float_t& z) const; |
5a5a1232 |
112 | |
fe6798e0 |
113 | void GetModuleIDs(AliEveITSModuleSelection* sel, std::vector<UInt_t>& ids) const; |
114 | |
115 | Bool_t HasData(Int_t module, Int_t det_id) const; |
116 | Bool_t IsDead (Int_t module, Int_t det_id) const; |
3d598e88 |
117 | |
5a5a1232 |
118 | virtual void Print(Option_t* opt="") const; |
119 | |
4b456ebb |
120 | protected: |
fe6798e0 |
121 | mutable std::map<Int_t, TClonesArray*> fSPDmap; // Map from module-id to SPD data. |
122 | mutable std::map<Int_t, TClonesArray*> fSDDmap; // Map from module-id to SDD data. |
123 | mutable std::map<Int_t, TClonesArray*> fSSDmap; // Map from module-id to SSD data. |
4b456ebb |
124 | |
4516a822 |
125 | void SetITSSegmentation(); |
4b456ebb |
126 | |
127 | private: |
4516a822 |
128 | Float_t fSPDZCoord[192]; // Precalculated z-coordinates for positions of digits. |
4b456ebb |
129 | |
130 | void InitInternals(); |
131 | |
132 | AliEveITSDigitsInfo(const AliEveITSDigitsInfo&); // Not implemented |
133 | AliEveITSDigitsInfo& operator=(const AliEveITSDigitsInfo&); // Not implemented |
134 | |
0879c50b |
135 | ClassDef(AliEveITSDigitsInfo, 0); // Stores ITS geometry information and event-data in format suitable for visualization. |
4516a822 |
136 | }; |
5a5a1232 |
137 | |
0879c50b |
138 | |
a15e6d7d |
139 | inline void AliEveITSDigitsInfo::GetSPDLocalZ(Int_t j, Float_t& z) const |
54f770b4 |
140 | { |
141 | z = fSPDZCoord[j]; |
142 | } |
143 | |
5a5a1232 |
144 | #endif |