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4.p3 ] [ 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/extended/hadronic/ParticleFluence/Calo/include/DetectorConstruction.hh (Version 11.3.0) and /examples/extended/hadronic/ParticleFluence/Calo/include/DetectorConstruction.hh (Version 11.1.1)


  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 /// \file DetectorConstruction.hh                  26 /// \file DetectorConstruction.hh
 27 /// \brief Definition of the DetectorConstruct     27 /// \brief Definition of the DetectorConstruction class
 28 //                                                 28 //
 29 //                                             <<  29 // 
 30                                                    30 
 31 //....oooOO0OOooo........oooOO0OOooo........oo     31 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 32 //....oooOO0OOooo........oooOO0OOooo........oo     32 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 33                                                    33 
 34 #ifndef DetectorConstruction_H                     34 #ifndef DetectorConstruction_H
 35 #define DetectorConstruction_H 1                   35 #define DetectorConstruction_H 1
 36                                                    36 
 37 #include "G4VUserDetectorConstruction.hh"          37 #include "G4VUserDetectorConstruction.hh"
 38 #include "globals.hh"                          <<  38 #include "globals.hh"       
 39                                                    39 
 40 class G4LogicalVolume;                             40 class G4LogicalVolume;
 41 class G4VPhysicalVolume;                           41 class G4VPhysicalVolume;
 42 class G4FieldManager;                              42 class G4FieldManager;
 43 class G4UniformMagField;                           43 class G4UniformMagField;
 44 class G4Material;                                  44 class G4Material;
 45 class DetectorMessenger;                           45 class DetectorMessenger;
 46                                                    46 
 47 //....oooOO0OOooo........oooOO0OOooo........oo     47 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 48                                                    48 
 49 class DetectorConstruction : public G4VUserDet <<  49 class DetectorConstruction : public G4VUserDetectorConstruction {
 50 {                                              <<  50   public:  
 51   public:                                      << 
 52     DetectorConstruction();                        51     DetectorConstruction();
 53     ~DetectorConstruction();                       52     ~DetectorConstruction();
 54                                                <<  53     
 55     G4VPhysicalVolume* Construct();                54     G4VPhysicalVolume* Construct();
 56     void ConstructSDandField();                    55     void ConstructSDandField();
 57                                                <<  56   
 58     void SetMagField(const G4double fieldValue <<  57     void SetMagField( const G4double fieldValue );
 59     void SetAbsorberMaterial(const G4String na <<  58     void SetAbsorberMaterial( const G4String name );
 60     void SetActiveMaterial(const G4String name <<  59     void SetActiveMaterial( const G4String name );
 61     // Use by the messenger.                       60     // Use by the messenger.
 62                                                <<  61   
 63     inline G4Material* GetAbsorberMaterial() c     62     inline G4Material* GetAbsorberMaterial() const;
 64     inline G4Material* GetActiveMaterial() con     63     inline G4Material* GetActiveMaterial() const;
 65                                                <<  64   
 66     inline void SetIsCalHomogeneous(const G4bo <<  65     inline void SetIsCalHomogeneous( const G4bool choice );
 67     inline void SetIsUnitInLambda(const G4bool <<  66     inline void SetIsUnitInLambda( const G4bool choice );
 68     inline void SetAbsorberTotalLength(const G <<  67     inline void SetAbsorberTotalLength( const G4double value );
 69     inline void SetCalorimeterRadius(const G4d <<  68     inline void SetCalorimeterRadius( const G4double value );
 70     inline void SetActiveLayerNumber(const G4i <<  69     inline void SetActiveLayerNumber( const G4int value );
 71     inline void SetActiveLayerSize(const G4dou <<  70     inline void SetActiveLayerSize( const G4double value );
 72     // To define the calorimeter geometry.         71     // To define the calorimeter geometry.
 73                                                <<  72   
 74     inline void SetIsRadiusUnitInLambda(const  <<  73     inline void SetIsRadiusUnitInLambda( const G4bool choice );
 75                                                <<  74     
 76     void UpdateGeometry();                         75     void UpdateGeometry();
 77                                                    76 
 78     inline G4double GetCaloLength() const;         77     inline G4double GetCaloLength() const;
 79                                                    78 
 80   private:                                         79   private:
                                                   >>  80   
 81     void DefineMaterials();                        81     void DefineMaterials();
 82     // Define all the materials.                   82     // Define all the materials.
 83                                                <<  83   
 84     G4VPhysicalVolume* ConstructCalorimeter(); <<  84     G4VPhysicalVolume* ConstructCalorimeter();     
 85     // To be invoked each time the geometry ne     85     // To be invoked each time the geometry needs to be updated.
 86                                                <<  86   
 87     G4bool AreParametersOK();                      87     G4bool AreParametersOK();
 88     // Return true if all the parameters are s     88     // Return true if all the parameters are sensible, false otherwise.
 89                                                <<  89   
 90     void PrintParameters();                        90     void PrintParameters();
 91     // Print the various parameters which defi     91     // Print the various parameters which define the calorimeter.
 92                                                <<  92   
 93     G4Material* fVacuum;                           93     G4Material* fVacuum;
 94     G4Material* fIron;                             94     G4Material* fIron;
 95     G4Material* fCopper;                           95     G4Material* fCopper;
 96     G4Material* fTungsten;                         96     G4Material* fTungsten;
 97     G4Material* fLead;                             97     G4Material* fLead;
 98     G4Material* fUranium;                          98     G4Material* fUranium;
 99     G4Material* fPbWO4;                            99     G4Material* fPbWO4;
100     G4Material* fPolystyrene;                     100     G4Material* fPolystyrene;
101     G4Material* fLiquidArgon;                     101     G4Material* fLiquidArgon;
102     G4Material* fSilicon;                         102     G4Material* fSilicon;
103     G4Material* fQuartz;                          103     G4Material* fQuartz;
104     G4Material* fBrass;                           104     G4Material* fBrass;
105     G4Material* fAluminium;                       105     G4Material* fAluminium;
106     G4Material* fGraphite;                        106     G4Material* fGraphite;
107     G4Material* fAbsorberMaterial;                107     G4Material* fAbsorberMaterial;
108     G4Material* fActiveMaterial;                  108     G4Material* fActiveMaterial;
109                                                << 109     
110     G4LogicalVolume* fExperimentalHall_log;       110     G4LogicalVolume* fExperimentalHall_log;
111     G4VPhysicalVolume* fExperimentalHall_phys;    111     G4VPhysicalVolume* fExperimentalHall_phys;
112     // World envelope.                         << 112     // World envelope. 
113                                                << 113     
114     G4LogicalVolume* fLogicCalo;               << 114     G4LogicalVolume*  fLogicCalo;
115     G4VPhysicalVolume* fPhysiCalo;                115     G4VPhysicalVolume* fPhysiCalo;
116     // "Calorimeter".                             116     // "Calorimeter".
117                                                << 117     
118     G4LogicalVolume* fLogicModule;             << 118     G4LogicalVolume*  fLogicModule;
119     G4VPhysicalVolume* fPhysiModule;              119     G4VPhysicalVolume* fPhysiModule;
120     // Module of the "calorimeter".               120     // Module of the "calorimeter".
121                                                << 121     
122     G4LogicalVolume* fLogicAbsorber;           << 122     G4LogicalVolume*  fLogicAbsorber;
123     G4VPhysicalVolume* fPhysiAbsorber;            123     G4VPhysicalVolume* fPhysiAbsorber;
124     // Absorber layer of the "calorimeter".       124     // Absorber layer of the "calorimeter".
125                                                << 125     
126     G4LogicalVolume* fLogicActive;             << 126     G4LogicalVolume*  fLogicActive;
127     G4VPhysicalVolume* fPhysiActive;              127     G4VPhysicalVolume* fPhysiActive;
128     // Active layer of the "calorimeter".         128     // Active layer of the "calorimeter".
129                                                << 129   
130     G4FieldManager* fFieldMgr;                    130     G4FieldManager* fFieldMgr;
131     // Pointer to the field manager.              131     // Pointer to the field manager.
132                                                << 132   
133     G4UniformMagField* fUniformMagField;       << 133     G4UniformMagField* fUniformMagField; 
134     // Pointer to the uniform magnetic field.     134     // Pointer to the uniform magnetic field.
135                                                << 135     
136     DetectorMessenger* fDetectorMessenger;        136     DetectorMessenger* fDetectorMessenger;
137     // Pointer to the Messenger.                  137     // Pointer to the Messenger.
138                                                << 138   
139     G4bool fIsCalHomogeneous;                  << 139     G4bool fIsCalHomogeneous; 
140     // If false then Sampling calorimeter;        140     // If false then Sampling calorimeter;
141     // If true  then Homogeneous calorimeter.     141     // If true  then Homogeneous calorimeter.
142                                                << 142   
143     G4bool fIsUnitInLambda;                       143     G4bool fIsUnitInLambda;
144     // If false then normal unit of length to     144     // If false then normal unit of length to express the absorber total length.
145     // If true  then lambda (interaction lengt    145     // If true  then lambda (interaction length) to express the absorber total length.
146                                                << 146   
147     G4double fAbsorberTotalLength;                147     G4double fAbsorberTotalLength;
148     // This is the total length of the absorbe << 148     // This is the total length of the absorber material, expressed 
149     // in unit of length (e.g. m, cm, mm) if t << 149     // in unit of length (e.g. m, cm, mm) if theIsUnitInLambda is false, 
150     // otherwise in number of lambdas (interac    150     // otherwise in number of lambdas (interaction lengths).
151     // Notice that in the case of a sampling c << 151     // Notice that in the case of a sampling calorimeter (i.e. 
152     // theIsCalHomogeneous is false), the acti    152     // theIsCalHomogeneous is false), the active layers are not counted;
153     // in the case of an homogenous calorimete    153     // in the case of an homogenous calorimeter, this length account
154     // for the overall dimension of the calori    154     // for the overall dimension of the calorimeter.
155                                                << 155   
156     G4double fCalorimeterRadius;                  156     G4double fCalorimeterRadius;
157     // This is the radius of the calorimeter w << 157     // This is the radius of the calorimeter which is a cylinder, expressed 
158     // in unit of length (e.g. m, cm, mm) if t << 158     // in unit of length (e.g. m, cm, mm) if theIsUnitInLambda is false, 
159     // otherwise in number of lambdas (interac    159     // otherwise in number of lambdas (interaction lengths) of the absorber.
160                                                << 160   
161     G4int fActiveLayerNumber;                     161     G4int fActiveLayerNumber;
162     G4double fActiveLayerSize;                    162     G4double fActiveLayerSize;
163     // Number of active layers and length of e    163     // Number of active layers and length of each of them (in normal unit
164     // of length, e.g. mm): in the case of sam    164     // of length, e.g. mm): in the case of sampling calorimeter
165     // (i.e. theIsCalHomogeneous is false) the    165     // (i.e. theIsCalHomogeneous is false) the medium is theActiveMaterial;
166     // in the case of an homogeneous calorimet    166     // in the case of an homogeneous calorimeter, the "active layers" are
167     // only a fictitious way to sample the lon    167     // only a fictitious way to sample the longitudinal energy deposits,
168     // but they are actually made of the same     168     // but they are actually made of the same absorber material, and their
169     // thickness is taken into account in theA    169     // thickness is taken into account in theAbsorberTotalLength.
170                                                << 170   
171     G4bool fIsRadiusUnitInLambda;                 171     G4bool fIsRadiusUnitInLambda;
172     // If false then normal unit of length to     172     // If false then normal unit of length to express the radius bin size.
173     // If true  then lambda (interaction lengt << 173     // If true  then lambda (interaction length of the absorber) to express 
174     // the radius bin size.                       174     // the radius bin size.
175                                                << 175   
176     G4double fCaloLength;  // total length of     176     G4double fCaloLength;  // total length of the calorimeter along its (z) axis
177                                                << 177   
178     // Scoring part                               178     // Scoring part
179     G4LogicalVolume* fLogicScoringUpDown;      << 179     G4LogicalVolume*  fLogicScoringUpDown;
180     G4VPhysicalVolume* fPhysiScoringUpstream;     180     G4VPhysicalVolume* fPhysiScoringUpstream;
181     G4VPhysicalVolume* fPhysiScoringDownstream    181     G4VPhysicalVolume* fPhysiScoringDownstream;
182     G4LogicalVolume* fLogicScoringSide;        << 182     G4LogicalVolume*  fLogicScoringSide;
183     G4VPhysicalVolume* fPhysiScoringSide;         183     G4VPhysicalVolume* fPhysiScoringSide;
184     const G4double fScoringThickness = 10.0;      184     const G4double fScoringThickness = 10.0;
185 };                                                185 };
186                                                   186 
187 inline G4Material* DetectorConstruction::GetAb << 187 inline G4Material* DetectorConstruction::GetAbsorberMaterial() const {
188 {                                              << 
189   return fAbsorberMaterial;                       188   return fAbsorberMaterial;
190 }                                                 189 }
191                                                   190 
192 inline G4Material* DetectorConstruction::GetAc << 191 inline G4Material* DetectorConstruction::GetActiveMaterial() const {
193 {                                              << 
194   return fActiveMaterial;                         192   return fActiveMaterial;
195 }                                                 193 }
196                                                   194 
197 inline void DetectorConstruction::SetIsCalHomo << 195 inline void DetectorConstruction::SetIsCalHomogeneous( const G4bool choice ) {
198 {                                              << 
199   fIsCalHomogeneous = choice;                     196   fIsCalHomogeneous = choice;
200 }                                                 197 }
201                                                   198 
202 inline void DetectorConstruction::SetIsUnitInL << 199 inline void DetectorConstruction::SetIsUnitInLambda( const G4bool choice ) {
203 {                                              << 
204   fIsUnitInLambda = choice;                       200   fIsUnitInLambda = choice;
205 }                                                 201 }
206                                                   202 
207 inline void DetectorConstruction::SetAbsorberT << 203 inline void DetectorConstruction::SetAbsorberTotalLength( const G4double value ) {
208 {                                              << 
209   fAbsorberTotalLength = value;                   204   fAbsorberTotalLength = value;
210 }                                                 205 }
211                                                   206 
212 inline void DetectorConstruction::SetCalorimet << 207 inline void DetectorConstruction::SetCalorimeterRadius( const G4double value ) {
213 {                                              << 
214   fCalorimeterRadius = value;                     208   fCalorimeterRadius = value;
215 }                                                 209 }
216                                                   210 
217 inline void DetectorConstruction::SetActiveLay << 211 inline void DetectorConstruction::SetActiveLayerNumber( const G4int value ) {
218 {                                              << 
219   fActiveLayerNumber = value;                     212   fActiveLayerNumber = value;
220 }                                                 213 }
221                                                   214 
222 inline void DetectorConstruction::SetActiveLay << 215 inline void DetectorConstruction::SetActiveLayerSize( const G4double value ) {
223 {                                              << 
224   fActiveLayerSize = value;                       216   fActiveLayerSize = value;
225 }                                                 217 }
226                                                   218 
227 inline void DetectorConstruction::SetIsRadiusU << 219 inline void DetectorConstruction::SetIsRadiusUnitInLambda( const G4bool choice ) {
228 {                                              << 
229   fIsRadiusUnitInLambda = choice;                 220   fIsRadiusUnitInLambda = choice;
230 }                                                 221 }
231                                                   222 
232 inline G4double DetectorConstruction::GetCaloL << 223 inline G4double DetectorConstruction::GetCaloLength() const {
233 {                                              << 
234   return fCaloLength;                             224   return fCaloLength;
235 }                                                 225 }
236                                                   226 
237 //....oooOO0OOooo........oooOO0OOooo........oo    227 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
238                                                   228 
239 #endif                                            229 #endif
240                                                   230