AliRoot Core  3dc7879 (3dc7879)
AliESDfriend.h
Go to the documentation of this file.
1 #ifndef ALIESDFRIEND_H
2 #define ALIESDFRIEND_H
3 
4 //-------------------------------------------------------------------------
5 // Class AliESDfriend
6 // This class contains ESD additions
7 // Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch
8 //-------------------------------------------------------------------------
9 
10 #include <TObject.h>
11 #include <TClonesArray.h>
12 
13 #include "AliESDfriendTrack.h"
14 #include "AliVfriendEvent.h"
15 
16 #include "AliESDVZEROfriend.h"
17 
18 class AliESDTZEROfriend;
19 class AliESDADfriend;
20 class AliESDCalofriend;
21 
22 //_____________________________________________________________________________
23 class AliESDfriend : public AliVfriendEvent {
24 public:
25  AliESDfriend();
26  AliESDfriend(const AliESDfriend &);
27  AliESDfriend& operator=(const AliESDfriend& esd);
28  virtual ~AliESDfriend();
29 
30  // This function will set the ownership
31  // needed to read old ESDfriends
32  void SetOwner(){
33  fTracks.SetOwner();
34  Int_t n=fTracks.GetEntriesFast();
35  for(;n--;){
36  AliESDfriendTrack *t=(AliESDfriendTrack *)fTracks.UncheckedAt(n);
37  if(t)t->SetOwner();
38  }
39  }
40 
41  Int_t GetNumberOfTracks() const {return fTracks.GetEntriesFast();}
42  AliESDfriendTrack *GetTrack(Int_t i) const {
43  return (AliESDfriendTrack *)fTracks.At(i);
44  }
45  Int_t GetEntriesInTracks() const {return fTracks.GetEntries();}
46 
47  AliESDfriendTrack* AddTrack(const AliESDfriendTrack *t, Bool_t shallow=kFALSE) {
48  return new(fTracks[fTracks.GetEntriesFast()]) AliESDfriendTrack(*t,shallow);
49  }
50 
51  AliESDfriendTrack* AddTrackAt(const AliESDfriendTrack *t, Int_t i, Bool_t shallow=kFALSE) {
52  return new(fTracks[i]) AliESDfriendTrack(*t,shallow);
53  }
54 
55  void SetVZEROfriend(const AliESDVZEROfriend * obj);
60  if( fESDVZEROfriend ){ v=*fESDVZEROfriend; return 0; }
61  return -1;
62  }
63 
66  void SetADfriend(AliESDADfriend * obj);
68  void SetCalofriend(AliESDCalofriend * obj);
70 
71  void Ls() const {
72  return fTracks.ls();
73  }
74  void Reset();
75  void ResetSoft();
76  // bit manipulation for filtering
77  void SetSkipBit(Bool_t skip){SetBit(23,skip);}
78  Bool_t TestSkipBit() const { return TestBit(23); }
79 
80  //TPC cluster occupancy
81  Int_t GetNclustersTPC(UInt_t sector) const {return (sector<72)?fNclustersTPC[sector]:0;}
82  Int_t GetNclustersTPCused(UInt_t sector) const {return (sector<72)?fNclustersTPCused[sector]:0;}
83  void SetNclustersTPC(UInt_t sector, Int_t occupancy) {if (sector<72) fNclustersTPC[sector]=occupancy;}
84  void SetNclustersTPCused(UInt_t sector, Int_t occupancy) {if (sector<72) fNclustersTPCused[sector]=occupancy;}
85  //
86  Bool_t GetESDIndicesStored() const {return fESDIndicesStored;}
87  void SetESDIndicesStored(Bool_t v) {fESDIndicesStored = v;}
88 
89  protected:
90  void DeleteTracksSafe();
91 
92 protected:
93  Bool_t fESDIndicesStored; // Flag new format of sparse friends
94  TClonesArray fTracks; // ESD friend tracks
95  AliESDVZEROfriend *fESDVZEROfriend; // VZERO object containing complete raw data
96  AliESDTZEROfriend *fESDTZEROfriend; // TZERO calibration object
97  AliESDADfriend *fESDADfriend; // AD object containing complete raw data
98  AliESDCalofriend *fESDCalofriend; // Calo object containing complete raw data
99 
100  Int_t fNclustersTPC[72]; //cluster occupancy per sector per sector
101  Int_t fNclustersTPCused[72]; //number of clusters used in tracking per sector
102 
103  ClassDef(AliESDfriend,7) // ESD friend
104 };
105 
106 #endif
107 
108 
void SetSkipBit(Bool_t skip)
Definition: AliESDfriend.h:77
void SetTZEROfriend(AliESDTZEROfriend *obj)
Int_t fNclustersTPC[72]
Definition: AliESDfriend.h:100
void SetESDIndicesStored(Bool_t v)
Definition: AliESDfriend.h:87
AliVVZEROfriend * GetVVZEROfriend()
Definition: AliESDfriend.h:58
Bool_t fESDIndicesStored
Definition: AliESDfriend.h:93
void SetNclustersTPC(UInt_t sector, Int_t occupancy)
Definition: AliESDfriend.h:83
void SetVZEROfriend(const AliESDVZEROfriend *obj)
Int_t GetEntriesInTracks() const
Definition: AliESDfriend.h:45
AliESDTZEROfriend * fESDTZEROfriend
Definition: AliESDfriend.h:96
Int_t GetESDVZEROfriend(AliESDVZEROfriend &v) const
Definition: AliESDfriend.h:59
AliESDfriendTrack * AddTrackAt(const AliESDfriendTrack *t, Int_t i, Bool_t shallow=kFALSE)
Definition: AliESDfriend.h:51
void Ls() const
Definition: AliESDfriend.h:71
AliESDTZEROfriend * GetTZEROfriend()
Definition: AliESDfriend.h:65
AliESDVZEROfriend * fESDVZEROfriend
Definition: AliESDfriend.h:95
Int_t GetNumberOfTracks() const
Definition: AliESDfriend.h:41
void SetNclustersTPCused(UInt_t sector, Int_t occupancy)
Definition: AliESDfriend.h:84
AliESDCalofriend * fESDCalofriend
Definition: AliESDfriend.h:98
Int_t fNclustersTPCused[72]
Definition: AliESDfriend.h:101
Int_t GetNclustersTPC(UInt_t sector) const
Definition: AliESDfriend.h:81
AliESDVZEROfriend * GetVZEROfriend()
Definition: AliESDfriend.h:56
AliESDADfriend * GetADfriend()
Definition: AliESDfriend.h:67
void SetCalofriend(AliESDCalofriend *obj)
const AliESDVZEROfriend * GetVZEROfriendConst() const
Definition: AliESDfriend.h:57
AliESDCalofriend * GetCalofriend()
Definition: AliESDfriend.h:69
AliESDfriendTrack * AddTrack(const AliESDfriendTrack *t, Bool_t shallow=kFALSE)
Definition: AliESDfriend.h:47
void DeleteTracksSafe()
AliESDADfriend * fESDADfriend
Definition: AliESDfriend.h:97
virtual ~AliESDfriend()
Bool_t TestSkipBit() const
Definition: AliESDfriend.h:78
void SetADfriend(AliESDADfriend *obj)
AliESDfriendTrack * GetTrack(Int_t i) const
Definition: AliESDfriend.h:42
Int_t GetNclustersTPCused(UInt_t sector) const
Definition: AliESDfriend.h:82
AliESDfriend & operator=(const AliESDfriend &esd)
Bool_t GetESDIndicesStored() const
Definition: AliESDfriend.h:86
TClonesArray fTracks
Definition: AliESDfriend.h:94
void SetOwner()
Definition: AliESDfriend.h:32