]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSLoader.h
Adding the possibility to rotate by a given angle the inner layer clusters of the...
[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
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);
aacedc3e 113 protected:
88cb7938 114
e56160b8 115 AliITSLoader(const AliITSLoader &ob); // copy constructor
116 AliITSLoader& operator=(const AliITSLoader & /* source */); // ass.
117
88cb7938 118 // METHODS
eeac5f9f 119 virtual void MakeRawClustersContainer() {GetRawClLoader()->MakeTree();}
aacedc3e 120 Int_t PostRawClusters(){
121 return GetRawClLoader()->GetBaseLoader(0)->Post();}
88cb7938 122
aacedc3e 123 virtual void MakeBackTracksContainer() {
124 GetBackTracksDataLoader()->MakeTree();}
125 Int_t PostBackTracks(){
126 return GetBackTracksDataLoader()->GetBaseLoader(0)->Post();}
eeac5f9f 127 virtual void MakeV0Container() {GetV0DataLoader()->MakeTree();}
aacedc3e 128 Int_t PostV0s(){
129 return GetV0DataLoader()->GetBaseLoader(0)->Post();}
566abf75 130
eeac5f9f 131 virtual void MakeCascadeContainer() {GetCascadeDataLoader()->MakeTree();}
aacedc3e 132 Int_t PostCascades(){
133 return GetCascadeDataLoader()->GetBaseLoader(0)->Post();}
88cb7938 134
135 // DATA
eeac5f9f 136 static const TString fgkDefaultRawClustersContainerName; //default for Raw Clusters container name
137 static const TString fgkDefaultBackTracksContainerName; //default for Back propag. tracks container name
138 static const TString fgkDefaultVerticesContainerName; //default for primary vertices container name
139 static const TString fgkDefaultV0ContainerName; //default for V0 container name
140 static const TString fgkDefaultCascadeContainerName; //default fo cascade container name
8e50d897 141 AliITSgeom *fGeom; //! pointer to the ITS geometry class
e56160b8 142
143
10d100d4 144 ClassDef(AliITSLoader,6) // Loader for additional ITS specific trees.
aacedc3e 145};
88cb7938 146
147#endif