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