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 // ALICE Cosmic Ray Trigger //
22 // This class contains the functions for version 0 of the ALICE Cosmic Ray //
23 // Trigger. This version will be used to simulation comic rays in alice //
24 // with all the detectors. //
28 // Arturo Fernandez <afernand@fcfm.buap.mx>
29 // Enrique Gamez <egamez@fcfm.buap.mx>
31 // Universidad Autonoma de Puebla
36 <img src="picts/AliACORDEv0Class.gif">
39 <p>The responsible person for this module is
40 <a href="mailto:egamez@fcfm.buap.mx">Enrique Gamez</a>.
46 ///////////////////////////////////////////////////////////////////////////////
48 #include "AliACORDEv0.h"
50 #include <TGeometry.h>
53 #include <TVirtualMC.h>
58 #include "AliACORDEConstants.h"
59 #include "AliACORDEModule.h"
63 //_____________________________________________________________________________
64 AliACORDEv0::AliACORDEv0()
68 // Default constructor
72 //_____________________________________________________________________________
73 AliACORDEv0::AliACORDEv0(const char *name, const char *title)
74 : AliACORDE(name, title)
77 // Standard constructor
81 <img src="picts/AliACORDEv0.gif">
84 //PH SetMarkerColor(kRed);
85 //PH SetMarkerStyle(kRed);
86 //PH SetMarkerSize(0.4);
89 //_____________________________________________________________________________
90 AliACORDEv0::~AliACORDEv0()
97 //_____________________________________________________________________________
98 void AliACORDEv0::BuildGeometry()
101 // Create the ROOT TNode geometry for the ACORDE
106 const Int_t kColorACORDE = kRed;
108 // Find the top node alice.
109 top = gAlice->GetGeometry()->GetNode("alice");
111 AliACORDEConstants* crtConstants = AliACORDEConstants::Instance();
113 new TBRIK("S_ACORDE_A", "ACORDE box", "void",
114 crtConstants->ActiveAreaLenght()/2.,
115 crtConstants->ActiveAreaHeight()/2.,
116 crtConstants->ActiveAreaWidth()/2.);
119 new TRotMatrix("Left", "Left", 90., 315., 90., 45., 0., 337.5);
120 new TRotMatrix("Right", "Right", 90., 45., 90., 315., 180., 202.5);
121 new TRotMatrix("Up", "Up", 90., 0., 90., 90., 0., 90.);
125 // Put 4 modules on the top of the magnet
126 Float_t box = crtConstants->CageWidth()/2.;
128 node = new TNode("upper1", "upper1", "S_ACORDE_A", 0., 790., 3.*box, "Up");
129 node->SetLineColor(kColorACORDE);
133 node = new TNode("upper2", "upper2", "S_ACORDE_A", 0., 790., box, "Up");
134 node->SetLineColor(kColorACORDE);
138 node = new TNode("upper3", "upper3", "S_ACORDE_A", 0., 790., -1.*box, "Up");
139 node->SetLineColor(kColorACORDE);
143 node = new TNode("upper4", "upper4", "S_ACORDE_A", 0., 790., -3.*box, "Up");
144 node->SetLineColor(kColorACORDE);
148 // Modules on the left side.
149 Float_t xtragap = 10.;
150 Float_t initXside = (790.+xtragap)*TMath::Sin(2*22.5*kDegrad); //rigth side
151 Float_t initYside = (790.+xtragap)*TMath::Cos(2*22.5*kDegrad);
153 node = new TNode("upper5", "upper5", "S_ACORDE_A", initXside, initYside, 3.*box, "Left");
154 node->SetLineColor(kColorACORDE);
158 node = new TNode("upper6", "upper6", "S_ACORDE_A", initXside, initYside, box, "Left");
159 node->SetLineColor(kColorACORDE);
163 node = new TNode("upper7", "upper7", "S_ACORDE_A", initXside, initYside, -1.*box, "Left");
164 node->SetLineColor(kColorACORDE);
168 node = new TNode("upper8", "upper8", "S_ACORDE_A", initXside, initYside, -3.*box, "Left");
169 node->SetLineColor(kColorACORDE);
173 // Modules on the right side.
175 node = new TNode("upper9", "upper9", "S_ACORDE_A", -initXside, initYside, 3.*box, "Right");
176 node->SetLineColor(kColorACORDE);
180 node = new TNode("upper10", "upper10", "S_ACORDE_A", -initXside, initYside, box, "Right");
181 node->SetLineColor(kColorACORDE);
185 node = new TNode("upper11","upper11", "S_ACORDE_A", -initXside, initYside, -1.*box, "Right");
186 node->SetLineColor(kColorACORDE);
190 node = new TNode("upper12","upper12", "S_ACORDE_A", -initXside, initYside, -3.*box, "Right");
191 node->SetLineColor(kColorACORDE);
196 //_____________________________________________________________________________
197 void AliACORDEv0::CreateGeometry()
200 // Create geometry for the ACORDE array
203 Int_t idrotm[2499]; // The rotation matrix.
204 Int_t* idtmed = fIdtmed->GetArray() - 1099;
205 AliACORDEConstants* crtConstants = AliACORDEConstants::Instance();
207 // Create the mother volume.
208 // This volume can be seen as the volume which ACORDE will ocupate
209 // above the upper face of the L3 magnet. Inside this volume the detectors
210 // aboce the magnet will be, then there will be two copies of this volume,
211 // one for each side.
213 //box[0] = 2*crtConstants->MagMinRadius()*TMath::Sin(kDegrad*22.5);
214 box[0] = crtConstants->MagMinRadius()*TMath::Sin(kDegrad*22.5);
215 box[1] = crtConstants->MagMaxRadius() - crtConstants->MagMinRadius();
216 box[2] = crtConstants->MagnetLenght()/2;
217 gMC->Gsvolu("ACORDE1", "BOX", idtmed[1112], box, 3);
219 // Check if the AliACORDEModule instance have been set, otherwise
220 // use the default values
222 Info("CreateGeometry", "Using default dimensions");
223 fModule = new AliACORDEModule("ACORDEmod", "Default module dimensions");
226 // The full module volume.
227 // This volume will be ocupied by all the material of the module
228 // the scintillators, the aluminium frame, etc.
229 box[0] = fModule->FrameLength()/2;
230 box[1] = fModule->FrameThickness()/2;
231 box[2] = fModule->FrameWidth()/2;
232 gMC->Gsvolu("ACORDE2", "BOX", idtmed[1114], box, 3);
235 box[0] = crtConstants->SinglePaletteLenght()/4;
236 box[1] = crtConstants->SinglePaletteHeight();
237 box[2] = crtConstants->SinglePaletteWidth()/2;
238 gMC->Gsvolu("ACORDE3", "BOX", idtmed[1112], box, 3);
239 gMC->Gspos("ACORDE3", 1, "ACORDE2", 0, 2, 0, 0, "ONLY");
241 // The metallic frame
242 box[0] = fModule->FrameLength()/2;
243 box[1] = fModule->FrameThickness()/2;
245 gMC->Gsvolu("ACORDE4", "BOX", idtmed[1108], box, 3);
246 gMC->Gspos("ACORDE4", 1, "ACORDE2", 0, 0, 13 - box[2], 0, "MANY");
247 gMC->Gspos("ACORDE4", 2, "ACORDE2", 0, 0, -13 + box[2], 0, "MANY");
250 box[1] = fModule->FrameThickness()/2;
251 box[2] = fModule->FrameWidth()/2;
252 gMC->Gsvolu("ACORDE5", "BOX", idtmed[1108], box, 3);
253 gMC->Gspos("ACORDE5", 1, "ACORDE2", 140 - box[0], 0, 0, 0, "MANY");
254 gMC->Gspos("ACORDE5", 2, "ACORDE2", -140 + box[0], 0, 0, 0, "MANY");
258 box[1] = fModule->FrameThickness()/2;
260 gMC->Gsvolu("ACORDE6", "BOX", idtmed[1108], box, 3);
262 // Now put into the volume CR11 all the above volumes.
263 // 20 scintillation modules
265 Int_t copyNumber = 0;
266 for ( Int_t k = 0; k < fModule->NumberOfRows(); k++ ) {
267 Float_t zCoordinate = k*fModule->ZGap() - 450;
268 gMC->Gspos("ACORDE2",++copyNumber,"ACORDE1",-150, 15, zCoordinate, 0, "MANY");
269 gMC->Gspos("ACORDE2",++copyNumber,"ACORDE1",150, 15, zCoordinate, 0, "MANY");
273 // Put the support bars
274 gMC->Gspos("ACORDE6", 1, "ACORDE1", -75, 5, 0, 0, "ONLY");
275 gMC->Gspos("ACORDE6", 2, "ACORDE1", -225, 5, 0, 0, "ONLY");
276 gMC->Gspos("ACORDE6", 3, "ACORDE1", 75, 5, 0, 0, "ONLY");
277 gMC->Gspos("ACORDE6", 4, "ACORDE1", 225, 5, 0, 0, "ONLY");
279 // Now put a copy of CR11 on the 3 upper faces of the magnet
280 // In the right side side of the magnet
281 AliMatrix(idrotm[231], 90, 45, 90, 135, 0, 0);
282 // In the left side side of the magnet
283 AliMatrix(idrotm[232], 90, 315, 90, 45, 0, 0);
285 Float_t x = crtConstants->MagMinRadius()+10;
286 gMC->Gspos("ACORDE1", 1, "ALIC", 0, x, 0, 0, "MANY");
287 gMC->Gspos("ACORDE1", 2, "ALIC", -x*TMath::Sin(kDegrad*45), x*TMath::Cos(kDegrad*45), 0, idrotm[231], "MANY");
288 gMC->Gspos("ACORDE1", 3, "ALIC", x*TMath::Sin(kDegrad*45), x*TMath::Cos(kDegrad*45), 0, idrotm[232], "MANY");
292 //_____________________________________________________________________________
293 void AliACORDEv0::DrawDetector() const
296 // Draw a shaded view of the L3 magnet
299 Info("DrawDetector", "Drawing the module");
301 gMC->Gsatt("*", "seen", -1);
303 gMC->Gsatt("ALIC","seen",0);
305 gMC->Gsatt("L3MO","seen",0); // L3 Magnet, Mother
306 gMC->Gsatt("L3CO","seen",1); // Coils
307 gMC->Gsatt("L3C1","seen",1); // Coils
308 gMC->Gsatt("L3YO","seen",1); // Yoke
309 gMC->Gsatt("L3DO","seen",0); // return Yoke (DOOR)
310 gMC->Gsatt("L3FR","seen",1); // DOOR
311 gMC->Gsatt("L3IR","seen",0); // Inner layer
312 gMC->Gsatt("L3O1","seen",1); // Door opening
313 gMC->Gsatt("L3O2","seen",1); // Door opening
315 gMC->Gsatt("ACORDE1", "seen", 0); // ACORDE Mother
316 gMC->Gsatt("ACORDE2", "seen", 0); // Module air box
317 gMC->Gsatt("ACORDE3", "seen", 1); // Scintillators
318 gMC->Gsatt("ACORDE3", "colo", 2); // Scintillators
319 gMC->Gsatt("ACORDE4", "seen", 1); // Aluminium frame (long bars)
320 gMC->Gsatt("ACORDE4", "colo", 3); //
321 gMC->Gsatt("ACORDE5", "seen", 1); // Aluminium frame (short bars)
322 gMC->Gsatt("ACORDE5", "colo", 3); //
323 gMC->Gsatt("ACORDE6", "seen", 1); // Module support
324 gMC->Gsatt("ACORDE6", "colo", 3); //
326 gMC->Gdopt("hide", "on");
327 gMC->Gdopt("edge","off");
328 gMC->Gdopt("shad", "on");
329 gMC->Gsatt("*", "fill", 7);
330 gMC->SetClipBox("ALIC", 0, 3000, -3000, 3000, -6000, 6000);
332 //gMC->Gdraw("alic", 40, 30, 0, 10, 9.5, .009, .009);
333 gMC->Gdraw("alic", 30, 40, 0, -30, -60, .09, .09);
334 gMC->Gdhead(1111, "View of ACORDE(ACORDE)");
335 gMC->Gdman(18, 4, "MAN");