File indexing completed on 2025-01-18 09:16:57
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037 #include "FCALCryostatVolumes.hh"
0038
0039 #include "FCALMaterialConsultant.hh"
0040
0041 #include "FCALEMModule.hh"
0042 #include "FCALHadModule.hh"
0043
0044 #include "G4PhysicalConstants.hh"
0045 #include "G4SystemOfUnits.hh"
0046 #include "G4Box.hh"
0047 #include "G4Tubs.hh"
0048 #include "G4Trd.hh"
0049 #include "G4LogicalVolume.hh"
0050 #include "G4VPhysicalVolume.hh"
0051 #include "G4PVPlacement.hh"
0052 #include "G4SubtractionSolid.hh"
0053
0054 #include "G4ThreeVector.hh"
0055 #include "G4RotationMatrix.hh"
0056 #include "G4VisAttributes.hh"
0057 #include "G4Colour.hh"
0058
0059 FCALCryostatVolumes::FCALCryostatVolumes()
0060 {
0061 #include "FCALCryostatVolumesParameters.input"
0062 }
0063
0064 FCALCryostatVolumes::~FCALCryostatVolumes() {;}
0065
0066 G4LogicalVolume * FCALCryostatVolumes::Construct()
0067 {
0068
0069
0070
0071
0072
0073 FCALMaterialConsultant * FCALMaterials =
0074 FCALMaterialConsultant::GetInstance();
0075
0076
0077
0078
0079 G4VisAttributes * ColorOfLead = new G4VisAttributes(G4Colour(0.5,0.5,0.5));
0080 G4VisAttributes * ColorOfAir = new G4VisAttributes(G4Colour(1.,1.,1.));
0081
0082
0083
0084
0085
0086
0087 G4Tubs * SolidCryostat =
0088 new G4Tubs("CryostatSolid", CryostatRMin, CryostatRMax, CryostatLenght,
0089 StartingPhi, DPhi);
0090 G4LogicalVolume * LogicalCryostat =
0091 new G4LogicalVolume(SolidCryostat,FCALMaterials->Material("Iron"),
0092 "CryostatLogical");
0093
0094
0095 LogicalCryostat->SetVisAttributes(G4VisAttributes::GetInvisible());
0096
0097
0098
0099
0100
0101 G4Tubs * SolidInsulation =
0102 new G4Tubs("InsulationSolid", InsulationRMin, InsulationRMax,
0103 InsulationLenght, StartingPhi, DPhi);
0104 G4LogicalVolume * LogicalInsulation =
0105 new G4LogicalVolume(SolidInsulation, FCALMaterials->Material("Air"),
0106 "InsulationLogical");
0107
0108 new G4PVPlacement(0, G4ThreeVector(), LogicalInsulation, "InsulationPhysical",
0109 LogicalCryostat, 0, 0);
0110
0111 LogicalInsulation->SetVisAttributes(ColorOfAir);
0112
0113
0114
0115
0116
0117
0118
0119
0120
0121
0122
0123
0124
0125
0126
0127
0128
0129
0130
0131
0132
0133
0134
0135
0136
0137 G4Tubs * SolidLArg =
0138 new G4Tubs("LArgSolid", LArgRMin, LArgRMax, LArgLenght,StartingPhi,DPhi);
0139 G4LogicalVolume * LogicalLArg =
0140 new G4LogicalVolume(SolidLArg, FCALMaterials->Material("LiquidArgon"),
0141 "LArgLogical");
0142 G4VPhysicalVolume * PhysicalLArg =
0143 new G4PVPlacement(0,G4ThreeVector(LArgPosX, LArgPosY, LArgPosZ),
0144 LogicalLArg, "LArgPhysical", LogicalCryostat, 0,0);
0145
0146
0147 LogicalLArg->SetVisAttributes(G4VisAttributes::GetInvisible());
0148
0149
0150
0151
0152 G4Box * SolidFrontExcluder =
0153 new G4Box("FrontExcluderSolid", FrontExcluderSizeX, FrontExcluderSizeY,
0154 FrontExcluderSizeZ);
0155 G4LogicalVolume * LogicalFrontExcluder =
0156 new G4LogicalVolume(SolidFrontExcluder, FCALMaterials->Material("Air")
0157 , "FrontExcluderLogical");
0158
0159
0160 new G4PVPlacement(0,G4ThreeVector(FrontExcluderPosX, FrontExcluderPosY,
0161 FrontExcluderPosZ), "FrontExcluderPhysical",
0162 LogicalFrontExcluder, PhysicalLArg, 0,0);
0163
0164 LogicalFrontExcluder->SetVisAttributes(ColorOfLead);
0165
0166
0167
0168
0169
0170
0171 G4Trd * SolidBackExcluder =
0172 new G4Trd("BackExcluderSolid", BackExcluderSize1X, BackExcluderSize2X,
0173 BackExcluderSize1Y, BackExcluderSize2Y, BackExcluderSizeZ);
0174 G4LogicalVolume * LogicalBackExcluder =
0175 new G4LogicalVolume(SolidBackExcluder, FCALMaterials->Material("Air"),
0176 "BackExcluderLogical");
0177
0178 G4RotationMatrix * BackExcluderRotationMatrix = new G4RotationMatrix();
0179 BackExcluderRotationMatrix->rotateX(BackExcluderRotX);
0180
0181
0182 new G4PVPlacement(BackExcluderRotationMatrix,
0183 G4ThreeVector(BackExcluderPosX, BackExcluderPosY,
0184 BackExcluderPosZ), "BackExcluder", LogicalBackExcluder,
0185 PhysicalLArg, 0,0);
0186
0187 LogicalBackExcluder->SetVisAttributes(ColorOfLead);
0188
0189
0190
0191
0192
0193
0194 G4Tubs * SolidFCALEnvelope =
0195 new G4Tubs("FCALEnvelopeSolid", FCALEnvelopeRMin, FCALEnvelopeRMax,
0196 FCALEnvelopeLenght, FCALEnvelopeStartPhi, FCALEnvelopeDPhi);
0197
0198 G4LogicalVolume * LogicalFCALEnvelope =
0199 new G4LogicalVolume(SolidFCALEnvelope, FCALMaterials->Material("LiquidArgon"),
0200 "FCALEnvelopeLogical");
0201
0202 G4RotationMatrix * FCALRotationMatrix = new G4RotationMatrix();
0203 FCALRotationMatrix->rotateX(FCALEnvelopeRotX);
0204
0205
0206
0207 new G4PVPlacement(FCALRotationMatrix,
0208 G4ThreeVector(FCALEnvelopePosX,FCALEnvelopePosY,FCALEnvelopePosZ)
0209 , LogicalFCALEnvelope, "FCALEnvelopePhysical", LogicalLArg, 0,0);
0210
0211
0212 LogicalFCALEnvelope->SetVisAttributes(G4VisAttributes::GetInvisible());
0213
0214
0215
0216
0217 EmModule = new FCALEMModule();
0218 G4LogicalVolume * LogicalFCALEmModule = EmModule->Construct();
0219
0220 G4RotationMatrix * EmModuleRot = new G4RotationMatrix();
0221 EmModuleRot->rotateZ(ModuleRotZ);
0222
0223
0224 new G4PVPlacement(EmModuleRot,
0225 G4ThreeVector(FCALEmModulePosX,FCALEmModulePosY,FCALEmModulePosZ),
0226 LogicalFCALEmModule,"FCALEmModulePhysical",LogicalFCALEnvelope,0,0);
0227
0228
0229
0230
0231
0232 HadModule = new FCALHadModule();
0233 G4LogicalVolume * LogicalFCALHadModule = HadModule->Construct();
0234
0235 G4RotationMatrix * HadModuleRot = new G4RotationMatrix();
0236 HadModuleRot->rotateZ(ModuleRotZ);
0237
0238
0239 new G4PVPlacement(HadModuleRot,
0240 G4ThreeVector(FCALHadModulePosX,FCALHadModulePosY,FCALHadModulePosZ),
0241 LogicalFCALHadModule, "FCALHadModulePhysical",LogicalFCALEnvelope,0,0);
0242
0243
0244
0245
0246
0247
0248
0249 return LogicalCryostat;
0250
0251 }
0252