Most of these updates are related to the offline software needed for the pixel trigge...
[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>
7d62fb64 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
ad7f2bfa 109 virtual AliBaseLoader* GetFOSignalsLoader();
110
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);
023ae34b 115 void SetITSgeom(AliITSgeom* g);
e62c1aea 116 // PID
117 AliITSpidESD* GetITSpid() const {return fITSpid;}
118 void AdoptITSpid(AliITSpidESD* pid) {fITSpid=pid;}
aacedc3e 119 protected:
88cb7938 120
e56160b8 121 AliITSLoader(const AliITSLoader &ob); // copy constructor
122 AliITSLoader& operator=(const AliITSLoader & /* source */); // ass.
123
88cb7938 124 // METHODS
eeac5f9f 125 virtual void MakeRawClustersContainer() {GetRawClLoader()->MakeTree();}
aacedc3e 126 Int_t PostRawClusters(){
127 return GetRawClLoader()->GetBaseLoader(0)->Post();}
88cb7938 128
aacedc3e 129 virtual void MakeBackTracksContainer() {
130 GetBackTracksDataLoader()->MakeTree();}
131 Int_t PostBackTracks(){
132 return GetBackTracksDataLoader()->GetBaseLoader(0)->Post();}
eeac5f9f 133 virtual void MakeV0Container() {GetV0DataLoader()->MakeTree();}
aacedc3e 134 Int_t PostV0s(){
135 return GetV0DataLoader()->GetBaseLoader(0)->Post();}
566abf75 136
eeac5f9f 137 virtual void MakeCascadeContainer() {GetCascadeDataLoader()->MakeTree();}
aacedc3e 138 Int_t PostCascades(){
139 return GetCascadeDataLoader()->GetBaseLoader(0)->Post();}
88cb7938 140
141 // DATA
eeac5f9f 142 static const TString fgkDefaultRawClustersContainerName; //default for Raw Clusters container name
143 static const TString fgkDefaultBackTracksContainerName; //default for Back propag. tracks container name
144 static const TString fgkDefaultVerticesContainerName; //default for primary vertices container name
145 static const TString fgkDefaultV0ContainerName; //default for V0 container name
146 static const TString fgkDefaultCascadeContainerName; //default fo cascade container name
8e50d897 147 AliITSpidESD* fITSpid; //! pointer for ITS pid
148 AliITSgeom *fGeom; //! pointer to the ITS geometry class
e56160b8 149
150
8e50d897 151 ClassDef(AliITSLoader,5) // Loader for additional ITS specific trees.
aacedc3e 152};
88cb7938 153
154#endif