]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSv11.cxx
Coding conventions + removal of redundant methods
[u/mrichter/AliRoot.git] / ITS / AliITSv11.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
7  * Permission to use, copy, modify and distribute this software and its   *
8  * documentation strictly for non-commercial purposes is hereby granted   *
9  * without fee, provided that the above copyright notice appears in all   *
10  * copies and that both the copyright notice and this permission notice   *
11  * appear in the supporting documentation. The authors make no claims     *
12  * about the suitability of this software for any purpose. It is          *
13  * provided "as is" without express or implied warranty.                  *
14  **************************************************************************/
15
16 /* $Id$ */
17
18 //////////////////////////////////////////////////////////////////////////////
19 //                                                                          //
20 //  Inner Traking System version 11                                         //
21 //  This class contains the base procedures for the Inner Tracking System   //
22 //                                                                          //
23 // Authors: R. Barbera                                                      //
24 // version 6.                                                               //
25 // Created  2000.                                                           //
26 //                                                                          //
27 //  NOTE: THIS IS THE  SYMMETRIC PPR geometry of the ITS.                   //
28 // THIS WILL NOT WORK                                                       //
29 // with the geometry or module classes or any analysis classes. You are     //
30 // strongly encouraged to uses AliITSv5.                                    //
31 //                                                                          //
32 //////////////////////////////////////////////////////////////////////////////
33 // See AliITSv11::StepManager().
34 // General C/C++ includes
35 #include <stdio.h>
36 #include <stdlib.h>
37 // General Root includes
38 #include <Riostream.h>
39 #include <TMath.h>
40 #include <float.h>
41 #include <TObjArray.h>
42 #include <TClonesArray.h>
43 #include <TLorentzVector.h>
44 #include <TObjString.h>
45 // Root Geometry includes
46 #include <TGeoManager.h>
47 #include <TGeoVolume.h>
48 #include <TGeoPcon.h>
49 #include <TGeoCone.h>
50 #include <TGeoTube.h> // contaings TGeoTubeSeg
51 #include <TGeoArb8.h>
52 #include <TGeoCompositeShape.h>
53 #include <TGeoMatrix.h>
54 #include <TGeoNode.h>
55 #include <TGeoMaterial.h>
56 #include <TGeoMedium.h>
57 #include "AliITSv11GeometrySupport.h"
58 // General AliRoot includes
59 #include "AliRun.h"
60 #include "AliMagF.h"
61 #include "AliConst.h"
62 // ITS specific includes
63 #include "AliITSgeomSPD.h"
64 #include "AliITSgeomSDD.h"
65 #include "AliITSDetType.h"
66 #include "AliITSresponseSPD.h"
67 #include "AliITSresponseSDD.h"
68 #include "AliITSsegmentationSPD.h"
69 #include "AliITSsegmentationSDD.h"
70 #include "AliITSsimulationSPD.h"
71 #include "AliITSsimulationSDD.h"
72 #include "AliITSClusterFinderSSD.h"
73 #include "AliITSv11.h"
74 #include "AliITSv11GeometrySupport.h"
75
76 ClassImp(AliITSv11)
77
78 /*
79   Some temparary #define's used untill ROOT has addoppted the proper
80   Getter in it's classes.
81   These Below are for TGeoPcon functions.
82 */
83
84 //______________________________________________________________________
85 AliITSv11::AliITSv11() : AliITS(),
86 fGeomDetOut(kFALSE),
87 fGeomDetIn(kFALSE),
88 fMajorVersion(11),
89 fMinorVersion(0),
90 fDet1(0.0),
91 fDet2(0.0),
92 fChip1(0.0),
93 fChip2(0.0),
94 fRails(0),
95 fFluid(1){
96     // Standard default constructor for the ITS version 11.
97     // Inputs:
98     //   none.
99     // Outputs:
100     //   none.
101     // Return
102     //   A default constructed AliITSv11 class.
103
104     //fITSV = 0;
105     //fcS = 0;
106 //   fcD = 0;
107
108    SetEUCLID(kFALSE);
109 }
110 //______________________________________________________________________
111 AliITSv11::AliITSv11(const char *title) : AliITS("ITS", title),
112 fGeomDetOut(kFALSE),
113 fGeomDetIn(kFALSE),
114 fMajorVersion(11),
115 fMinorVersion(0),
116 fDet1(0.0),
117 fDet2(0.0),
118 fChip1(0.0),
119 fChip2(0.0),
120 fRails(0),
121 fFluid(1){
122     // Standard constructor for the ITS version 11.
123     // Inputs:
124     //   const char *title  The title of for this geometry.
125     // Outputs:
126     //   none.
127     // Return
128     //   A Standard constructed AliITSv11 class.
129    SetEUCLID(kFALSE);
130 }
131 //______________________________________________________________________
132 AliITSv11::~AliITSv11() {
133     // Standard destructor for the ITS version 11.
134     // Inputs:
135     //   none.
136     // Outputs:
137     //   none.
138     // Return
139     //   none.
140
141 //    if(fITSV!=0) delete fITSV;
142 //    if(fcS!=0) delete fcS;
143 //    if(fcD!=0) delete fcD;
144 }
145 //______________________________________________________________________
146 AliITSv11::AliITSv11(const AliITSv11 &source) : AliITS(source){
147     //     Copy Constructor for ITS version 11.
148     // Inputs:
149     //   AliITSv11 &source  class to be copied from.
150     // Outputs:
151     //   none.
152     // Return
153     //   none.
154
155     if(&source == this) return;
156     Error("Copy Constructor","Not allowed to copy AliITSv11");
157     return;
158 }
159 //______________________________________________________________________
160 AliITSv11& AliITSv11::operator=(const AliITSv11 &source){
161     //    Assignment operator for the ITS version 11.
162     // Inputs:
163     //   AliITSv11 &source  class to be copied from.
164     // Outputs:
165     //   none.
166     // Return
167     //   none.
168
169     if(&source == this) return *this;
170     Error("= operator","Not allowed to copy AliITSv11");
171     return *this;
172 }
173 //______________________________________________________________________
174 void AliITSv11::BuildGeometry(){
175     // This routine defines and Creates the geometry for version 11 of 
176     // the ITS for use in the simulation display routines. This is a 
177     // very simplified geometry for speed of viewing.
178     // Inputs:
179     //   none.
180     // Outputs:
181     //   none.
182     // Return
183     //   none.
184     //TVector3 t(0.0,0.0,0.0);
185
186     //if(fITSV==0) fITSV = new AliITSGeometryITSV(this,"ALIC");
187     //if(fcS==0) fcS = new AliITSGeometrySSDCone(this,t,"TSV",1);
188
189     //fcS->BuildDisplayGeometry();
190 }
191 //______________________________________________________________________
192 void AliITSv11::CreateGeometry(){
193     // This routine defines and Creates the geometry for version 11 of 
194     // the ITS. The geometry is used by the particle trasport routines,
195     // and therefore, is very detailed.
196     // Inputs:
197     //   none.
198     // Outputs:
199     //   none.
200     // Return
201     //   none.
202     TVector3 t(0.0,0.0,0.0);
203     const Double_t kcm = 1.0;
204
205     TGeoManager *mgr = gGeoManager;
206     TGeoVolume *vALIC = mgr->GetTopVolume();
207
208     TGeoPcon *sITS = new TGeoPcon("ITS Top Volume, Daughter of ALIC",
209                                   0.0,360.0,2);
210     // DefineSection(section number, Z, Rmin, Rmax).
211     sITS->DefineSection(0,-300.0*kcm,0.01*kcm,50.0*kcm);
212     sITS->DefineSection(1,+300.0*kcm,0.01*kcm,50.0*kcm);
213     TGeoVolume *vITS = new TGeoVolume("ITSV",sITS,0);
214     mgr->AddVolume(vITS);
215     vITS->SetVisibility(kFALSE);
216     vALIC->AddNode(vITS,1,0);
217     //
218     AliITSv11GeometrySupport *sup = new AliITSv11GeometrySupport(GetDebug());
219     sup->SPDCone(vITS);
220     sup->SPDThermalSheald(vITS);
221     sup->SDDCone(vITS);
222     sup->SSDCone(vITS);
223     sup->ServicesCableSupport(vITS);
224 }
225 //______________________________________________________________________
226 void AliITSv11::CreateMaterials(){
227     // Create ITS materials
228     //     This function defines the default materials used in the Geant
229     // Monte Carlo simulations for the geometries AliITSv11.
230     // In general it is automatically replaced by
231     // Inputs:
232     //   none.
233     // Outputs:
234     //   none.
235     // Return
236     //   none.
237
238     //TGeoMaterial *C  = new TGeoMaterial("ITSCarbon",12.0,6.0,2.265);
239     TGeoMaterial *matAl = new TGeoMaterial("ITSAluminum",26.981539,13.0,2.07);
240     TGeoMixture *matCfiber = new TGeoMixture("ITSCarbonFiber",6,1.930);
241     TGeoMixture *matRohacell = new TGeoMixture("ITSRohacell",6,1.930);
242     TGeoMixture *matStaselite = new TGeoMixture("ITSStaselite4411w",6,1.930);
243     TGeoMixture *matAir = new TGeoMixture("ITSAir",6,1.205*1.E-3);
244     TGeoMixture *matStainless = new TGeoMixture("ITSStainless",6,1.930);
245     //
246     Double_t medSPDcone[20];
247     medSPDcone[0] = 1.0; // imat
248     medSPDcone[1] = 0.0; // isvol
249     medSPDcone[2] = gAlice->Field()->Integ(); // ifield
250     medSPDcone[3] = gAlice->Field()->Max(); // fieldm
251     medSPDcone[4] = 1.0; // tmaxfd [degrees]
252     medSPDcone[5] = 1.0; // stemax [cm]
253     medSPDcone[6] = 0.5; // deemax [fraction]
254     medSPDcone[7] = 1.0E-3; // epsil [cm]
255     medSPDcone[8] = 0.0; // stmin [cm]
256     new TGeoMedium("ITSspdCarbonFiber",1,matCfiber,medSPDcone);
257     medSPDcone[0] += 1.0;
258     new TGeoMedium("ITSspdStaselite4411w",2,matStaselite,medSPDcone);
259     medSPDcone[0] += 1.0;
260     new TGeoMedium("ITSspdRohacell50A",3,matRohacell,medSPDcone);
261     medSPDcone[0] += 1.0;
262     new TGeoMedium("ITSspdStainlesSteal",4,matStainless,medSPDcone);
263     medSPDcone[0] += 1.0;
264     new TGeoMedium("ITSspdAir",5,matAir,medSPDcone);
265     medSPDcone[0] += 1.0;
266     new TGeoMedium("ITSspdAl",6,matAl,medSPDcone);
267     //
268     Double_t medSSDcone[20];
269     medSSDcone[0] = 1.0; // imat
270     medSSDcone[1] = 0.0; // isvol
271     medSSDcone[2] = gAlice->Field()->Integ(); // ifield
272     medSSDcone[3] = gAlice->Field()->Max(); // fieldm
273     medSSDcone[4] = 1.0; // tmaxfd [degrees]
274     medSSDcone[5] = 1.0; // stemax [cm]
275     medSSDcone[6] = 0.5; // deemax [fraction]
276     medSSDcone[7] = 1.0E-3; // epsil [cm]
277     medSSDcone[8] = 0.0; // stmin [cm]
278     new TGeoMedium("ITSssdCarbonFiber",1,matCfiber,medSSDcone);
279     medSSDcone[0] += 1.0;
280     new TGeoMedium("ITSssdStaselite4411w",2,matStaselite,medSSDcone);
281     medSSDcone[0] += 1.0;
282     new TGeoMedium("ITSssdRohacell50A",3,matRohacell,medSSDcone);
283     medSSDcone[0] += 1.0;
284     new TGeoMedium("ITSssdStainlesSteal",4,matStainless,medSSDcone);
285     medSSDcone[0] += 1.0;
286     new TGeoMedium("ITSssdAir",5,matAir,medSSDcone);
287     medSSDcone[0] += 1.0;
288     new TGeoMedium("ITSssdAl",6,matAl,medSSDcone);
289 }
290 //______________________________________________________________________
291 void AliITSv11::InitAliITSgeom(){
292     // Based on the geometry tree defined in Geant 3.21, this
293     // routine initilizes the Class AliITSgeom from the Geant 3.21 ITS 
294     // geometry sturture.
295     // Inputs:
296     //   none.
297     // Outputs:
298     //   none.
299     // Return
300     //   none.
301 }
302 //______________________________________________________________________
303 void AliITSv11::Init(){
304     // Initialise the ITS after it has been created.
305     // Inputs:
306     //   none.
307     // Outputs:
308     //   none.
309     // Return
310     //   none.
311 }
312 //______________________________________________________________________
313 void AliITSv11::SetDefaults(){
314     // Sets the default segmentation, response, digit and raw cluster 
315     // classes to be used. These defaults can be overwritten in the
316     // macros that do these later steps. Defaults are give hear for the
317     // general user.
318     // Inputs:
319     //   none.
320     // Outputs:
321     //   none.
322     // Return
323     //   none.
324 }
325 //______________________________________________________________________
326 void AliITSv11::DrawModule(){
327     // Draw a standard set of shaded view of the ITS version 11.
328     // Inputs:
329     //   none.
330     // Outputs:
331     //   none.
332     // Return
333     //   none.
334 }
335 //______________________________________________________________________
336 void AliITSv11::StepManager(){
337     // Called for every step in the ITS, then calles the AliITShit class
338     // creator with the information to be recoreded about that hit.
339     //  The value of the macro ALIITSPRINTGEOM if set to 1 will allow the
340     // printing of information to a file which can be used to create a .det
341     // file read in by the routine CreateGeometry(). If set to 0 or any other
342     // value except 1, the default behavior, then no such file is created nor
343     // is the extra variables and the like used in the printing allocated.
344 }
345