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