Incrementing class version
[u/mrichter/AliRoot.git] / MUON / AliMUONData.h
CommitLineData
6309cf6e 1#ifndef ALIMUONDATA_H
2#define ALIMUONDATA_H
3//
1391e633 4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
50837721 5 * See cxx source for full Copyright notice */
6
7/* $Id$ */
8
6309cf6e 9// AliMUONData
10// Class containing MUON data: hits, digits, rawclusters, globaltrigger, localtrigger, etc ...
11// Gines Martinez, Subatech, September 2003
12//
13
1a1cdff8 14#include "AliLoader.h"
6309cf6e 15
16class TClonesArray;
1a1cdff8 17class TNamed;
6309cf6e 18class TObjArray;
19class TTree;
20
1a1cdff8 21
22class AliMUONConstants;
6309cf6e 23class AliMUONRawCluster;
dcd2690d 24class AliMUONTrack;
276c44b7 25class AliMUONTriggerTrack;
61adb9bd 26class AliMUONDigit;
27class AliMUONHit;
28class AliMUONLocalTrigger;
29class AliMUONGlobalTrigger;
6309cf6e 30
31//__________________________________________________________________
32/////////////////////////////////////////////////////////////////////
33// //
34// class AliMUONData //
35// //
36/////////////////////////////////////////////////////////////////////
37
38class AliMUONData : public TNamed {
39 public:
40 AliMUONData();
41 AliMUONData(AliLoader * loader, const char* name, const char* title);
42 AliMUONData(const AliMUONData& rMUONData);
43 virtual ~AliMUONData();
44 virtual void AddDigit(Int_t id, Int_t* tracks, Int_t* charges,
45 Int_t* digits);
d1775029 46 virtual void AddSDigit(Int_t id, Int_t* tracks, Int_t* charges,
47 Int_t* digits);
61adb9bd 48 virtual void AddDigit(Int_t, const AliMUONDigit& ); // use copy constructor
d1775029 49 virtual void AddSDigit(Int_t, const AliMUONDigit& ); // use copy constructor
6309cf6e 50 virtual void AddHit(Int_t fIshunt, Int_t track, Int_t iChamber,
51 Int_t idpart, Float_t X, Float_t Y, Float_t Z,
52 Float_t tof, Float_t momentum, Float_t theta,
53 Float_t phi, Float_t length, Float_t destep);
1391e633 54 virtual void AddHit(Int_t fIshunt, Int_t track, Int_t iChamber,
55 Int_t idpart, Float_t X, Float_t Y, Float_t Z,
56 Float_t tof, Float_t momentum, Float_t theta,
57 Float_t phi, Float_t length, Float_t destep,
58 Float_t Xref,Float_t Yref,Float_t Zref);
61adb9bd 59 virtual void AddHit(const AliMUONHit& ); // use copy constructor
60
6309cf6e 61 virtual void AddGlobalTrigger(Int_t *singlePlus, Int_t *singleMinus,
62 Int_t *singleUndef, Int_t *pairUnlike,
63 Int_t *pairLike);
61adb9bd 64 virtual void AddGlobalTrigger(const AliMUONGlobalTrigger& trigger); // use copy constructor
65
6309cf6e 66 virtual void AddLocalTrigger(Int_t* ltrigger);
61adb9bd 67 virtual void AddLocalTrigger(const AliMUONLocalTrigger& trigger); // use copy constructor
68
6309cf6e 69 virtual void AddRawCluster(Int_t id, const AliMUONRawCluster& clust);
dcd2690d 70 virtual void AddRecTrack(const AliMUONTrack& track);
276c44b7 71 virtual void AddRecTriggerTrack(const AliMUONTriggerTrack& triggertrack);
dcd2690d 72
6309cf6e 73 TClonesArray* Hits() {return fHits;}
1eccde20 74 TClonesArray* Digits(Int_t DetectionPlane);
d1775029 75 TClonesArray* SDigits(Int_t DetectionPlane);
276c44b7 76// TClonesArray* LocalTrigger() {return fLocalTrigger;}
77// TClonesArray* GlobalTrigger() {return fGlobalTrigger;}
78 TClonesArray* LocalTrigger();
79 TClonesArray* GlobalTrigger();
1eccde20 80 TClonesArray* RawClusters(Int_t DetectionPlane);
dcd2690d 81 TClonesArray* RecTracks() {return fRecTracks;}
276c44b7 82 TClonesArray* RecTriggerTracks() {return fRecTriggerTracks;}
1a1cdff8 83
84 void GetTrack(Int_t it) {fLoader->TreeH()->GetEvent(it);}
3a87c34c 85 Int_t GetNtracks() {return (Int_t) fLoader->TreeH()->GetEntries();}
1a1cdff8 86 void GetCathode(Int_t ic) {fLoader->TreeD()->GetEvent(ic);}
d1775029 87 void GetCathodeS(Int_t ic) {fLoader->TreeS()->GetEvent(ic);}
1a1cdff8 88 void GetRawClusters() {fLoader->TreeR()->GetEvent(0);}
89 void GetTrigger() {fLoader->TreeR()->GetEvent(0);}
d652f85c 90 Int_t GetSplitLevel() {return fSplitLevel;}
8547965d 91 void GetRecTracks() {fLoader->TreeT()->GetEvent(0);}
276c44b7 92 void GetRecTriggerTracks() {fLoader->TreeT()->GetEvent(0);}
1a1cdff8 93
c1d45bdf 94 Bool_t IsRawClusterBranchesInTree();
95 Bool_t IsTriggerBranchesInTree();
276c44b7 96 Bool_t IsTrackBranchesInTree();
97 Bool_t IsTriggerTrackBranchesInTree();
c1d45bdf 98
ce3f5e87 99 virtual AliLoader* GetLoader() {return fLoader;}
100 virtual void SetLoader(AliLoader * loader) {fLoader=loader;}
dcd2690d 101
1a1cdff8 102 virtual void Fill(Option_t* opt=" ");
6309cf6e 103 virtual void MakeBranch(Option_t *opt=" ");
ce3f5e87 104 virtual void SetTreeAddress(Option_t *opt=" ");
dcd2690d 105
d652f85c 106 void SetSplitLevel(Int_t SplitLevel) {fSplitLevel=SplitLevel;}
107
108
6309cf6e 109 virtual void ResetHits();
110 virtual void ResetDigits();
d1775029 111 virtual void ResetSDigits();
6309cf6e 112 virtual void ResetTrigger();
113 virtual void ResetRawClusters();
dcd2690d 114 virtual void ResetRecTracks();
276c44b7 115 virtual void ResetRecTriggerTracks();
6309cf6e 116
117 TTree* TreeH() {return fLoader->TreeH(); }
118 TTree* TreeD() {return fLoader->TreeD(); }
d1775029 119 TTree* TreeS() {return fLoader->TreeS(); }
6309cf6e 120 TTree* TreeR() {return fLoader->TreeR(); }
121 TTree* TreeT() {return fLoader->TreeT(); }
122 TTree* TreeP() {return fLoader->TreeP(); }
123
124 private:
125 //descendant classes should
126 //use protected interface methods to access these folders
127
128
129 protected:
9140dcef 130 AliLoader* fLoader; //! Detector Loader pointer
131 TClonesArray* fHits; // One event in treeH per primary track
132 TObjArray* fDigits; // One event in treeD and one branch per detection plane
d1775029 133 TObjArray* fSDigits; // One event in treeS and one branch per detection plane
9140dcef 134 TObjArray* fRawClusters; //One event in TreeR/Rawcluster and one branch per tracking detection plane
135 TClonesArray* fGlobalTrigger; // List of Global Trigger One event in TreeR/GlobalTriggerBranch
136 TClonesArray* fLocalTrigger; // List of Local Trigger, One event in TreeR/LocalTriggerBranch
137 TClonesArray* fRecTracks; // pointer to array of reconstructed tracks
276c44b7 138 TClonesArray* fRecTriggerTracks; // pointer to array of reconstructed trigger tracks
9140dcef 139
140 Int_t fNhits; //! Number of Hits
141 Int_t* fNdigits;//! Number of Digits
d1775029 142 Int_t* fNSdigits;//! Number of Digits
9140dcef 143 Int_t* fNrawclusters;//! Number of Raw Clusters
144 Int_t fNglobaltrigger;//! Number of Global trigger
145 Int_t fNlocaltrigger;//! Number of Local trigger
146 Int_t fNrectracks; //! Number of reconstructed tracks
276c44b7 147 Int_t fNrectriggertracks; //! Number of reconstructed tracks
d652f85c 148 Int_t fSplitLevel; // Splitting of branches 0 no spitting (root files are smaller) 1 splitting (larger output files)
6309cf6e 149
9d6df3aa 150 ClassDef(AliMUONData,2)
6309cf6e 151 };
152#endif
8547965d 153