]>
Commit | Line | Data |
---|---|---|
4c039060 | 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 | ||
88cb7938 | 16 | /* $Id$ */ |
4c039060 | 17 | |
fe4da5cc | 18 | ///////////////////////////////////////////////////////// |
19 | // Manager and hits classes for set:MUON version 0 // | |
20 | ///////////////////////////////////////////////////////// | |
21 | ||
116cbefd | 22 | #include <TLorentzVector.h> |
88cb7938 | 23 | #include <TVirtualMC.h> |
fe4da5cc | 24 | |
fe4da5cc | 25 | #include "AliConst.h" |
88cb7938 | 26 | #include "AliMUONChamber.h" |
e118b27e | 27 | #include "AliMUONGeometryModule.h" |
f665c1ea | 28 | #include "AliMUONConstants.h" |
be3bb6c1 | 29 | #include "AliMUONFactory.h" |
88cb7938 | 30 | #include "AliMUONHit.h" |
88cb7938 | 31 | #include "AliMUONv0.h" |
32 | #include "AliMagF.h" | |
33 | #include "AliRun.h" | |
5d12ce38 | 34 | #include "AliMC.h" |
c4a97bcd | 35 | #include "AliLog.h" |
88cb7938 | 36 | |
fe4da5cc | 37 | ClassImp(AliMUONv0) |
38 | ||
39 | //___________________________________________ | |
30178c30 | 40 | AliMUONv0::AliMUONv0() |
41 | : AliMUON() | |
fe4da5cc | 42 | { |
a9e2aefa | 43 | // Constructor |
fe4da5cc | 44 | fChambers = 0; |
45 | } | |
46 | ||
47 | //___________________________________________ | |
48 | AliMUONv0::AliMUONv0(const char *name, const char *title) | |
30178c30 | 49 | : AliMUON(name,title) |
fe4da5cc | 50 | { |
a9e2aefa | 51 | // Constructor |
ba030c0e | 52 | AliMUONFactory factory; |
53 | factory.Build(this, title); | |
a897a37a | 54 | } |
55 | ||
30178c30 | 56 | //___________________________________________ |
a9e2aefa | 57 | void AliMUONv0::CreateGeometry() |
58 | { | |
59 | // Creates coarse geometry for hit density simulations | |
60 | Int_t *idtmed = fIdtmed->GetArray()-1099; | |
fe4da5cc | 61 | // |
a9e2aefa | 62 | Float_t zpos, dAlu, tpar[3]; |
63 | Int_t idAir=idtmed[1100]; | |
64 | Int_t idAlu=idtmed[1103]; | |
65 | ||
66 | AliMUONChamber *iChamber; | |
67 | // Loop over all chambers (tracking and trigger) | |
f665c1ea | 68 | for (Int_t ch = 0; ch < AliMUONConstants::NCh(); ch++) { |
a9e2aefa | 69 | char alu[8]; |
70 | char gas[8]; | |
71 | ||
72 | iChamber=(AliMUONChamber*) (*fChambers)[ch]; | |
73 | // Z of the chamber | |
74 | zpos=iChamber->Z(); | |
75 | dAlu=iChamber->DAlu(); | |
f665c1ea | 76 | if (ch < AliMUONConstants::NTrackingCh()) { |
a9e2aefa | 77 | // tracking chambers |
b74f1c6a | 78 | sprintf(alu,"SA0%1d",ch); |
79 | sprintf(gas,"SG0%1d",ch); | |
a9e2aefa | 80 | } else { |
81 | // trigger chambers | |
b74f1c6a | 82 | sprintf(alu,"SA%2d",ch); |
83 | sprintf(gas,"SG%2d",ch); | |
a9e2aefa | 84 | } |
85 | // | |
a9e2aefa | 86 | tpar[0] = iChamber->RInner(); |
87 | tpar[1] = iChamber->ROuter(); | |
88 | tpar[2] = (dAlu+0.2)/2.; | |
89 | if (ch !=4 && ch !=5) { | |
90 | gMC->Gsvolu(alu, "TUBE", idAlu, tpar, 3); | |
91 | tpar[2] = 0.1; | |
92 | gMC->Gsvolu(gas, "TUBE", idAir, tpar, 3); | |
93 | } else { | |
94 | gMC->Gsvolu(alu, "TUBE", idAlu, tpar, 3); | |
95 | tpar[2] = 0.1; | |
96 | gMC->Gsvolu(gas, "TUBE", idAir, tpar, 3); | |
97 | } | |
98 | gMC->Gspos(gas, 1, alu, 0., 0., 0., 0, "ONLY"); | |
afa281f0 | 99 | if (ch == 4 || ch ==5) { |
82e22b99 | 100 | if (gMC->VolId("DDIP")) { |
101 | gMC->Gspos(alu, 1, "DDIP", 0., 0., zpos, 0, "ONLY"); | |
102 | } else { | |
103 | gMC->Gspos(alu, 1, "ALIC", 0., 0., zpos, 0, "ONLY"); | |
104 | } | |
afa281f0 | 105 | } else { |
106 | gMC->Gspos(alu, 1, "ALIC", 0., 0., zpos, 0, "ONLY"); | |
107 | } | |
a897a37a | 108 | } |
fe4da5cc | 109 | } |
110 | ||
fe4da5cc | 111 | //___________________________________________ |
112 | void AliMUONv0::CreateMaterials() | |
113 | { | |
a9e2aefa | 114 | // Creates materials for coarse geometry |
97ddb489 | 115 | // Air |
116 | Float_t aAir[4]={12.0107,14.0067,15.9994,39.948}; | |
117 | Float_t zAir[4]={6.,7.,8.,18.}; | |
118 | Float_t wAir[4]={0.000124,0.755267,0.231781,0.012827}; | |
119 | Float_t dAir = 1.20479E-3; | |
120 | AliMixture(15, "AIR$ ", aAir, zAir, dAir,4, wAir); | |
121 | // AliMaterial(15, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500); | |
122 | AliMaterial( 9, "ALUMINIUM$", 26.98, 13. , 2.7, 8.9, 37.2); | |
fe4da5cc | 123 | |
97ddb489 | 124 | Float_t epsil = .001; // Tracking precision, |
125 | Float_t stemax = -1.; // Maximum displacement for multiple scat | |
126 | Float_t tmaxfd = -20.; // Maximum angle due to field deflection | |
127 | Float_t deemax = -.3; // Maximum fractional energy loss, DLS | |
128 | Float_t stmin = -.8; | |
129 | Int_t isxfld = gAlice->Field()->Integ(); | |
130 | Float_t sxmgmx = gAlice->Field()->Max(); | |
131 | ||
132 | // | |
133 | // Air | |
134 | AliMedium(1, "AIR_CH_US ", 15, 1, isxfld, sxmgmx, tmaxfd, stemax, deemax, epsil, stmin); | |
135 | AliMedium(4, "ALU_CH_US ", 9, 0, isxfld, sxmgmx, tmaxfd, fMaxStepAlu, | |
a897a37a | 136 | fMaxDestepAlu, epsil, stmin); |
97ddb489 | 137 | |
fe4da5cc | 138 | } |
139 | ||
fe4da5cc | 140 | void AliMUONv0::Init() |
141 | { | |
fe4da5cc | 142 | // |
143 | // Initialize Tracking Chambers | |
144 | // | |
b9046b8f | 145 | char vName[8]; |
c4a97bcd | 146 | AliInfo("\n\n\n Start Init for version 0 - CPC chamber type\n\n\n"); |
b9046b8f | 147 | for (Int_t i=0; i<AliMUONConstants::NCh(); i++) { |
148 | // Initialise chamber | |
149 | ((AliMUONChamber*) (*fChambers)[i])->Init(); | |
150 | // Set sensitive volume Id | |
151 | if (i < AliMUONConstants::NTrackingCh()) { | |
152 | // tracking chambers | |
b74f1c6a | 153 | sprintf(vName,"SG0%1d",i); |
b9046b8f | 154 | } else { |
155 | // trigger chambers | |
b74f1c6a | 156 | sprintf(vName,"SG%2d",i); |
b9046b8f | 157 | } |
d1cd2474 | 158 | //((AliMUONChamber*) (*fChambers)[i])->SetGid(gMC->VolId(vName)); |
159 | ((AliMUONChamber*) (*fChambers)[i]) | |
160 | ->GetGeometry()->SetSensitiveVolume(gMC->VolId(vName)); | |
b9046b8f | 161 | } |
fe4da5cc | 162 | } |
163 | ||
a9e2aefa | 164 | |
165 | ||
166 | ||
167 | ||
168 | ||
169 | ||
170 | ||
171 |