SND@LHC Software
Loading...
Searching...
No Matches
ShipChamber.cxx
Go to the documentation of this file.
1#include "ShipChamber.h"
2
3#include "TGeoManager.h"
4#include "FairRun.h" // for FairRun
5#include "FairRuntimeDb.h" // for FairRuntimeDb
6#include <iosfwd> // for ostream
7#include "TList.h" // for TListIter, TList (ptr only)
8#include "TObjArray.h" // for TObjArray
9#include "TString.h" // for TString
10#include "TGeoBBox.h"
11#include "TGeoCompositeShape.h"
12#include "FairGeoMedia.h"
13#include "FairGeoBuilder.h"
14#include "TGeoTube.h"
15#include "TGeoMaterial.h"
16#include "TGeoMedium.h"
17#include <stddef.h> // for NULL
18#include <iostream> // for operator<<, basic_ostream, etc
19
20
21
26 : FairModule("ShipChamber", "")
27{
28}
29
30ShipChamber::ShipChamber(const char* name, const char* Title)
31 : FairModule(name ,Title)
32{
33}
34// ----- Private method InitMedium
35Int_t ShipChamber::InitMedium(const char* name)
36{
37 static FairGeoLoader *geoLoad=FairGeoLoader::Instance();
38 static FairGeoInterface *geoFace=geoLoad->getGeoInterface();
39 static FairGeoMedia *media=geoFace->getMedia();
40 static FairGeoBuilder *geoBuild=geoLoad->getGeoBuilder();
41
42 FairGeoMedium *ShipMedium=media->getMedium(name);
43
44 if (!ShipMedium)
45 {
46 Fatal("InitMedium","Material %s not defined in media file.", name);
47 return -1111;
48 }
49 TGeoMedium* medium=gGeoManager->GetMedium(name);
50 if (medium!=NULL)
51 return ShipMedium->getMediumIndex();
52 return geoBuild->createMedium(ShipMedium);
53}
55{
56
57 TGeoVolume *top=gGeoManager->GetTopVolume();
58 InitMedium("Aluminum");
59 TGeoMedium *Al =gGeoManager->GetMedium("Aluminum");
60 // first part of vacuum chamber up to veto station
61 TGeoVolume *tub1 = gGeoManager->MakeTube("tub1", Al, 245, 250, 50);
62 tub1->SetLineColor(18); // silver/gray
63 top->AddNode(tub1, 1, new TGeoTranslation(0, 0, -2450));
64
65
66 // second part of vacuum chamber up to first tracking station
67 TGeoVolume *tub2 = gGeoManager->MakeTube("tub2", Al, 245, 250, 3880/2); // 1890
68 tub2->SetLineColor(18);
69 top->AddNode(tub2, 1, new TGeoTranslation(0, 0, -440));
70
71
72 // third part of vacuum chamber up to second tracking station
73 TGeoVolume *tub3 = gGeoManager->MakeTube("tub3", Al, 245, 250, 80);
74 tub3->SetLineColor(18);
75 top->AddNode(tub3, 1, new TGeoTranslation(0, 0, 1620));
76
77 // fourth part of vacuum chamber up to third tracking station and being covered by magnet
78 TGeoVolume *tub4 = gGeoManager->MakeTube("tub4", Al, 245, 250, 200);
79 tub4->SetLineColor(18);
80 top->AddNode(tub4, 1, new TGeoTranslation(0, 0, 1940));
81
82 // fifth part of vacuum chamber up to fourth tracking station
83 TGeoVolume *tub5 = gGeoManager->MakeTube("tub5", Al, 245, 250, 90);
84 tub5->SetLineColor(18);
85 top->AddNode(tub5, 1, new TGeoTranslation(0, 0, 2270));
86
87 // sixth part of vacuum chamber up to muon detector
88 TGeoVolume *tub6 = gGeoManager->MakeTube("tub6", Al, 245, 250, 20);
89 tub6->SetLineColor(18);
90 top->AddNode(tub6, 1, new TGeoTranslation(0, 0, 2540));
91
92
93
94}
95
96
97
99
100
101
102
103
104
105
106
107
108
109
110
111
112
void ConstructGeometry()
virtual ~ShipChamber()
ClassImp(ecalContFact) ecalContFact