Project
Loading...
Searching...
No Matches
TF3Chip.cxx
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
13
16
17#include <TGeoBBox.h> // for TGeoBBox
18#include <TGeoManager.h> // for gGeoManager, TGeoManager
19#include "TGeoVolume.h" // for TGeoVolume
20#include "TGeoMatrix.h" // for TGeoMatrix
21#include <fairlogger/Logger.h> // for LOG
22
23namespace o2
24{
25
26namespace iotof
27{
28
29const double TF3Chip::sChipSizeX = 2.6; // cm
30const double TF3Chip::sChipSizeZ = 3.0; // cm
31
32//________________________________________________________________________
33TGeoVolume* TF3Chip::createChip(const Double_t ychip,
34 const Double_t ysens,
35 const char* chipName,
36 const char* sensName,
37 const Bool_t dummy,
38 const TGeoManager* mgr)
39{
40
41 Double_t xchip, zchip;
42 Double_t ylen, ypos;
43
44 xchip = 0.5 * sChipSizeX;
45 zchip = 0.5 * sChipSizeZ;
46
47 // First create all needed shapes
48 ylen = ysens;
49 if (ysens > ychip) {
50 LOG(warning) << "Sensor half thickness (" << ysens
51 << ") greater than chip half thickness (" << ychip
52 << "), setting equal";
53 ylen = ychip;
54 }
55
56 // The chip
57 TGeoBBox* chip = new TGeoBBox(xchip, 0.5 * ychip, zchip);
58
59 // The sensor
60 TGeoBBox* sensor = new TGeoBBox(xchip, 0.5 * ylen, zchip);
61
62 // We have all shapes: now create the real volumes
63 TGeoMedium* medSi = mgr->GetMedium("TF3CHIP_SI$");
64 if (!medSi) {
65 Int_t fieldType;
66 Float_t maxField;
68 createMaterials(0, fieldType, maxField);
69 medSi = mgr->GetMedium("TF3CHIP_SI$");
70 }
71 TGeoMedium* medAir = mgr->GetMedium("TF3CHIP_AIR$");
72
73 TGeoMedium* medChip;
74
75 if (dummy) {
76 medChip = medAir;
77 } else {
78 medChip = medSi;
79 }
80
81 TGeoVolume* chipVol = new TGeoVolume(chipName, chip, medChip);
82 chipVol->SetVisibility(kTRUE);
83 chipVol->SetLineColor(kOrange);
84 chipVol->SetFillColor(kOrange - 9);
85 chipVol->SetLineWidth(3);
86 chipVol->SetTransparency(20);
87
88 TGeoVolume* sensVol = new TGeoVolume(sensName, sensor, medChip);
89 sensVol->SetVisibility(kTRUE);
90 sensVol->SetLineColor(kRed);
91 sensVol->SetLineWidth(3);
92 sensVol->SetFillColor(kRed - 9);
93 sensVol->SetFillStyle(4000); // 0% transparent
94
95 // Now build up the chip
96 ypos = chip->GetDY() - sensor->GetDY();
97 chipVol->AddNode(sensVol, 1, new TGeoTranslation(0., ypos, 0.));
98
99 // Done, return the chip
100 return chipVol;
101}
102
103//________________________________________________________________________
104void TF3Chip::createMaterials(Int_t id, Int_t ifield, Float_t fieldm)
105{
107
108 Float_t tmaxfd = 0.1; // Degree
109 Float_t stemax = 1.0; // cm
110 Float_t deemax = 0.1; // Fraction of particle's energy 0<deemax<=1
111 Float_t epsil = 1.0E-4; // cm
112 Float_t stmin = 0.0; // cm "Default value used"
113
114 Float_t tmaxfdSi = 0.1; // Degree
115 Float_t stemaxSi = 0.0075; // cm
116 Float_t deemaxSi = 0.1; // Fraction of particle's energy 0<deemax<=1
117 Float_t epsilSi = 1.0E-4; // cm
118 Float_t stminSi = 0.0; // cm "Default value used"
119
120 Float_t tmaxfdAir = 0.1; // Degree
121 Float_t stemaxAir = 1.0; // cm
122 Float_t deemaxAir = 0.1; // Fraction of particle's energy 0<deemax<=1
123 Float_t epsilAir = 1.0E-4; // cm
124 Float_t stminAir = 0.0; // cm "Default value used"
125
126 // AIR
127 Float_t aAir[4] = {12.0107, 14.0067, 15.9994, 39.948};
128 Float_t zAir[4] = {6., 7., 8., 18.};
129 Float_t wAir[4] = {0.000124, 0.755267, 0.231781, 0.012827};
130 Float_t dAir = 1.20479E-3;
131
132 if (mgr.getMediumID("TF3CHIP", id) < 0) {
133 mgr.Mixture("TF3CHIP", id, "AIR$", aAir, zAir, dAir, 4, wAir);
134 mgr.Medium("TF3CHIP", id, "AIR$", id, 0, ifield, fieldm, tmaxfdAir, stemaxAir, deemaxAir, epsilAir, stminAir);
135 id++;
136 }
137
138 if (mgr.getMediumID("TF3CHIP", id) < 0) {
139 mgr.Material("TF3CHIP", id, "SI$", 0.28086E+02, 0.14000E+02, 0.23300E+01, 0.93600E+01, 0.99900E+03);
140 mgr.Medium("TF3CHIP", id, "SI$", id, 0, ifield, fieldm, tmaxfdSi, stemaxSi, deemaxSi, epsilSi, stminSi);
141 }
142}
143
144} // namespace iotof
145} // namespace o2
Definition of the Detector class.
static void initFieldTrackingParams(int &mode, float &maxfield)
Definition Detector.cxx:143
static MaterialManager & Instance()
static void createMaterials(Int_t id, Int_t fieldType, Float_t maxField)
Definition TF3Chip.cxx:104
static const double sChipSizeZ
Definition TF3Chip.h:52
static TGeoVolume * createChip(Double_t yc, Double_t ys, char const *chipName="TF3Chip", char const *sensName="TF3Sensor", Bool_t dummy=kFALSE, const TGeoManager *mgr=gGeoManager)
Definition TF3Chip.cxx:33
static const double sChipSizeX
Definition TF3Chip.h:51
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"