New class with track point summary info (Ruben)
[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);
26 //
27 AliESDVertex& GetVertex() const {return (AliESDVertex&)fVertex;}
28 AliTrackPointArray* GetTrack(Int_t i) const {return (AliTrackPointArray*)fTracks[i];}
29 TObjArray& GetTracks() const {return (TObjArray&) fTracks;}
30 Int_t GetNTracks() const {return fNVars/kNVarPerTrack;}
31 Double_t GetCrvTPC(Int_t i) const {return fCrvVars[i*kNVarPerTrack+kCrvTPC];}
32 Double_t GetCrvTPCErr(Int_t i) const {return fCrvVars[i*kNVarPerTrack+kCrvTPCErr];}
33 Double_t GetCrvGlo(Int_t i) const {return fCrvVars[i*kNVarPerTrack+kCrvGlo];}
34 Double_t GetCrvGloErr(Int_t i) const {return fCrvVars[i*kNVarPerTrack+kCrvGloErr];}
35 //
36 void Reset();
37 void BookNTracks(Int_t n);
38 void SetCrvTPC(Int_t i, Double_t v) {fCrvVars[i*kNVarPerTrack+kCrvTPC] = v;}
39 void SetCrvTPCErr(Int_t i, Double_t v) {fCrvVars[i*kNVarPerTrack+kCrvTPCErr] = v;}
40 void SetCrvGlo(Int_t i, Double_t v) {fCrvVars[i*kNVarPerTrack+kCrvGlo] = v;}
41 void SetCrvGloErr(Int_t i, Double_t v) {fCrvVars[i*kNVarPerTrack+kCrvGloErr] = v;}
42 void AddTrack(AliTrackPointArray* trc) {fTracks.AddLast((TObject*)trc);}
43 void SetVertex(const AliESDVertex* vtx) {fVertex = *vtx;}
44 //
45 protected:
46 //
47 TObjArray fTracks; // TrackPoints
48 AliESDVertex fVertex; // ESD Vertex
49 Int_t fNVars; // Ntracks*kNVarPerTrack
50 Double32_t* fCrvVars; //[fNVars];
51
52 ClassDef(AliITSSumTP,1)
53};
54
55#endif
56