]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITS.h
Minor corrections for uninitialised variables.
[u/mrichter/AliRoot.git] / ITS / AliITS.h
CommitLineData
fe4da5cc 1#ifndef ITS_H
2#define ITS_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////////////////////////////////////////////////////////////////////////
9// Manager and hits classes for set: ITS //
10////////////////////////////////////////////////////////////////////////
fe4da5cc 11
58005f18 12#include "TObjArray.h"
fe4da5cc 13#include "AliDetector.h"
58005f18 14#include "AliITSgeom.h"
15#include "AliITSdigit.h"
16#include "AliITSmodule.h"
fe4da5cc 17
18class AliITS : public AliDetector {
58005f18 19////////////////////////////////////////////////////////////////////////
20//
21// An overview of the basic philosophy of the ITS code development
22// and analysis is show in the figure below.
23//Begin_Html
24/*
a92b2b7d 25<img src="picts/ITS/ITS_Analysis_schema.gif">
58005f18 26</pre>
27<br clear=left>
28<font size=+2 color=red>
29<p>Roberto Barbera is in charge of the ITS Offline code (1999).
30<a href="mailto:roberto.barbera@ct.infn.it">Roberto Barbera</a>.
31</font>
32<pre>
33*/
34//End_Html
35//
36// Version: 0
37// Written by Rene Brun, Federico Carminati, and Roberto Barbera
38//
39// Version: 1
40// Modified and documented by Bjorn S. Nilsen
41// July 11 1999
42//
43// AliITS is the general base class for the ITS. Also see AliDetector for
44// futher information.
45//
46// Data members:
47//
48// AliITSgeom *fITSgeom
49// All of the geometry information about the active volumes that
50// make up the ITS are described in the AliITSgeom class. This includes
51// the transformation functions between the local and global coordinate
52// systems and the like. See the full description found in the AliITSgeom
53// class. Here in the AliITS class is kept the pointer to the geometry
54// used in the simulations or that thought to be the correct one for the
55// data. Until a more general class is define and a more appropriate
56// place is found to keep this geometry information, it is kept here in
57// AliITS.
58//
59// TObjArray *fITSpoints
60// This is a pointer to the points, to be used by the tracking algorithms
61// for example, found in the detectors of the ITS. To allow for the most
62// general points structure it is defined to be a pointer to a TObjArray where
63// each array element would be one point found in the ITS detectors. An
64// Addpoints function is defined below. By default an array of 16 TObjects are
65// defined during the initialization of AliITS. This is automatically expanded
66// when necessary by the Addpoints function.
67//
68// Bool_t fEuclidOut
69// This is a flag used to indicate that an Euclid compatible CAD
70// file will be created upon the creation of the ITS Monte Carlo
71// geometry definition, in the function CreatGeometry. If fEuclidOut is
72// true, then a file called ITSgeometry.euc will be created.
73//
74// Int_t fIdN
75// This variable contains the number of layers defined in the ITS
76// geometry. It is primarily used as a size indicator for fIdSens and
77// fIdName described below. In general the number of layers, ladders, or
78// detectors should be gotten from the AliITSgeom functions. Upon
79// creating the AliITS object it is set to zero.
80//
81// Int_t *fIdSens
82// This is a pointer to an array containing the Monte Carlo volume
83// numbers for the different layers of the ITS. These numbers are needed
84// by the StepManager function to determine what layer a hit was on. It
85// is sized and initialized in the Init function and the AliITSv? Init
86// function, called after a call to CreateGeometry. Upon creating the
87// AliITS object it points to zero. This variable is made a pointer
88// in order to keep the maximum flexibility at this level of the code.
89//
90// char **fIdName
91// This is a pointer to an array of characters containing the names of
92// the different ITS layers as defined in the Monte Carlo geometry data-
93// base. It is sized and filled in the AliITSv? Init function, called
94// after a call to CreatGeometry. Upon creating the AliITS object it
95// points to zero. This variable is make a pointer in order to keep the
96// maximum flexibility at this level of the code.
97//
98// Member Functions:
99//
100// AliITS()
101// The default constructor of the AliITS class. In addition to
102// creating the AliITS class it zeros the variables fIshunt (a member
103// of AliDetector class), fEuclidOut, and fIdN, and zeros the pointers
104// fITSpoints, fIdSens, and fIdName. The AliDetector default constructor
105// is also called.
106//
107// AliITS(const char *name, const char *title)
108// The constructor of the AliITS class. In addition to creating the
109// AliITS class, it allocates memory for the TClonesArrays fHits and
110// fDigits, and for the TObjArray fITSpoints. It also zeros the variables
111// fIshunt (a member of AliDetector class), fEuclidOut, and fIdN, and zeros
112// the pointers fIdSens and fIdName. To help in displaying hits via the ROOT
113// macro display.C AliITS also sets the marker color to red. The variables
114// passes with this constructor, const char *name and *title, are used by
115// the constructor of AliDetector class. See AliDetector class for a
116// description of these parameters and its constructor functions.
117//
118// ~AliITS()
119// The default destructor of the AliITS class. In addition to deleting
120// the AliITS class it deletes the memory pointed to by the fHits, fDigits,
121// fIdSens, fIdName, and fITSpoints.
122//
123// AddHit(Int_t track, Int_t *vol, Float_t *hits)
124// The function to add information to the AliITShit class. See the
125// AliITShit class for a full description. This function allocates the
126// necessary new space for the hit information and passes the variable
127// track, and the pointers *vol and *hits to the AliITShit constructor
128// function.
129//
130// AddDigit(Int_t *track, Int_t *digits)
131// The function to add information to the AliITSdigits class. See the
132// AliITSdigits class for a full description. This function allocates the
133// necessary new space for the digits information and passes the pointers
134// *track and *digits to the AliITSdigits constructor function.
135//
136// BuildGeometry()
137// This function builds a simple ITS geometry used by the ROOT macro
138// display.C. In general the geometry as coded is wrong.
139//
140// CreateGeometry()
141// This function builds the detailed geometry used by the Geant
142// Monte Carlo. As defined here it is a dummy routine to be replaced
143// by the version coded up in AliITSv? where the specific geometry to
144// be used by the simulation is defined. See the definition of AliITSv5
145// or the other routines for a complete definition.
146//
147// CreateMaterials()
148// This function defines the default materials used in the Geant
149// Monte Carlo simulations. In general it is automatically replaced by
150// the CreatMaterials routine defined in AliITSv?. Should the function
151// CreateMaterials not exist for the geometry version you are using this
152// one is used. See the definition found in AliITSv5 or the other routine
153// for a complete definition.
154//
155// IsVersion()
156// Returns the version number of the AliITS class. At present it is
157// version 1.
158//
159// DistancetoPrimitive(Int_t x, Int_t y)
160// A dummy routine used by the ROOT macro display.C to allow for the
161// use of the mouse (pointing device) in the macro. In general this should
162// never be called. If it is it returns the number 9999 for any value of
163// x and y.
164//
165// Init()
166// This routine initializes the AliITS class. It is intended to be called
167// from the Init function in AliITSv?. Besides displaying a banner
168// indicating that it has been called it initializes the array fIdSens.
169// Therefore it should be called after a call to CreateGeometry.
170//
171// MakeBranch(Option_t *Opt=" ")
172// Creates the TTree branch where the class AliITS is kept.
173//
174// SetEUCLID(bool_t euclid=1)
175// Sets the flag fEuclidOut to true (default) of false (euclid=0).
176// By setting or clearing the fEuclidOut flag you can controls whether
177// or not a euclid formatted output file of the ITS geometry is written.
178// If fEuclidOut is set true then a file called ITSgeometry.euc will be
179// written after the ITS geometry is defined in the Monte Carlo. If
180// fEuclidOut is set false then no file is created.
181//
182// StepManager()
183// Dummy routine which is replaced by the routine StepManager() defined
184// in AliITSv?. If no such routine exist then this routine returns zero.
185// See AliITSv? for a detailed description of the step manager routines.
186//
187// GetITSgeom()
188// Returns the value of the pointer fITSgeom. This is used to get
189// access to the ITS geometry stored in the file. See AliITSgeom for a
190// full description of the geometry package.
191//
192// GetITSpoints()
193// Returns the value of the pointer fITSpoints. This is used to get
194// access to the ITS cluster objects, if filled, stored in the file. See
195// AliITSCluster for a full description of the cluster data.
196////////////////////////////////////////////////////////////////////////
197 protected:
198 AliITSgeom *fITSgeom; // Pointer to ITS geometry
199 TObjArray *fITSmodules; // Pointer to ITS modules
200 // Defined here since it doesn't have a place in AliDetector like fDigit
201 TObjArray *fITSpoints; // Pointer to ITS points
fe4da5cc 202
58005f18 203 Bool_t fEuclidOut; // Flag to write out geometry in euclid format
204 Int_t fIdN; // the number of layers
205 Int_t *fIdSens; char **fIdName; //layer identifier
206 // Geometry and Stepmanager version numbers used.
207 Int_t fMajorVersion,fMinorVersion;
208
209 public:
210 AliITS();
211 AliITS(const char *name, const char *title);
212 virtual ~AliITS();
213
214 virtual void AddHit(Int_t, Int_t*, Float_t*);
215 virtual void AddDigit(Int_t*, Int_t*);
216 virtual Int_t AddDigit(AliITSdigit *d);
217// virtual void AddPoint(); // yet to be defined
218
219 virtual void BuildGeometry();
220 virtual void CreateGeometry() {};
221 virtual void CreateMaterials();
222
593d2ea1 223 virtual TObjArray* GetModules() const {return fITSmodules;}
224 virtual TObjArray* GetPoints() const {return fITSpoints;}
58005f18 225
593d2ea1 226 void GetGeometryVersion(Int_t &a,Int_t &b) const
58005f18 227 {a = fMajorVersion;b=fMinorVersion;return;}
ad0e60d9 228 virtual Int_t IsVersion() const {return 1;}
58005f18 229 Int_t DistancetoPrimitive(Int_t px, Int_t py);
230 virtual void Init();
231 virtual void MakeBranch(Option_t *opt=" ");
ad0e60d9 232 virtual void SetEUCLID(Bool_t euclid=1) {fEuclidOut = euclid;}
58005f18 233 virtual void StepManager()=0;
234 //
235 // ITS geometry functions
593d2ea1 236 virtual AliITSgeom *GetITSgeom() const {return fITSgeom;}
237 virtual TObjArray *GetITSpoints() const {return fITSpoints;}
58005f18 238
239 ClassDef(AliITS,1)
fe4da5cc 240};
fe4da5cc 241#endif