1 #ifndef ALIMILLEPEDERECORD_H
2 #define ALIMILLEPEDERECORD_H
4 /**********************************************************************************************/
5 /* AliMillePedeRecords: class to store the data of single track processing */
6 /* Format: for each measured point the data is stored consequtively */
9 /* Local_param_id dResidual/dLocal_param */
11 /* -2 weight of the measurement */
12 /* Global_param_od dResidual/dGlobal_param */
15 /* The records for all processed tracks are stored in the temporary tree in orgder to be */
16 /* reused for multiple iterations of MillePede */
18 /* Author: ruben.shahoyan@cern.ch */
20 /**********************************************************************************************/
23 class AliMillePedeRecord : public TObject
27 AliMillePedeRecord(const AliMillePedeRecord& src);
28 AliMillePedeRecord& operator=(const AliMillePedeRecord& rhs);
30 virtual ~AliMillePedeRecord();
32 void Print(const Option_t *opt="") const;
34 Int_t GetSize() const {return fSize;}
35 Int_t *GetIndex() const {return fIndex;}
36 Int_t GetIndex(int i) const {return fIndex[i];}
38 void GetIndexValue(Int_t i,Int_t &ind,Double_t &val) const {ind=fIndex[i]; val=fValue[i];}
39 void AddIndexValue(Int_t ind, Double_t val);
40 void AddResidual(Double_t val) {AddIndexValue(-1,val);}
41 void AddWeight(Double_t val) {AddIndexValue(-2,val);}
42 Bool_t IsResidual(Int_t i) const {return fIndex[i]==-1;}
43 Bool_t IsWeight(Int_t i) const {return fIndex[i]==-2;}
45 Double_t *GetValue() const {return fValue;}
46 Double_t GetValue(Int_t i) const {return fValue[i];}
48 void MarkGroup(Int_t id);
49 Int_t GetNGroups() const {return fNGroups;}
50 Int_t GetGroupID(Int_t i) const {return fGroupID[i];}
51 Bool_t IsGroupPresent(Int_t id) const;
54 Int_t GetDtBufferSize() const {return GetUniqueID()&0x0000ffff;}
55 Int_t GetGrBufferSize() const {return GetUniqueID()>>16;}
56 void SetDtBufferSize(Int_t sz) {SetUniqueID((GetGrBufferSize()<<16)+sz);}
57 void SetGrBufferSize(Int_t sz) {SetUniqueID(GetDtBufferSize()+(sz<<16));}
58 void ExpandDtBuffer(Int_t bfsize);
59 void ExpandGrBuffer(Int_t bfsize);
62 Int_t fSize; // size of the record
63 Int_t fNGroups; // number of groups (e.g. detectors) contributing
64 Int_t * fGroupID; //[fNGroups] groups id's (in increasing order)
65 Int_t * fIndex; //[fSize] index of variables
66 Double_t* fValue; //[fSize] array of values: derivs,residuals
68 ClassDef(AliMillePedeRecord,1) // Record of track residuals and local/global deriavtives
71 inline void AliMillePedeRecord::AddIndexValue(Int_t ind, Double_t val)
73 if (fSize>=GetDtBufferSize()) ExpandDtBuffer(2*(fSize+1));