Skip to content

Commit bb279fd

Browse files
committed
Big update due to missing an OR in the all.sh
This gets rid of the problme of stuff in most of the ESS bemaline
1 parent 5e5deea commit bb279fd

38 files changed

+437
-385
lines changed

Model/ESSBeam/beer/BEER.cxx

+9-6
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
44
* File: ESSBeam/beer/BEER.cxx
55
*
6-
* Copyright (c) 2004-2022 by Stuart Ansell
6+
* Copyright (c) 2004-2023 by Stuart Ansell
77
*
88
* This program is free software: you can redistribute it and/or modify
99
* it under the terms of the GNU General Public License as published by
@@ -93,6 +93,7 @@ namespace essSystem
9393

9494
BEER::BEER(const std::string& keyName) :
9595
attachSystem::CopiedComp("beer",keyName),
96+
attachSystem::ExternalCut(), // extra for target cut
9697
stopPoint(0),
9798
beerAxis(new attachSystem::FixedRotateUnit(newName+"Axis",4)),
9899

@@ -484,21 +485,23 @@ BEER::build(Simulation& System,
484485
*/
485486
{
486487
ELog::RegMethod RegA("BEER","build");
487-
488-
489488

490489
const FuncDataBase& Control=System.getDataBase();
491490
CopiedComp::process(System.getDataBase());
492491
stopPoint=Control.EvalDefVar<int>(newName+"StopPoint",0);
493492

494-
ELog::EM<<"GItem == "<<GItem.getKey("Beam").getLinkPt(-1)
495-
<<ELog::endDiag;
496493
essBeamSystem::setBeamAxis(*beerAxis,Control,GItem,1);
497-
494+
498495
BendA->addInsertCell(GItem.getCells("Void"));
499496
BendA->setFront(GItem.getKey("Beam"),-1);
500497
BendA->setBack(GItem.getKey("Beam"),-2);
501498
BendA->createAll(System,*beerAxis,-3);
499+
// wheel cuts outer guide void !!!!!!!!!
500+
if (isActive("wheel") && BendA->hasCell("Layer2"))
501+
BendA->insertComponent(System,"Layer2",getComplementRule("wheel"));
502+
503+
// NOTE: Beer intersects the target void !!!!!
504+
502505
ELog::EM<<"BeerAxis == "<<beerAxis->getLinkAxis(-3)<<ELog::endDiag;
503506
if (stopPoint==1) return; // STOP At monolith
504507
// edge

Model/ESSBeam/beer/BEERvariables.cxx

+5-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
44
* File: ESSBeam/beer/BEERvariables.cxx
55
*
6-
* Copyright (c) 2004-2017 by Stuart Ansell
6+
* Copyright (c) 2004-2023 by Stuart Ansell
77
*
88
* This program is free software: you can redistribute it and/or modify
99
* it under the terms of the GNU General Public License as published by
@@ -43,6 +43,7 @@
4343
#include "varList.h"
4444
#include "FuncDataBase.h"
4545

46+
#include "CFFlanges.h"
4647
#include "FocusGenerator.h"
4748
#include "ShieldGenerator.h"
4849
#include "ChopperGenerator.h"
@@ -151,9 +152,8 @@ BEERvariables(FuncDataBase& Control)
151152
SGen.addRoofMat(5,"Concrete");
152153
SGen.addWallMat(5,"Concrete");
153154

154-
PipeGen.setPipe(12.0,0.8);
155-
PipeGen.setWindow(-2.0,0.8);
156-
PipeGen.setFlange(-4.0,1.0);
155+
PipeGen.setCF<CF250>();
156+
PipeGen.setNoWindow();
157157

158158
// setVariable::ShieldGenerator SGen;
159159
// extent of beamline
@@ -200,6 +200,7 @@ BEERvariables(FuncDataBase& Control)
200200
BGen.addPhase({95,275},{30.0,30.0});
201201
BGen.generateBlades(Control,"beerWFMBlade",0.0,40.0,75.0);
202202

203+
PipeGen.setCF<CF300>();
203204
PipeGen.generatePipe(Control,"beerPipeD",125.0);
204205
Control.addVariable("beerPipeDYStep",4.0);
205206
FGen.generateBender(Control,"beerBD",121.0,4.0,4.0,20.0,16.0,

Model/ESSBeam/beerInc/BEER.h

+5-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
44
* File: ESSBeam/beer/BEER.h
55
*
6-
* Copyright (c) 2004-2022 by Stuart Ansell
6+
* Copyright (c) 2004-2023 by Stuart Ansell
77
*
88
* This program is free software: you can redistribute it and/or modify
99
* it under the terms of the GNU General Public License as published by
@@ -75,7 +75,10 @@ namespace essSystem
7575
\brief BEER beamline constructor for the ESS
7676
*/
7777

78-
class BEER : public attachSystem::CopiedComp
78+
class BEER :
79+
public attachSystem::CopiedComp,
80+
public attachSystem::ExternalCut
81+
7982
{
8083
private:
8184

Model/ESSBeam/bifrost/BIFROSTvariables.cxx

+22-28
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
44
* File: ESSBeam/bifrost/BIFROSTvariables.cxx
55
*
6-
* Copyright (c) 2004-2022 by Stuart Ansell
6+
* Copyright (c) 2004-2023 by Stuart Ansell
77
*
88
* This program is free software: you can redistribute it and/or modify
99
* it under the terms of the GNU General Public License as published by
@@ -42,6 +42,8 @@
4242
#include "Code.h"
4343
#include "varList.h"
4444
#include "FuncDataBase.h"
45+
#include "CFFlanges.h"
46+
4547
#include "FocusGenerator.h"
4648
#include "ShieldGenerator.h"
4749
#include "ChopperGenerator.h"
@@ -70,8 +72,8 @@ BIFROSTvariables(FuncDataBase& Control)
7072
setVariable::BladeGenerator BGen;
7173

7274
PipeGen.setPipe(8.0,0.5);
73-
PipeGen.setWindow(-2.0,0.5);
74-
PipeGen.setFlange(-4.0,1.0);
75+
PipeGen.setNoWindow();
76+
PipeGen.setFlange(12.0,1.0);
7577

7678
SGen.addWall(1,20.0,"CastIron");
7779
SGen.addRoof(1,20.0,"CastIron");
@@ -124,9 +126,8 @@ BIFROSTvariables(FuncDataBase& Control)
124126
BGen.generateBlades(Control,"bifrostDBlade",0.0,20.0,35.0);
125127

126128
// VACUUM PIPE: SDisk to T0 (A)
127-
PipeGen.setPipe(12.0,0.5);
128-
PipeGen.setWindow(-2.0,0.5);
129-
PipeGen.setFlange(-4.0,1.0);
129+
PipeGen.setCF<CF250>();
130+
PipeGen.setNoWindow();
130131
PipeGen.generatePipe(Control,"bifrostPipeC",400.0);
131132
Control.addVariable("bifrostPipeCYStep",2.0);
132133
Control.addVariable("bifrostPipeCNDivision",1);
@@ -145,19 +146,17 @@ BIFROSTvariables(FuncDataBase& Control)
145146
BGen.generateBlades(Control,"bifrostFOC1Blade",0.0,20.0,35.0);
146147

147148
// VACUUM PIPE: from ChoperB to 6m holding point
148-
PipeGen.setPipe(12.0,0.5);
149-
PipeGen.setWindow(-2.0,0.5);
150-
PipeGen.setFlange(-4.0,1.0);
149+
PipeGen.setCF<CF250>();
150+
PipeGen.setNoWindow();
151151
PipeGen.generatePipe(Control,"bifrostPipeD",500.0);
152152
Control.addVariable("bifrostPipeDYStep",2.0);
153153

154154
FGen.clearYOffset();
155155
FGen.generateRectangle(Control,"bifrostFD",496.0, 13.0,13.0);
156156

157157
// VACUUM PIPE: from ChoperB to 6m holding point
158-
PipeGen.setPipe(12.0,0.5);
159-
PipeGen.setWindow(-2.0,0.5);
160-
PipeGen.setFlange(-4.0,1.0);
158+
PipeGen.setCF<CF250>();
159+
PipeGen.setNoWindow();
161160
PipeGen.generatePipe(Control,"bifrostPipeE",400.0);
162161
Control.addVariable("bifrostPipeEYStep",2.0);
163162

@@ -174,9 +173,8 @@ BIFROSTvariables(FuncDataBase& Control)
174173
BGen.generateBlades(Control,"bifrostFOC2Blade",0.0,20.0,35.0);
175174

176175
// VACUUM PIPE: from ChoperC with 4m
177-
PipeGen.setPipe(12.0,0.5);
178-
PipeGen.setWindow(-2.0,0.5);
179-
PipeGen.setFlange(-4.0,1.0);
176+
PipeGen.setCF<CF250>();
177+
PipeGen.setNoWindow();
180178
PipeGen.generatePipe(Control,"bifrostPipeF",481.5);
181179
Control.addVariable("bifrostPipeFYStep",2.0);
182180

@@ -222,8 +220,8 @@ BIFROSTvariables(FuncDataBase& Control)
222220

223221
// VACUUM PIPE: in bunker wall
224222
PipeGen.setPipe(6.0,0.5);
225-
PipeGen.setWindow(-2.0,0.5);
226-
PipeGen.setFlange(-4.0,1.0);
223+
PipeGen.setNoWindow();
224+
PipeGen.setFlange(10.0,1.0);
227225
PipeGen.generatePipe(Control,"bifrostPipeWall",348.0);
228226
Control.addVariable("bifrostPipeWallYStep",1.0);
229227
// Guide in wall
@@ -236,9 +234,8 @@ BIFROSTvariables(FuncDataBase& Control)
236234
SGen.generateShield(Control,"bifrostShieldA",6500.0,40.0,40.0,40.0,4,8);
237235
Control.addVariable("bifrostShieldAYStep",-4.0);
238236
// VACUUM PIPE: leaving bunker
239-
PipeGen.setPipe(6.0,0.5);
240-
PipeGen.setWindow(-2.0,0.5);
241-
PipeGen.setFlange(-4.0,1.0);
237+
PipeGen.setCF<CF150>();
238+
PipeGen.setNoWindow();
242239
PipeGen.generatePipe(Control,"bifrostPipeOutA",600);
243240
Control.addVariable("bifrostPipeOutAYStep",4.0);
244241

@@ -247,9 +244,7 @@ BIFROSTvariables(FuncDataBase& Control)
247244
FGen.generateTaper(Control,"bifrostFOutA",596.0,5.232,5.84, 5.232,5.84);
248245

249246
// Second vacuum pipe out of bunker [before chopper pit]
250-
PipeGen.setPipe(6.0,0.5);
251-
PipeGen.setWindow(-2.0,0.5);
252-
PipeGen.setFlange(-4.0,1.0);
247+
PipeGen.setCF<CF250>();
253248
PipeGen.generatePipe(Control,"bifrostPipeOutB",600);
254249
Control.addVariable("bifrostPipeOutBYStep",4.0);
255250

@@ -259,9 +254,8 @@ BIFROSTvariables(FuncDataBase& Control)
259254
FGen.generateTaper(Control,"bifrostFOutB",596.0,5.84,7.04, 5.84,7.04);
260255

261256
// Second vacuum pipe out of bunker [before chopper pit]
262-
PipeGen.setPipe(7.0,0.5);
263-
PipeGen.setWindow(-2.0,0.5);
264-
PipeGen.setFlange(-4.0,1.0);
257+
PipeGen.setCF<CF250>();
258+
PipeGen.setNoWindow();
265259
PipeGen.generatePipe(Control,"bifrostPipeOutC",480.0);
266260
Control.addVariable("bifrostPipeOutCYStep",4.0);
267261

@@ -357,8 +351,8 @@ BIFROSTvariables(FuncDataBase& Control)
357351

358352
// Second vacuum pipe out of bunker [before chopper pit]
359353
PipeGen.setPipe(6.0,0.5);
360-
PipeGen.setWindow(-2.0,0.5);
361-
PipeGen.setFlange(-4.0,1.0);
354+
PipeGen.setNoWindow();
355+
PipeGen.setFlange(10.0,1.0);
362356
PipeGen.generatePipe(Control,"bifrostPipeCave",250.0);
363357
Control.addVariable("bifrostPipeCaveYStep",2.0);
364358

Model/ESSBeam/cspec/CSPECvariables.cxx

+4-2
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,9 @@ CSPECvariables(FuncDataBase& Control)
7272
setVariable::BladeGenerator BGen;
7373
setVariable::TwinGenerator TGen;
7474

75+
PipeGen.setCF<CF250>();
7576
PipeGen.setNoWindow();
76-
PipeGen.setCF<CF200>();
77+
7778

7879
// extent of beamline
7980
Control.addVariable("cspecStopPoint",0);
@@ -90,9 +91,10 @@ CSPECvariables(FuncDataBase& Control)
9091
FGen.clearYOffset();
9192
FGen.generateRectangle(Control,"cspecFB",44.0, 10.6,14.8);
9293

94+
9395
PipeGen.generatePipe(Control,"cspecPipeC",1260.0);
9496
Control.addVariable("cspecPipeCYStep",4.0);
95-
FGen.generateRectangle(Control,"cspecFC",1256.0, 10.6,14.8);
97+
FGen.generateRectangle(Control,"cspecFC",1256.0,10.6,14.8);
9698

9799
CGen.setMainRadius(38.122); // diameter 70.0 internal
98100
CGen.setFrame(86.5,86.5);

Model/ESSBeam/dream/DREAMvariables.cxx

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
44
* File: ESSBeam/dream/DREAMvariables.cxx
55
*
6-
* Copyright (c) 2004-2022 by Stuart Ansell
6+
* Copyright (c) 2004-2023 by Stuart Ansell
77
*
88
* This program is free software: you can redistribute it and/or modify
99
* it under the terms of the GNU General Public License as published by
@@ -237,7 +237,7 @@ DREAMvariables(FuncDataBase& Control)
237237
FGen.generateOctagon(Control,"dreamFOutC",1183.0,5.86,4.34);
238238

239239
PipeGen.setWindowMat("Void");
240-
PipeGen.setWindow(-2.0,0.0);
240+
PipeGen.setNoWindow();
241241
// Part of Guide Section 4 inside Cave
242242
PipeGen.generatePipe(Control,"dreamPipeCaveA",516.36);
243243
Control.addVariable("dreamPipeCaveAYStep",0.0);

Model/ESSBeam/freia/FREIA.cxx

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
44
* File: ESSBeam/freia/FREIA.cxx
55
*
6-
* Copyright (c) 2004-2022 by Stuart Ansell
6+
* Copyright (c) 2004-2023 by Stuart Ansell
77
*
88
* This program is free software: you can redistribute it and/or modify
99
* it under the terms of the GNU General Public License as published by

Model/ESSBeam/freia/FREIAvariables.cxx

+5-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
44
* File: ESSBeam/freia/FREIAvariables.cxx
55
*
6-
* Copyright (c) 2004-2017 by Stuart Ansell
6+
* Copyright (c) 2004-2023 by Stuart Ansell
77
*
88
* This program is free software: you can redistribute it and/or modify
99
* it under the terms of the GNU General Public License as published by
@@ -42,6 +42,8 @@
4242
#include "Code.h"
4343
#include "varList.h"
4444
#include "FuncDataBase.h"
45+
#include "CFFlanges.h"
46+
4547
#include "FocusGenerator.h"
4648
#include "ShieldGenerator.h"
4749
#include "ChopperGenerator.h"
@@ -77,9 +79,8 @@ FREIAvariables(FuncDataBase& Control)
7779
SGen.addRoofMat(5,"Concrete");
7880
SGen.addWallMat(5,"Concrete");
7981

80-
PipeGen.setPipe(12.0,0.5);
81-
PipeGen.setWindow(-2.0,0.3);
82-
PipeGen.setFlange(-4.0,1.0);
82+
PipeGen.setCF<CF250>();
83+
PipeGen.setNoWindow();
8384

8485
// setVariable::ShieldGenerator SGen;
8586
// extent of beamline

Model/ESSBeam/loki/LOKIvariables.cxx

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
44
* File: ESSBeam/loki/LOKIvariables.cxx
55
*
6-
* Copyright (c) 2004-2022 by Stuart Ansell
6+
* Copyright (c) 2004-2023 by Stuart Ansell
77
*
88
* This program is free software: you can redistribute it and/or modify
99
* it under the terms of the GNU General Public License as published by
@@ -130,8 +130,8 @@ LOKIvariables(FuncDataBase& Control)
130130

131131
// Guide from First chopper to Wall
132132
PipeGen.setPipe(5.0,0.8); // Rad / thick
133-
PipeGen.setWindow(-2.0,0.8); // window offset/ thick
134-
PipeGen.setFlange(-4.0,1.0);
133+
PipeGen.setNoWindow();
134+
PipeGen.setFlange(9.0,1.0);
135135
PipeGen.generatePipe(Control,"lokiPipeC",487.0);
136136
Control.addVariable("lokiPipeCYStep",1.0);
137137
FGen.generateRectangle(Control,"lokiFC",484.0,2.5,3.0);

Model/ESSBeam/miracles/MIRACLES.cxx

+7-6
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
44
* File: ESSBeam/miracles/MIRACLES.cxx
55
*
6-
* Copyright (c) 2004-2022 by Stuart Ansell
6+
* Copyright (c) 2004-2023 by Stuart Ansell
77
*
88
* This program is free software: you can redistribute it and/or modify
99
* it under the terms of the GNU General Public License as published by
@@ -79,6 +79,7 @@
7979
#include "DiskChopper.h"
8080
#include "GeneralPipe.h"
8181
#include "VacuumPipe.h"
82+
#include "RectanglePipe.h"
8283
#include "Bunker.h"
8384
#include "BunkerInsert.h"
8485
#include "SingleChopper.h"
@@ -110,23 +111,23 @@ MIRACLES::MIRACLES(const std::string& keyName) :
110111

111112
VPipeD(new constructSystem::VacuumPipe(newName+"PipeD")),
112113
FocusD(new beamlineSystem::PlateUnit(newName+"FD")),
113-
114+
114115
TwinC(new essConstruct::TwinChopper(newName+"TwinC")),
115116
CDiskTop(new essConstruct::DiskChopper(newName+"CBladeTop")),
116117
CDiskLow(new essConstruct::DiskChopper(newName+"CBladeLow")),
117118

118-
VPipeE(new constructSystem::VacuumPipe(newName+"PipeE")),
119+
VPipeE(new constructSystem::RectanglePipe(newName+"PipeE")),
119120
FocusE(new beamlineSystem::PlateUnit(newName+"FE")),
120121

121122
ChopE(new essConstruct::SingleChopper(newName+"ChopE")),
122123
EDisk(new essConstruct::DiskChopper(newName+"EBlade")),
123124

124125
ShutterA(new constructSystem::BeamShutter(newName+"ShutterA")),
125126

126-
VPipeF(new constructSystem::VacuumPipe(newName+"PipeF")),
127+
VPipeF(new constructSystem::RectanglePipe(newName+"PipeF")),
127128
FocusF(new beamlineSystem::PlateUnit(newName+"FF")),
128129

129-
VPipeG(new constructSystem::VacuumPipe(newName+"PipeG")),
130+
VPipeG(new constructSystem::RectanglePipe(newName+"PipeG")),
130131
BendG(new beamlineSystem::BenderUnit(newName+"BG")),
131132

132133
BInsert(new BunkerInsert(newName+"BInsert")),
@@ -264,7 +265,7 @@ MIRACLES::buildBunkerUnits(Simulation& System,
264265
CDiskTop->createAll(System,TwinC->getKey("MotorTop"),0,
265266
TwinC->getKey("Beam"),-1);
266267
TwinC->insertAxle(System,*CDiskLow,*CDiskTop);
267-
268+
268269
VPipeE->addAllInsertCell(bunkerVoid);
269270
VPipeE->createAll(System,TwinC->getKey("Beam"),2);
270271

0 commit comments

Comments
 (0)