FairRoot/PandaRoot
Public Member Functions | List of all members
PndPipe Class Reference

#include <PndPipe.h>

Inheritance diagram for PndPipe:

Public Member Functions

 PndPipe (const char *name, const char *Title="PND Pipe")
 
 PndPipe ()
 
virtual ~PndPipe ()
 
virtual void ConstructGeometry ()
 
Bool_t CheckIfSensitive (std::string name)
 

Detailed Description

Definition at line 11 of file PndPipe.h.

Constructor & Destructor Documentation

PndPipe::PndPipe ( const char *  name,
const char *  Title = "PND Pipe" 
)

Definition at line 27 of file PndPipe.cxx.

28  : FairModule(name ,title)
29 {
30 }
TString name
PndPipe::PndPipe ( )

Definition at line 23 of file PndPipe.cxx.

24 {
25 }
PndPipe::~PndPipe ( )
virtual

Definition at line 19 of file PndPipe.cxx.

20 {
21 }

Member Function Documentation

Bool_t PndPipe::CheckIfSensitive ( std::string  name)

Definition at line 32 of file PndPipe.cxx.

32  {
33  // just to get rid of the warrning during run, not need this is a passive element!
34  (void)name; // to remove "unused" warnings
35  return kFALSE;
36 }
TString name
void PndPipe::ConstructGeometry ( )
virtual

Definition at line 38 of file PndPipe.cxx.

References cave, Double_t, gGeoManager, r1, rot, and TString.

38  {
39 
40  TString fileName=GetGeometryFileName();
41  if (fileName.EndsWith(".root")) {
42  std::cout<< "<I> PndPipe - Using geometry " << fileName <<std::endl;
43  ConstructRootGeometry();
44  } else if (fileName.EndsWith(".geo")) {
45  std::cout<< "<I> PndPipe - Using geometry " << fileName <<std::endl;
46  ConstructASCIIGeometry();
47  } else {
48  std::cout<< "<I> PndPipe - Using default geometry" <<std::endl;
49 
50  //FairRun *fRun = FairRun::Instance();
51  //FairRuntimeDb *rtdb= fRun->GetRuntimeDb();
52  //PndGeoPassivePar* par=(PndGeoPassivePar*)(rtdb->getContainer("PndGeoPassivePar"));
53 
54  //FairGeoLoader *loader=FairGeoLoader::Instance();
55  //FairGeoInterface *GeoInterface =loader->getGeoInterface();
56  //FairGeoMedia *Media = GeoInterface->getMedia();
57  //FairGeoBuilder *geobuild = loader->getGeoBuilder();
58 
59  // Call materials
60  //FairGeoMedium *medVacuum = Media->getMedium("vacuum");
61  //FairGeoMedium *medSteel = Media->getMedium("steel");
62  //FairGeoMedium *medAlBe = Media->getMedium("Al+Be");
63 
64  //Int_t nMedVacuum = geobuild->createMedium(medVacuum);
65  //Int_t nMedSteel = geobuild->createMedium(medSteel);
66  //Int_t nMedAlBe = geobuild->createMedium(medAlBe);
67 
68  Double_t parPipeLeft[9] = { 0., 360., 2,
69  -200., 7.9, 8.,
70  -32., 7.9, 8.};
71 
72  // The central part is totally filled because of the crossing operations
73  Double_t parPipeCentral[12] = { 0., 360., 3,
74  -32., 0., 8.,
75  -2., 0., .9,
76  23., 0., .9};
77 
78  Double_t parPipeRight[18] = { 0., 360., 5,
79  23., .8873, .9,
80  25., 2.073, 2.1,
81  120., 2.05, 2.1,
82  300.1, 2.85, 2.9,
83  1050., 5.4, 5.5};
84 
85  Double_t parPipeVacuumLeft[9] = { 0., 360., 2,
86  -200., 0., 7.9,
87  -32., 0., 7.9 };
88 
89  Double_t parPipeVacuumCentral[12] = { 0., 360., 3,
90  -32., 0., 7.9,
91  -2., 0., .873,
92  23., 0., .873};
93 
94  Double_t parPipeVacuumRight[18] = { 0., 360., 5,
95  23., 0., .873,
96  25., 0., 2.073,
97  120., 0., 2.05,
98  300.1, 0., 2.85,
99  1050., 0., 5.4};
100 
101 
102  Double_t parPipeTargetDown[27] = { 0., 360., 8,
103  -215., 17.4, 17.5,
104  -183., 17.4, 17.5,
105  -173., 4.5, 4.6,
106  -96., 4.5, 4.6,
107  -95., 2.4, 2.5,
108  -55., 2.4, 2.5,
109  -54., 2.056, 2.1,
110  -15., 1.067, 1.1,};
111 
112  Double_t parPipeTargetCentral[9] = { 0., 360., 2,
113  -15., 0., 1.1,
114  15., 0., 1.1,};
115 
116  Double_t parPipeTargetUp[27] = { 0., 360., 8,
117  15., 1.067, 1.1,
118  54., 2.056, 2.1,
119  55., 2.4, 2.5,
120  95., 2.4, 2.5,
121  96., 4.5, 4.6,
122  145., 4.5, 4.6,
123  155., 14.4, 14.5,
124  215., 14.4, 14.5};
125 
126  Double_t parPipeVacuumTargetDown[27] = { 0., 360., 8,
127  -215., 0., 17.4,
128  -183., 0., 17.4,
129  -173., 0., 4.5,
130  -96., 0., 4.5,
131  -95., 0., 2.4,
132  -55., 0., 2.4,
133  -54., 0., 2.056,
134  -15., 0., 1.067};
135 
136  Double_t parPipeVacuumTargetCentral[9] = { 0., 360., 2,
137  -15., 0., 1.067,
138  15., 0., 1.067,};
139 
140  Double_t parPipeVacuumTargetUp[27] = { 0., 360., 8,
141  15., 0., 1.067,
142  54., 0., 2.056,
143  55., 0., 2.4,
144  95., 0., 2.4,
145  96., 0., 4.5,
146  145., 0., 4.5,
147  155., 0., 14.4,
148  215., 0., 14.4};
149 
150  TGeoPcon *pipeLeft = new TGeoPcon(parPipeLeft);
151  TGeoPcon *pipeCentral = new TGeoPcon(parPipeCentral);pipeCentral->SetName("PIPE_CN");
152  TGeoPcon *pipeRight = new TGeoPcon(parPipeRight);
153  TGeoPcon *pipeTargetDown = new TGeoPcon(parPipeTargetDown);
154  TGeoPcon *pipeTargetCentral = new TGeoPcon(parPipeTargetCentral); pipeTargetCentral->SetName("TRG_CN");
155  TGeoPcon *pipeTargetUp = new TGeoPcon(parPipeTargetUp);
156 
157  TGeoPcon *pipeVacuumLeft = new TGeoPcon(parPipeVacuumLeft);
158  TGeoPcon *pipeVacuumCentral = new TGeoPcon(parPipeVacuumCentral); pipeVacuumCentral->SetName("PIPEV_CN");
159  TGeoPcon *pipeVacuumRight = new TGeoPcon(parPipeVacuumRight);
160  TGeoPcon *pipeVacuumTargetDown = new TGeoPcon(parPipeVacuumTargetDown);
161  TGeoPcon *pipeVacuumTargetCentral = new TGeoPcon(parPipeVacuumTargetCentral); pipeVacuumTargetCentral->SetName("TRGV_CN");
162  TGeoPcon *pipeVacuumTargetUp = new TGeoPcon(parPipeVacuumTargetUp);
163 
164  TGeoRotation *r1 = new TGeoRotation("r1");
165  r1->RotateX(90.);
166  r1->RegisterYourself();
167 
168  TGeoCompositeShape *pipeCross = new TGeoCompositeShape("pipeCross", "(PIPE_CN+TRG_CN:r1) - (PIPEV_CN+TRGV_CN:r1)");
169  TGeoCompositeShape *pipeVacuumCross = new TGeoCompositeShape("pipeVacuumCross", "PIPEV_CN+TRGV_CN:r1");
170 
171 
172  TGeoVolume *volPipeLeft = new TGeoVolume("PipeLeft", pipeLeft, gGeoManager->GetMedium("steel"));
173  TGeoVolume *volPipeCross = new TGeoVolume("PipeCross", pipeCross, gGeoManager->GetMedium("Al+Be"));
174  TGeoVolume *volPipeRight = new TGeoVolume("PipeRight", pipeRight, gGeoManager->GetMedium("steel"));
175  TGeoVolume *volPipeTargetUp = new TGeoVolume("PipeTargetUp", pipeTargetUp, gGeoManager->GetMedium("steel"));
176  TGeoVolume *volPipeTargetDown = new TGeoVolume("PipeTargetDown", pipeTargetDown, gGeoManager->GetMedium("steel"));
177 
178  TGeoVolume *volPipeVacuumLeft = new TGeoVolume("PipeVacuumLeft", pipeVacuumLeft, gGeoManager->GetMedium("vacuum"));
179  TGeoVolume *volPipeVacuumCross = new TGeoVolume("PipeVacuumCross", pipeVacuumCross, gGeoManager->GetMedium("vacuum"));
180  TGeoVolume *volPipeVacuumRight = new TGeoVolume("PipeVacuumRight", pipeVacuumRight, gGeoManager->GetMedium("vacuum"));
181  TGeoVolume *volPipeVacuumTargetUp = new TGeoVolume("PipeVacuumTargetUp", pipeVacuumTargetUp, gGeoManager->GetMedium("vacuum"));
182  TGeoVolume *volPipeVacuumTargetDown = new TGeoVolume("PipeVacuumTargetDown", pipeVacuumTargetDown, gGeoManager->GetMedium("vacuum"));
183 
184  TGeoRotation rot;
185  rot.RotateX(90.);
186 
187  TGeoVolume *beamPipe = new TGeoVolumeAssembly("BeamPipe");
188  beamPipe->AddNode(volPipeLeft, 0);
189  beamPipe->AddNode(volPipeRight, 0);
190  beamPipe->AddNode(volPipeVacuumLeft, 0);
191  beamPipe->AddNode(volPipeVacuumRight, 0);
192  beamPipe->AddNode(volPipeTargetUp, 0, new TGeoRotation(rot));
193  beamPipe->AddNode(volPipeTargetDown, 0, new TGeoRotation(rot));
194  beamPipe->AddNode(volPipeVacuumTargetUp, 0, new TGeoRotation(rot));
195  beamPipe->AddNode(volPipeVacuumTargetDown, 0, new TGeoRotation(rot));
196  beamPipe->AddNode(volPipeCross, 0);
197  beamPipe->AddNode(volPipeVacuumCross, 0);
198 
199  TGeoVolume *cave = gGeoManager->GetTopVolume();
200  cave->AddNode(beamPipe, 1);
201 
202  }
203 
204 }
double r1
TGeoManager * gGeoManager
#define cave
Definition: createSTT.C:62
Double_t
TGeoRotation rot

The documentation for this class was generated from the following files: