]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDgtuTrack.h
Storing the trigger class mask into the raw data header. Should be ok for TPC,PHOS...
[u/mrichter/AliRoot.git] / TRD / AliTRDgtuTrack.h
1 #ifndef ALITRDGTUTRACK_H
2 #define ALITRDGTUTRACK_H
3
4 ///////////////////////////////////////////////////////////////////////////////
5 //                                                                           //
6 //  TRD module global track (GTU)                                            //
7 //                                                                           //
8 ///////////////////////////////////////////////////////////////////////////////
9
10 #include <TObjArray.h>
11
12 class AliTRDltuTracklet;
13
14 class AliTRDgtuTrack : public TObject {
15
16  public:
17
18   enum { kNmaxTrk = 12, kNplan = 6 };
19
20   AliTRDgtuTrack();
21   AliTRDgtuTrack(const AliTRDgtuTrack& track);
22   virtual ~AliTRDgtuTrack();
23   AliTRDgtuTrack &operator=(const AliTRDgtuTrack &t);
24   virtual void Copy(TObject &t) const;
25
26   Bool_t        IsSortable() const { return kTRUE; }
27   virtual Int_t Compare(const TObject *o) const;
28
29   void Reset();
30   void ResetTracklets() { if(fTracklets) fTracklets->Delete(); };
31   void AddTracklet(AliTRDltuTracklet *trk);
32   AliTRDltuTracklet *GetTracklet(Int_t pos) const;
33   TObjArray *Tracklets() { 
34     if(!fTracklets) fTracklets = new TObjArray(400); return fTracklets; 
35   };
36   Int_t GetNtracklets() const {
37     if (fTracklets) return fTracklets->GetEntriesFast();
38     return 0;
39   };
40
41   Float_t GetYproj()     const { return fYproj; };
42   Float_t GetZproj()     const { return fZproj; };
43   Float_t GetSlope()     const { return fSlope; };
44   Int_t   GetTracklets() const { return fNtracklets; };
45   Int_t   GetPlanes()    const { return fNplanes; };
46   Int_t   GetClusters()  const { return fNclusters; };
47   Float_t GetPt()        const { return fPt; };
48   Float_t GetPhi()       const { return fPhi; };
49   Float_t GetEta()       const { return fEta; };
50   Int_t   GetLabel()     const { return fLabel; };
51   Int_t   GetDetector()  const { return fDetector; };
52   Float_t GetPID()       const { return fPID; };
53   Bool_t  IsElectron()   const { return fIsElectron; };
54
55   void Track(Float_t xpl, Float_t field);
56   void CookLabel();
57   void SetDetector(Int_t det) { fDetector = det; };
58   void MakePID();
59
60  protected:
61
62   TObjArray  *fTracklets;                           //! Array of LTU tracklets
63
64   Float_t fYproj;                                   // Average y-projection
65   Float_t fZproj;                                   // Average z-projection
66   Float_t fSlope;                                   // Average slope
67
68   Int_t   fDetector;                                // First detector in the module
69
70   Int_t   fNtracklets;                              // Number of tracklets
71   Int_t   fNplanes;                                 // Number of TRD planes
72   Int_t   fNclusters;                               // Total number of clusters
73
74   Float_t fPt;                                      // Transverse momentum
75   Float_t fPhi;                                     // Phi angle at the vertex
76   Float_t fEta;                                     // Eta at the vertex
77   Int_t   fLabel;                                   // Track label
78   Float_t fPID;                                     // PID electron likelihood
79   Bool_t  fIsElectron;                              // Electron flag
80
81   ClassDef(AliTRDgtuTrack,2)
82
83 };
84
85 #endif