]>
Commit | Line | Data |
---|---|---|
0145e89a | 1 | #ifndef ALIMUONTRACKERDATA_H |
2 | #define ALIMUONTRACKERDATA_H | |
3 | ||
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
7 | // $Id$ | |
8 | ||
e41c38cf | 9 | /// \ingroup calib |
0145e89a | 10 | /// \class AliMUONTrackerData |
11 | /// \brief Implementation of AliMUONVTrackerData | |
12 | /// | |
13 | // Author Laurent Aphecetche, Subatech | |
14 | ||
15 | #ifndef ALIMUONVTRACKERDATA_H | |
16 | # include "AliMUONVTrackerData.h" | |
17 | #endif | |
18 | ||
8741815f | 19 | class AliMUONSparseHisto; |
0145e89a | 20 | class AliMUONVCalibParam; |
21 | class AliMUONVStore; | |
8741815f | 22 | class AliMpDetElement; |
0145e89a | 23 | |
24 | class AliMUONTrackerData : public AliMUONVTrackerData | |
25 | { | |
26 | public: | |
27 | AliMUONTrackerData(const char* name="", const char* title="", | |
28 | Int_t dimension=0, | |
49419555 | 29 | Bool_t issingleevent=kFALSE); |
0145e89a | 30 | virtual ~AliMUONTrackerData(); |
31 | ||
49419555 | 32 | virtual Bool_t Add(const AliMUONVStore& channelValues); |
1ffbeb9d | 33 | |
34 | virtual Bool_t Replace(const AliMUONVStore& channelValues); | |
35 | ||
0145e89a | 36 | virtual Double_t BusPatch(Int_t busPatchId, Int_t dim=0) const; |
37 | ||
38 | virtual Double_t Chamber(Int_t chamberId, Int_t dim=0) const; | |
39 | ||
40 | virtual Double_t Channel(Int_t detElemId, Int_t manuId, Int_t manuChannel, | |
41 | Int_t dim=0) const; | |
42 | ||
43 | virtual void Clear(Option_t* opt=""); | |
44 | ||
45 | virtual Double_t Count(Int_t detElemId, Int_t manuId, Int_t manuChannel) const; | |
46 | ||
47 | virtual Double_t DetectionElement(Int_t detElemId, Int_t dim=0) const; | |
48 | ||
49 | virtual TString DimensionName(Int_t dim) const; | |
8741815f | 50 | |
51 | virtual TString ExternalDimensionName(Int_t dim) const; | |
0145e89a | 52 | |
53 | virtual Bool_t HasChamber(Int_t chamberId) const; | |
54 | ||
55 | virtual Bool_t HasBusPatch(Int_t busPatchId) const; | |
56 | ||
57 | virtual Bool_t HasDetectionElement(Int_t detElemId) const; | |
58 | ||
59 | virtual Bool_t HasManu(Int_t detElemId, Int_t manuId) const; | |
60 | ||
61 | virtual Bool_t HasPCB(Int_t detElemId, Int_t pcbIndex) const; | |
62 | ||
9016a84e | 63 | /// Whether we can be run |
49419555 | 64 | virtual Bool_t IsSingleEvent() const { return fIsSingleEvent; } |
0145e89a | 65 | |
66 | virtual Double_t Manu(Int_t detElemId, Int_t manuId, Int_t dim=0) const; | |
67 | ||
68 | /// Returns the number of dimensions (i.e. the number of values) each element has | |
69 | virtual Int_t NumberOfDimensions() const; | |
70 | ||
10eb3d17 | 71 | /// The number of values we are inputting |
72 | virtual Int_t ExternalDimension() const { return fExternalDimension; } | |
73 | ||
74 | /// Convert from internal to external dimension | |
75 | virtual Int_t InternalToExternal(Int_t dim) const { return dim/2; } | |
76 | ||
0145e89a | 77 | /// Returns the number of events we have seen so far |
78 | virtual Int_t NumberOfEvents() const { return fNevents; } | |
79 | ||
80 | virtual Double_t PCB(Int_t detElemId, Int_t pcbIndex, Int_t dim=0) const; | |
81 | ||
82 | using TObject::Print; | |
83 | ||
84 | /// Print, with option, all objects whose name matches wildcard | |
85 | virtual void Print(Option_t* wildcard, Option_t* opt) const; | |
86 | ||
87 | virtual void SetDimensionName(Int_t index, const char* value); | |
88 | ||
8741815f | 89 | Bool_t CanHistogram() const { return kTRUE; } |
90 | ||
10eb3d17 | 91 | void MakeHistogramForDimension(Int_t index, Bool_t value, Double_t xmin=0.0, Double_t xmax=4096.0); |
8741815f | 92 | |
10eb3d17 | 93 | virtual void HistogramRange(Double_t& xmin, Double_t& xmax) const { xmin = fXmin; xmax = fXmax; } |
8741815f | 94 | |
10eb3d17 | 95 | AliMUONSparseHisto* GetChannelSparseHisto(Int_t detElemId, Int_t manuId, |
96 | Int_t manuChannel, Int_t dim=0); | |
8741815f | 97 | |
10eb3d17 | 98 | virtual AliMUONSparseHisto* GetChannelSparseHisto(Int_t detElemId, Int_t manuId, |
99 | Int_t manuChannel, Int_t dim=0) const; | |
8741815f | 100 | |
8741815f | 101 | private: |
102 | ||
103 | void FillChannel(Int_t detElemId, Int_t manuId, Int_t manuChannel, | |
104 | Int_t dim, Double_t value); | |
105 | ||
8741815f | 106 | AliMUONVCalibParam* BusPatchParam(Int_t busPatch, Bool_t create=kFALSE) const; |
107 | ||
108 | AliMUONVCalibParam* CreateBusPatchParam(Int_t busPatch) const; | |
109 | ||
110 | AliMUONVCalibParam* ChamberParam(Int_t chamberId, Bool_t create=kFALSE) const; | |
111 | ||
112 | AliMUONVCalibParam* CreateChamberParam(Int_t chamberId) const; | |
113 | ||
114 | AliMUONVCalibParam* ChannelParam(Int_t detElemId, Int_t manuId, | |
115 | AliMUONVCalibParam* external=0x0) const; | |
0145e89a | 116 | |
8741815f | 117 | AliMUONVCalibParam* DetectionElementParam(Int_t detElemId, Bool_t create=kFALSE) const; |
0145e89a | 118 | |
8741815f | 119 | AliMUONVCalibParam* CreateDetectionElementParam(Int_t detElemId) const; |
0145e89a | 120 | |
8741815f | 121 | AliMUONVCalibParam* ManuParam(Int_t detElemId, Int_t manuId, Bool_t create=kFALSE) const; |
0145e89a | 122 | |
8741815f | 123 | AliMUONVCalibParam* CreateManuParam(Int_t detElemInd, Int_t manuId) const; |
0145e89a | 124 | |
8741815f | 125 | AliMUONVCalibParam* PCBParam(Int_t detElemId, Int_t pcbIndex, Bool_t create=kFALSE) const; |
0145e89a | 126 | |
8741815f | 127 | AliMUONVCalibParam* CreatePCBParam(Int_t detElemId, Int_t pcbIndex) const; |
0145e89a | 128 | |
9016a84e | 129 | /// Index of the dimension containing the number of time an item was hit |
0145e89a | 130 | virtual Int_t IndexOfNumberDimension() const { return fDimension - 1; } |
131 | ||
9016a84e | 132 | /// Index of the dimension containing the occupancy number |
0145e89a | 133 | virtual Int_t IndexOfOccupancyDimension() const { return fDimension - 2; } |
134 | ||
10eb3d17 | 135 | /// Whether we have histograms for a given dimension, or not |
136 | virtual Bool_t IsHistogrammed(Int_t dim) const { return ( fHistogramming[dim] > 0 ); } | |
137 | ||
7b6684fe | 138 | /// To allow merging of different objects |
139 | virtual Long64_t Merge(TCollection* list); | |
140 | ||
0145e89a | 141 | private: |
142 | /// Not implemented | |
143 | AliMUONTrackerData(const AliMUONTrackerData& rhs); | |
144 | /// Not implemented | |
145 | AliMUONTrackerData& operator=(const AliMUONTrackerData& rhs); | |
146 | ||
7b6684fe | 147 | AliMUONVCalibParam* CreateDouble(const AliMUONVCalibParam& param, Int_t detElemId, Int_t manuId) const; |
0145e89a | 148 | |
8741815f | 149 | Int_t GetParts(AliMUONVCalibParam* external, |
150 | AliMUONVCalibParam*& chamber, | |
151 | AliMUONVCalibParam*& de, | |
152 | AliMUONVCalibParam*& busPatch, | |
153 | AliMUONVCalibParam*& pcb, | |
154 | AliMUONVCalibParam*& manu, | |
155 | AliMUONVCalibParam*& channel, | |
156 | AliMpDetElement*& mpde); | |
157 | ||
0145e89a | 158 | /// Convert from external to internal index |
49419555 | 159 | Int_t External2Internal(Int_t index) const; |
0145e89a | 160 | |
0145e89a | 161 | void SetInternalDimensionName(Int_t index, const char* value); |
162 | ||
8741815f | 163 | void SetExternalDimensionName(Int_t index, const char* value); |
164 | ||
0145e89a | 165 | Double_t Value(const AliMUONVCalibParam& param, Int_t i, Int_t dim) const; |
8741815f | 166 | |
167 | /// The number of values we actually *store* for each item | |
168 | Int_t Dimension() const { return fDimension; } | |
10eb3d17 | 169 | |
0145e89a | 170 | private: |
171 | ||
1ffbeb9d | 172 | Bool_t InternalAdd(const AliMUONVStore& store, Bool_t replace); |
173 | ||
49419555 | 174 | Bool_t fIsSingleEvent; ///< whether we can deal with more than one event |
0145e89a | 175 | AliMUONVStore* fChannelValues; ///< the channel store |
176 | AliMUONVStore* fManuValues; ///< the manu store | |
177 | AliMUONVStore* fBusPatchValues; ///< the bus patch store | |
178 | AliMUONVStore* fDEValues; ///< the detection element store | |
179 | AliMUONVStore* fChamberValues; ///< the chamber store | |
180 | AliMUONVStore* fPCBValues; ///< the pcb store | |
181 | Int_t fDimension; ///< the dimension of the data | |
182 | Int_t fNevents; ///< the number of events treated | |
8741815f | 183 | TObjArray* fDimensionNames; ///< the names of the (internal) dimensions |
184 | TObjArray* fExternalDimensionNames; ///< the names of the external (i.e. original) dimensions | |
0145e89a | 185 | Int_t fExternalDimension; ///< number of interface values per item |
8741815f | 186 | /// whether we should histogram the dimension(s) |
187 | Int_t* fHistogramming; //[fExternalDimension] whether we should histogram the dimension(s) | |
188 | AliMUONVStore* fChannelHistos; ///< the channel histograms | |
10eb3d17 | 189 | Double_t fXmin; ///< min x value for histograms |
190 | Double_t fXmax; ///< max x value for histograms | |
0145e89a | 191 | static const Int_t fgkExtraDimension; ///< to hold extra information |
192 | static const Int_t fgkVirtualExtraDimension; ///< to give access to information not stored, but computed on the fly | |
193 | ||
49419555 | 194 | ClassDef(AliMUONTrackerData,4) // Implementation of AliMUONVTrackerData |
0145e89a | 195 | }; |
196 | ||
197 | #endif |