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