]>
Commit | Line | Data |
---|---|---|
eeac5f9f | 1 | #ifndef ALIITSLOADER_H |
2 | #define ALIITSLOADER_H | |
7d62fb64 | 3 | ////////////////////////////////////////////////////////// |
4 | // Loader class for ITS // | |
5 | ////////////////////////////////////////////////////////// | |
88cb7938 | 6 | #include <AliLoader.h> |
d681bb2d | 7 | #include <AliESDVertex.h> |
7d62fb64 | 8 | #include <AliITSgeom.h> |
e62c1aea | 9 | #include <AliITSpidESD.h> |
aacedc3e | 10 | class AliITSdigit; |
11 | class TObjArray; | |
eeac5f9f | 12 | |
aacedc3e | 13 | class AliITSLoader: public AliLoader{ |
14 | public: | |
eeac5f9f | 15 | AliITSLoader(); |
88cb7938 | 16 | AliITSLoader(const Char_t *name,const Char_t *topfoldername); |
17 | AliITSLoader(const Char_t *name,TFolder *topfolder); | |
e62c1aea | 18 | AliITSLoader(const AliITSLoader &ob); // copy constructor |
19 | AliITSLoader& operator=(const AliITSLoader & /* source */); // ass. | |
20 | ||
aacedc3e | 21 | |
88cb7938 | 22 | virtual ~AliITSLoader(); |
23 | ||
24 | void MakeTree(Option_t* opt); | |
7d62fb64 | 25 | virtual void SetupDigits(TObjArray *digPerDet,Int_t n, |
aacedc3e | 26 | const Char_t **digclass); // Sets up digits |
27 | // Gets the AliITSdigit for a given module and a specific digit in that | |
28 | // module. Array of digits stored in AliITS (must use | |
29 | // SetupDigits(AliITS *its)). | |
7d62fb64 | 30 | // virtual AliITSdigit* GetDigit(AliITS *its,Int_t module,Int_t digit); |
aacedc3e | 31 | // Gets the AliITSdigit for a given module and a specific digit in that |
32 | // module. Array of digits stored in a user defined TObjArray digPerDet | |
33 | virtual AliITSdigit* GetDigit(TObjArray *digPerDet,Int_t module,Int_t digit); | |
34 | ||
88cb7938 | 35 | //Raw Clusters |
eeac5f9f | 36 | AliDataLoader* GetRawClLoader() {return GetDataLoader("Raw Clusters");} |
aacedc3e | 37 | virtual void CleanRawClusters() { |
38 | GetRawClLoader()->GetBaseLoader(0)->Clean();} | |
39 | Int_t LoadRawClusters(Option_t* opt=""){ | |
40 | return GetRawClLoader()->GetBaseLoader(0)->Load(opt);} | |
41 | void SetRawClustersFileName(const TString& fname){ | |
42 | GetRawClLoader()->SetFileName(fname);} | |
43 | // returns a pointer to the tree of RawClusters | |
44 | TTree* TreeC(){ return GetRawClLoader()->Tree();} | |
45 | void UnloadRawClusters(){ | |
46 | GetRawClLoader()->GetBaseLoader(0)->Unload();} | |
47 | virtual Int_t WriteRawClusters(Option_t* opt=""){ | |
48 | return GetRawClLoader()->GetBaseLoader(0)->WriteData(opt);} | |
88cb7938 | 49 | |
50 | //Vertices | |
aacedc3e | 51 | AliDataLoader* GetVertexDataLoader() { |
52 | return GetDataLoader("Primary Vertices");} | |
53 | virtual void CleanVertices() { | |
54 | GetVertexDataLoader()->GetBaseLoader(0)->Clean();} | |
55 | Int_t LoadVertices(Option_t* opt=""){ | |
56 | return GetVertexDataLoader()->GetBaseLoader(0)->Load(opt);} | |
57 | void SetVerticesFileName(const TString& fname){ | |
58 | GetVertexDataLoader()->SetFileName(fname);} | |
59 | void UnloadVertices(){ | |
60 | GetVertexDataLoader()->GetBaseLoader(0)->Unload();} | |
61 | virtual Int_t WriteVertices(Option_t* opt=""){ | |
62 | return GetVertexDataLoader()->GetBaseLoader(0)->WriteData(opt);} | |
63 | virtual Int_t PostVertex(AliESDVertex *ptr){ | |
64 | return GetVertexDataLoader()->GetBaseLoader(0)->Post(ptr);} | |
65 | // virtual void SetVerticesContName(const char *name){ | |
66 | // GetVertexDataLoader()->GetBaseLoader(0)->SetName(name);} | |
67 | AliESDVertex *GetVertex(){ | |
68 | return static_cast <AliESDVertex*>(GetVertexDataLoader()-> | |
69 | GetBaseLoader(0)->Get());} | |
566abf75 | 70 | //V0s |
eeac5f9f | 71 | AliDataLoader* GetV0DataLoader() {return GetDataLoader("V0 Vertices");} |
72 | virtual void CleanV0s() {GetV0DataLoader()->GetBaseLoader(0)->Clean();} | |
aacedc3e | 73 | Int_t LoadV0s(Option_t* opt=""){ |
74 | return GetV0DataLoader()->GetBaseLoader(0)->Load(opt);} | |
75 | void SetV0FileName(const TString& fname){ | |
76 | GetV0DataLoader()->SetFileName(fname);} | |
eeac5f9f | 77 | void UnloadV0s(){GetV0DataLoader()->GetBaseLoader(0)->Unload();} |
aacedc3e | 78 | virtual Int_t WriteV0s(Option_t* opt=""){ |
79 | return GetV0DataLoader()->GetBaseLoader(0)->WriteData(opt);} | |
eeac5f9f | 80 | TTree* TreeV0(){ return GetV0DataLoader()->Tree();} |
566abf75 | 81 | |
82 | //Cascades | |
eeac5f9f | 83 | AliDataLoader* GetCascadeDataLoader() {return GetDataLoader("Cascades");} |
aacedc3e | 84 | virtual void CleanCascades() { |
85 | GetCascadeDataLoader()->GetBaseLoader(0)->Clean();} | |
86 | Int_t LoadCascades(Option_t* opt=""){ | |
87 | return GetCascadeDataLoader()->GetBaseLoader(0)->Load(opt);} | |
88 | void SetCascadeFileName(const TString& fname){ | |
89 | GetCascadeDataLoader()->SetFileName(fname);} | |
90 | void UnloadCascades(){ | |
91 | GetCascadeDataLoader()->GetBaseLoader(0)->Unload();} | |
92 | virtual Int_t WriteCascades(Option_t* opt=""){ | |
93 | return GetCascadeDataLoader()->GetBaseLoader(0)->WriteData(opt);} | |
eeac5f9f | 94 | TTree* TreeX(){ return GetCascadeDataLoader()->Tree();} |
566abf75 | 95 | |
88cb7938 | 96 | //Back Propagated Tracks |
aacedc3e | 97 | AliDataLoader* GetBackTracksDataLoader() { |
98 | return GetDataLoader("Back Propagated Tracks");} | |
99 | virtual void CleanBackTracks() { | |
100 | GetBackTracksDataLoader()->GetBaseLoader(0)->Clean();} | |
101 | Int_t LoadBackTracks(Option_t* opt=""){ | |
102 | return GetBackTracksDataLoader()->GetBaseLoader(0)->Load(opt);} | |
103 | void SetBackTracksFileName(const TString& fname){ | |
104 | GetBackTracksDataLoader()->SetFileName(fname);} | |
105 | // returns a pointer to the tree of BackTracks | |
106 | TTree* TreeB(){ return GetBackTracksDataLoader()->Tree();} | |
107 | void UnloadBackTracks(){ | |
108 | GetBackTracksDataLoader()->GetBaseLoader(0)->Unload();} | |
109 | virtual Int_t WriteBackTracks(Option_t* opt=""){ | |
110 | return GetBackTracksDataLoader()->GetBaseLoader(0)->WriteData(opt);} | |
111 | ||
8e50d897 | 112 | // Geometry. Geom is read from file, unless already loaded |
113 | // readout from file can be forced if force=kTRUE | |
114 | AliITSgeom* GetITSgeom(Bool_t force=kFALSE); | |
115 | void SetITSgeom(AliITSgeom* g){fGeom=g;} | |
e62c1aea | 116 | // PID |
117 | AliITSpidESD* GetITSpid() const {return fITSpid;} | |
118 | void AdoptITSpid(AliITSpidESD* pid) {fITSpid=pid;} | |
aacedc3e | 119 | protected: |
88cb7938 | 120 | |
121 | // METHODS | |
eeac5f9f | 122 | virtual void MakeRawClustersContainer() {GetRawClLoader()->MakeTree();} |
aacedc3e | 123 | Int_t PostRawClusters(){ |
124 | return GetRawClLoader()->GetBaseLoader(0)->Post();} | |
88cb7938 | 125 | |
aacedc3e | 126 | virtual void MakeBackTracksContainer() { |
127 | GetBackTracksDataLoader()->MakeTree();} | |
128 | Int_t PostBackTracks(){ | |
129 | return GetBackTracksDataLoader()->GetBaseLoader(0)->Post();} | |
eeac5f9f | 130 | virtual void MakeV0Container() {GetV0DataLoader()->MakeTree();} |
aacedc3e | 131 | Int_t PostV0s(){ |
132 | return GetV0DataLoader()->GetBaseLoader(0)->Post();} | |
566abf75 | 133 | |
eeac5f9f | 134 | virtual void MakeCascadeContainer() {GetCascadeDataLoader()->MakeTree();} |
aacedc3e | 135 | Int_t PostCascades(){ |
136 | return GetCascadeDataLoader()->GetBaseLoader(0)->Post();} | |
88cb7938 | 137 | |
138 | // DATA | |
eeac5f9f | 139 | static const TString fgkDefaultRawClustersContainerName; //default for Raw Clusters container name |
140 | static const TString fgkDefaultBackTracksContainerName; //default for Back propag. tracks container name | |
141 | static const TString fgkDefaultVerticesContainerName; //default for primary vertices container name | |
142 | static const TString fgkDefaultV0ContainerName; //default for V0 container name | |
143 | static const TString fgkDefaultCascadeContainerName; //default fo cascade container name | |
8e50d897 | 144 | AliITSpidESD* fITSpid; //! pointer for ITS pid |
145 | AliITSgeom *fGeom; //! pointer to the ITS geometry class | |
146 | ClassDef(AliITSLoader,5) // Loader for additional ITS specific trees. | |
aacedc3e | 147 | }; |
88cb7938 | 148 | |
149 | #endif |