running local for SP and LYZEP and new histograms for QC
[u/mrichter/AliRoot.git] / TRD / AliTRDtrigger.h
CommitLineData
0ee00e25 1#ifndef ALITRDTRIGGER_H
2#define ALITRDTRIGGER_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6d50f529 6/* $Id$ */
7
0ee00e25 8///////////////////////////////////////////////////////////////////////////////
9// //
10// TRD trigger class //
11// //
12///////////////////////////////////////////////////////////////////////////////
13
e3b2b5e5 14#include <TNamed.h>
0ee00e25 15
e3b2b5e5 16class TTree;
6d50f529 17class TClonesArray;
18class TObjArray;
0ee00e25 19
20class AliRunLoader;
21class AliRawReader;
22
23class AliTRDmcmTracklet;
6d50f529 24class AliTRDgtuTrack;
0ee00e25 25class AliTRDmcm;
26class AliTRDmodule;
6d50f529 27class AliTRDdigitsManager;
b65e5048 28class AliTRDarrayDictionary;
29class AliTRDarrayADC;
6d50f529 30class AliTRDgeometry;
0ee00e25 31
32class AliTRDtrigger : public TNamed {
33
34 public:
35
e3b2b5e5 36 enum { kNMCM = 16, kMaxTrackletsPerMCM = 4, kMcmCol = 21 };
0ee00e25 37
38 AliTRDtrigger();
39 AliTRDtrigger(const Text_t* name, const Text_t* title);
40 AliTRDtrigger(const AliTRDtrigger &p);
6d50f529 41 virtual ~AliTRDtrigger();
42 AliTRDtrigger &operator=(const AliTRDtrigger &p);
43
44 virtual void Copy(TObject &p) const;
45
46 void Init();
47
48 Bool_t Open(const Char_t *name, Int_t nEvent = 0);
49 Bool_t ReadDigits();
25ca55ce 50 Bool_t ReadDigits(AliRawReader *rawReader);
51 Bool_t ReadDigits(TTree *digitsTree);
6d50f529 52 Bool_t MakeTracklets(Bool_t makeTracks = kFALSE);
53 void MakeTracks(Int_t det);
54 Bool_t WriteTracklets(Int_t det);
55 Bool_t ReadTracklets(AliRunLoader *rl);
56
57 void AddTracklet(Int_t det, Int_t row, Int_t seed, Int_t n);
58 void AddTrack(const AliTRDgtuTrack *t, Int_t det);
59 Bool_t TestTracklet(Int_t det, Int_t row, Int_t seed, Int_t n);
60 TObjArray *Tracklets();
61 void ResetTracklets();
62
63 Int_t GetNumberOfTracks() const;
64 Int_t GetNPrimary() const { return fNPrimary; };
6d50f529 65 AliTRDgtuTrack *GetTrack(Int_t i) const;
66
67 void SetRunLoader(AliRunLoader *rl) { fRunLoader = rl; };
68 void SetMCMcoordinates(Int_t imcm);
0ee00e25 69
70 protected:
71
6d50f529 72 Float_t fField; //! Magnetic field
73 AliTRDgeometry *fGeo; //! TRD geometry
3fcb9908 74
6d50f529 75 AliRunLoader *fRunLoader; //! Run Loader
76 AliTRDdigitsManager *fDigitsManager; //! TRD digits manager
77 TTree *fTrackletTree; //! Tree with tracklets
78 TObjArray *fTracklets; //! Array of tracklets
0ee00e25 79
6d50f529 80 Int_t fNROB; //! Number of ROBs in the current chamber
81 AliTRDmcm *fMCM; //! Current MCM
82 AliTRDmcmTracklet *fTrk; //! Current tracklet
83 AliTRDmcmTracklet *fTrkTest; //! Test tracklet
84 AliTRDmodule *fModule; //! Current module
85 AliTRDgtuTrack *fGTUtrk; //! Current GTU track
0ee00e25 86
6d50f529 87 Int_t fNtracklets; //! Tracklets counter
0ee00e25 88
b65e5048 89 AliTRDarrayADC *fDigits; //! Array with digits
90 AliTRDarrayDictionary *fTrack0; //! Track dictionary 0
91 AliTRDarrayDictionary *fTrack1; //! Track dictionary 1
92 AliTRDarrayDictionary *fTrack2; //! Track dictionary 2
0ee00e25 93
6d50f529 94 Int_t fNPrimary; //! Number of primary tracks
0ee00e25 95
6d50f529 96 TClonesArray *fTracks; //! Array of GTU tracks
0ee00e25 97
625f5260 98 ClassDef(AliTRDtrigger,6) // TRD trigger class
0ee00e25 99
100};
101
102#endif