]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONAlignmentRecord.h
Remove TClonesArray deletions (Diego)
[u/mrichter/AliRoot.git] / MUON / AliMUONAlignmentRecord.h
CommitLineData
56218672 1#ifndef ALIMUONALIGNMENTRECORD_H
2#define ALIMUONALIGNMENTRECORD_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7
8/// \ingroup rec
9/// \class AliMUONAlignmentClusterRecord
10/// \brief Class to store alignment local and global derivatives of muon spectrometer
11//
12// Author: Hugo Pereira Da Costa
13
14#include <TClonesArray.h>
15#include <TObject.h>
16#include <cassert>
17
18class AliMUONAlignmentClusterRecord:public TObject
19{
20
21public:
22
23 /// constructor
24 AliMUONAlignmentClusterRecord( void );
25
26 /// destructor
27 virtual ~AliMUONAlignmentClusterRecord( void )
28 {}
29
30 /// Print
31 virtual void Print(Option_t* = "") const;
32
33 ///@name modifiers
34 ///@{
35
36 /// detetion element Id
37 void SetDetElemId( Int_t value )
38 {
39 fDetElemId = value;
40 fDetElemNumber = fDetElemId%100;
41 }
42
43 /// detection element number
44 void SetDetElemNumber( Int_t value )
45 { fDetElemNumber = value; }
46
47 /// measurement
48 void SetMeas( Double_t value )
49 { fMeas = value; }
50
51 /// error on measurement
52 void SetSigma( Double_t value )
53 { fSigma = value; }
54
55 /// local derivative
56 void SetLocalDerivative( Int_t index, Double_t value )
57 {
58 // todo: bound check ?
59 fLocalDerivatives[index] = value;
60 }
61
62 /// global derivative
63 void SetGlobalDerivative( Int_t index, Double_t value )
64 {
65 // todo: bound check ?
66 fGlobalDerivatives[index] = value;
67 }
68
69 ///@}
70
71 ///@name accessors
72 ///@{
73
74 /// detection element id
75 Int_t GetDetElemId( void ) const
76 { return fDetElemId; }
77
78 /// detection element number
79 Int_t GetDetElemNumber( void ) const
80 { return fDetElemNumber; }
81
82 /// measurement
83 Double_t GetMeas( void ) const
84 { return fMeas; }
85
86 /// error on measurement
87 Double_t GetSigma( void ) const
88 { return fSigma; }
89
90 /// local derivative
91 Double_t GetLocalDerivative( Int_t index ) const
92 {
93 // todo: bound check ?
94 return fLocalDerivatives[index];
95 }
96
97 /// global derivative
98 Double_t GetGlobalDerivative( Int_t index ) const
99 {
100 // todo: bound check ?
101 return fGlobalDerivatives[index];
102 }
103
104 /// @}
105
106private:
107
108 /// Detection element Id
109 Int_t fDetElemId;
110
111 /// Detection element number
112 Int_t fDetElemNumber;
113
114 /// measurement
115 Double_t fMeas;
116
117 /// error on measurement
118 Double_t fSigma;
119
120 /// local derivatives
121 Double_t fLocalDerivatives[4];
122
123 /// global derivatives
124 Double_t fGlobalDerivatives[4];
125
126ClassDef(AliMUONAlignmentClusterRecord, 1)
127
128};
129
130/// \ingroup rec
131/// \class AliMUONAlignmentTrackRecord
132/// \brief Class to store alignment local and global derivatives of muon spectrometer
133//
134// Author: Hugo Pereira Da Costa
135class AliMUONAlignmentTrackRecord:public TObject
136{
137
138public:
139
140 /// constructor
141 AliMUONAlignmentTrackRecord( void );
142
143 /// destructor
144 virtual ~AliMUONAlignmentTrackRecord( void );
145
146 /// copy constructor
147 AliMUONAlignmentTrackRecord (const AliMUONAlignmentTrackRecord& );
148
149 /// assignment operator
150 AliMUONAlignmentTrackRecord& operator=(const AliMUONAlignmentTrackRecord& );
151
152 /// Print
153 virtual void Print(Option_t* option = "") const;
154
155 ///@name accessors
156 //@{
157
158 /// cluster records
159 TClonesArray* GetClusterRecords( void ) const
160 { return fClusterRecords; }
161
162 /// number of records
163 Int_t GetNRecords( void ) const
164 { return fClusterCount; }
165
166 /// return record for given index
167 AliMUONAlignmentClusterRecord* GetRecord( Int_t index ) const
168 { return fClusterRecords ? static_cast<AliMUONAlignmentClusterRecord*>(fClusterRecords->UncheckedAt( index )) : 0x0; }
169
170 //@}
171
172 ///@name modifiers
173 //@{
174
175 /// add cluster record
176 void AddClusterRecord( const AliMUONAlignmentClusterRecord& );
177
178 /// remove cluster record
179 void RemoveClusterRecord( AliMUONAlignmentClusterRecord* );
180
181 /// clear memory
182 virtual void Clear( Option_t* ="" );
183
184 //@}
185
186private:
187
188 /// default clonesarray size
189 enum { fSize = 20 };
190
191 /// alignment parameters at cluster
192 TClonesArray* fClusterRecords;
193
194 /// number of cluster records in array
195 Int_t fClusterCount;
196
197ClassDef(AliMUONAlignmentTrackRecord, 1)
198
199};
200
201#endif