warning GetNtracks()
[u/mrichter/AliRoot.git] / MUON / AliMUONData.h
CommitLineData
6309cf6e 1#ifndef ALIMUONDATA_H
2#define ALIMUONDATA_H
3//
4// AliMUONData
5// Class containing MUON data: hits, digits, rawclusters, globaltrigger, localtrigger, etc ...
6// Gines Martinez, Subatech, September 2003
7//
8
1a1cdff8 9#include "AliLoader.h"
6309cf6e 10
11class TClonesArray;
1a1cdff8 12class TNamed;
6309cf6e 13class TObjArray;
14class TTree;
15
1a1cdff8 16
17class AliMUONConstants;
6309cf6e 18class AliMUONRawCluster;
dcd2690d 19class AliMUONTrack;
6309cf6e 20
21//__________________________________________________________________
22/////////////////////////////////////////////////////////////////////
23// //
24// class AliMUONData //
25// //
26/////////////////////////////////////////////////////////////////////
27
28class AliMUONData : public TNamed {
29 public:
30 AliMUONData();
31 AliMUONData(AliLoader * loader, const char* name, const char* title);
32 AliMUONData(const AliMUONData& rMUONData);
33 virtual ~AliMUONData();
34 virtual void AddDigit(Int_t id, Int_t* tracks, Int_t* charges,
35 Int_t* digits);
36 virtual void AddHit(Int_t fIshunt, Int_t track, Int_t iChamber,
37 Int_t idpart, Float_t X, Float_t Y, Float_t Z,
38 Float_t tof, Float_t momentum, Float_t theta,
39 Float_t phi, Float_t length, Float_t destep);
40 virtual void AddGlobalTrigger(Int_t *singlePlus, Int_t *singleMinus,
41 Int_t *singleUndef, Int_t *pairUnlike,
42 Int_t *pairLike);
43 virtual void AddLocalTrigger(Int_t* ltrigger);
44 virtual void AddRawCluster(Int_t id, const AliMUONRawCluster& clust);
dcd2690d 45 virtual void AddRecTrack(const AliMUONTrack& track);
46
6309cf6e 47 TClonesArray* Hits() {return fHits;}
1a1cdff8 48 TClonesArray* Digits(Int_t DetectionPlane)
6309cf6e 49 {return ( (TClonesArray*) fDigits->At(DetectionPlane) );}
50 TClonesArray* LocalTrigger() {return fLocalTrigger;}
51 TClonesArray* GlobalTrigger() {return fGlobalTrigger;}
52 TClonesArray* RawClusters(Int_t DetectionPlane)
53 {return ( (TClonesArray*) fRawClusters->At(DetectionPlane) );}
dcd2690d 54 TClonesArray* RecTracks() {return fRecTracks;}
1a1cdff8 55
56 void GetTrack(Int_t it) {fLoader->TreeH()->GetEvent(it);}
05d12263 57 int GetNtracks() {return fLoader->TreeH()->GetEntries();}
1a1cdff8 58 void GetCathode(Int_t ic) {fLoader->TreeD()->GetEvent(ic);}
59 void GetRawClusters() {fLoader->TreeR()->GetEvent(0);}
60 void GetTrigger() {fLoader->TreeR()->GetEvent(0);}
61
ce3f5e87 62 virtual AliLoader* GetLoader() {return fLoader;}
63 virtual void SetLoader(AliLoader * loader) {fLoader=loader;}
dcd2690d 64
1a1cdff8 65 virtual void Fill(Option_t* opt=" ");
6309cf6e 66 virtual void MakeBranch(Option_t *opt=" ");
ce3f5e87 67 virtual void SetTreeAddress(Option_t *opt=" ");
dcd2690d 68
6309cf6e 69 virtual void ResetHits();
70 virtual void ResetDigits();
71 virtual void ResetTrigger();
72 virtual void ResetRawClusters();
dcd2690d 73 virtual void ResetRecTracks();
6309cf6e 74
75 TTree* TreeH() {return fLoader->TreeH(); }
76 TTree* TreeD() {return fLoader->TreeD(); }
77 TTree* TreeR() {return fLoader->TreeR(); }
78 TTree* TreeT() {return fLoader->TreeT(); }
79 TTree* TreeP() {return fLoader->TreeP(); }
80
81 private:
82 //descendant classes should
83 //use protected interface methods to access these folders
84
85
86 protected:
87 AliLoader* fLoader;
88
dcd2690d 89 // One event in treeH per primary track
90 TClonesArray* fHits;
91 // One event in treeD and one branch per detection plane
92 TObjArray* fDigits;
93 //One event in TreeR/Rawcluster and one branch per tracking detection plane
94 TObjArray* fRawClusters;
95 //! List of Global Trigger One event in TreeR/GlobalTriggerBranch
96 TClonesArray* fGlobalTrigger;
97 //! List of Local Trigger, One event in TreeR/LocalTriggerBranch
98 TClonesArray* fLocalTrigger;
99 // pointer to array of reconstructed tracks
100 TClonesArray* fRecTracks;
101
6309cf6e 102 Int_t fNhits;
103 Int_t* fNdigits;
104 Int_t* fNrawclusters;
105 Int_t fNglobaltrigger;
106 Int_t fNlocaltrigger;
dcd2690d 107 Int_t fNrectracks;
6309cf6e 108
109 ClassDef(AliMUONData,1)
110 };
111#endif