4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
8 // Revision of includes 07/05/2004
11 // Class containing MUON data: hits, digits, rawclusters, globaltrigger, localtrigger, etc ...
12 // Gines Martinez, Subatech, September 2003
17 #include "AliLoader.h"
24 class AliMUONConstants;
25 class AliMUONRawCluster;
27 class AliMUONTriggerTrack;
30 class AliMUONLocalTrigger;
31 class AliMUONGlobalTrigger;
33 //__________________________________________________________________
34 /////////////////////////////////////////////////////////////////////
36 // class AliMUONData //
38 /////////////////////////////////////////////////////////////////////
40 class AliMUONData : public TNamed
44 AliMUONData(AliLoader * loader, const char* name, const char* title);
45 virtual ~AliMUONData();
46 virtual void AddDigit(Int_t id, Int_t* tracks, Int_t* charges,
48 virtual void AddSDigit(Int_t id, Int_t* tracks, Int_t* charges,
50 virtual void AddDigit(Int_t id, const AliMUONDigit& digit); // use copy constructor
51 virtual void AddSDigit(Int_t id, const AliMUONDigit& digit); // use copy constructor
52 virtual void AddHit(Int_t fIshunt, Int_t track, Int_t iChamber,
53 Int_t idpart, Float_t X, Float_t Y, Float_t Z,
54 Float_t tof, Float_t momentum, Float_t theta,
55 Float_t phi, Float_t length, Float_t destep,
56 Float_t Xref,Float_t Yref,Float_t Zref);
58 virtual void AddHit2(Int_t fIshunt, Int_t track, Int_t detElemId,
59 Int_t idpart, Float_t X, Float_t Y, Float_t Z,
60 Float_t tof, Float_t momentum, Float_t theta,
61 Float_t phi, Float_t length, Float_t destep,
62 Float_t Xref,Float_t Yref,Float_t Zref);
64 virtual void AddGlobalTrigger(Int_t *singlePlus, Int_t *singleMinus,
65 Int_t *singleUndef, Int_t *pairUnlike,
67 virtual void AddGlobalTrigger(const AliMUONGlobalTrigger& trigger); // use copy constructor
69 virtual void AddLocalTrigger(Int_t* ltrigger);
70 virtual void AddLocalTrigger(const AliMUONLocalTrigger& trigger); // use copy constructor
72 virtual void AddRawCluster(Int_t id, const AliMUONRawCluster& clust);
73 virtual void AddRecTrack(const AliMUONTrack& track);
74 virtual void AddRecTriggerTrack(const AliMUONTriggerTrack& triggertrack);
76 TClonesArray* Hits() {return fHits;}
77 TClonesArray* Digits(Int_t DetectionPlane);
78 TClonesArray* SDigits(Int_t DetectionPlane);
79 // TClonesArray* LocalTrigger() {return fLocalTrigger;}
80 // TClonesArray* GlobalTrigger() {return fGlobalTrigger;}
81 TClonesArray* LocalTrigger();
82 TClonesArray* GlobalTrigger();
83 TClonesArray* RawClusters(Int_t DetectionPlane);
84 TClonesArray* RecTracks() {return fRecTracks;}
85 TClonesArray* RecTriggerTracks() {return fRecTriggerTracks;}
87 void GetTrack(Int_t it) const {fLoader->TreeH()->GetEvent(it);}
88 Int_t GetNtracks() const {return (Int_t) fLoader->TreeH()->GetEntries();}
89 void GetCathode(Int_t ic) const {fLoader->TreeD()->GetEvent(ic);}
90 void GetCathodeS(Int_t ic) const {fLoader->TreeS()->GetEvent(ic);}
91 void GetRawClusters() const {fLoader->TreeR()->GetEvent(0);}
92 void GetTrigger() const {fLoader->TreeR()->GetEvent(0);}
93 void GetTriggerD() const {fLoader->TreeD()->GetEvent(0);}
94 Int_t GetSplitLevel() const {return fSplitLevel;}
95 void GetRecTracks() const {fLoader->TreeT()->GetEvent(0);}
96 void GetRecTriggerTracks() const {fLoader->TreeT()->GetEvent(0);}
98 Bool_t IsRawClusterBranchesInTree();
99 Bool_t IsDigitsBranchesInTree();
100 Bool_t IsTriggerBranchesInTree();
101 Bool_t IsTriggerBranchesInTreeD();
102 Bool_t IsTrackBranchesInTree();
103 Bool_t IsTriggerTrackBranchesInTree();
105 virtual AliLoader* GetLoader() {return fLoader;}
106 virtual void SetLoader(AliLoader * loader) {fLoader=loader;}
108 virtual void Fill(Option_t* opt=" ");
109 virtual void MakeBranch(Option_t *opt=" ");
110 virtual void SetTreeAddress(Option_t *opt=" ");
112 void SetSplitLevel(Int_t SplitLevel) {fSplitLevel=SplitLevel;}
115 virtual void ResetHits();
116 virtual void ResetDigits();
117 virtual void ResetSDigits();
118 virtual void ResetTrigger();
119 virtual void ResetRawClusters();
120 virtual void ResetRecTracks();
121 virtual void ResetRecTriggerTracks();
123 TTree* TreeH() {return fLoader->TreeH(); }
124 TTree* TreeD() {return fLoader->TreeD(); }
125 TTree* TreeS() {return fLoader->TreeS(); }
126 TTree* TreeR() {return fLoader->TreeR(); }
127 TTree* TreeT() {return fLoader->TreeT(); }
128 TTree* TreeP() {return fLoader->TreeP(); }
131 AliMUONData(const AliMUONData& rhs);
132 AliMUONData& operator=(const AliMUONData& rhs);
134 AliLoader* fLoader; //! Detector Loader pointer
135 TClonesArray* fHits; // One event in treeH per primary track
136 TObjArray* fDigits; // One event in treeD and one branch per detection plane
137 TObjArray* fSDigits; // One event in treeS and one branch per detection plane
138 TObjArray* fRawClusters; //One event in TreeR/Rawcluster and one branch per tracking detection plane
139 TClonesArray* fGlobalTrigger; // List of Global Trigger One event in TreeR/GlobalTriggerBranch
140 TClonesArray* fLocalTrigger; // List of Local Trigger, One event in TreeR/LocalTriggerBranch
141 TClonesArray* fRecTracks; // pointer to array of reconstructed tracks
142 TClonesArray* fRecTriggerTracks; // pointer to array of reconstructed trigger tracks
144 Int_t fNhits; //! Number of Hits
145 Int_t* fNdigits;//! Number of Digits
146 Int_t* fNSdigits;//! Number of Digits
147 Int_t* fNrawclusters;//! Number of Raw Clusters
148 Int_t fNglobaltrigger;//! Number of Global trigger
149 Int_t fNlocaltrigger;//! Number of Local trigger
150 Int_t fNrectracks; //! Number of reconstructed tracks
151 Int_t fNrectriggertracks; //! Number of reconstructed tracks
152 Int_t fSplitLevel; // Splitting of branches 0 no spitting (root files are smaller) 1 splitting (larger output files)
155 //descendant classes should
156 //use protected interface methods to access these folders
159 ClassDef(AliMUONData,2)