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