]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSv11.cxx
Calculation of new variables needed for Non-id HBT added. (Z. Chajecki)
[u/mrichter/AliRoot.git] / ITS / AliITSv11.cxx
CommitLineData
2b680d9b 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
803d1ab0 16/* $Id$ */
2b680d9b 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().
541f7ba6 34// General C/C++ includes
2b680d9b 35#include <stdio.h>
36#include <stdlib.h>
541f7ba6 37// General Root includes
38#include <Riostream.h>
2b680d9b 39#include <TMath.h>
172b0d90 40#include <float.h>
2b680d9b 41#include <TObjArray.h>
541f7ba6 42#include <TClonesArray.h>
2b680d9b 43#include <TLorentzVector.h>
44#include <TObjString.h>
541f7ba6 45// Root Geometry includes
46#include <TGeoManager.h>
afac0af7 47#include <TGeoVolume.h>
541f7ba6 48#include <TGeoPcon.h>
d1a22f9a 49#include <TGeoCone.h>
afac0af7 50#include <TGeoTube.h> // contaings TGeoTubeSeg
51#include <TGeoArb8.h>
52#include <TGeoCompositeShape.h>
53#include <TGeoMatrix.h>
541f7ba6 54#include <TGeoNode.h>
55#include <TGeoMaterial.h>
afac0af7 56#include <TGeoMedium.h>
172b0d90 57#include "AliITSv11GeometrySupport.h"
541f7ba6 58// General AliRoot includes
2b680d9b 59#include "AliRun.h"
60#include "AliMagF.h"
61#include "AliConst.h"
541f7ba6 62// ITS specific includes
2b680d9b 63#include "AliITSgeomSPD.h"
64#include "AliITSgeomSDD.h"
2b680d9b 65#include "AliITSDetType.h"
66#include "AliITSresponseSPD.h"
67#include "AliITSresponseSDD.h"
2b680d9b 68#include "AliITSsegmentationSPD.h"
69#include "AliITSsegmentationSDD.h"
2b680d9b 70#include "AliITSsimulationSPD.h"
71#include "AliITSsimulationSDD.h"
2b680d9b 72#include "AliITSClusterFinderSSD.h"
541f7ba6 73#include "AliITSv11.h"
db486a6e 74#include "AliITSv11GeometrySPD.h"
75#include "AliITSv11GeometrySDD.h"
172b0d90 76#include "AliITSv11GeometrySupport.h"
171f3f35 77
2b680d9b 78ClassImp(AliITSv11)
79
541f7ba6 80/*
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.
84*/
85
2b680d9b 86//______________________________________________________________________
db486a6e 87AliITSv11::AliITSv11() :
88 AliITS(),
89 fGeomDetOut(kFALSE),
90 fGeomDetIn(kFALSE),
91 fMajorVersion(11),
92 fMinorVersion(0),
93 fDet1(0.0),
94 fDet2(0.0),
95 fChip1(0.0),
96 fChip2(0.0),
97 fRails(0),
98 fFluid(1),
99 fSPDgeom(0),
100 fSupgeom(0){
aa9bc63b 101 // Standard default constructor for the ITS version 11.
2b680d9b 102 // Inputs:
aa9bc63b 103 // none.
2b680d9b 104 // Outputs:
aa9bc63b 105 // none.
106 // Return
107 // A default constructed AliITSv11 class.
2b680d9b 108
541f7ba6 109 //fITSV = 0;
110 //fcS = 0;
162acd47 111// fcD = 0;
f7315efc 112
db486a6e 113 SetEUCLID(kFALSE);
2b680d9b 114}
115//______________________________________________________________________
db486a6e 116AliITSv11::AliITSv11(Int_t debugITS,Int_t debugSPD,Int_t debugSDD,
117 Int_t debugSSD,Int_t debugSUP) :
118 AliITS(),
119 fGeomDetOut(kFALSE),
120 fGeomDetIn(kFALSE),
121 fMajorVersion(11),
122 fMinorVersion(0),
123 fDet1(0.0),
124 fDet2(0.0),
125 fChip1(0.0),
126 fChip2(0.0),
127 fRails(0),
128 fFluid(1),
129 fSPDgeom(0),
130 fSupgeom(0){
131 // Standard default constructor for the ITS version 11.
132 // Inputs:
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).
138 // Outputs:
139 // none.
140 // Return
141 // A Constructor for ITS geometry version 11 useful for Geometry display.
142
143 SetEUCLID(kFALSE);
144 debugSSD = debugSDD; // remove waring for unused variables.
145 SetDebug(debugITS);
146 fSPDgeom = new AliITSv11GeometrySPD(debugSPD);
147 fSDDgeom = new AliITSv11GeometrySDD(debugSDD);
148 fSupgeom = new AliITSv11GeometrySupport(debugSUP);
149}
150//______________________________________________________________________
151AliITSv11::AliITSv11(const char *title) :
152 AliITS("ITS", title),
153 fGeomDetOut(kFALSE),
154 fGeomDetIn(kFALSE),
155 fMajorVersion(11),
156 fMinorVersion(0),
157 fDet1(0.0),
158 fDet2(0.0),
159 fChip1(0.0),
160 fChip2(0.0),
161 fRails(0),
162 fFluid(1),
163 fSPDgeom(0),
164 fSupgeom(0){
aa9bc63b 165 // Standard constructor for the ITS version 11.
2b680d9b 166 // Inputs:
162acd47 167 // const char *title The title of for this geometry.
2b680d9b 168 // Outputs:
aa9bc63b 169 // none.
170 // Return
171 // A Standard constructed AliITSv11 class.
db486a6e 172 SetEUCLID(kFALSE);
173 fSPDgeom = new AliITSv11GeometrySPD(GetDebug());
174 fSupgeom = new AliITSv11GeometrySupport(GetDebug());
2b680d9b 175}
176//______________________________________________________________________
aa9bc63b 177AliITSv11::~AliITSv11() {
178 // Standard destructor for the ITS version 11.
dfefbaec 179 // Inputs:
aa9bc63b 180 // none.
dfefbaec 181 // Outputs:
aa9bc63b 182 // none.
183 // Return
184 // none.
dfefbaec 185
541f7ba6 186// if(fITSV!=0) delete fITSV;
187// if(fcS!=0) delete fcS;
162acd47 188// if(fcD!=0) delete fcD;
189}
190//______________________________________________________________________
541f7ba6 191AliITSv11::AliITSv11(const AliITSv11 &source) : AliITS(source){
162acd47 192 // Copy Constructor for ITS version 11.
193 // Inputs:
194 // AliITSv11 &source class to be copied from.
195 // Outputs:
196 // none.
197 // Return
198 // none.
199
200 if(&source == this) return;
201 Error("Copy Constructor","Not allowed to copy AliITSv11");
202 return;
203}
204//______________________________________________________________________
205AliITSv11& AliITSv11::operator=(const AliITSv11 &source){
206 // Assignment operator for the ITS version 11.
207 // Inputs:
208 // AliITSv11 &source class to be copied from.
209 // Outputs:
210 // none.
211 // Return
212 // none.
213
214 if(&source == this) return *this;
215 Error("= operator","Not allowed to copy AliITSv11");
216 return *this;
dfefbaec 217}
218//______________________________________________________________________
aa9bc63b 219void AliITSv11::BuildGeometry(){
162acd47 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.
2b680d9b 223 // Inputs:
aa9bc63b 224 // none.
2b680d9b 225 // Outputs:
aa9bc63b 226 // none.
227 // Return
228 // none.
d5219d0d 229 //TVector3 t(0.0,0.0,0.0);
2b680d9b 230
541f7ba6 231 //if(fITSV==0) fITSV = new AliITSGeometryITSV(this,"ALIC");
232 //if(fcS==0) fcS = new AliITSGeometrySSDCone(this,t,"TSV",1);
2b680d9b 233
541f7ba6 234 //fcS->BuildDisplayGeometry();
2b680d9b 235}
236//______________________________________________________________________
aa9bc63b 237void AliITSv11::CreateGeometry(){
162acd47 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.
dfefbaec 241 // Inputs:
aa9bc63b 242 // none.
dfefbaec 243 // Outputs:
aa9bc63b 244 // none.
245 // Return
246 // none.
aa9bc63b 247 TVector3 t(0.0,0.0,0.0);
286dfe89 248 const Double_t kcm = 1.0;
162acd47 249
541f7ba6 250 TGeoManager *mgr = gGeoManager;
d5219d0d 251 TGeoVolume *vALIC = mgr->GetTopVolume();
541f7ba6 252
d5219d0d 253 TGeoPcon *sITS = new TGeoPcon("ITS Top Volume, Daughter of ALIC",
fed42993 254 0.0,360.0,2);
541f7ba6 255 // DefineSection(section number, Z, Rmin, Rmax).
d5219d0d 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);
162acd47 262 //
db486a6e 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);
541f7ba6 272}
273//______________________________________________________________________
274void 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
279 // Inputs:
280 // none.
281 // Outputs:
282 // none.
283 // Return
284 // none.
aa9bc63b 285
541f7ba6 286 //TGeoMaterial *C = new TGeoMaterial("ITSCarbon",12.0,6.0,2.265);
d5219d0d 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);
541f7ba6 293 //
d5219d0d 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);
afac0af7 315 //
d5219d0d 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);
dfefbaec 337}
338//______________________________________________________________________
339void AliITSv11::InitAliITSgeom(){
aa9bc63b 340 // Based on the geometry tree defined in Geant 3.21, this
162acd47 341 // routine initilizes the Class AliITSgeom from the Geant 3.21 ITS
342 // geometry sturture.
aa9bc63b 343 // Inputs:
344 // none.
345 // Outputs:
346 // none.
347 // Return
348 // none.
dfefbaec 349}
dfefbaec 350//______________________________________________________________________
351void AliITSv11::Init(){
aa9bc63b 352 // Initialise the ITS after it has been created.
353 // Inputs:
354 // none.
355 // Outputs:
356 // none.
357 // Return
358 // none.
dfefbaec 359}
360//______________________________________________________________________
361void AliITSv11::SetDefaults(){
162acd47 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
365 // general user.
aa9bc63b 366 // Inputs:
367 // none.
368 // Outputs:
369 // none.
370 // Return
371 // none.
dfefbaec 372}
373//______________________________________________________________________
374void AliITSv11::DrawModule(){
162acd47 375 // Draw a standard set of shaded view of the ITS version 11.
aa9bc63b 376 // Inputs:
377 // none.
378 // Outputs:
379 // none.
380 // Return
381 // none.
dfefbaec 382}
383//______________________________________________________________________
384void AliITSv11::StepManager(){
aa9bc63b 385 // Called for every step in the ITS, then calles the AliITShit class
dfefbaec 386 // creator with the information to be recoreded about that hit.
aa9bc63b 387 // The value of the macro ALIITSPRINTGEOM if set to 1 will allow the
dfefbaec 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
162acd47 391 // is the extra variables and the like used in the printing allocated.
2b680d9b 392}
dfefbaec 393