New MUON data container AliMUONData implementation
[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
9#include "TNamed.h"
10
11#include "AliLoader.h"
12#include "AliMUONConstants.h"
13
14class TClonesArray;
15class TObjArray;
16class TTree;
17
18class AliMUONRawCluster;
19
20//__________________________________________________________________
21/////////////////////////////////////////////////////////////////////
22// //
23// class AliMUONData //
24// //
25/////////////////////////////////////////////////////////////////////
26
27class AliMUONData : public TNamed {
28 public:
29 AliMUONData();
30 AliMUONData(AliLoader * loader, const char* name, const char* title);
31 AliMUONData(const AliMUONData& rMUONData);
32 virtual ~AliMUONData();
33 virtual void AddDigit(Int_t id, Int_t* tracks, Int_t* charges,
34 Int_t* digits);
35 virtual void AddHit(Int_t fIshunt, Int_t track, Int_t iChamber,
36 Int_t idpart, Float_t X, Float_t Y, Float_t Z,
37 Float_t tof, Float_t momentum, Float_t theta,
38 Float_t phi, Float_t length, Float_t destep);
39 virtual void AddGlobalTrigger(Int_t *singlePlus, Int_t *singleMinus,
40 Int_t *singleUndef, Int_t *pairUnlike,
41 Int_t *pairLike);
42 virtual void AddLocalTrigger(Int_t* ltrigger);
43 virtual void AddRawCluster(Int_t id, const AliMUONRawCluster& clust);
44 TClonesArray* Hits() {return fHits;}
45 TClonesArray* Digits(Int_t DetectionPlane, Int_t /*Cathode*/)
46 {return ( (TClonesArray*) fDigits->At(DetectionPlane) );}
47 TClonesArray* LocalTrigger() {return fLocalTrigger;}
48 TClonesArray* GlobalTrigger() {return fGlobalTrigger;}
49 TClonesArray* RawClusters(Int_t DetectionPlane)
50 {return ( (TClonesArray*) fRawClusters->At(DetectionPlane) );}
ce3f5e87 51
52 virtual AliLoader* GetLoader() {return fLoader;}
53 virtual void SetLoader(AliLoader * loader) {fLoader=loader;}
54
6309cf6e 55 virtual void MakeBranch(Option_t *opt=" ");
ce3f5e87 56 virtual void SetTreeAddress(Option_t *opt=" ");
6309cf6e 57
58 virtual void ResetHits();
59 virtual void ResetDigits();
60 virtual void ResetTrigger();
61 virtual void ResetRawClusters();
62
63 TTree* TreeH() {return fLoader->TreeH(); }
64 TTree* TreeD() {return fLoader->TreeD(); }
65 TTree* TreeR() {return fLoader->TreeR(); }
66 TTree* TreeT() {return fLoader->TreeT(); }
67 TTree* TreeP() {return fLoader->TreeP(); }
68
69 private:
70 //descendant classes should
71 //use protected interface methods to access these folders
72
73
74 protected:
75 AliLoader* fLoader;
76
77 TClonesArray* fHits; // One event in treeH per primary track
78 TObjArray* fDigits; // One event in treeD and one branch per detection plane
79 TObjArray* fRawClusters; //One event in TreeR/Rawcluster and one branch per tracking detection plane
80 TClonesArray* fGlobalTrigger; //! List of Global Trigger One event in TreeR/GlobalTriggerBranch
81 TClonesArray* fLocalTrigger; //! List of Local Trigger, ONe event in TreeR/LocalTriggerBranch
82 Int_t fNhits;
83 Int_t* fNdigits;
84 Int_t* fNrawclusters;
85 Int_t fNglobaltrigger;
86 Int_t fNlocaltrigger;
87
88 ClassDef(AliMUONData,1)
89 };
90#endif