LBNEVolumePlacements.hh
Go to the documentation of this file.
1 //---------------------------------------------------------------------------//
2 // $Id: LBNEVolumePlacements.hh,v 1.1.2.35 2013/12/06 18:23:50 lebrun Exp $
3 //---------------------------------------------------------------------------//
4 
5 #ifndef LBNEVolumePlacement_H
6 #define LBNEVolumePlacement_H 1
7 
8 #include <vector>
9 #include <map>
10 
11 //#include "G4VUserVolumePlacement.hh"
12 #include "globals.hh"
13 #include "G4ThreeVector.hh"
14 #include "G4RotationMatrix.hh"
15 #include "G4UImessenger.hh"
16 #include "G4UIdirectory.hh"
17 #include "G4UIcmdWithADoubleAndUnit.hh"
18 #include "G4UIcmdWithABool.hh"
19 #include "G4UIcmdWithADoubleAndUnit.hh"
20 #include "G4PVPlacement.hh"
21 #include "G4ExceptionSeverity.hh"
22 
23 //---------------------------------------------------------------------------//
24 // This class controls the placement of everything within the geometry.
25 
26 //class LBNEVolumePlacement : public G4VUserVolumePlacement
27 //
28 // The file G4VUserVolumePlacement.hh was found missing in my cvs instance of the package.
29 // Not sure what happened here.
30 // In any event, do we need inheritance here?
31 //
32 // Rephrasing the scope and goal for this class: a container that all hold
33 // critical volume nominal placements in the package.
34 // Real placements can be modifed before physical placement by correcting
35 // for misalignments using the LBNESurveyor data.
36 // Thus, for a given subVolume, we might have two placements, two entries in the
37 // in the map.
38 //
39 // Benefits of this class are (i) a central repository of all
40 // nominal and tried placements data.
41 // (ii) interface to the messenger to get nominal data from User's cards.
42 // (iii) interface with the Surveyor data class, in case misalignment are studied
43 //
44 // The Dectetor construction handles the list of materials, and will use this repository
45 // of placement
46 //
47 // Key functionality :
48 //
49 // CheckPlacement
50 //
51 // This is a singleton class
52 //
53 
54 //
55 // Paul L. G. Lebrun, July 2013
56 //
57 // Type of alignment study algorythms one could use
58 
60 //
61 // First, one more container to avoid the search through the map more then once
62 //
64 
67  bool fIsPlaced;
68  G4ThreeVector fPosition;
69  G4RotationMatrix fRotation;
71  std::vector<double> fParams; // sizes, or others..
72  G4String fTypeName; // Box, tube, etc...
73  G4VPhysicalVolume *fMother; // Not Owned. G4 maintain this pointer. Do not delete in the destructor of this class.
74  G4LogicalVolume* fCurrent; // Same
75 
76  void initialize() {
77  fAlignmentModel = eNominal;
78  fIsPlaced = false;
79  fRotation = G4RotationMatrix();
80  fRotationIsUnitMatrix = true;
81  fPosition = G4ThreeVector(0.0, 0.0, 0.0);
82  fParams.resize(3, 0.0);
83  fMother = 0;
84  fTypeName = G4String("Tubs"); // most common type of volume..
85  }
86 
87 };
88 
90 
91  public:
92  LBNEHornRadialEquation(); // to be able to store in an stl vector.
93  LBNEHornRadialEquation(double rSqrtCoefficient, double zCoefficient, double rOffset, bool parabolic=true);
94  double GetVal(double z) const ;
95  void test1() const; // Cross check for equation 1. Will generate G4Exception
96 
97  private:
98  static double inchDef;
99  bool parabolic;
100  double rCoeff;
101  double zCoeff;
102  double rOff;
103  double rResc;
104  double rRescCst;
105  double zResc;
106 
107  public:
108  inline void SetLongRescaleFactor(double r) {zResc = r;}
109  inline void SetRadialRescaleFactor(double r) {rResc = r;}
110  inline void SetRadialRescaleFactorCst(double r) {rRescCst = r;}
111 
112 };
113 
115 {
116 
117 private:
120  LBNEVolumePlacements (LBNEVolumePlacements const &); // not implemented
121  LBNEVolumePlacements& operator=(LBNEVolumePlacements const&); // not implemented
123 
124 public:
125 //
126 // Alignment algorithm See also LBNE Surveyor
127 // eNominal: the element on the beam line is placed perfectly, no misalignment
128 // eFixed: The placement occurs after picking up the surveyed value for one or more points
129 // rigidly attached to the placed volume in question.
130 // eRandom: The survey point is understood as a tolerance figure, the actual placement will be taken randomly
131 // assuming the actual placement occurs within +- 2 sigma, truncated gaussian. (to be negotiated )
132 
133  static LBNEVolumePlacements* Instance();
134 
135  void InitializeMessenger(); // Can't be in the constructor, inf. loop otherwise
136  void Initialize(const G4LogicalVolume* matriarch); // Define only the top of the hierarchy
137 
138  LBNEVolumePlacementData* Create(const G4String &name);
139 
140  G4PVPlacement* PlaceFinal(const G4String &name, G4VPhysicalVolume *mother);
141 
142  void PlaceFinalUpstrTarget(G4PVPlacement *mother); // Aug 2014: if NoSplit target, this method name is confusing
143  // As there is downstream target any longer.
144  void PlaceFinalDownstrTarget(G4PVPlacement *mother);
145 
146  void PlaceFinalHorn1(G4PVPlacement *mother, G4PVPlacement *motherDownstrTarget);
147  void PlaceFinalNoSplitHorn1(G4PVPlacement *mother, G4PVPlacement *motherTop); //2nd argument is to place plug in Horn1.
148  void UpdateParamsForHorn1MotherPoly();
149 // August 2015 Multiple Horns
150  void PlaceFinalSimpleHornPolyNumber( size_t iHorn, G4PVPlacement *mother); // For Horns Optimization studies.
151  // iHorn ranges from 0 to 4, inclusive.
152  void UpdateParamsForHornMotherPolyNum(size_t iH);
153 
154 
155  void ExtendChaseLengthForHorn2(); // Feb. 2015: Optimization seems to require longer chase.
156  void PlaceFinalHorn2(G4PVPlacement *mother);
157 
158  void PlaceFinalDecayPipeSnout(G4PVPlacement *mother);
159  double GetMaxRadiusMotherHorn1();
160 
161  void PrintAll() const;
162 
163  inline double GetTargetHallZ() const { return fTargetHallZ; }
164  inline double GetDecayHallZ() const { return fDecayHallZ; }
165  inline double GetDecayPipeLength() const { return fDecayPipeLength; }
166  inline double GetDecayPipeRadius() const { return fDecayPipeRadius; }
167  inline double GetDecayPipeUpstrWindowThick() const { return fDecayPipeUpstrWindowThick; }
168  inline double GetDecayPipeLongPosition() const { return fDecayPipeLongPosition; }
169  inline G4String GetDecayPipeGas() const {return fDecayPipeGas; }
170  inline G4String GetHorn1InnerConductorMaterial() const {return fHorn1InnerCondMat; }
171  inline G4String GetHorn2InnerConductorMaterial() const {return fHorn2InnerCondMat; }
172  inline G4String GetHorn3InnerConductorMaterial() const {return fHorn3InnerCondMat; }
173  inline G4String GetHorn1AllConductorMaterial() const {return fHorn1AllCondMat; }
174  inline G4String GetHorn2AllConductorMaterial() const {return fHorn2AllCondMat; }
175  inline G4String GetHorn3AllConductorMaterial() const {return fHorn3AllCondMat; }
176  inline double GetAbsorberHallZ() const { return fAbsorberHallZ; }
177  inline double GetHorn1Length() const { return fHorn1Length; }
178  inline double GetBaffleLength() const { return fBaffleLength; }
179  inline double GetBaffleWindowThickness() const { return fBaffleWindowThickness; }
180  inline double GetBaffleInnerRadius() const { return fBaffleInnerRadius; }
181  inline double GetBaffleZPosition() const { return fBaffleZPosition; }
182  inline double GetPlugLength() const { return fPlugLength; }
183  inline double GetPlugInnerRadius() const { return fPlugInnerRadius; }
184  inline double GetPlugOuterRadius() const { return fPlugOuterRadius; }
185  inline double GetPlugZPosition() const { return fPlugZPosition; }
186  inline std::string GetPlugMaterial() const { return fPlugMaterial; }
187 
188  // Interface to the Detector construction classes, or others..
189 
190  inline void SetTotalLengthOfRock(double l) { fTotalLength = l;}
191  inline double GetTotalLengthOfRock() const { return fTotalLength;}
192  inline void SetLengthOfRockDownstreamAlcove(double l) {
193  fLengthOfRockDownstr = 2.0*l; // Downstream and upstream, actually, the latter does not matter.
194  const double aRockLength = 2.0*(fDecayPipeLength + 160.*CLHEP::m ); // before digging the tunnel.
195  // Approximate.. 150 m. is for the target hall, Horn1 + horn2, and the Hadron absorber hall + muon alcove.
196  fTotalLength = aRockLength+fLengthOfRockDownstr;
197  }
198  inline double GetLengthOfRockDownstreamAlcove() const { return fLengthOfRockDownstr;}
199 
200  // Interface to the Messenger command
201 
202  inline void SetDecayPipeLength(double l) {
203  const double lCorr = l + fDecayPipeLengthCorrection;
204  fDecayPipeLength=lCorr; fTotalLength = 2.0*(fDecayPipeLength + 160.*CLHEP::m + fLengthOfRockDownstr);
205  }
206  inline void SetDecayPipeRadius(double l) {fDecayPipeRadius=l;}
207  inline void SetDecayPipeLongPosition(double l) {fDecayPipeLongPosition=l;}
208  inline void SetDecayPipeUpstrWindowThick(double l) {fDecayPipeUpstrWindowThick=l;}
209  inline void SetDecayPipeGas(G4String &name) {fDecayPipeGas = name;}
210  inline void SetHorn1InnerConductorMaterial(G4String &name) {fHorn1InnerCondMat = name;}
211  inline void SetHorn2InnerConductorMaterial(G4String &name) {fHorn2InnerCondMat = name;}
212  inline void SetHorn3InnerConductorMaterial(G4String &name) {fHorn3InnerCondMat = name;}
213  inline void SetHorn1AllConductorMaterial(G4String &name) {fHorn1AllCondMat = name;}
214  inline void SetHorn2AllConductorMaterial(G4String &name) {fHorn2AllCondMat = name;}
215  inline void SetHorn3AllConductorMaterial(G4String &name) {fHorn3AllCondMat = name;}
216  inline void SetTotalLength(double l) {fTotalLength=l;} // dangerous! Possible conflict with length of rock downstream
217  inline void SetWaterLayerThickInHorns(double l) { fWaterLayerThickInHorns = l;}
218  inline void SetHorn1Length(double l) { fHorn1Length = l;}
219  inline void SetBaffleLength(double l) { fBaffleLength = l;}
220  inline void SetBaffleInnerRadius(double r) { fBaffleInnerRadius = r;}
221  inline void SetBaffleZPosition(double z) { fBaffleZPosition = z;}
222  inline void SetPlugLength(double l) { fPlugLength = l;}
223  inline void SetPlugInnerRadius(double r) { fPlugInnerRadius = r;}
224  inline void SetPlugOuterRadius(double r) { fPlugOuterRadius = r;}
225  inline void SetPlugMaterial(std::string name) { fPlugMaterial = name;}
226  inline void SetPlugZPosition(double z) { fPlugZPosition = z;}
227  inline void SetConstructPlug(bool t) { fConstructPlug = t;}
228  inline void SetConstructPlugInHorn1(bool t) { fConstructPlugInHorn1 = t;} // Added, August 31 2014.
229 //
230 // december 2013: Simple target
231 //
232  inline void SetUseSimpleTargetBox(bool t) { fUseSimpleTargetBox = t;}
233  inline void SetUseSimpleTargetCylinder(bool t) { fUseSimpleTargetCylinder = t;}
234  inline void SetSimpleTargetRadius(double r) { fSimpleTargetRadius = r;}
235  inline void SetSimpleTargetWidth(double r) { fSimpleTargetWidth = r;}
236  inline void SetSimpleTargetHeight(double r) { fSimpleTargetHeight = r;}
237  inline void SetSimpleTargetLength(double l) { fSimpleTargetLength = l;}
238 //
239  inline bool GetUseSimpleTargetBox() const { return fUseSimpleTargetBox;}
240  inline bool GetUseSimpleTargetCylinder() const { return fUseSimpleTargetCylinder;}
241  inline bool GetConstructPlug() const { return fConstructPlug;}
242  inline bool GetConstructPlugInHorn1() const { return fConstructPlugInHorn1;}
243  inline double GetSimpleTargetRadius() const {return fSimpleTargetRadius;}
244  inline double GetSimpleTargetWidth() const { return fSimpleTargetWidth;}
245  inline double GetSimpleTargetHeight() const {return fSimpleTargetHeight;}
246  inline double GetSimpleTargetLength() const {return fSimpleTargetLength;}
247 //
248 // October 2015
249 //
250  inline void SetRemoveTargetAlltogether(bool t) { fRemoveTargetAlltogether = t;}
251  inline bool GetRemoveTargetAlltogether() { return fRemoveTargetAlltogether;}
252 
253 // Interface to the Messenger, Target stuff.
254 
255  inline double GetTargetSLengthGraphite() const { return fTargetSLengthGraphite; }
256  inline void SetTargetSLengthGraphite(double l) { fTargetSLengthGraphite = l; }
257  inline double GetTargetFinWidth() const { return fTargetFinWidth; }
258  inline void SetTargetFinWidth(double l) {
259  fTargetFinWidth = l;
260  if (fUse1p2MW) {
261  fTargetFinWidth /=2.; // since we will place two of them side by side
262  fTargetFinWidthRequired = fTargetFinWidth;
263  // October, November 2016.. Install the 1/2 fins as a subtracted volume,
264  // such the cooling pipe diameter (OD) can be larger than 1/2 fin width.
265 // if (fTargetFinWidth > fTargetCTubeOuterRadius) {
266 // fTargetFinExtraWidth = (fTargetFinWidth - 2.0*fTargetCTubeOuterRadius);
267 // fTargetFinWidth = fTargetCTubeOuterRadius - 0.001*CLHEP::mm;
268 // }
269 
270  }
271  }
272  inline unsigned int GetTargetNumFinsWithWings() const { return fTargetNumFinsWithWings; }
273  inline void SetTargetNumFinsWithWings(unsigned int n) {fTargetNumFinsWithWings=n;}
274  inline double GetTargetDensity() const { return fTargetDensity; }
275  inline void SetTargetDensity(double l) { fTargetDensity = l; }
276 
277  inline double GetTargetSpecificLambda() const {return fTargetSpecificLambda;}
278  inline void SetTargetSpecificLambda(double l) {fTargetSpecificLambda = l;}
279 
280  inline G4String GetTargetMaterialName() const { return fTargetMaterialName; }
281  inline void SetTargetMaterialName(G4String &aName) { fTargetMaterialName = aName; }
282  inline double GetTargetLengthIntoHorn() const { return fTargetLengthIntoHorn; }
283  inline void SetTargetLengthIntoHorn(double l) { fTargetLengthIntoHorn = l; }
284  inline void SetTargetLengthOutsideHorn(double l) { fTargetLengthOutsideHorn = l; }
285  inline double GetTargetBerylDownstrWindowThick() const { return fTargetBerylDownstrWindowThick;}
286  inline void SetTargetBerylDownstrWindowThick(double t) { fTargetBerylDownstrWindowThick = t;}
287  inline void SetHorn1RadialSafetyMargin(double t) { fHorn1RadialSafetyMargin = t;}
288  inline double GetHorn1RadialSafetyMargin() const { return fHorn1RadialSafetyMargin;}
289  inline void SetHorn1RadiusBigEnough(bool t) { fHorn1RadiusBigEnough = t;}
290  inline bool IsHorn1RadiusBigEnough() const { return fHorn1RadiusBigEnough;}
291 
292 //
293 // Interface to the Messenger, Horn1 and Horn2 parameters
294 //
295  inline void SetHorn1LongRescale(double r) {fHorn1LongRescale = r;}
296  inline double GetHorn1LongRescale() const {return fHorn1LongRescale;}
297  inline void SetHorn1RadialRescale(double r) {fHorn1RadialRescale = r;}
298  inline double GetHorn2LongRescale() const {return fHorn2LongRescale;}
299  inline void SetHorn2LongRescale(double r) {fHorn2LongRescale = r;}
300  inline double GetHorn2RadialRescale() {return fHorn2LongRescale;}
301  inline void SetHorn2RadialRescale(double r) {fHorn2RadialRescale = r;}
302  inline void SetHorn2RadialRescaleCst(double r) {fHorn2RadialRescaleCst = r;}
303  inline double GetHorn2LongPosition() const { return fHorn2LongPosition; }
304  inline void SetHorn2LongPosition(double l) { fHorn2LongPosition = l; }
305 
306  inline bool GetUseMarsTargetHorns() const { return fUseMarsTargetHorns;}
307  inline void SetUseMarsTargetHorns( bool v) { fUseMarsTargetHorns=v;}
308 
309  inline G4String GetMarsTargetHornsGDMLFilename() const { return fMarsTargetHornsGDMLFilename; }
310  inline void SetMarsTargetHornsGDMLFilename(G4String &name) { fMarsTargetHornsGDMLFilename=name; }
311 
312  inline G4String GetAbsorberGDMLFilename() const { return fAbsorberGDMLFilename; }
313  inline void SetAbsorberGDMLFilename(G4String &name) { fAbsorberGDMLFilename=name; }
314 //
315 // more public getter to support the Magnetic field
316 //
317  inline double GetHorn1NeckZPosition() const { return fHorn1NeckZPosition; } // in Drawing coordinate system
318  inline double GetHorn1NeckLength() const { return fHorn1NeckLength; } // ... but rescaled is asked for..
319  inline double GetHorn1NeckOuterRadius() const { return fHorn1NeckOuterRadius; } // same coordinate system..
320  inline double GetHorn1NeckInnerRadius() const { return fHorn1NeckInnerRadius; } // same coordinate system..
321  inline double GetHorn1ZDEndNeckRegion() const { return fHorn1ZDEndNeckRegion; } // same coordinate system..
322  inline double GetHorn1ZEndIC() const { return fHorn1ZEndIC; } // the Z end of the inner conductor, rescaled..
323  inline double GetHorn1EffectiveLength() const { return (fHorn1TopUpstrLength + fHorn1TopDownstrLength); }
324  inline double GetHorn1DeltaZEntranceToZOrigin() const { return -fHorn1LongRescale*3.0*CLHEP::cm;} // To be checked!...
325  inline double GetHorn1OuterTubeOuterRad() const {return fHorn1OuterTubeOuterRad; }
326  inline double GetHornsOuterTubeOuterRad(size_t iH) const {return fHornsOuterTubeOuterRad[iH]; }
327  //Same thing for Horn2
328  inline double GetHorn2NeckZPosition() const { return fHorn2NeckZPosition; } // in Drawing coordinate system
329  inline double GetHorn2NeckLength() const { return fHorn2NeckLength; } // ... but rescaled is asked for..
330  inline double GetHorn2NeckOuterRadius() const { return fHorn2NeckOuterRadius; } // same coordinate system..
331  inline double GetHorn2NeckInnerRadius() const { return fHorn2NeckInnerRadius; } // same coordinate system..
332  inline double GetHorn2ZEndIC() const { return fHorn2ZEndIC; } // the Z end of the inner conductor, rescaled..
333  inline double GetHorn2ZEqnChange(size_t k) const {return fHorn2ZEqnChanges[k]; }
334  inline size_t GetHorn2ZEqnChangeNumEqn() const {return fHorn2ZEqnChanges.size(); }
335  inline double GetHorn2DeltaZEntranceToZOrigin() const {return fHorn2DeltaZEntranceToZOrigin; }
336  inline double GetHorn2OuterTubeOuterRad() const {return fHorn2OuterTubeOuterRad; }
337  inline bool GetDoInstallShield() const { return fDoInstallShield;}
338  inline void SetDoInstallShield( bool v) { fDoInstallShield=v;}
339  void SegmentTarget(); // Check the target segmentation. Assume fixed Fin size.
340  void SegmentTargetSmallTgt(); // Check the target segmentation. Assume fixed Fin size.
341  void SegmentRALTGTv1();
342 //
343  //Additional Functions to ppfx..... Amit Bashyal 05/27/2016
344  inline std::vector<G4String> GetHorn1ICList() const {return fHorn1IC;}
345  inline std::vector<G4String> GetHorn2ICList() const {return fHorn2IC;}
346 
347  void RescaleHorn1Lengthwise();
348  void RescaleHorn2Lengthwise();
349  void RescaleHorn1Radially();
350  void RescaleHorn2Radially();
351  void ShiftHorn2Radially();
352  // Custom stuff for the upstream part of Horn1
353  //
354  // Custom Horn1, based on a G4Polycone
355  //
357  bool fUseHornsPolycone; // Extension to arbitrary number of Horns
359  std::vector<G4ThreeVector> fHorn1PolyListRinThickZVects;
361  //
362  // Additional Custom Horns, based on a G4Polycone up to 5. (set by the G4UI limits)
363  // August 2015.
364  //
366  std::vector<int> fUseHornsPolyNumInnerPts;
367  std::vector< std::vector<G4ThreeVector> > fHornsPolyListRinThickZVects;
368  std::vector<double> fHornsPolyOuterRadius;
369  std::vector<double> fHornsPolyZStartPos;
370  //
371  std::vector<bool> fPolyconeHornsAreParabolic; // October 2015: LoSecco, Horns can be parabolic....
372  bool fPolyconeHorn1IsParabolic; // for consistency with the old Horn1 Optimization.
373  //
374  // November/December 2016: Improve the accuracy of the magnetic field calculation.
375  // We record the position of the inner conductor, as we build in the "PlaceFinalxxx" method.
376  // These will transfered to magnetic field methods, if the "ConceptualDesign, realistic" version of
377  // the horns are selected (on a horn by horn basis....)
378  // The coordinate system is the one from the LBNFSimpleHornxContainer,
379  // where x = 1,2,3 for Horn A, B, C respectively. For sake of convenience, the Z coordinates are global,
380  // returning from PlaceFinalLBNFConceptHornx.
381  //
382  // The raddi are in local coordinate system. The LBNFSimpleHornxContainer volumes are surveyed,
383  // the rotation are taken out in the Magnetic field routines. It is implicitely assume that Z-translation effects
384  // are very small.
385  //
386  std::vector<double> fZCoordCDRevisedHornA;
387  std::vector<double> fRInCoordCDRevisedHornA;
389  std::vector<double> fZCoordCDRevisedHornB;
390  std::vector<double> fRInCoordCDRevisedHornB;
392  std::vector<double> fZCoordCDRevisedHornC;
393  std::vector<double> fRInCoordCDRevisedHornC;
395 
396 
397  //
398  LBNEVolumePlacementData* CreateHorn1TopLevelUpstr();
399 
400  const LBNEVolumePlacementData* Find(const G4String &name, const char *motherName, const char *method) const ;
401 
402  inline double GetConductorRadiusHorn1(double zD, size_t eqn) const {
403  if (eqn >= fHorn1Equations.size()) return -1.;
404  return fHorn1Equations[eqn].GetVal(zD);
405  }
406  inline double GetConductorRadiusHorn2(double zD, size_t eqn) const {
407  if (eqn >= fHorn2Equations.size()) return -1.;
408  return fHorn2Equations[eqn].GetVal(zD);
409  }
410 //
411 // 1.2 MW, Feb 2014, November-December 2016.
412 //
413  inline bool GetUse1p2MW() const { return fUse1p2MW; }
414  inline void SetUse1p2MW(bool t) { fUse1p2MW = t; }
415 
416  inline bool GetUse1p2MWSmallTgt() const { return fUse1p2MWSmallTgt; }
417  inline void SetUse1p2MWSmallTgt(bool t) { fUse1p2MWSmallTgt = t; }
418 
419  inline bool GetUseRALTGTv1() const { return fUseRALTGTv1; }
420  inline void SetUseRALTGTv1(bool t) { fUseRALTGTv1 = t; }
421 
422 //
423  inline bool GetUseRoundedTargetFins() const { return fUseRoundedTargetFins; }
424  inline void SetUseRoundedTargetFins(bool t) { fUseRoundedTargetFins = t; }
425  void adaptTargetFor1p2MW();
426  void adaptTargetFor1p2MWSmallTgt();
427  void adaptRALTGTv1();
428  void configureTargetForConceptHornARev2();
429  //
430  // Accessor of the accurate RZ map, as built.
431  //
432  inline std::vector<double> GetHornsPolyInnerConductorRadiiHornARev2() const {return fRInCoordCDRevisedHornA;}
433  // Inefficient, but done once per detector construction, per horn
434  inline std::vector<double> GetHornsPolyInnerConductorZsHornARev2() const {return fZCoordCDRevisedHornA;}
435  inline double GetThickICDRevisedHornA() const { return fThickICDRevisedHornA; }
436 
437  // Same for Horn B. We will also add the point from the IO transition.
438  //
439  inline std::vector<double> GetHornsPolyInnerConductorRadiiHornBRev2() const {return fRInCoordCDRevisedHornB;}
440  inline std::vector<double> GetHornsPolyInnerConductorZsHornBRev2() const {return fZCoordCDRevisedHornB;}
441  // Thickness is almost constant... Not true in I/O region, where field map very inaccurate, anyhow..
442  inline double GetThickICDRevisedHornB() const { return fThickICDRevisedHornB; }
443 //
444  // Same for Horn C. We will also add the point from the IO transition.
445  //
446  inline std::vector<double> GetHornsPolyInnerConductorRadiiHornCRev2() const {return fRInCoordCDRevisedHornC;}
447  inline std::vector<double> GetHornsPolyInnerConductorZsHornCRev2() const {return fZCoordCDRevisedHornC;}
448  // Thickness is almost constant... Not true in I/O region, where field map very inaccurate, anyhow..
449  inline double GetThickICDRevisedHornC() const { return fThickICDRevisedHornC; }
450 // August 2014, add arbitrary shaped Polycone.
451 //
452  inline bool GetUseHorn1Polycone() const { return fUseHorn1Polycone; }
453  inline int GetUseHorn1PolyNumInnerPts() const { return fUseHorn1PolyNumInnerPts; }
454  inline double GetHorn1PolyInnerConductorRadius(size_t numPts) const {
455  if (numPts >= static_cast<size_t>(fUseHorn1PolyNumInnerPts)) {
456  G4Exception("GetHorn1PolyInnerConductorRadius", " ", FatalErrorInArgument, "Bad Index");
457  }
458  G4ThreeVector v = fHorn1PolyListRinThickZVects[numPts];
459  return v[0];
460  }
461  inline double GetHorn1PolyInnerConductorThickness(size_t numPts) const {
462  if (numPts >= static_cast<size_t>(fUseHorn1PolyNumInnerPts)) {
463  G4Exception("GetHorn1PolyInnerConductorThickness", " ", FatalErrorInArgument, "Bad Index");
464  }
465  G4ThreeVector v = fHorn1PolyListRinThickZVects[numPts];
466  return v[1];
467  }
468  inline double GetHorn1PolyInnerConductorZCoord(size_t numPts) const {
469  if (numPts >= static_cast<size_t>(fUseHorn1PolyNumInnerPts)) {
470  G4Exception("GetHorn1PolyInnerConductorZCoord", " ", FatalErrorInArgument, "Bad Index");
471  }
472  G4ThreeVector v = fHorn1PolyListRinThickZVects[numPts];
473  return v[2];
474  }
475  inline double GetHorn1PolyOuterRadius() const { return fHorn1PolyOuterRadius;}
476  //
477  //Settors
478  //
479  inline void SetUseHorn1Polycone(bool t) {
480 
481  fUseHorn1Polycone = t;
482  if (!t) return;
483  fUseHornsPolycone = false; // not a typo, indicating new mode for defining the geometry.
484  // we support the idea to have one and only horn, simple Polycone.
485  fUseNumberOfHornsPoly = 1;
486  fMotherHornsAllLengths.resize(1);
487  fMotherHornsAllRads.resize(1);
488  fUseHornsPolyNumInnerPts.resize(1);
489  fHornsPolyOuterRadius.resize(1);
490  fHornsPolyListRinThickZVects.resize(1);
491  fPolyconeHornsAreParabolic.resize(1); fPolyconeHornsAreParabolic[0] = false;
492  fMotherHornsAllThick.resize(1);
493  fHornsLength.resize(1);
494  fHornsPolyZStartPos.resize(1);
495  fHornsPolyZStartPos[0] = 0.; // defining here the G4 world coordinate system with respect to the Horns
496  fHornsOuterTubeOuterRad.resize(1);
497  fRemoveDecayPipeSnout = true;
498  }
499  inline void SetUseHorn1PolyNumInnerPts(int n) {
500  fUseHorn1PolyNumInnerPts = n;
501  fHorn1PolyListRinThickZVects.resize(static_cast<size_t>(n));
502  }
503  inline void SetHorn1PolyInnerThreeVect(size_t iP, G4ThreeVector vVal) {
504  if (fHorn1PolyListRinThickZVects.size() < iP) {
505  size_t numMiss = iP - fHorn1PolyListRinThickZVects.size();
506  for (size_t ipp = 0; ipp != numMiss; ipp++) {
507  G4ThreeVector vNew; vNew[0] = 40.; vNew[1] = 2; vNew[2] = 400.;
508  fHorn1PolyListRinThickZVects.push_back(vNew);
509  }
510  }
511  for (size_t kv=0; kv != 3; kv++)
512  fHorn1PolyListRinThickZVects[iP][kv] = vVal[kv];
513  }
514  inline void SetHorn1PolyOuterRadius(double r) { fHorn1PolyOuterRadius = r;}
515  //
516  // August 2015: extend this to an arbitrary number of Polycone horns
517  //
518  inline int GetNumberOfHornsPolycone() const { return fUseNumberOfHornsPoly; }
519  inline int GetUseHornsPolyNumInnerPts(size_t i) const {
520  if ((i < 1) || (i > fUseHornsPolyNumInnerPts.size())) {
521  G4Exception("GetUseHornsPolyNumInnerPts", " ", FatalErrorInArgument, "Illegal Horn number");
522  }
523  return fUseHornsPolyNumInnerPts[i-1];
524  }
525  inline double GetHornsPolyInnerConductorRadius(size_t iH, size_t numPts) const {
526  if ((iH < 1) || (iH > fUseHornsPolyNumInnerPts.size())) {
527  G4Exception("GetHornsPolyInnerConductorRadius", " ", FatalErrorInArgument, "Illegal Horn number");
528  }
529  std::vector<G4ThreeVector> data = fHornsPolyListRinThickZVects[(iH-1)];
530  if (numPts >= data.size()) {
531  G4Exception("GetHornsPolyInnerConductorRadius", " ", FatalErrorInArgument, "Bad Index");
532  }
533  G4ThreeVector v = data[numPts];
534  return v[0];
535  }
536  inline double GetHornsPolyInnerConductorThickness(size_t iH, size_t numPts) const {
537  if ((iH < 1) || (iH > fUseHornsPolyNumInnerPts.size())) {
538  G4Exception("GetHornsPolyInnerConductorThickness", " ", FatalErrorInArgument, "Illegal Horn number");
539  }
540  std::vector<G4ThreeVector> data = fHornsPolyListRinThickZVects[(iH-1)];
541  if (numPts >= data.size()) {
542  G4Exception("GetHornsPolyInnerConductorThickness", " ", FatalErrorInArgument, "Bad Index");
543  }
544  G4ThreeVector v = data[numPts];
545  return v[1];
546  }
547  inline double GetHornsPolyInnerConductorZCoord(size_t iH, size_t numPts) const {
548  if ((iH < 1) || (iH > fUseHornsPolyNumInnerPts.size())) {
549  G4Exception("GetHorn2PolyInnerConductorZCoord", " ", FatalErrorInArgument, "Illegal Horn number");
550  }
551  std::vector<G4ThreeVector> data = fHornsPolyListRinThickZVects[(iH-1)];
552  if (numPts >= data.size()) {
553  G4Exception("GetHornsPolyInnerConductorZCoord", " ", FatalErrorInArgument, "Bad Index");
554  }
555  G4ThreeVector v = data[numPts];
556  return v[2];
557  }
558  inline double GetHornsPolyOuterRadius(size_t iH) const {
559  if ((iH < 1) || (iH > fHornsPolyOuterRadius.size())) {
560  std::cerr << " GetHornsPolyOuterRadius, iH = " << iH << " size of container.. " << fHornsPolyOuterRadius.size() << std::endl;
561  G4Exception("GetHornsPolyOuterRadius", " ", FatalErrorInArgument, "Illegal Horn number");
562  }
563 
564  return fHornsPolyOuterRadius[(iH-1)];
565  }
566  inline double GetHornsPolyZStartPos(size_t iH) const {
567  if ((iH < 1) || (iH > fHornsPolyZStartPos.size())) {
568  G4Exception("GetHornsPolyZStartPos", " ", FatalErrorInArgument, "Illegal Horn number");
569  }
570 
571  return fHornsPolyZStartPos[(iH-1)];
572  }
573  //
574  // Parabolic horns, as ( very ) segmented Polycone
575  //
576  inline bool IsHornPnParabolic(size_t numHorn) const {
577  return fPolyconeHornsAreParabolic[numHorn-1]; // same convention as the other accessors.
578  }
579  inline bool IsHorn1PlParabolic() const {
580  return fPolyconeHorn1IsParabolic;
581  }
582  inline size_t GetHornParabolicNumInnerPts(size_t iH) const { return fMotherHornsAllLengths[iH].size();}
583  inline double GetHornParabolicRZCoord(size_t iH, size_t k) const { return fMotherHornsAllLengths[iH][k];}
584  inline double GetHornParabolicRIn(size_t iH, size_t k) const { return fMotherHornsAllRads[iH][k];}
585  inline double GetHornParabolicThick(size_t iH, size_t k) const { return fMotherHornsAllThick[iH][k];}
586 
587  //
588  //Settors
589  //
590  inline void SetNumberOfHornsPolycone(int n) {
591  if ((n < 1) || (n > 5)) {
592  G4Exception("SetNumberOfHornsPolycone", " ", FatalErrorInArgument, "Valid Number are 1, 2, 3, 4 or 5 ");
593  }
594  G4String msg0(
595  " We hereby declaring the number of horns used in the simulation, either simple Polycone, or engineered \n");
596  std::cout << msg0 << std::endl;
597  std::cerr << msg0 << std::endl;
598  if (n == 1) {
599  G4String msg1(" We will be using one and only one Horn, Mother is Polycone style. \n ");
600  msg1 += std::string(" We assume it is the first horn. \n");
601  std::cout << msg1 << std::endl;
602  std::cerr << msg1 << std::endl;
603  }
604  fUseHorn1Polycone = false; // we will use the generic Placement even for Horn1, more consistent this way
605  fUseHornsPolycone = true; // not a typo, indicating new mode for defining the geometry.
606  // we support the idea to have one and only horn, simple Polycone.
607  fUseNumberOfHornsPoly = n;
608  fMotherHornsAllLengths.resize(n);
609  fMotherHornsAllRads.resize(n);
610  fUseHornsPolyNumInnerPts.resize(n);
611  fHornsPolyOuterRadius.resize(n);
612  fHornsPolyListRinThickZVects.resize(n);
613  fHornsLength.resize(n);
614  fHornsPolyZStartPos.resize(n);
615  fHornsPolyZStartPos[0] = 0.; // defining here the G4 world coordinate system with respect to the Horns
616  if (n > 1) {
617  for (size_t k=1; k != static_cast<size_t>(n); k++) {
618  fHornsPolyZStartPos[k] = -10000.*CLHEP::m; fHornsLength[k] = -1.;
619  }
620  } // used to check the initialization.
621  fHornsOuterTubeOuterRad.resize(n);
622  fPolyconeHornsAreParabolic.resize(n);
623  fMotherHornsAllThick.resize(n);
624  for (size_t k=0; k != static_cast<size_t>(n); k++) fPolyconeHornsAreParabolic[k] = false; //default is false..
625  fRemoveDecayPipeSnout = true;
626  }
627  inline void SetPolyconeHornParabolic(size_t hornNumber, bool t) {
628  if (hornNumber > 5) {
629  G4Exception("SetPolyconeHornParabolic", " ", FatalErrorInArgument, "Valid Number are 1, 2, 3, 4 or 5 ");
630  }
631  if (fUseNumberOfHornsPoly < static_cast<int>(hornNumber))
632  this->SetNumberOfHornsPolycone(hornNumber);
633  std::cerr << " Setting index " << hornNumber-1
634  << " Hornpara.., size " << fPolyconeHornsAreParabolic.size() << std::endl;
635  fPolyconeHornsAreParabolic[hornNumber-1] = t;
636  }
637  inline void SetPolyconeHorn1Parabolic( bool t) {
638  fPolyconeHorn1IsParabolic = t;
639  }
640  inline void SetUseHornsPolyNumInnerPts(size_t hornNumber, size_t nElem) {
641  if (hornNumber > 5) {
642  G4Exception("SetUseHornsPolyNumInnerPts", " ", FatalErrorInArgument, "Valid Number are 1, 2, 3, 4 or 5 ");
643  }
644  fUseHornsPolyNumInnerPts[hornNumber-1] = nElem;
645  fHornsPolyListRinThickZVects[hornNumber-1].resize(nElem);
646  fMotherHornsAllLengths[hornNumber-1].resize(nElem);
647  fMotherHornsAllRads[hornNumber-1].resize(nElem);
648  }
649  inline void SetHornsPolyInnerThreeVect(size_t hornNumber, size_t iP, G4ThreeVector vVal) {
650  if (hornNumber > 5) {
651  G4Exception("SetUseHornsPolyInnerThreeVect", " ", FatalErrorInArgument, "Valid Number are 1, 2, 3, 4 or 5 ");
652  }
653  if (fHornsPolyListRinThickZVects[hornNumber-1].size() < iP) {
654  size_t numMiss = iP - fHornsPolyListRinThickZVects[hornNumber-1].size();
655  for (size_t ipp = 0; ipp != numMiss; ipp++) {
656  G4ThreeVector vNew; vNew[0] = 40.; vNew[1] = 2; vNew[2] = 400.;
657  fHornsPolyListRinThickZVects[hornNumber-1].push_back(vNew);
658  }
659  }
660  for (size_t kv=0; kv != 3; kv++)
661  fHornsPolyListRinThickZVects[hornNumber-1][iP][kv] = vVal[kv];
662  }
663  inline void SetHornsPolyOuterRadius(size_t hornNumber, double r) {
664  if (hornNumber > 5) {
665  G4Exception("SetUseHornsPolyOuterRadius", " ", FatalErrorInArgument, "Valid Number are 1, 2, 3, 4 or 5 ");
666  }
667  fHornsPolyOuterRadius[hornNumber-1] = r;
668  }
669  inline void SetHornsPolyZStartPos(size_t hornNumber, double z) {
670  if (hornNumber > 5) {
671  G4Exception("SetUseHornsPolyZStartPos", " ", FatalErrorInArgument, "Valid Number are 1, 2, 3, 4 or 5 ");
672  }
673  if ((hornNumber == 1) && (std::abs(z) > 5.0*CLHEP::mm)) {
674  std::ostringstream mStrStr; mStrStr << " The Z start of the 1rst simple Horn must be at zero. Found value : " << z;
675  std::string mStr(mStrStr.str());
676  G4Exception("SetUseHornsPolyZStartPos", " ", FatalErrorInArgument, mStr.c_str());
677  }
678 
679  fHornsPolyZStartPos[hornNumber-1] = z;
680 
681  }
682 
683 private:
684  // GUI Interface
685 
686  // Messenger
687  G4UImessenger *fPlacementMessenger;
688 
689  // maps, to map the name of the detector to its placement, rotation, and the
690  // logical volume in which it is placed.
691 
692  std::map<G4String, LBNEVolumePlacementData> fSubVolumes;
693  //
694  // A rotation matrix we will use often, to implement the round corners
695  //
696  G4RotationMatrix fRotVertical;
697  //
698  // A rotation matrix for the Titanium Cooling tube, HornA downstream target support.
699  //
700  G4RotationMatrix fRotTgtTitCTubeVert;
701  G4RotationMatrix fRotTgtTitCTubeHor;
702 
703  // Useful lengths/dimensions, gotten from the messenger class, or set internally.
704 
705  G4double fTotalLength;
707  G4double fTargetHallZ;
708  G4double fAbsorberHallZ;
709  G4double fDecayHallZ;
710  G4double fDecayPipeLength;
716  G4String fDecayPipeGas;
717 
719  G4double fHorn1Length;
720  std::vector<double> fHornsLength; // Aug. 2015. Extensions to multiple Simple Polycone Horns
723  G4double fHorn1DownstreamPlateLength; // Bulkhead, guess work at this point
724  //
725  G4double fDistMCZeroToACTRN1Pts; // See drawing 8875.112-MD-363097, with Jim Hylen annotation.
726  //
729  G4double fBaffleLength;
731  G4double fBaffleZPosition; // With respect to 0. of TargetHallAndHorn1 center (MCZERO)
734  G4double fPlugLength;
735  G4double fPlugZPosition; // With respect to 0. of Horn2 center (MCZERO)
737  //
738  // Target description. Variable name
739  // borrowed (inspired, actually) from LBNENumiDataInput, when applicable.
740  //
741  G4double fTargetSLength; // total length from first fin Beryllium window end cap.
742  G4double fTargetSLengthGraphite;// total length for the graphite target per-se. **Settable via Messenger.
743  G4double fTargetDensity; // Density of the target
744  G4double fTargetSpecificLambda; // Specific nuclear interaction length of the target material
747  // offset with respecto MCZERO, and/or the transition between UpstreamTarget Hall and Horn1 Hall
748  // **Settable via Messenger.
749  G4double fTargetLengthOutsideHorn; // defined from the above.
750  G4double fTargetLengthOutsideExtra; // Only for the Pseudo Nova option
753  // No fTargetX0, Y0: These would be surveyed point, part of the alignement
754  // realm, i.e. handled in the Surveyor class.
755  G4double fTargetFinWidth;
757  // Oct. Nov. 2016, Conceptual design of Horn A & NuMI target, adopting these wings
759  G4double fTargetFinWWingRadius; // New variable.
760  G4double fTargetFinContainerWidth; // No longer used in the Conceptual
761  // design for HornA, October/November 2016.
762  G4double fTargetFinExtraWidth;// same...
764  G4double fTargetFinLength; //
768  // Quynh, August 2014.
772  G4double fTargetFinSpacingLength; // Averaged over the whole length
800  G4double fTargetCTubeReturnLengthDownstr;// Obsolete.but keep for possible upgrade if need
801  // Replaced by an effective thicness Titanium + water effective thickness
802  G4double fTargetCTubeReturnDownstrCutAngleStart; // The angle at which we start, from 90 dgree (x=0., y ~ 16.5 mm)
803  G4double fTargetCTubeReturnDownstrCutAngleSize; // The angular size of the wedge representing the volume
808  //
852  G4double fTargetHeContTubeLength; // New August/Sept 2014.
853  G4double fThicknessWall;
869  // derived quantities
870  G4double fTargetZ0; // offset with respecto MCZERO
871  G4double fTargetZ0Upstr; // For the two sections of the target.
872  G4double fTargetZ0Downstr; // For the two sections of the target.
873  G4double fTargetSWidth;
874  G4double fTargetSHeight;
875  //
876  // Variables that are part physicall part of Horn1 but located logically in G4, in UpstreamTargetAssembly.
877  // We decompose the Inner to Outer conductor transition into 5 section of cones.
878  //
879  std::vector<G4double> fTargetHorn1InnerRadsUpstr;
880  std::vector<G4double> fTargetHorn1InnerRadsDownstr;
881  std::vector<G4double> fTargetHorn1TransThick;
882  std::vector<G4double> fTargetHorn1Lengths;
883  std::vector<G4double> fTargetHorn1ZPositions;
884  //
885  // December 2013: Request to support 1.2 MW target option. 1rst step is to provide
886  // a simple target, box and/or cylinder
887  //
889  G4bool fConstructPlug;
894  G4double fRALTargetRing;
897  G4double fSimpleTargetRadius; // not used if box.
898  G4double fSimpleTargetHeight; // not used if cylinder
899  G4double fSimpleTargetWidth; // not used if cylinder
902 //Quynh, August 2014
906 // October 2015,
907 //
909  //
910  // Horn1, excluding the target elements in side the Horn1.
911  //
912  bool fFillHornsWithArgon; // Introduced on June 18 2015. default is false,
913  // for sake of consistency with LBNF CD1-refresh
914  // Likely to change to true, or we will fill with Helium..
915  G4int fHorn1RadialRescaleCnt; // A counter to avoid calling the Rescale method twice in a give job .
916  // Amit B., Paul L. March 2015.
918  //
919  // First, a rescaling factor with respect to current (NUMI based) design
920  //
924  G4double fHorn1RMinAllBG; // 1.2 MW upgrade, insterting the target fully into the horn.
925  G4double fHorn1RMaxAllBG; // 1.2 MW upgrade, insterting the target fully into the horn.
926  bool fHorn1RadiusBigEnough; // 1p2 MW design and optimization: set the inner conductor radius sufficiently large such that
927  // it does not interfere with the Target helium Container tube.
928 
929  G4double fHorn1IOTransLength; // Transition Inner to Outer conductors. A container volume (TUBS)
930  G4double fHorn1IOTransInnerRad; // Surveyable!. But physically attachached to the top level section.
932 
933  std::vector<G4double> fHorn1UpstrInnerRadsUpstr;
934  std::vector<G4double> fHorn1UpstrInnerRadsDownstr;
935  std::vector<G4double> fHorn1UpstrInnerRadsOuterUpstr;
936  std::vector<G4double> fHorn1UpstrInnerRadsOuterDownstr;
937  std::vector<G4double> fHorn1UpstrLengths;
938  std::vector<G4double> fHorn1UpstrZPositions;
939 
940  std::vector<G4double> fHorn1UpstrOuterIOTransInnerRads;
941  std::vector<G4double> fHorn1UpstrOuterIOTransThicks;
942  std::vector<G4double> fHorn1UpstrOuterIOTransLengths;
943  std::vector<G4double> fHorn1UpstrOuterIOTransPositions;
944 
945  G4double fHorn1TopUpstrLength; // Upstream part of the inner conductor, container volume (TUBS), Surveyed.
946  G4double fHorn1TopUpstrInnerRad; // This volume envelopes the target.
948  G4double fZHorn1ACRNT1Shift; // Z coordinate shift from the beginning of Horn1TopLevelUpstr and Z=0., drawing coordinate.
949 
950  G4double fHorn1TopDownstrLength; // Do part of the inner conductor, container volume (TUBS), Surveyed.
956  G4double fHorn1NeckZPosition; // from the start of Horn1TopLevelUpstr
957  G4double fHorn1ZEndIC; // Z coordinate of the end of the inner conductor, rescaled is need be.
958 
959  // The outer tube
960 
963  std::vector<double> fHornsOuterTubeOuterRad;
964  G4double fHorn1OuterConnectorRad; // rescaled radially as well.
968 
969  G4double fHorn1InnerConnectorRad; // dwonstream end connectors
973 
974  G4String fHorn1InnerCondMat; // so that we can study the relevance of thinning the conductor.
975  G4String fHorn1AllCondMat; // so that we can study the relevance of thinning the conductor.
976 
977  std::vector<LBNEHornRadialEquation> fHorn1Equations;
978  //
979  // For the Nova-like option, different volume hierarchy.
980  //
981  G4VPhysicalVolume* fTargetNoSplitM1;
982  G4VPhysicalVolume* fTargetHorn1HallPhysPtr;
983  G4PVPlacement* fHorn1HallPhysPtr;
984  //
985  // ==========================================================
986  //
987  // Horn2
988  //
989  G4int fHorn2RadialRescaleCnt; // A counter to avoid calling the Rescale method twice in a give job .
990  // Amit B., Paul L. March 2015.
993  G4double fHorn2RadialRescaleCst; // Added Dec. 16 2014
995  G4double fHorn2LongPosition; // with data cards...
996  //
997  G4double fHorn2Length; // Top level volume, surveyable. and rescal-able.
998  G4double fHorn2LengthNominal; // As found on drawing 8875.112-MD 363382, Revision E
999  G4double fHorn2Radius;
1000  G4double fHorn2OffsetIOTr1; // The distance between Z=0 in Horn2 Drawing coordinate and
1001  // the most upstream z location of the Inner Outer transition piece
1002 
1003  // We will subdivide Horn2 along the parts on Drawing 8875.112MD - 363383
1004  //
1005  // Part 1 (index 0 in the array below) : Transition Inner to outer conductor . Drawing 363382
1006  // Part2.... Up to 7.
1007  //
1008  std::vector<G4double> fHorn2PartsLengths;
1009  std::vector<G4double> fHorn2PartsRadii;
1010 
1012  //
1013  // We approximate the upstream inner to outer transition (part 1) as a bunch tubs
1014  //
1015  std::vector<G4double> fHorn2UpstrOuterIOTransRadsOne;
1016  std::vector<G4double> fHorn2UpstrOuterIOTransRadsTwo;
1017  std::vector<G4double> fHorn2UpstrOuterIOTransLengths;
1018  std::vector<G4double> fHorn2UpstrOuterIOTransPositions; // with respect to the start of the mother volume
1019  //
1020  // And one mulit-sections cone section, whoe raddi are set the equations..
1021  //
1023 
1024  std::vector<LBNEHornRadialEquation> fHorn2Equations;
1025 
1026  // The outer tube
1027 
1030  G4double fHorn2OuterTubeOuterRadMax; // include downstream flange
1031  //
1032  // July 2016: Installation of Conceptual design, Optimized horns.
1033  // To be used in the installation of the doswtream parts of the Horn2 current equalizer sections,
1034  // along with the striplines.
1035  //
1036  G4double fLengthCurrEqICInMotherHorn2, fRadInnerICCurrEqHorn2, fRadOuterICCurrEqHorn2;
1037  G4double fLengthCurrEqOCInMotherHorn2, fRadInnerOCCurrEqHorn2, fRadOuterOCCurrEqHorn2;
1038  G4RotationMatrix* fRotHornBStrpLineConnFlatB[4];
1039  G4RotationMatrix* fRotHornBStrpLineConnFlatC[4];
1040  G4RotationMatrix* fRotHornBStrpLineRotY;
1041 
1042 // To be used in the coordinate transform for computing the magnetic field
1043 
1044  std::vector<G4double> fHorn2ZEqnChanges; // Z Coordinates (Drawing ) where the equation setting the radius changes.
1048  G4double fHorn2NeckZPosition; // from the start of Horn1TopLevelUpstr
1049  G4double fHorn2ZEndIC; // Z coordinate of the end of the inner conductor, rescaled is need be.
1051 //
1052  G4String fHorn2InnerCondMat; // so that we can study the relevance of thinning the conductor.
1053  G4String fHorn2AllCondMat; // so that we can study the relevance of thinning the conductor.
1054  G4String fHorn3InnerCondMat; // so that we can study the relevance of thinning the conductor.
1055  G4String fHorn3AllCondMat; // so that we can study the relevance of thinning the conductor.
1062 //
1063 // Ferburary 7-10 2015: The optimum geometry prefers a longer Horn2, and placed further downstresm
1064 // Extend the chase, optionally, and reduce the decay pipe length See method ExtendChaseForHorn2
1065 //
1067 //
1068 // March 10 2015: Implement the magentic field inside the decay pipe..
1069 //
1070 
1073 
1074  G4double fWriteGDMLFile;
1075 
1076 //
1077 // August Sept 2015:, post CD1-Refresh, LBNF era:
1078 //
1080 
1081 //
1082 // ===========================================
1083 //
1084 //
1085 // Decay Pipe Snout Window ( if Helium chosen)
1086 //
1090  G4double fDecayPipeWindowThickBeryl; // Alreay defined see fDecayPipeUpstrWindowThick
1092 //
1093 // Other dimensions in PlaceFinalDecayPipeSnout
1094 //
1095 //
1096 // 1.2 MW option, February 2014 to December 2016
1097 //
1098  G4bool fUse1p2MW;
1099  G4bool fUse1p2MWSmallTgt; // Used in conjunction with the NuMI horns
1101  // degsign, Feb. 2014
1102 //
1103 // Improve accuracy of volumes in target, rounded fins, March 2014
1104 //
1106 //
1107 // July 2014: a logical to declare the target completely out of Horn1, similar to the NuMI Medium energy
1108 // setting currently used for Nova. Set when fTargetLengthOutsideHorn is < entire target length.
1109 // If true, Valid only for the 1.2 MW option.
1110 //
1112 //
1113 //
1114 // Connectors and flange downstream used only once, so we declare and rescale them as we go
1115 
1116  bool fUseMarsTargetHorns; // a flag to turn on Mars GDML geometry for target and horns
1117 
1119 
1121 //
1122 // Steel shielding surrounding the horns
1123 //
1124  bool fDoInstallShield; // a flag to install or removing these shielding block.
1125 
1126 
1127  // a flag to check the geometry as it is constructed.
1128 
1130 
1131  // Store the mother volume at top of volume hierarchy, for book-keeping/debugging purposes.
1132 
1133  const G4LogicalVolume* fTopLogicalVolume;
1134  //
1135  // August 2014: Decide to install the complete Horn1 as a polycone volume to avoid having to split it
1136  //
1137  // But, we'd like to keep the existing code as such, so, we start by placing a flag.
1140  std::vector<double> fMotherHorn1AllRads;
1141  std::vector<double> fMotherHorn1AllLengths; // [0] is the most upstream length.
1142  std::vector<double> fMotherHorn1AllThick;
1143 // Extension to multiple Horns
1144  std::vector< std::vector<double> > fMotherHornsAllRads;
1145  std::vector< std::vector<double> > fMotherHornsAllThick;
1146  std::vector< std::vector<double> > fMotherHornsAllLengths; // [0] is the most upstream length.
1147 //
1148  // October 2014: logical flag to build (or not) the decay Pipe snout, such that we have more room to place
1149  // the Horns
1152 
1153  //To calculate the absorption outside target more effecient.....Amit Bashyal
1154  std::vector<G4String> fHorn1IC;
1155  std::vector<G4String> fHorn2IC;
1156 
1157 //
1158 // LBNF era:
1159 // June 2016: Starting on the detailed representation of the 3 Horns for LBNF, optimized and conceptual engineering.
1160  //
1172  size_t fLBNFOptimConceptDesignHornCNumStepIC[10]; // number of major subsections of of the inner conductor.
1173  //
1174  // This method was found in G4PVPlacement. It is a clone, where we just skip
1175  // the error messages.
1176  bool CheckOverlaps(const G4PVPlacement *phys, G4int nres, G4double eps, G4bool verbose) const;
1177  //
1178  // More intialization done here (too keep the constructor code of reasonable length.. )
1179  //
1180  void DeclareHorn1Dims();
1181  void CheckHorn1InnerConductAndTargetRadii(); // A check prior to the CheckOverlap of Geant4. In principle,
1182  // simpler and therefore more exact or reliable.
1183  // If fail, issues a fatal G4Exception.
1184  int GetNumberOfInnerHornSubSections(size_t eqn, double z1, double z2, int nMax) const;
1185  int GetNumberOfInnerHorn2SubSections(size_t eqn, double z1, double z2, int nMax) const;
1186 
1187  void Horn1InstallSpiderHanger(const G4String &name, double zFromStartInnerConduct, double zPos,
1188  G4PVPlacement *vMother );
1189  void Horn2InstallSpiderHanger(const G4String &name, G4PVPlacement *vMother );
1190  void Horn1PlaceAWeld(const G4String &name, double z,
1191  const LBNEVolumePlacementData *plInfo, G4PVPlacement *vMother );
1192 
1193  void DeclareHorn2Dims();
1194  //
1195  // 1.2 MW upgrade..
1196  //
1197  void PlaceFinalUpstrTarget1p2MW(G4PVPlacement *mother);
1198  void PlaceFinalDownstrTarget1p2MW(G4PVPlacement *mother);
1199  void PlaceFinalSmallTarget1p2MW(G4PVPlacement *mother);
1200  void PlaceRALTGTv1(G4PVPlacement *mother);
1201 
1202 //
1203 // Simple target implementation..
1204 //
1205  void PlaceFinalRALTarget(G4PVPlacement *mother);
1206  void PlaceFinalUpstrTargetSimpleCylinder(G4PVPlacement *mother);
1207  void PlaceFinalUpstrTargetSimpleBox(G4PVPlacement *mother);
1208  void declareTargetFinVertCorners(LBNEVolumePlacementData &info);
1209 //Quynh add Sphere target choice----------------------------
1210  void PlaceFinalUpstrMultiSphereTarget(LBNEVolumePlacementData *plHelium, G4PVPlacement *mother);
1211  //
1212  void setMotherVolumeForHorn1(); // Simplification of geometry, August/Sept 2013.
1213  void setEntireTargetDims(); // Simplification of geometry, August/Sept 2013.
1214  void DumpAllHornsPolyconeParameters(); // for debugging...
1215  public:
1216  //
1217  // Transfer of the radial information about the field to the 1p2 MW new design of Horn1
1218  //
1219  inline double GetHorn1RMinAllBG() const {return fHorn1RMinAllBG;} // Big radius of inner conductor, inner radius if 1p2 MW
1220  inline double GetHorn1RMaxAllBG() const {return fHorn1RMaxAllBG;}
1221  //
1222  inline void SetUsePseudoNova(bool t) {fUsePseudoNova = t;}
1223  inline bool GetUsePseudoNova() const {return fUsePseudoNova;}
1224  inline void SetTargetNoSplitM1(G4VPhysicalVolume *p) { fTargetNoSplitM1 = p;}
1225  inline void SetTargetHorn1HallPhysPtr(G4VPhysicalVolume *p) { fTargetHorn1HallPhysPtr = p;}
1226  inline void SetHorn1HallPhysPtr(G4PVPlacement *p) { fHorn1HallPhysPtr = p;}
1227  //
1228  inline bool GetHorn1MotherIsPolycone() const {return fHorn1MotherIsPolycone;}
1229 
1230 // July-August 2014: Multi-sphere target (Quynh )
1231 
1232  inline void SetUseMultiSphereTarget(bool t) { fUseMultiSphereTarget = t;}
1233  inline void SetMultiSphereTargetLength (double r) {fMultiSphereTargetLength = r;} //Quynh. real target.(2) - July 16 2014
1234  inline void SetMultiSphereTargetRadius (double r) {fMultiSphereTargetRadius = r;} //Quynh, P.L., August 2014
1235  inline bool GetUseMultiSphereTarget() const { return fUseMultiSphereTarget;}
1236  inline double GetMultiSphereTargetRadius() const {return fMultiSphereTargetRadius;}
1237  void AdaptForMultiSphereTarget();
1238  void PlaceFinalMultiSphereTarget(LBNEVolumePlacementData *plHelium, G4PVPlacement *mother);
1239 
1240  inline bool GetRemoveDecayPipeSnout() const {return fRemoveDecayPipeSnout;}
1241  inline void SetRemoveDecayPipeSnout(bool t) { fRemoveDecayPipeSnout = t;}
1242 
1243  inline double GetRadiusMilindWire() const {return fRadiusMilindWire;}
1244  inline void SetRadiusMilindWire(double r) { fRadiusMilindWire = r;}
1245  inline double GetCurrentMilindWire() const {return fCurrentMilindWire;}
1246  inline void SetCurrentMilindWire(double r) { fCurrentMilindWire = r;}
1247 
1248  inline bool GetWriteGDMLFile() const {return fWriteGDMLFile;}
1249  inline void SetWriteGDMLFile(bool t) { fWriteGDMLFile = t;}
1250 
1251  // August 2015..
1252  inline double GetChaseWidthForLBNF() const { return fChaseWidthForLBNF;}
1253 
1254  // John Back, March 2016, target module options, which includes the SAT
1255  // Also added mirror image 2nd target module options: Jan 2017
1257  inline void SetUseTargetModule(bool t) {fUseTargetModule = t;}
1258  inline bool GetUseTargetModule() const { return fUseTargetModule;}
1260  inline void SetUseTarget2Module(bool t) {fUseTarget2Module = t;}
1261  inline bool GetUseTarget2Module() const { return fUseTarget2Module;}
1262 
1263  // The target module type
1264  enum TargetType {SAT = 0, Cylinder = 1};
1265 
1267  void SetTargetModuleType(int i) {fTargetModuleType = i;}
1268  inline int GetTargetModuleType() const {return fTargetModuleType;}
1270  void SetTarget2ModuleType(int i) {fTarget2ModuleType = i;}
1271  inline int GetTarget2ModuleType() const {return fTarget2ModuleType;}
1272 
1273  // Initialise the geometrical parameters for the target module(s)
1274  void InitTargetModule();
1275  void InitTarget2Module();
1276 
1277  // Create and place the target modules
1278  void PlaceTargetModule(int number = 1);
1279 
1280  // Create the individual target module volumes
1281  LBNEVolumePlacementData* CreateTargetVol(const G4String &volName, int number = 1);
1282 
1283  // Place the outer canister of the target module(s)
1284  void PlaceTargetOuterCan(int number = 1);
1285 
1286  // Place the inner canister of the target module(s)
1287  void PlaceTargetInnerCan(int number = 1);
1288 
1289  // Place the inner support rods of the target module(s)
1290  void PlaceTargetSupport(int number = 1);
1291 
1292  // Place the actual targets, e.g. cylinder or spheres
1293  void PlaceTargetObject(int number = 1);
1294 
1295  // The radius of the target object(s)
1296  G4double fTargetRadius;
1297  inline void SetTargetRadius (double r) {fTargetRadius = r;}
1298  inline double GetTargetRadius() const {return fTargetRadius;}
1299  G4double fTarget2Radius;
1300  inline void SetTarget2Radius (double r) {fTarget2Radius = r;}
1301  inline double GetTarget2Radius() const {return fTarget2Radius;}
1302 
1303  // The length of the target object
1304  G4double fTargetLength;
1305  inline void SetTargetLength (double l) {fTargetLength = l;}
1306  inline double GetTargetLength() const {return fTargetLength;}
1307  G4double fTarget2Length;
1308  inline void SetTarget2Length (double l) {fTarget2Length = l;}
1309  inline double GetTarget2Length() const {return fTarget2Length;}
1310 
1311  // Both target modules will use the same supporting structure dimensions:
1312  // only the target object(s) radius, length and/or material will differ
1313 
1314  // The diameter thickness of the supporting rods holding the target object
1316 
1317  // The total length of the supporting rods
1319 
1320  // The thickness of the Ti casings
1321  G4double fTargetCaseT;
1322  // The He gas gap between the two Ti casing cylinders
1323  G4double fTargetHeGap;
1324  // The inner radius of the outer casing
1327 
1328  // The integer number of target objects (cylinder = 1, spheres = N)
1331 
1332  // The length of the inner canister holding the spheres
1333  G4double fTargetInCaseL;
1335 
1336  // The length of the upstream start of the inner target canister
1338 
1339  // The length of the downstream end of the inner target canister
1341 
1342  // The length separation between the downstream end of the inner target canister
1343  // and the downstream end of the cylindrical section of the outer target canister
1345 
1346  // The length of the outer target canister
1349 
1350  // The total length of the target module, including the end bulb of the outer canister
1353 
1354  // The fractional length of the first target module outside Horn1. The second module
1355  // is always placed with respect to the first one
1357  inline void SetTargetFracOutHornL(double l) {fTargetFracOutHornL = l;}
1358  inline G4double GetTargetFracOutHornL() const {return fTargetFracOutHornL;}
1359 
1360  // The number of interaction lengths required for the target object
1361  G4double fTargetNLambda;
1362  inline void SetTargetNLambda(double N) {fTargetNLambda = N;}
1363  inline G4double GetTargetNLambda() const {return fTargetNLambda;}
1365  inline void SetTarget2NLambda(double N) {fTarget2NLambda = N;}
1366  inline G4double GetTarget2NLambda() const {return fTarget2NLambda;}
1367 
1368  // May need to set the extra outside length depending on Horn1 set-up, for example
1369  // if UseHorn1Polycone = false (default)
1370  inline void SetTargetLengthOutsideExtra(double l) {fTargetLengthOutsideExtra = l;}
1371  inline G4double GetTargetLengthOutsideExtra() const {return fTargetLengthOutsideExtra;}
1372 
1373  // Helper function to find the number of spheres in the SAT given
1374  // the required number of interaction lengths, taking into account
1375  // the finite size of the Gaussian beam
1376  G4double FindNTargetSpheres(int number = 1) const;
1377 
1378  // For the second module target material, which can be different from the first module
1379  G4double fTarget2Density; // Density of the target
1380  G4double fTarget2SpecificLambda; // Specific nuclear interaction length of the target material
1382  inline double GetTarget2Density() const { return fTarget2Density; }
1383  inline void SetTarget2Density(double l) { fTarget2Density = l; }
1384 
1385  inline double GetTarget2SpecificLambda() const {return fTarget2SpecificLambda;}
1386  inline void SetTarget2SpecificLambda(double l) {fTarget2SpecificLambda = l;}
1387 
1388  inline G4String GetTarget2MaterialName() const { return fTarget2MaterialName; }
1389  inline void SetTarget2MaterialName(G4String &aName) { fTarget2MaterialName = aName; }
1390 
1391  // Rotation matrix for the 2nd module
1392  G4RotationMatrix* fMirrorRotation;
1393  // Displacement of the 2nd module along z: depends on length of 1st module
1394  G4double fZModuleShift;
1395 
1396  //
1397  // June 2016 : LBNF Optimize, Conceptual Design.
1398  //
1399  inline bool GetUseLBNFOptimConceptDesignHornA() const { return fUseLBNFOptimConceptDesignHornA; }
1400  inline bool GetUseLBNFOptimConceptDesignHornB() const { return fUseLBNFOptimConceptDesignHornB; }
1401  inline bool GetUseLBNFOptimConceptDesignHornC() const { return fUseLBNFOptimConceptDesignHornC; }
1402  inline bool GetUseCDR2015Optimized() const { return fUseCDR2015Optimized; }
1403  inline double GetZShiftConceptHornAStartIC() { return fZShiftConceptHornAStartIC; }
1404  inline double GetZHallHorn1ToHorn1PolyM1() { return fZHallHorn1ToHorn1PolyM1; }
1405  inline void SetUseLBNFOptimConceptDesignHornA(bool f) { fUseLBNFOptimConceptDesignHornA = f; }
1406  inline void SetUseLBNFOptimConceptDesignHornB(bool f) { fUseLBNFOptimConceptDesignHornB = f; }
1407  inline void SetUseLBNFOptimConceptDesignHornC(bool f) { fUseLBNFOptimConceptDesignHornC = f; }
1408  inline void SetUseCDR2015Optimized(bool f) { fUseCDR2015Optimized = f; }
1409  inline void SetZHallHorn1ToHorn1PolyM1(double d) { fZHallHorn1ToHorn1PolyM1 = d; }
1410  void PlaceFinalLBNFConceptHornA();
1411  void PlaceFinalLBNFConceptTgtSupport();
1412  void PlaceFinalLBNFConceptHornB();
1413  void PlaceFinalLBNFConceptStripLinesConnectHornB();
1414  void PlaceFinalLBNFConceptHornC();
1415  void PreparePolyconForConceptHornA();
1416  void PreparePolyconForConceptHornB();
1417  void PreparePolyconForConceptHornC();
1418  void PlaceFinalLBNFConceptStripLinesConnectHornC();
1419  // August 2016: give the option to remove the baffle and the horizontal target.
1420  inline bool GetInstallBaffle() const { return fInstallBaffle; }
1421  inline bool GetInstallUpstreamHorizontalTarget() const { return fInstallUpstreamHorizontalTarget; }
1422  inline void SetInstallBaffle(bool f) { fInstallBaffle=f;}
1423  inline void SetInstallUpstreamHorizontalTarget(bool f) { fInstallUpstreamHorizontalTarget=f;}
1424  inline bool GetInstallDownstTargetSupport() const { return fInstallDownstTargetSupport; }
1425  inline void SetInstallDownstTargetSupport(bool t) { fInstallDownstTargetSupport = t; }
1426  inline bool GetRemoveRALBafflet() const {return fRemoveRALBafflet; }
1427  inline void SetRemoveRALBafflet(bool f) {fRemoveRALBafflet=f;}
1428 
1429  inline bool GetInstallRALShortTarget() const { return fInstallRALShortTarget; }
1430  inline void SetInstallRALShortTarget(bool f) { fInstallRALShortTarget=f; }
1431 
1432  inline double GetRALSimpleTargetLength() const { return
1433  fRALSimpleTargetLength; }
1434  inline void SetRALSimpleTargetLength(double l) {fRALSimpleTargetLength=l;}
1435 
1436 };
1437 
1438 #endif
1439 
double GetCurrentMilindWire() const
static QCString name
Definition: declinfo.cpp:673
double GetLengthOfRockDownstreamAlcove() const
G4PVPlacement * fHorn1HallPhysPtr
void SetRadialRescaleFactorCst(double r)
std::vector< G4double > fHorn2UpstrOuterIOTransRadsTwo
void SetMultiSphereTargetLength(double r)
std::vector< double > fMotherHorn1AllLengths
std::vector< LBNEHornRadialEquation > fHorn1Equations
double GetHorn1OuterTubeOuterRad() const
double GetChaseWidthForLBNF() const
G4double fTargetOutHeContTubeInnerRadiusTapered
void SetSimpleTargetWidth(double r)
void SetTargetNumFinsWithWings(unsigned int n)
double GetSimpleTargetHeight() const
void SetDecayPipeUpstrWindowThick(double l)
std::vector< G4ThreeVector > fHorn1PolyListRinThickZVects
double GetTargetDensity() const
void SetTargetFracOutHornL(double l)
std::vector< G4double > fTargetHorn1ZPositions
double GetDecayPipeUpstrWindowThick() const
G4double fTargetDSSupportSmallConeSmallOuterRad
double GetHorn2ZEqnChange(size_t k) const
bool GetUseMultiSphereTarget() const
std::vector< std::vector< G4ThreeVector > > fHornsPolyListRinThickZVects
double GetHorn1EffectiveLength() const
double GetMultiSphereTargetRadius() const
void SetPlugMaterial(std::string name)
std::vector< double > fZCoordCDRevisedHornC
LBNEVolumePlacements_AlignmentAlgo
bool GetUseLBNFOptimConceptDesignHornB() const
void SetMarsTargetHornsGDMLFilename(G4String &name)
std::string string
Definition: nybbler.cc:12
std::vector< double > fHornsPolyOuterRadius
std::vector< G4double > fHorn1UpstrOuterIOTransPositions
double GetPlugZPosition() const
std::vector< std::vector< double > > fMotherHornsAllRads
double GetDecayPipeLongPosition() const
G4double fTargetCTubeReturnDownstrCutAngleStart
void SetTargetHorn1HallPhysPtr(G4VPhysicalVolume *p)
bool GetInstallUpstreamHorizontalTarget() const
double GetTarget2Length() const
bool GetHorn1MotherIsPolycone() const
void SetRALSimpleTargetLength(double l)
std::vector< double > fRInCoordCDRevisedHornA
double GetHornsOuterTubeOuterRad(size_t iH) const
G4String GetMarsTargetHornsGDMLFilename() const
std::vector< G4double > fHorn1UpstrOuterIOTransLengths
double GetHorn1DeltaZEntranceToZOrigin() const
double GetBaffleWindowThickness() const
std::vector< double > fHornsPolyZStartPos
void SetHorn3AllConductorMaterial(G4String &name)
void SetUseLBNFOptimConceptDesignHornB(bool f)
bool GetUseLBNFOptimConceptDesignHornC() const
void SetZHallHorn1ToHorn1PolyM1(double d)
std::vector< G4String > GetHorn2ICList() const
void SetTargetFinWidth(double l)
double GetHorn1RMinAllBG() const
double GetHorn1PolyOuterRadius() const
void SetHorn2RadialRescaleCst(double r)
G4double fTargetCTubeReturnDownstrThickTitanium
double GetHorn2DeltaZEntranceToZOrigin() const
G4UImessenger * fPlacementMessenger
std::vector< double > GetHornsPolyInnerConductorRadiiHornARev2() const
double GetTargetSLengthGraphite() const
std::vector< int > fUseHornsPolyNumInnerPts
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:45
double GetSimpleTargetWidth() const
G4double fTargetOutHeContTubeOuterSphericalEndCap
void SetMultiSphereTargetRadius(double r)
std::vector< double > fRInCoordCDRevisedHornC
std::vector< G4double > fHorn2UpstrOuterIOTransPositions
G4String GetAbsorberGDMLFilename() const
double GetHornsPolyInnerConductorZCoord(size_t iH, size_t numPts) const
double GetBaffleInnerRadius() const
void SetTargetLengthOutsideExtra(double l)
G4double fTargetDSSupportSmallConeLargeOuterRad
void SetBaffleInnerRadius(double r)
void SetConstructPlugInHorn1(bool t)
void SetTarget2SpecificLambda(double l)
static QStrList * l
Definition: config.cpp:1044
void SetTargetMaterialName(G4String &aName)
double GetTarget2Radius() const
double GetHorn2ZEndIC() const
bool GetUseLBNFOptimConceptDesignHornA() const
std::vector< G4double > fHorn2ZEqnChanges
std::vector< G4double > fTargetHorn1InnerRadsUpstr
double GetDecayPipeLength() const
double GetHornParabolicRZCoord(size_t iH, size_t k) const
G4double fTargetDSSupportSmallConeSmallInnerRad
bool GetUseSimpleTargetBox() const
double GetThickICDRevisedHornB() const
G4double GetTarget2NLambda() const
void SetHorn1RadialRescale(double r)
double GetHorn1NeckInnerRadius() const
void SetTargetSpecificLambda(double l)
void SetHornsPolyZStartPos(size_t hornNumber, double z)
size_t GetHorn2ZEqnChangeNumEqn() const
double GetHorn1LongRescale() const
unsigned int GetTargetNumFinsWithWings() const
std::vector< double > fHornsOuterTubeOuterRad
void SetHorn2LongPosition(double l)
std::map< G4String, LBNEVolumePlacementData > fSubVolumes
double GetHorn2OuterTubeOuterRad() const
std::vector< G4double > fHorn1UpstrOuterIOTransInnerRads
double GetTargetSpecificLambda() const
void SetTargetNoSplitM1(G4VPhysicalVolume *p)
G4String GetDecayPipeGas() const
std::vector< G4double > fHorn2PartsRadii
T abs(T value)
std::vector< G4String > fHorn2IC
double GetSimpleTargetRadius() const
bool GetUseMarsTargetHorns() const
double GetTargetFinWidth() const
void SetDecayPipeRadius(double l)
void SetPolyconeHorn1Parabolic(bool t)
std::vector< double > GetHornsPolyInnerConductorZsHornARev2() const
std::vector< double > fParams
void SetHorn2AllConductorMaterial(G4String &name)
std::vector< double > GetHornsPolyInnerConductorRadiiHornBRev2() const
double GetTotalLengthOfRock() const
void PrintAll(std::string someText)
Definition: Utils.cxx:4945
G4VPhysicalVolume * fMother
double GetHornsPolyOuterRadius(size_t iH) const
double GetHornsPolyZStartPos(size_t iH) const
std::vector< G4double > fTargetHorn1Lengths
double GetHorn2NeckInnerRadius() const
std::vector< LBNEHornRadialEquation > fHorn2Equations
void SetHorn3InnerConductorMaterial(G4String &name)
std::vector< double > GetHornsPolyInnerConductorRadiiHornCRev2() const
unsigned int fTargetNumFinsWithWings
std::vector< bool > fPolyconeHornsAreParabolic
void SetSimpleTargetHeight(double r)
G4String GetTargetMaterialName() const
double GetHornsPolyInnerConductorThickness(size_t iH, size_t numPts) const
void SetDecayPipeGas(G4String &name)
G4RotationMatrix * fRotHornBStrpLineRotY
std::vector< double > fRInCoordCDRevisedHornB
std::vector< G4double > fHorn2PartsLengths
void SetHorn1PolyOuterRadius(double r)
G4String GetHorn2InnerConductorMaterial() const
double GetTargetHallZ() const
void SetCurrentMilindWire(double r)
double GetHorn2NeckLength() const
std::vector< G4double > fHorn2UpstrOuterIOTransLengths
void SetTotalLengthOfRock(double l)
G4String GetHorn2AllConductorMaterial() const
void SetPlugInnerRadius(double r)
double z
double GetHorn1RadialSafetyMargin() const
void SetUseHorn1PolyNumInnerPts(int n)
void SetHorn2InnerConductorMaterial(G4String &name)
double GetDecayPipeRadius() const
G4double fTargetOutHeContTubeInnerSphericalEndCap
G4String GetTarget2MaterialName() const
double GetHorn1ZEndIC() const
double GetHorn1PolyInnerConductorThickness(size_t numPts) const
G4double fTargetDSSupportLargeConeSmallInnerRad
double GetTargetBerylDownstrWindowThick() const
double GetTarget2Density() const
void SetTargetLengthIntoHorn(double l)
G4double fTargetDSSupportLargeConeLargeOuterRad
std::vector< double > fZCoordCDRevisedHornA
G4double GetTargetNLambda() const
void SetSimpleTargetLength(double l)
void SetUseLBNFOptimConceptDesignHornA(bool f)
std::vector< G4double > fHorn1UpstrInnerRadsOuterUpstr
bool IsHornPnParabolic(size_t numHorn) const
std::vector< double > fMotherHorn1AllThick
bool GetRemoveDecayPipeSnout() const
verbose
Definition: train.py:477
double GetHorn1NeckOuterRadius() const
void SetHorn1InnerConductorMaterial(G4String &name)
void SetUseLBNFOptimConceptDesignHornC(bool f)
G4RotationMatrix fRotTgtTitCTubeHor
std::vector< double > fHornsLength
std::string GetPlugMaterial() const
bool GetUseCDR2015Optimized() const
double GetConductorRadiusHorn2(double zD, size_t eqn) const
void SetHorn2LongRescale(double r)
static LBNEVolumePlacements * fInstance
double GetHorn1NeckZPosition() const
p
Definition: test.py:223
double GetHorn1PolyInnerConductorRadius(size_t numPts) const
void SetDecayPipeLongPosition(double l)
std::vector< G4double > fHorn1UpstrInnerRadsOuterDownstr
int GetUseHornsPolyNumInnerPts(size_t i) const
void SetInstallDownstTargetSupport(bool t)
std::vector< std::vector< double > > fMotherHornsAllThick
void SetPolyconeHornParabolic(size_t hornNumber, bool t)
void SetRadialRescaleFactor(double r)
G4String GetHorn3AllConductorMaterial() const
G4double fTargetDSSupportLargeConeLargeInnerRad
G4double fTargetCTubeReturnDownstrThickWater
double GetBaffleLength() const
std::vector< G4double > fHorn1UpstrOuterIOTransThicks
G4RotationMatrix * fMirrorRotation
std::vector< double > GetHornsPolyInnerConductorZsHornCRev2() const
G4RotationMatrix fRotVertical
double GetHorn2LongRescale() const
void SetHorn1RadiusBigEnough(bool t)
std::vector< G4double > fHorn1UpstrInnerRadsDownstr
void SetPlugOuterRadius(double r)
double GetHornsPolyInnerConductorRadius(size_t iH, size_t numPts) const
void SetTarget2MaterialName(G4String &aName)
void SetRemoveTargetAlltogether(bool t)
double GetHorn1Length() const
void SetHorn1HallPhysPtr(G4PVPlacement *p)
double GetHorn1PolyInnerConductorZCoord(size_t numPts) const
G4RotationMatrix fRotTgtTitCTubeVert
double GetRALSimpleTargetLength() const
std::vector< G4double > fTargetHorn1TransThick
std::vector< G4double > fHorn1UpstrZPositions
double GetRadiusMilindWire() const
double GetTargetLengthIntoHorn() const
std::vector< G4double > fHorn1UpstrInnerRadsUpstr
G4double GetTargetLengthOutsideExtra() const
double GetThickICDRevisedHornC() const
void SetTargetSLengthGraphite(double l)
G4String GetHorn1AllConductorMaterial() const
void SetHornsPolyOuterRadius(size_t hornNumber, double r)
void SetLengthOfRockDownstreamAlcove(double l)
std::vector< G4double > fHorn1UpstrLengths
bool GetConstructPlugInHorn1() const
void SetSimpleTargetRadius(double r)
double GetHornParabolicThick(size_t iH, size_t k) const
bool GetUseSimpleTargetCylinder() const
std::vector< double > fZCoordCDRevisedHornB
void SetUseHornsPolyNumInnerPts(size_t hornNumber, size_t nElem)
double GetHorn1NeckLength() const
G4VPhysicalVolume * fTargetHorn1HallPhysPtr
double GetThickICDRevisedHornA() const
void SetDecayPipeLength(double l)
void SetHorn2RadialRescale(double r)
double GetSimpleTargetLength() const
void SetHorn1LongRescale(double r)
std::vector< double > fMotherHorn1AllRads
void SetHornsPolyInnerThreeVect(size_t hornNumber, size_t iP, G4ThreeVector vVal)
double GetHorn2NeckZPosition() const
void SetRadiusMilindWire(double r)
bool GetInstallDownstTargetSupport() const
double GetConductorRadiusHorn1(double zD, size_t eqn) const
G4double fTargetDSSupportSmallConeLargeInnerRad
const G4LogicalVolume * fTopLogicalVolume
double GetHornParabolicRIn(size_t iH, size_t k) const
G4String GetHorn1InnerConductorMaterial() const
void SetTargetBerylDownstrWindowThick(double t)
bool GetUseRoundedTargetFins() const
double GetPlugInnerRadius() const
int GetNumberOfHornsPolycone() const
void SetAbsorberGDMLFilename(G4String &name)
void SetHorn1PolyInnerThreeVect(size_t iP, G4ThreeVector vVal)
std::vector< G4double > fTargetHorn1InnerRadsDownstr
G4VPhysicalVolume * fTargetNoSplitM1
double GetPlugOuterRadius() const
G4double GetTargetFracOutHornL() const
double GetHorn1ZDEndNeckRegion() const
void SetBaffleZPosition(double z)
bool GetInstallRALShortTarget() const
std::vector< G4double > fHorn2UpstrOuterIOTransRadsOne
size_t GetHornParabolicNumInnerPts(size_t iH) const
G4double fTargetDSSupportLargeConeSmallOuterRad
void SetHorn1RadialSafetyMargin(double t)
double GetHorn2LongPosition() const
double GetBaffleZPosition() const
void SetUseSimpleTargetCylinder(bool t)
double GetAbsorberHallZ() const
G4double fTargetCTubeReturnDownstrCutAngleSize
double GetTarget2SpecificLambda() const
G4String GetHorn3InnerConductorMaterial() const
LBNEVolumePlacements_AlignmentAlgo fAlignmentModel
int GetUseHorn1PolyNumInnerPts() const
double GetHorn1RMaxAllBG() const
std::vector< G4String > GetHorn1ICList() const
QTextStream & endl(QTextStream &s)
std::vector< double > GetHornsPolyInnerConductorZsHornBRev2() const
void SetUseRoundedTargetFins(bool t)
bool IsHorn1RadiusBigEnough() const
void SetHorn1AllConductorMaterial(G4String &name)
std::vector< std::vector< double > > fMotherHornsAllLengths
void SetWaterLayerThickInHorns(double l)
std::vector< G4String > fHorn1IC
void SetTargetLengthOutsideHorn(double l)
void SetInstallUpstreamHorizontalTarget(bool f)
G4double fTargetOutHeContTubeOuterRadiusTapered
double GetHorn2NeckOuterRadius() const