Added option for different binning of DCAxy axis in THnSparse. Same width for all...
[u/mrichter/AliRoot.git] / ITS / AliITSLoader.h
CommitLineData
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>
d54ad8d4 8#include "AliITSgeom.h"
97d0abba 9class AliITSpidESD;
aacedc3e 10class AliITSdigit;
11class TObjArray;
eeac5f9f 12
aacedc3e 13class 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);
aacedc3e 18
88cb7938 19 virtual ~AliITSLoader();
20
21 void MakeTree(Option_t* opt);
7d62fb64 22 virtual void SetupDigits(TObjArray *digPerDet,Int_t n,
aacedc3e 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)).
7d62fb64 27 // virtual AliITSdigit* GetDigit(AliITS *its,Int_t module,Int_t digit);
aacedc3e 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
88cb7938 32 //Raw Clusters
eeac5f9f 33 AliDataLoader* GetRawClLoader() {return GetDataLoader("Raw Clusters");}
aacedc3e 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);}
88cb7938 46
47 //Vertices
aacedc3e 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());}
566abf75 67 //V0s
eeac5f9f 68 AliDataLoader* GetV0DataLoader() {return GetDataLoader("V0 Vertices");}
69 virtual void CleanV0s() {GetV0DataLoader()->GetBaseLoader(0)->Clean();}
aacedc3e 70 Int_t LoadV0s(Option_t* opt=""){
71 return GetV0DataLoader()->GetBaseLoader(0)->Load(opt);}
72 void SetV0FileName(const TString& fname){
73 GetV0DataLoader()->SetFileName(fname);}
eeac5f9f 74 void UnloadV0s(){GetV0DataLoader()->GetBaseLoader(0)->Unload();}
aacedc3e 75 virtual Int_t WriteV0s(Option_t* opt=""){
76 return GetV0DataLoader()->GetBaseLoader(0)->WriteData(opt);}
eeac5f9f 77 TTree* TreeV0(){ return GetV0DataLoader()->Tree();}
566abf75 78
79 //Cascades
eeac5f9f 80 AliDataLoader* GetCascadeDataLoader() {return GetDataLoader("Cascades");}
aacedc3e 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);}
eeac5f9f 91 TTree* TreeX(){ return GetCascadeDataLoader()->Tree();}
566abf75 92
88cb7938 93 //Back Propagated Tracks
aacedc3e 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
8e50d897 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);
023ae34b 112 void SetITSgeom(AliITSgeom* g);
f1b15b8d 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 //
aacedc3e 120 protected:
88cb7938 121
e56160b8 122 AliITSLoader(const AliITSLoader &ob); // copy constructor
123 AliITSLoader& operator=(const AliITSLoader & /* source */); // ass.
124
88cb7938 125 // METHODS
eeac5f9f 126 virtual void MakeRawClustersContainer() {GetRawClLoader()->MakeTree();}
aacedc3e 127 Int_t PostRawClusters(){
128 return GetRawClLoader()->GetBaseLoader(0)->Post();}
88cb7938 129
aacedc3e 130 virtual void MakeBackTracksContainer() {
131 GetBackTracksDataLoader()->MakeTree();}
132 Int_t PostBackTracks(){
133 return GetBackTracksDataLoader()->GetBaseLoader(0)->Post();}
eeac5f9f 134 virtual void MakeV0Container() {GetV0DataLoader()->MakeTree();}
aacedc3e 135 Int_t PostV0s(){
136 return GetV0DataLoader()->GetBaseLoader(0)->Post();}
566abf75 137
eeac5f9f 138 virtual void MakeCascadeContainer() {GetCascadeDataLoader()->MakeTree();}
aacedc3e 139 Int_t PostCascades(){
140 return GetCascadeDataLoader()->GetBaseLoader(0)->Post();}
88cb7938 141
8e50d897 142 AliITSgeom *fGeom; //! pointer to the ITS geometry class
e56160b8 143
144
10d100d4 145 ClassDef(AliITSLoader,6) // Loader for additional ITS specific trees.
aacedc3e 146};
88cb7938 147
148#endif