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 AliMUONData
14 /// Class containing MUON data: hits, digits, rawclusters, globaltrigger,
15 /// localtrigger, etc ...
17 /// Author: Gines Martinez, Subatech, September 2003
23 #include "AliLoader.h"
31 class AliMUONConstants;
32 class AliMUONRawCluster;
34 class AliMUONTriggerTrack;
37 class AliMUONLocalTrigger;
38 class AliMUONGlobalTrigger;
40 //__________________________________________________________________
41 /////////////////////////////////////////////////////////////////////
43 // class AliMUONData //
45 /////////////////////////////////////////////////////////////////////
47 class AliMUONData : public TNamed
51 // enum EChamberIteration { kAllChambers, kTrackingChambers, kTriggerChambers };
54 AliMUONData(AliLoader * loader, const char* name, const char* title);
55 virtual ~AliMUONData();
56 virtual void AddDigit(Int_t id, Int_t* tracks, Int_t* charges,
58 virtual void AddSDigit(Int_t id, Int_t* tracks, Int_t* charges,
60 virtual void AddDigit(Int_t id, const AliMUONDigit& digit); // use copy constructor
61 virtual void AddSDigit(Int_t id, const AliMUONDigit& digit); // use copy constructor
62 virtual void AddHit(Int_t fIshunt, Int_t track, Int_t iChamber,
63 Int_t idpart, Float_t X, Float_t Y, Float_t Z,
64 Float_t tof, Float_t momentum, Float_t theta,
65 Float_t phi, Float_t length, Float_t destep,
66 Float_t Xref,Float_t Yref,Float_t Zref);
68 virtual void AddHit2(Int_t fIshunt, Int_t track, Int_t detElemId,
69 Int_t idpart, Float_t X, Float_t Y, Float_t Z,
70 Float_t tof, Float_t momentum, Float_t theta,
71 Float_t phi, Float_t length, Float_t destep,
72 Float_t Xref,Float_t Yref,Float_t Zref);
74 virtual void AddGlobalTrigger(const AliMUONGlobalTrigger& trigger); // use copy constructor
76 virtual void AddLocalTrigger(const AliMUONLocalTrigger& trigger); // use copy constructor
78 virtual void AddRawCluster(Int_t id, const AliMUONRawCluster& clust);
79 virtual void AddRecTrack(const AliMUONTrack& track);
80 virtual void AddRecTriggerTrack(const AliMUONTriggerTrack& triggertrack);
82 TClonesArray* Hits() {return fHits;}
83 TClonesArray* Digits(Int_t DetectionPlane) const;
84 TClonesArray* SDigits(Int_t DetectionPlane) const;
85 TClonesArray* LocalTrigger() const;
86 TClonesArray* GlobalTrigger() const;
87 TClonesArray* RawClusters(Int_t DetectionPlane);
88 TClonesArray* RecTracks() {return fRecTracks;}
89 TClonesArray* RecTriggerTracks() {return fRecTriggerTracks;}
91 void GetTrack(Int_t it) const {fLoader->TreeH()->GetEvent(it);}
92 Int_t GetNtracks() const {return (Int_t) fLoader->TreeH()->GetEntries();}
93 void GetDigits() const;
94 void GetSDigits() const {fLoader->TreeS()->GetEvent(0);}
95 void GetRawClusters() const {fLoader->TreeR()->GetEvent(0);}
96 void GetTrigger() const {fLoader->TreeR()->GetEvent(0);}
97 void GetTriggerD() const {fLoader->TreeD()->GetEvent(0);}
98 Int_t GetSplitLevel() const {return fSplitLevel;}
99 void GetRecTracks() const {fLoader->TreeT()->GetEvent(0);}
100 void GetRecTriggerTracks() const {fLoader->TreeT()->GetEvent(0);}
102 Bool_t IsRawClusterBranchesInTree();
103 Bool_t IsDigitsBranchesInTree();
104 Bool_t IsTriggerBranchesInTree();
105 Bool_t IsTriggerBranchesInTreeD();
106 Bool_t IsTrackBranchesInTree();
107 Bool_t IsTriggerTrackBranchesInTree();
109 virtual AliLoader* GetLoader() const { return fLoader; }
110 virtual void SetLoader(AliLoader * loader) {fLoader=loader;}
112 virtual void Fill(Option_t* opt=" ");
113 virtual void MakeBranch(Option_t *opt=" ");
114 virtual void SetTreeAddress(Option_t *opt=" ");
116 void SetSplitLevel(Int_t SplitLevel) {fSplitLevel=SplitLevel;}
118 virtual void Print(Option_t* opt="") const;
120 virtual void ResetHits();
121 virtual void ResetDigits();
122 virtual void ResetSDigits();
123 virtual void ResetTrigger();
124 virtual void ResetRawClusters();
125 virtual void ResetRecTracks();
126 virtual void ResetRecTriggerTracks();
128 TTree* TreeH() {return fLoader->TreeH(); }
129 TTree* TreeD() {return fLoader->TreeD(); }
130 TTree* TreeS() {return fLoader->TreeS(); }
131 TTree* TreeR() {return fLoader->TreeR(); }
132 TTree* TreeT() {return fLoader->TreeT(); }
133 TTree* TreeP() {return fLoader->TreeP(); }
135 // TIterator* CreateDigitIterator(AliMUONData::EChamberIteration type);
138 AliMUONData(const AliMUONData& rhs);
139 AliMUONData& operator=(const AliMUONData& rhs);
141 AliLoader* fLoader; //! Detector Loader pointer
142 TClonesArray* fHits; // One event in treeH per primary track
143 TObjArray* fDigits; // One event in treeD and one branch per detection plane
144 TObjArray* fSDigits; // One event in treeS and one branch per detection plane
145 TObjArray* fRawClusters; //One event in TreeR/Rawcluster and one branch per tracking detection plane
146 TClonesArray* fGlobalTrigger; // List of Global Trigger One event in TreeR/GlobalTriggerBranch
147 TClonesArray* fLocalTrigger; // List of Local Trigger, One event in TreeR/LocalTriggerBranch
148 TClonesArray* fRecTracks; // pointer to array of reconstructed tracks
149 TClonesArray* fRecTriggerTracks; // pointer to array of reconstructed trigger tracks
151 Int_t fNhits; //! Number of Hits
152 Int_t* fNdigits;//! Number of Digits
153 Int_t* fNSdigits;//! Number of Digits
154 Int_t* fNrawclusters;//! Number of Raw Clusters
155 Int_t fNglobaltrigger;//! Number of Global trigger
156 Int_t fNlocaltrigger;//! Number of Local trigger
157 Int_t fNrectracks; //! Number of reconstructed tracks
158 Int_t fNrectriggertracks; //! Number of reconstructed tracks
159 Int_t fSplitLevel; // Splitting of branches 0 no spitting (root files are smaller) 1 splitting (larger output files)
161 mutable Int_t fCurrentEvent; // Current event we're dealing with
\13
165 ClassDef(AliMUONData,3) // Data accessor for MUON module