1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 //////////////////////////////////////////////////////////////////////////////
20 // Inner Traking System version 11 //
21 // This class contains the base procedures for the Inner Tracking System //
23 // Authors: R. Barbera //
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. //
32 //////////////////////////////////////////////////////////////////////////////
33 // See AliITSv11::StepManager().
34 // General C/C++ includes
37 // General Root includes
38 #include <Riostream.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>
50 #include <TGeoTube.h> // contaings TGeoTubeSeg
52 #include <TGeoCompositeShape.h>
53 #include <TGeoMatrix.h>
55 #include <TGeoMaterial.h>
56 #include <TGeoMedium.h>
57 #include "AliITSv11GeometrySupport.h"
58 // General AliRoot includes
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 "AliITSv11GeometrySPD.h"
75 #include "AliITSv11GeometrySDD.h"
76 #include "AliITSv11GeometrySupport.h"
81 Some temparary #define's used untill ROOT has addoppted the proper
82 Getter in it's classes.
83 These Below are for TGeoPcon functions.
86 //______________________________________________________________________
87 AliITSv11::AliITSv11() :
101 // Standard default constructor for the ITS version 11.
107 // A default constructed AliITSv11 class.
115 //______________________________________________________________________
116 AliITSv11::AliITSv11(Int_t debugITS,Int_t debugSPD,Int_t debugSDD,
117 Int_t debugSSD,Int_t debugSUP) :
131 // Standard default constructor for the ITS version 11.
133 // Int_t debugITS Debug flag for ITS code (required).
134 // Int_t debugSPD Debug flag for SPD geometry (default = 0).
135 // Int_t debugSDD Debug flag for SDD geometry (default = 0).
136 // Int_t debugSSD Debug flag for SSD geometry (default = 0).
137 // Int_t debugSUP Debug flag for SUPort geometry (default = 0).
141 // A Constructor for ITS geometry version 11 useful for Geometry display.
144 debugSSD = debugSDD; // remove waring for unused variables.
146 fSPDgeom = new AliITSv11GeometrySPD(debugSPD);
147 fSDDgeom = new AliITSv11GeometrySDD(debugSDD);
148 fSupgeom = new AliITSv11GeometrySupport(debugSUP);
150 //______________________________________________________________________
151 AliITSv11::AliITSv11(const char *title) :
152 AliITS("ITS", title),
165 // Standard constructor for the ITS version 11.
167 // const char *title The title of for this geometry.
171 // A Standard constructed AliITSv11 class.
173 fSPDgeom = new AliITSv11GeometrySPD(GetDebug());
174 fSupgeom = new AliITSv11GeometrySupport(GetDebug());
176 //______________________________________________________________________
177 AliITSv11::~AliITSv11() {
178 // Standard destructor for the ITS version 11.
186 // if(fITSV!=0) delete fITSV;
187 // if(fcS!=0) delete fcS;
188 // if(fcD!=0) delete fcD;
190 //______________________________________________________________________
191 AliITSv11::AliITSv11(const AliITSv11 &source) : AliITS(source){
192 // Copy Constructor for ITS version 11.
194 // AliITSv11 &source class to be copied from.
200 if(&source == this) return;
201 Error("Copy Constructor","Not allowed to copy AliITSv11");
204 //______________________________________________________________________
205 AliITSv11& AliITSv11::operator=(const AliITSv11 &source){
206 // Assignment operator for the ITS version 11.
208 // AliITSv11 &source class to be copied from.
214 if(&source == this) return *this;
215 Error("= operator","Not allowed to copy AliITSv11");
218 //______________________________________________________________________
219 void AliITSv11::BuildGeometry(){
220 // This routine defines and Creates the geometry for version 11 of
221 // the ITS for use in the simulation display routines. This is a
222 // very simplified geometry for speed of viewing.
229 //TVector3 t(0.0,0.0,0.0);
231 //if(fITSV==0) fITSV = new AliITSGeometryITSV(this,"ALIC");
232 //if(fcS==0) fcS = new AliITSGeometrySSDCone(this,t,"TSV",1);
234 //fcS->BuildDisplayGeometry();
236 //______________________________________________________________________
237 void AliITSv11::CreateGeometry(){
238 // This routine defines and Creates the geometry for version 11 of
239 // the ITS. The geometry is used by the particle trasport routines,
240 // and therefore, is very detailed.
247 TVector3 t(0.0,0.0,0.0);
248 const Double_t kcm = 1.0;
250 TGeoManager *mgr = gGeoManager;
251 TGeoVolume *vALIC = mgr->GetTopVolume();
253 TGeoPcon *sITS = new TGeoPcon("ITS Top Volume, Daughter of ALIC",
255 // DefineSection(section number, Z, Rmin, Rmax).
256 sITS->DefineSection(0,-300.0*kcm,0.01*kcm,50.0*kcm);
257 sITS->DefineSection(1,+300.0*kcm,0.01*kcm,50.0*kcm);
258 TGeoVolume *vITS = new TGeoVolume("ITSV",sITS,0);
259 mgr->AddVolume(vITS);
260 vITS->SetVisibility(kFALSE);
261 vALIC->AddNode(vITS,1,0);
263 fSPDgeom->CarbonFiberSector(vITS);
264 fSDDgeom->SetGeomParameters(); // needed
265 fSDDgeom->Layer3(vITS);
266 fSDDgeom->Layer4(vITS);
267 fSupgeom->SPDCone(vITS);
268 fSupgeom->SPDThermalSheald(vITS);
269 fSupgeom->SDDCone(vITS);
270 fSupgeom->SSDCone(vITS);
271 fSupgeom->ServicesCableSupport(vITS);
273 //______________________________________________________________________
274 void AliITSv11::CreateMaterials(){
275 // Create ITS materials
276 // This function defines the default materials used in the Geant
277 // Monte Carlo simulations for the geometries AliITSv11.
278 // In general it is automatically replaced by
286 //TGeoMaterial *C = new TGeoMaterial("ITSCarbon",12.0,6.0,2.265);
287 TGeoMaterial *matAl = new TGeoMaterial("ITSAluminum",26.981539,13.0,2.07);
288 TGeoMixture *matCfiber = new TGeoMixture("ITSCarbonFiber",6,1.930);
289 TGeoMixture *matRohacell = new TGeoMixture("ITSRohacell",6,1.930);
290 TGeoMixture *matStaselite = new TGeoMixture("ITSStaselite4411w",6,1.930);
291 TGeoMixture *matAir = new TGeoMixture("ITSAir",6,1.205*1.E-3);
292 TGeoMixture *matStainless = new TGeoMixture("ITSStainless",6,1.930);
294 Double_t medSPDcone[20];
295 medSPDcone[0] = 1.0; // imat
296 medSPDcone[1] = 0.0; // isvol
297 medSPDcone[2] = gAlice->Field()->Integ(); // ifield
298 medSPDcone[3] = gAlice->Field()->Max(); // fieldm
299 medSPDcone[4] = 1.0; // tmaxfd [degrees]
300 medSPDcone[5] = 1.0; // stemax [cm]
301 medSPDcone[6] = 0.5; // deemax [fraction]
302 medSPDcone[7] = 1.0E-3; // epsil [cm]
303 medSPDcone[8] = 0.0; // stmin [cm]
304 new TGeoMedium("ITSspdCarbonFiber",1,matCfiber,medSPDcone);
305 medSPDcone[0] += 1.0;
306 new TGeoMedium("ITSspdStaselite4411w",2,matStaselite,medSPDcone);
307 medSPDcone[0] += 1.0;
308 new TGeoMedium("ITSspdRohacell50A",3,matRohacell,medSPDcone);
309 medSPDcone[0] += 1.0;
310 new TGeoMedium("ITSspdStainlesSteal",4,matStainless,medSPDcone);
311 medSPDcone[0] += 1.0;
312 new TGeoMedium("ITSspdAir",5,matAir,medSPDcone);
313 medSPDcone[0] += 1.0;
314 new TGeoMedium("ITSspdAl",6,matAl,medSPDcone);
316 Double_t medSSDcone[20];
317 medSSDcone[0] = 1.0; // imat
318 medSSDcone[1] = 0.0; // isvol
319 medSSDcone[2] = gAlice->Field()->Integ(); // ifield
320 medSSDcone[3] = gAlice->Field()->Max(); // fieldm
321 medSSDcone[4] = 1.0; // tmaxfd [degrees]
322 medSSDcone[5] = 1.0; // stemax [cm]
323 medSSDcone[6] = 0.5; // deemax [fraction]
324 medSSDcone[7] = 1.0E-3; // epsil [cm]
325 medSSDcone[8] = 0.0; // stmin [cm]
326 new TGeoMedium("ITSssdCarbonFiber",1,matCfiber,medSSDcone);
327 medSSDcone[0] += 1.0;
328 new TGeoMedium("ITSssdStaselite4411w",2,matStaselite,medSSDcone);
329 medSSDcone[0] += 1.0;
330 new TGeoMedium("ITSssdRohacell50A",3,matRohacell,medSSDcone);
331 medSSDcone[0] += 1.0;
332 new TGeoMedium("ITSssdStainlesSteal",4,matStainless,medSSDcone);
333 medSSDcone[0] += 1.0;
334 new TGeoMedium("ITSssdAir",5,matAir,medSSDcone);
335 medSSDcone[0] += 1.0;
336 new TGeoMedium("ITSssdAl",6,matAl,medSSDcone);
338 //______________________________________________________________________
339 void AliITSv11::InitAliITSgeom(){
340 // Based on the geometry tree defined in Geant 3.21, this
341 // routine initilizes the Class AliITSgeom from the Geant 3.21 ITS
342 // geometry sturture.
350 //______________________________________________________________________
351 void AliITSv11::Init(){
352 // Initialise the ITS after it has been created.
360 //______________________________________________________________________
361 void AliITSv11::SetDefaults(){
362 // Sets the default segmentation, response, digit and raw cluster
363 // classes to be used. These defaults can be overwritten in the
364 // macros that do these later steps. Defaults are give hear for the
373 //______________________________________________________________________
374 void AliITSv11::DrawModule(){
375 // Draw a standard set of shaded view of the ITS version 11.
383 //______________________________________________________________________
384 void AliITSv11::StepManager(){
385 // Called for every step in the ITS, then calles the AliITShit class
386 // creator with the information to be recoreded about that hit.
387 // The value of the macro ALIITSPRINTGEOM if set to 1 will allow the
388 // printing of information to a file which can be used to create a .det
389 // file read in by the routine CreateGeometry(). If set to 0 or any other
390 // value except 1, the default behavior, then no such file is created nor
391 // is the extra variables and the like used in the printing allocated.