Correction
[u/mrichter/AliRoot.git] / ITS / AliITSSumTP.h
CommitLineData
8f359d7b 1#ifndef ALIITSSUMTP_H
2#define ALIITSSUMTP_H
3
4///////////////////////////////////////////////////////////////////
5// //
6// Class for ITS trackpoints summary + some aux. info ) //
7// Author: Ruben Shahoian //
8// //
9///////////////////////////////////////////////////////////////////
10
11/* $Id$ */
12
13class AliTrackPointArray;
14#include <TObjArray.h>
15#include "AliESDVertex.h"
16
17class AliITSSumTP : public TObject
18{
19 public:
20 enum {kCrvTPC,kCrvTPCErr,kCrvGlo,kCrvGloErr,kNVarPerTrack};
21 //
22 AliITSSumTP() : fTracks(0),fVertex(),fNVars(0),fCrvVars(0) {fTracks.SetOwner(kTRUE);}
23 AliITSSumTP(const AliITSSumTP& src);
24 virtual ~AliITSSumTP() {Reset();}
25 AliITSSumTP &operator=(const AliITSSumTP& src);
6fe97dd9 26 virtual void Print(Option_t* opt="") const;
8f359d7b 27 //
28 AliESDVertex& GetVertex() const {return (AliESDVertex&)fVertex;}
29 AliTrackPointArray* GetTrack(Int_t i) const {return (AliTrackPointArray*)fTracks[i];}
30 TObjArray& GetTracks() const {return (TObjArray&) fTracks;}
31 Int_t GetNTracks() const {return fNVars/kNVarPerTrack;}
32 Double_t GetCrvTPC(Int_t i) const {return fCrvVars[i*kNVarPerTrack+kCrvTPC];}
33 Double_t GetCrvTPCErr(Int_t i) const {return fCrvVars[i*kNVarPerTrack+kCrvTPCErr];}
34 Double_t GetCrvGlo(Int_t i) const {return fCrvVars[i*kNVarPerTrack+kCrvGlo];}
35 Double_t GetCrvGloErr(Int_t i) const {return fCrvVars[i*kNVarPerTrack+kCrvGloErr];}
36 //
37 void Reset();
38 void BookNTracks(Int_t n);
39 void SetCrvTPC(Int_t i, Double_t v) {fCrvVars[i*kNVarPerTrack+kCrvTPC] = v;}
40 void SetCrvTPCErr(Int_t i, Double_t v) {fCrvVars[i*kNVarPerTrack+kCrvTPCErr] = v;}
41 void SetCrvGlo(Int_t i, Double_t v) {fCrvVars[i*kNVarPerTrack+kCrvGlo] = v;}
42 void SetCrvGloErr(Int_t i, Double_t v) {fCrvVars[i*kNVarPerTrack+kCrvGloErr] = v;}
43 void AddTrack(AliTrackPointArray* trc) {fTracks.AddLast((TObject*)trc);}
44 void SetVertex(const AliESDVertex* vtx) {fVertex = *vtx;}
45 //
46 protected:
47 //
48 TObjArray fTracks; // TrackPoints
49 AliESDVertex fVertex; // ESD Vertex
50 Int_t fNVars; // Ntracks*kNVarPerTrack
51 Double32_t* fCrvVars; //[fNVars];
52
53 ClassDef(AliITSSumTP,1)
54};
55
56#endif
57