Line data Source code
1 : #ifndef ALIESDFRIENDTRACK_H
2 : #define ALIESDFRIENDTRACK_H
3 :
4 : //-------------------------------------------------------------------------
5 : // Class AliESDfriendTrack
6 : // This class contains ESD track additions
7 : // Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch
8 : //-------------------------------------------------------------------------
9 :
10 : #include <TClonesArray.h>
11 : #include <AliExternalTrackParam.h>
12 : #include "AliVfriendTrack.h"
13 : #include "AliTrackPointArray.h"
14 :
15 : class AliKalmanTrack;
16 : class TObjArrray;
17 : class AliTPCseed;
18 : class AliVTPCseed;
19 :
20 : //_____________________________________________________________________________
21 : class AliESDfriendTrack : public AliVfriendTrack {
22 : public:
23 : enum {
24 : kMaxITScluster=12,
25 : kMaxTPCcluster=160,
26 : kMaxTRDcluster=180
27 : };
28 : AliESDfriendTrack();
29 : AliESDfriendTrack(const AliESDfriendTrack &t, Bool_t shallow=kFALSE);
30 : virtual ~AliESDfriendTrack();
31 : virtual void Clear(Option_t* opt="");
32 : // This function will set the ownership
33 : // needed to read old ESDfriends
34 0 : void SetOwner(){if(fCalibContainer)fCalibContainer->SetOwner();}
35 304 : void SetESDtrackID(int i) {SetUniqueID(i);}
36 0 : Int_t GetESDtrackID() const {return GetUniqueID();}
37 0 : void Set1P(Float_t p) {f1P=p;}
38 : void SetTrackPointArray(AliTrackPointArray *points) {
39 152 : fPoints=points;
40 76 : }
41 0 : Float_t Get1P() const {return f1P;}
42 2080 : Int_t *GetITSindices() {return fITSindex;}
43 2096 : Int_t *GetTPCindices() {return fTPCindex;}
44 724 : Int_t *GetTRDindices() {return fTRDindex;}
45 0 : const AliTrackPointArray *GetTrackPointArray() const {return fPoints;}
46 :
47 732 : void SetITStrack(AliKalmanTrack *t) {fITStrack=t;}
48 0 : void SetTRDtrack(AliKalmanTrack *t) {fTRDtrack=t;}
49 0 : AliKalmanTrack *GetTRDtrack() {return fTRDtrack;}
50 732 : AliKalmanTrack *GetITStrack() {return fITStrack;}
51 : void AddCalibObject(TObject * calibObject);
52 : void RemoveCalibObject(TObject * calibObject);
53 : TObject * GetCalibObject(Int_t index) const;
54 :
55 : //
56 : // parameters backup
57 : void SetTPCOut(const AliExternalTrackParam ¶m);
58 : void SetITSOut(const AliExternalTrackParam ¶m);
59 : void SetTRDIn(const AliExternalTrackParam ¶m);
60 : //
61 :
62 2380 : const AliExternalTrackParam * GetTPCOut() const {return fTPCOut;}
63 0 : const AliExternalTrackParam * GetITSOut() const {return fITSOut;}
64 0 : const AliExternalTrackParam * GetTRDIn() const {return fTRDIn;}
65 :
66 : //used in calibration
67 : Int_t GetTrackParamTPCOut( AliExternalTrackParam &p ) const {
68 0 : if(!GetTPCOut()) return -1;
69 0 : p=*GetTPCOut();
70 0 : return 0;}
71 :
72 : Int_t GetTrackParamITSOut( AliExternalTrackParam &p ) const {
73 0 : if(!GetITSOut()) return -1;
74 0 : p=*GetITSOut();
75 0 : return 0;}
76 :
77 : void ResetTrackParamTPCOut( const AliExternalTrackParam *p){
78 0 : if (fTPCOut) delete fTPCOut;
79 0 : fTPCOut=new AliExternalTrackParam(*p);
80 0 : }
81 :
82 : void SetITSIndices(Int_t* indices, Int_t n);
83 : void SetTPCIndices(Int_t* indices, Int_t n);
84 : void SetTRDIndices(Int_t* indices, Int_t n);
85 :
86 0 : Int_t GetMaxITScluster() {return fnMaxITScluster;}
87 0 : Int_t GetMaxTPCcluster() {return fnMaxTPCcluster;}
88 0 : Int_t GetMaxTRDcluster() {return fnMaxTRDcluster;}
89 :
90 : // bit manipulation for filtering
91 0 : void SetSkipBit(Bool_t skip){SetBit(23,skip);}
92 0 : Bool_t TestSkipBit() const {return TestBit(23);}
93 :
94 : // VfriendTrack interface
95 :
96 : Int_t GetTPCseed( AliTPCseed &) const;
97 : const TObject* GetTPCseed() const;
98 : void ResetTPCseed( const AliTPCseed* s );
99 : void TagSuppressSharedObjectsBeforeDeletion();
100 : protected:
101 : Float_t f1P; // 1/P (1/(GeV/c))
102 : Int_t fnMaxITScluster; // Max number of ITS clusters
103 : Int_t fnMaxTPCcluster; // Max number of TPC clusters
104 : Int_t fnMaxTRDcluster; // Max number of TRD clusters
105 : Int_t* fITSindex; //[fnMaxITScluster] indices of the ITS clusters
106 : Int_t* fTPCindex; //[fnMaxTPCcluster] indices of the TPC clusters
107 : Int_t* fTRDindex; //[fnMaxTRDcluster] indices of the TRD clusters
108 :
109 : AliTrackPointArray *fPoints;//Array of track space points in the global frame
110 : TObjArray *fCalibContainer; //Array of objects for calibration
111 : AliKalmanTrack *fITStrack; //! pointer to the ITS track (debug purposes)
112 : AliKalmanTrack *fTRDtrack; //! pointer to the TRD track (debug purposes)
113 : //
114 : //
115 : AliExternalTrackParam * fTPCOut; // tpc outer parameters
116 : AliExternalTrackParam * fITSOut; // its outer parameters
117 : AliExternalTrackParam * fTRDIn; // trd inner parameters
118 :
119 : private:
120 : AliESDfriendTrack &operator=(const AliESDfriendTrack & /* t */) {return *this;}
121 :
122 3730 : ClassDef(AliESDfriendTrack,8) //ESD friend track
123 : };
124 :
125 : #endif
126 :
127 :
|