]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/EveDet/AliEveITSDigitsInfo.h
New code for full visualization of the vzero raw data. ctrl-alt-letf-button shows...
[u/mrichter/AliRoot.git] / EVE / EveDet / AliEveITSDigitsInfo.h
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          *
7  * full copyright notice.                                                 *
8  **************************************************************************/
9
10 #ifndef AliEveITSDigitsInfo_H
11 #define AliEveITSDigitsInfo_H
12
13 #include <TEveUtil.h>
14 #include <TObject.h>
15
16 #include <map>
17 #include <vector>
18
19 class TClonesArray;
20 class TTree;
21
22 //class AliITSgeom;
23 class AliITSsegmentationSPD;
24 class AliITSsegmentationSDD;
25 class AliITSsegmentationSSD;
26 class AliITSDDLModuleMapSDD;
27
28 class AliRawReader;
29
30 /******************************************************************************/
31 // AliEveITSModuleSelection
32 /******************************************************************************/
33 class AliEveITSModuleSelection
34 {
35 public:
36   AliEveITSModuleSelection();
37   virtual ~AliEveITSModuleSelection() {}
38
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
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.
64 };
65
66 /******************************************************************************/
67 // AliEveITSDigitsInfo
68 /******************************************************************************/
69
70 class AliEveITSDigitsInfo : public TObject, public TEveRefCnt
71 {
72 public:
73   TTree*                   fTree;         // Tree from which the digits are read.
74
75   AliITSsegmentationSPD*   fSegSPD;       // Segmentation of SPD.
76   AliITSsegmentationSDD*   fSegSDD;       // Segmentation of SDD.
77   AliITSsegmentationSSD*   fSegSSD;       // Segmentation of SSD.
78   AliITSDDLModuleMapSDD*   fDDLMapSDD;    // Mapping DDL/module to SDD-module number.
79
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.
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.
96
97   AliEveITSDigitsInfo();
98   virtual ~AliEveITSDigitsInfo();
99
100   void SetTree(TTree* tree);
101   void ReadRaw(AliRawReader* raw, Int_t mode);
102
103   TClonesArray* GetDigits(Int_t moduleID, Int_t detector);
104
105   void GetSPDLocalZ(Int_t j, Float_t& z) const;
106
107   void GetModuleIDs(AliEveITSModuleSelection* sel, std::vector<UInt_t>& ids);
108
109   virtual void Print(Option_t* opt="") const;
110
111 protected:
112   std::map<Int_t,  TClonesArray*> fSPDmap;     // Map from module-id to SPD data.
113   std::map<Int_t,  TClonesArray*> fSDDmap;     // Map from module-id to SDD data.
114   std::map<Int_t,  TClonesArray*> fSSDmap;     // Map from module-id to SSD data.
115
116   void        SetITSSegmentation();
117
118 private:
119   Float_t fSPDZCoord[192];                // Precalculated z-coordinates for positions of digits.
120
121   void InitInternals();
122
123   AliEveITSDigitsInfo(const AliEveITSDigitsInfo&);            // Not implemented
124   AliEveITSDigitsInfo& operator=(const AliEveITSDigitsInfo&); // Not implemented
125
126   ClassDef(AliEveITSDigitsInfo, 0); // Stores ITS geometry information and event-data in format suitable for visualization.
127 }; // endclass AliEveITSDigitsInfo
128
129
130 inline void AliEveITSDigitsInfo::GetSPDLocalZ(Int_t j, Float_t& z) const
131 {
132   z = fSPDZCoord[j];
133 }
134
135 #endif