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