]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITS.h
Correction of the inheritance scheme
[u/mrichter/AliRoot.git] / ITS / AliITS.h
CommitLineData
3bd79107 1#ifndef ALIITS_H
2#define ALIITS_H
3da30618 3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7
58005f18 8////////////////////////////////////////////////////////////////////////
3bd79107 9// Manager class for set: ITS //
58005f18 10////////////////////////////////////////////////////////////////////////
fe4da5cc 11
3bd79107 12#include <TObjArray.h>
13#include <TBranch.h>
14#include <TTree.h>
15#include <TFile.h>
16#include <TObjectTable.h>
17
fe4da5cc 18#include "AliDetector.h"
58005f18 19#include "AliITSgeom.h"
3bd79107 20#include "AliITSsegmentation.h"
21#include "AliITSresponse.h"
22#include "AliITSDetType.h"
23#include "AliITShit.h"
58005f18 24#include "AliITSdigit.h"
25#include "AliITSmodule.h"
3bd79107 26#include "AliITSRecPoint.h"
27#include "AliITSRawCluster.h"
fe4da5cc 28
c9a71be1 29
3bd79107 30class AliITSsimulation;
31class AliITSClusterFinder;
32//class AliITStrack;
33
34class AliITS : public AliDetector {
58005f18 35
36 public:
3bd79107 37 AliITS();
38 AliITS(const char *name, const char *title);
39 virtual ~AliITS();
40 AliITS(AliITS &source);
41 AliITS & operator=(AliITS &source);
42
43 virtual void AddHit(Int_t track, Int_t *vol, Float_t *hits);
44 virtual void AddRealDigit(Int_t branch, Int_t *digits);
45 virtual void AddDigit(Int_t branch, AliITSdigit *d);
46 virtual void AddDigit(Int_t branch,Float_t phys,Int_t* digits, Int_t* tracks, Float_t* trkcharges);
58005f18 47 //
3bd79107 48 virtual void AddCluster(Int_t branch, AliITSRawCluster *c);
49 virtual void AddRecPoint(const AliITSRecPoint &p);
50 virtual void AddTrack(Float_t* tracks) {}
51// virtual void AddTrack(const AliITStrack&) {}
52
53 virtual void ResetDigits(); // depending on how the
54 virtual void ResetDigits(Int_t branch); // tree will be filled only
55 virtual void ResetClusters(); // one of the methods in
56 virtual void ResetClusters(Int_t branch); // the pair will be kept
57 virtual void ResetRecPoints();
58
59 virtual void BuildGeometry() {}
60 virtual void CreateGeometry() {}
61 virtual void CreateMaterials() {}
62
63 void GetGeometryVersion(Int_t &a,Int_t &b) const
64 {a = fMajorVersion;b=fMinorVersion;return;}
65 virtual Int_t IsVersion() const {return 1;}
66 Int_t DistancetoPrimitive(Int_t px, Int_t py);
67 virtual void Init();
68 virtual void SetDefaults();
69 // create separate tree for clusters - declustering refining
70 virtual void MakeTreeC(Option_t *option="C");
71 void GetTreeC(Int_t event);
72 virtual void MakeBranch(Option_t *opt=" ");
73 void SetTreeAddress();
74 virtual void SetEUCLID(Bool_t euclid=1) {fEuclidOut = euclid;}
75 virtual void StepManager() {}
76 // sort hits by module
77 virtual void InitModules(Int_t size,Int_t &nmodules);
78 virtual void FillModules(Int_t evnt,Int_t bgrev,Int_t lastev,
79 Int_t nmodules,Option_t *opt,Text_t *filename);
80 virtual void ClearModules();
81 // Digitisation
82 void HitsToDigits(Int_t evNumber,Int_t bgrev,Int_t lastev,Int_t size,
83 Option_t *add, Option_t *det, Text_t *filename);
84 // Reconstruct hits
85 void DigitsToRecPoints(Int_t evNumber,Int_t lastEntry,Option_t *det);
86 // Fast simulation of space points from hits
87 void HitsToFastRecPoints(Int_t evNumber,Int_t bgrev,Int_t lastev,Int_t size,
88 Option_t *add, Option_t *det, Text_t *filename);
89
90
91
92 // Write digits into raw data format
93 virtual void Digits2RawData() {}
94
95 // Configuration Methods (per detector type )
96 // Set number of detector types
97 virtual void SetNDetTypes(Int_t ndtypes=3) {fNDetTypes=ndtypes;}
98 // Set response
99 virtual void SetResponseModel(Int_t id, AliITSresponse *response);
100 // Set segmentation
101 virtual void SetSegmentationModel(Int_t id, AliITSsegmentation *seg);
102 // Set simulation - temporary
103 virtual void SetSimulationModel(Int_t id, AliITSsimulation *sim);
104 // Set reconstruction
105 virtual void SetReconstructionModel(Int_t id, AliITSClusterFinder *rec);
106 // Set class names for digit and rec point
be33dccb 107 virtual void SetClasses(Int_t id, char* digit, char* cluster);
3bd79107 108
109
110 // Getters
58005f18 111 // ITS geometry functions
3bd79107 112 virtual AliITSgeom *GetITSgeom() const {return fITSgeom;}
113 virtual TObjArray *GetModules() const {return fITSmodules;}
114 AliITSmodule *GetModule(Int_t index) {return (AliITSmodule *)
115 (fITSmodules->At(index));}
58005f18 116
3bd79107 117 // Return pointers to digits
118 TObjArray *Dtype() {return fDtype;}
119 Int_t *Ndtype() {return fNdtype;}
120 virtual TClonesArray *DigitsAddress(Int_t id)
121 {return ((TClonesArray *) (*fDtype)[id]);}
122 // Return pointers to clusters
123 TObjArray *Ctype() {return fCtype;}
124 Int_t *Nctype() {return fNctype;}
125 virtual TClonesArray *ClustersAddress(Int_t id)
126 {return ((TClonesArray *) (*fCtype)[id]);}
127
128 // Return pointer to rec points
129 TClonesArray *RecPoints() {return fRecPoints;}
130 // Return pointer to tracks
131 TClonesArray *Tracks() {return fTracks;}
132
133 // Return pointer to DetType #id
134 AliITSDetType *DetType(Int_t id);
135 Int_t NDetTypes() {return fNDetTypes;}
136
137 // Return pointer to the tree of clusters
138 TTree *TreeC() {return fTreeC;}
139
140 protected:
141
142 AliITSgeom *fITSgeom; // Pointer to ITS geometry
143 TObjArray *fITSmodules; // Pointer to ITS modules
144
145 Bool_t fEuclidOut; // Flag to write out geometry
146 //in euclid format
147 Int_t fIdN; // the number of layers
2b2439bd 148 Int_t *fIdSens; //[fIdN] layer identifier
149 char **fIdName; //layer identifier
3bd79107 150 // Geometry and Stepmanager version numbers used.
151 Int_t fMajorVersion,fMinorVersion; //detailed and coarse(minor) versions
152 //
153 //
154 TObjArray *fDetTypes; // List of detector types
155 Int_t fNDetTypes; // Number of Detector types
156
157 TObjArray *fDtype; // List of digits
2b2439bd 158 Int_t *fNdtype; //[fNDetTypes] Number of digits per type of
3bd79107 159 // detector
160 TObjArray *fCtype; // List of clusters
2b2439bd 161 Int_t *fNctype; //[fNDetTypes] Number of clusters per type
3bd79107 162 // of detector
163
164
165 TClonesArray *fRecPoints; // List of reconstructed points
166 Int_t fNRecPoints; // Number of rec points
167 TClonesArray *fTracks; // List of reconstructed tracks
168 TTree *fTreeC; // Tree for raw clusters
169
170
171 ClassDef(AliITS,1) // Base class for ITS
fe4da5cc 172};
3bd79107 173
fe4da5cc 174#endif