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3 ] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /examples/advanced/STCyclotron/include/STCyclotronDetectorConstruction.hh (Version 11.3.0) and /examples/advanced/STCyclotron/include/STCyclotronDetectorConstruction.hh (Version 10.6.p2)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                         3 // * License and Disclaimer                                           *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th      5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided      6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License      7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/      8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.           9 // * include a list of copyright holders.                             *
 10 // *                                               10 // *                                                                  *
 11 // * Neither the authors of this software syst     11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file      15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitatio     16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                               17 // *                                                                  *
 18 // * This  code  implementation is the result      18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboratio     19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distri     20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  ag     21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publicati     22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Sof     23 // * acceptance of all terms of the Geant4 Software license.          *
 24 // *******************************************     24 // ********************************************************************
 25 //                                                 25 //
 26 //  Author: F. Poignant, floriane.poignant@gma     26 //  Author: F. Poignant, floriane.poignant@gmail.com
 27 //                                                 27 //
 28 /// file STCyclotronDetectorConstruction.cc        28 /// file STCyclotronDetectorConstruction.cc
 29                                                    29 
 30 #ifndef STCyclotronDetectorConstruction_h          30 #ifndef STCyclotronDetectorConstruction_h
 31 #define STCyclotronDetectorConstruction_h 1        31 #define STCyclotronDetectorConstruction_h 1
 32                                                    32 
 33 #include "G4VUserDetectorConstruction.hh"          33 #include "G4VUserDetectorConstruction.hh"
 34 #include "globals.hh"                              34 #include "globals.hh"
 35 #include "G4PhysicalConstants.hh"                  35 #include "G4PhysicalConstants.hh"
 36 #include <fstream>                                 36 #include <fstream>
 37                                                    37 
 38 class G4VPhysicalVolume;                           38 class G4VPhysicalVolume;
 39 class G4LogicalVolume;                             39 class G4LogicalVolume;
 40 class G4Region;                                    40 class G4Region;
 41 class G4Tubs;                                      41 class G4Tubs;
 42 class G4Material;                                  42 class G4Material;
 43 class STCyclotronDetectorMessenger;                43 class STCyclotronDetectorMessenger;
 44 class G4Element;                                   44 class G4Element;
 45                                                    45 
 46 /// Detector construction class to define mate     46 /// Detector construction class to define materials and geometry.
 47                                                    47 
 48 class STCyclotronDetectorConstruction : public     48 class STCyclotronDetectorConstruction : public G4VUserDetectorConstruction
 49 {                                                  49 {
 50 public:                                            50 public:
 51   STCyclotronDetectorConstruction();               51   STCyclotronDetectorConstruction();
 52   ~STCyclotronDetectorConstruction();              52   ~STCyclotronDetectorConstruction();
 53                                                    53     
 54   G4VPhysicalVolume* Construct();                  54   G4VPhysicalVolume* Construct();
 55   void ConstructSDandField();                      55   void ConstructSDandField();
 56                                                    56   
 57   void SetTargetDiameter(G4double );               57   void SetTargetDiameter(G4double );
 58   void SetTargetIsotopeName(G4String );            58   void SetTargetIsotopeName(G4String );
 59   void SetTargetIsotopeZ(G4double );               59   void SetTargetIsotopeZ(G4double );
 60   void SetTargetIsotopeN(G4int );                  60   void SetTargetIsotopeN(G4int );
 61   void SetTargetIsotopeA(G4double );               61   void SetTargetIsotopeA(G4double );
 62   void SetTargetElementName(G4String );            62   void SetTargetElementName(G4String );
 63   void SetTargetElementSymbole(G4String );         63   void SetTargetElementSymbole(G4String );
 64   void SetTargetElementNComponents(G4int );        64   void SetTargetElementNComponents(G4int );
 65   void SetTargetElementAbundance(G4double );       65   void SetTargetElementAbundance(G4double );
 66   void SetTargetMaterialDensity(G4double );        66   void SetTargetMaterialDensity(G4double );
 67   void SetTargetMaterialNComponents(G4int );       67   void SetTargetMaterialNComponents(G4int );
 68   void SetTargetMaterialFractionMass(G4double      68   void SetTargetMaterialFractionMass(G4double );
 69   void SetTargetNaturalElement(G4String );         69   void SetTargetNaturalElement(G4String );
 70   void SetTargetNaturalMaterialFractionMass(G4     70   void SetTargetNaturalMaterialFractionMass(G4double );
 71   G4bool UpdateMaterial();                         71   G4bool UpdateMaterial();
 72   void SetTargetMaterial(G4String );               72   void SetTargetMaterial(G4String );
 73                                                    73 
 74   void SetFoilIsotopeName(G4String );              74   void SetFoilIsotopeName(G4String );
 75   void SetFoilIsotopeZ(G4double );                 75   void SetFoilIsotopeZ(G4double );
 76   void SetFoilIsotopeN(G4int );                    76   void SetFoilIsotopeN(G4int );
 77   void SetFoilIsotopeA(G4double );                 77   void SetFoilIsotopeA(G4double );
 78   void SetFoilElementName(G4String );              78   void SetFoilElementName(G4String );
 79   void SetFoilElementSymbole(G4String );           79   void SetFoilElementSymbole(G4String );
 80   void SetFoilElementNComponents(G4int );          80   void SetFoilElementNComponents(G4int );
 81   void SetFoilElementAbundance(G4double );         81   void SetFoilElementAbundance(G4double );
 82   void SetFoilMaterialDensity(G4double );          82   void SetFoilMaterialDensity(G4double );
 83   void SetFoilMaterialNComponents(G4int );         83   void SetFoilMaterialNComponents(G4int );
 84   void SetFoilMaterialFractionMass(G4double );     84   void SetFoilMaterialFractionMass(G4double );
 85   void SetFoilNaturalElement(G4String );           85   void SetFoilNaturalElement(G4String );
 86   void SetFoilNaturalMaterialFractionMass(G4do     86   void SetFoilNaturalMaterialFractionMass(G4double );
 87   G4bool UpdateFoilMaterial();                     87   G4bool UpdateFoilMaterial();
 88   void SetFoilMaterial(G4String );                 88   void SetFoilMaterial(G4String );
 89                                                    89 
 90   void SetTargetThickness(G4double );              90   void SetTargetThickness(G4double );
 91   void SetFoilThickness(G4double );                91   void SetFoilThickness(G4double );
 92                                                    92   
 93   //Get methods                                    93   //Get methods
 94   inline G4double GetTargetPosition1(){return      94   inline G4double GetTargetPosition1(){return fLayer1_z_position_PART4 + 0.5*11.5 - fTarget_thickness;}
 95   inline G4double GetTargetPosition2(){return      95   inline G4double GetTargetPosition2(){return fLayer1_z_position_PART4 + 0.5*11.5;}
 96   inline G4double GetVolumeTarget(){return pi*     96   inline G4double GetVolumeTarget(){return pi*fTarget_diameter*fTarget_diameter/4*fTarget_thickness;}
 97   inline G4double GetFoilPosition1(){return fZ     97   inline G4double GetFoilPosition1(){return fZ_foil_position - 0.5*fFoil_thickness;}
 98   inline G4double GetTargetVolume(){return fTa     98   inline G4double GetTargetVolume(){return fTargetVolume;}
 99   inline G4double GetFoilVolume(){return fFoil     99   inline G4double GetFoilVolume(){return fFoilVolume;}
100   inline G4double GetFoilThickness(){return fF    100   inline G4double GetFoilThickness(){return fFoil_thickness;}
101   inline G4double GetTargetThickness(){return     101   inline G4double GetTargetThickness(){return fTarget_thickness;}
102   inline G4double GetTargetDiameter(){return f    102   inline G4double GetTargetDiameter(){return fTarget_diameter;}
103                                                   103   
104 private:                                          104 private:
105                                                   105 
106   STCyclotronDetectorMessenger* fDetectorMesse    106   STCyclotronDetectorMessenger* fDetectorMessenger;
107                                                   107 
108   //Messenger parameters                          108   //Messenger parameters
109   G4double fTarget_diameter;                      109   G4double fTarget_diameter;
110   std::vector<G4String> fIsotopeName;             110   std::vector<G4String> fIsotopeName;
111   std::vector<G4double> fIsotopeZ;                111   std::vector<G4double> fIsotopeZ;
112   std::vector<G4int>    fIsotopeN;                112   std::vector<G4int>    fIsotopeN;
113   std::vector<G4double> fIsotopeA;                113   std::vector<G4double> fIsotopeA;
114   std::vector<G4String> fElementName;             114   std::vector<G4String> fElementName;
115   std::vector<G4String> fElementSymbole;          115   std::vector<G4String> fElementSymbole;
116   std::vector<G4int>    fElementNComponents;      116   std::vector<G4int>    fElementNComponents;
117   std::vector<G4double> fElementAbundance;        117   std::vector<G4double> fElementAbundance;
118   std::vector<G4String> fNaturalElementName;      118   std::vector<G4String> fNaturalElementName;
119   std::vector<G4double> fNaturalMaterialFracti    119   std::vector<G4double> fNaturalMaterialFractionMass;
120   G4double fDensity_target;                       120   G4double fDensity_target;
121   G4int    fTarget_NComponents;                   121   G4int    fTarget_NComponents;
122   std::vector<G4double> fMaterialFractionMass;    122   std::vector<G4double> fMaterialFractionMass;
123                                                   123 
124   std::vector<G4String> fIsotopeNameFoil;         124   std::vector<G4String> fIsotopeNameFoil;
125   std::vector<G4double> fIsotopeZFoil;            125   std::vector<G4double> fIsotopeZFoil;
126   std::vector<G4int>    fIsotopeNFoil;            126   std::vector<G4int>    fIsotopeNFoil;
127   std::vector<G4double> fIsotopeAFoil;            127   std::vector<G4double> fIsotopeAFoil;
128   std::vector<G4String> fElementNameFoil;         128   std::vector<G4String> fElementNameFoil;
129   std::vector<G4String> fElementSymboleFoil;      129   std::vector<G4String> fElementSymboleFoil;
130   std::vector<G4int>    fElementNComponentsFoi    130   std::vector<G4int>    fElementNComponentsFoil;
131   std::vector<G4double> fElementAbundanceFoil;    131   std::vector<G4double> fElementAbundanceFoil;
132   std::vector<G4String> fNaturalElementNameFoi    132   std::vector<G4String> fNaturalElementNameFoil;
133   std::vector<G4double> fNaturalMaterialFracti    133   std::vector<G4double> fNaturalMaterialFractionMassFoil;
134   G4double fDensity_foil;                         134   G4double fDensity_foil;
135   G4int    fFoil_NComponents;                     135   G4int    fFoil_NComponents;
136   std::vector<G4double> fMaterialFractionMassF    136   std::vector<G4double> fMaterialFractionMassFoil;
137                                                   137 
138   G4double fTarget_thickness;                     138   G4double fTarget_thickness;
139   G4double fFoil_thickness;                       139   G4double fFoil_thickness;
140                                                   140 
141   //Parameters that are used/modified in the s    141   //Parameters that are used/modified in the set methods
142   //When modifying the target parameters          142   //When modifying the target parameters
143                                                   143  
144   //Material                                      144   //Material
145   G4Material* fTarget_Material;                   145   G4Material* fTarget_Material;
146   G4Material* fFoil_Material;                     146   G4Material* fFoil_Material;
147   //Foil                                          147   //Foil
148   G4double fZ_foil_position;                      148   G4double fZ_foil_position;
149   G4Tubs* fSolidFoil;                             149   G4Tubs* fSolidFoil;
150   G4LogicalVolume* fLogicFoil;                    150   G4LogicalVolume* fLogicFoil;
151   G4VPhysicalVolume* fPhysFoil;                   151   G4VPhysicalVolume* fPhysFoil;
152   //WORLD                                         152   //WORLD
153   G4LogicalVolume* fLogicWorld;                   153   G4LogicalVolume* fLogicWorld;
154   //PART 3                                        154   //PART 3
155   G4double fLayer_z_position_PART3;               155   G4double fLayer_z_position_PART3;
156   G4VPhysicalVolume* fPhysLayer_PART3;            156   G4VPhysicalVolume* fPhysLayer_PART3;
157   G4VPhysicalVolume* fPhysTube_PART3;             157   G4VPhysicalVolume* fPhysTube_PART3;
158   //PART 4                                        158   //PART 4
159   G4double fTube_outerRadius_PART4;               159   G4double fTube_outerRadius_PART4;
160   G4double fTube_length_PART4;                    160   G4double fTube_length_PART4;
161   G4double fLayer_z_position_PART4;               161   G4double fLayer_z_position_PART4;
162   G4VPhysicalVolume* fPhysTube_PART4;             162   G4VPhysicalVolume* fPhysTube_PART4;
163   G4VPhysicalVolume* fPhysLayer_PART4;            163   G4VPhysicalVolume* fPhysLayer_PART4;
164   G4double fLayer1_z_position_PART4;              164   G4double fLayer1_z_position_PART4;
165   G4VPhysicalVolume* fPhysLayer1_PART4;           165   G4VPhysicalVolume* fPhysLayer1_PART4;
166   //Target                                        166   //Target
167   G4LogicalVolume* fLogicTarget;                  167   G4LogicalVolume* fLogicTarget;
168   G4double fTarget_z_position;                    168   G4double fTarget_z_position;
169   G4Tubs* fSolidTarget;                           169   G4Tubs* fSolidTarget;
170   G4VPhysicalVolume* fPhysTarget;                 170   G4VPhysicalVolume* fPhysTarget;
171   //PART 5                                        171   //PART 5 
172   G4double fLayer1_z_position_PART5;              172   G4double fLayer1_z_position_PART5;
173   G4VPhysicalVolume* fPhysLayer1_PART5;           173   G4VPhysicalVolume* fPhysLayer1_PART5;
174   G4double fLayer2_z_position_PART5;              174   G4double fLayer2_z_position_PART5;
175   G4VPhysicalVolume* fPhysLayer2_PART5;           175   G4VPhysicalVolume* fPhysLayer2_PART5;
176   G4double fLayer3_z_position_PART5;              176   G4double fLayer3_z_position_PART5;
177   G4VPhysicalVolume* fPhysLayer3_PART5;           177   G4VPhysicalVolume* fPhysLayer3_PART5;
178                                                   178   
179   G4Region* fRegionTarget;                        179   G4Region* fRegionTarget;
180   G4Region* fRegionFoil;                          180   G4Region* fRegionFoil;
181                                                   181 
182   G4double fTargetVolume;                         182   G4double fTargetVolume;
183   G4double fFoilVolume;                           183   G4double fFoilVolume;
184                                                   184   
185   std::ofstream fParametersSummary;               185   std::ofstream fParametersSummary;
186                                                   186 
187 };                                                187 };
188 #endif                                            188 #endif
189                                                   189