Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FCALHadModule Class Reference

#include <FCALHadModule.hh>

Public Member Functions

 FCALHadModule ()
 
 ~FCALHadModule ()
 
G4LogicalVolumeConstruct ()
 
void InitializeGeometry ()
 
G4int GetF2TileID (G4int)
 

Detailed Description

Definition at line 45 of file FCALHadModule.hh.

Constructor & Destructor Documentation

FCALHadModule::FCALHadModule ( )

Definition at line 62 of file FCALHadModule.cc.

62  :
63  FcalHadModuleSD(0)
64 {
65  F2LArGapID = new G4int[2600];
66  F2LArIX = new G4int[2600];
67  F2LArJY = new G4int[2600];
68  F2LArITile = new G4int[2600];
69  F2LArGapPosX = new G4double[2600];
70  F2LArGapPosY = new G4double[2600];
71 }
int G4int
Definition: G4Types.hh:78
double G4double
Definition: G4Types.hh:76
FCALHadModule::~FCALHadModule ( )

Definition at line 73 of file FCALHadModule.cc.

73  {
74  delete [] F2LArGapID;
75  delete [] F2LArGapPosX;
76  delete [] F2LArGapPosY;
77  delete [] F2LArIX;
78  delete [] F2LArJY;
79  delete [] F2LArITile;
80 }

Member Function Documentation

G4LogicalVolume * FCALHadModule::Construct ( void  )

Definition at line 104 of file FCALHadModule.cc.

105 {
106  //-----------------------------
107  // construction of materials
108  //-----------------------------
109 
110  FCALMaterialConsultant * FCALMaterials =
112 
113  G4VisAttributes * ColorOfTungsten = new G4VisAttributes(G4Colour(.5,.5,.5));
114  G4VisAttributes * ColorOfCopper =new G4VisAttributes(G4Colour(0.58,0.15,0.05));
115  G4VisAttributes * ColorOfLarg = new G4VisAttributes(G4Colour(0.,0.,1.));
116 
117 
118  //----------------------------
119  // Read Parameters
120  //----------------------------
122 
123 
124  //-----------------------------------------
125  // the logical to be returned (mother)
126  //-----------------------------------------
127 
128  G4Tubs * SolidHadModule =
129  new G4Tubs("HadModuleSolid", HadModuleRMin, HadModuleRMax, HadModuleLenght,
130  HadModuleStartPhi,HadModuleDPhi);
131  G4LogicalVolume * LogicalHadModule =
132  new G4LogicalVolume(SolidHadModule, FCALMaterials->Material("Copper"),
133  "HadModuleLogical");
134 
135  LogicalHadModule->SetSmartless(FCAL2HadSmart);
136 
137  LogicalHadModule->SetVisAttributes(ColorOfCopper);
138  // LogicalHadModule->SetVisAttributes(G4VisAttributes::GetInvisible());
139 
140 
141  //-----------------------------------------
142  // Tungsten Absorber
143  //-----------------------------------------
144  G4Tubs * SolidWAbsorber =
145  new G4Tubs("WAbsorberSolid", WAbsorberRMin, WAbsorberRMax, WAbsorberLenght,
146  WAbsorberStartPhi, WAbsorberDPhi);
147  G4LogicalVolume * LogicalWAbsorber =
148  new G4LogicalVolume(SolidWAbsorber, FCALMaterials->Material("FCAL2WFeNi"),
149  "SolidWLogical");
150 // G4VPhysicalVolume * PhysicalWAbsorber =
151  new G4PVPlacement(0, G4ThreeVector(), LogicalWAbsorber, "WAbsorberPhysical",
152  LogicalHadModule, 0, 0);
153 
154  LogicalWAbsorber->SetVisAttributes(ColorOfTungsten);
155  // LogicalWAbsorber->SetVisAttributes(G4VisAttributes::GetInvisible());
156 
157 
158  // -----------------
159  // Copper Plates
160  //------------------
161  G4Tubs * SolidCuPlate =
162  new G4Tubs("CuPlateSolid",HadModuleRMin, HadModuleRMax, CuPlateLenght,
163  HadModuleStartPhi, HadModuleDPhi);
164  G4LogicalVolume * LogicalCuPlate =
165  new G4LogicalVolume(SolidCuPlate, FCALMaterials->Material("Copper"), "CuPlateLogical");
166 
167 // G4VPhysicalVolume * PhysicalCuPlateA =
168  new G4PVPlacement(0, G4ThreeVector(0.,0.,CuPlateAPosZ), LogicalCuPlate,
169  "CuPlateAPhysical", LogicalHadModule, 0, 0);
170 // G4VPhysicalVolume * PhysicalCuPlateB =
171  new G4PVPlacement(0, G4ThreeVector(0.,0.,CuPlateBPosZ), LogicalCuPlate,
172  "CuPlateBPhysical", LogicalHadModule, 0, 0);
173 
174  LogicalCuPlate->SetVisAttributes(ColorOfCopper);
175  // LogicalCuPlate->SetVisAttributes(G4VisAttributes::GetInvisible());
176 
177  //------------------------------------------
178  // Had Module (F2) Main and A/B Cable Troff
179  //------------------------------------------
180  G4Tubs * SolidF2TroffMain =
181  new G4Tubs("F2TroffMainSolid", F2TroffRmin, F2TroffRmax, F2TroffMainLenght,
182  F2TroffStartPhi, F2TroffDphi);
183  G4LogicalVolume * LogicalF2TroffMain =
184  new G4LogicalVolume(SolidF2TroffMain, FCALMaterials->Material("FCAL2CuArKap"),
185  "F2TroffMainLogical");
186 
187  G4Tubs * SolidF2TroffAB =
188  new G4Tubs("F2TroffABSolid", F2TroffRmin, F2TroffRmax, F2TroffABLenght,
189  F2TroffStartPhi, F2TroffDphi);
190  G4LogicalVolume * LogicalF2TroffAB =
191  new G4LogicalVolume(SolidF2TroffAB, FCALMaterials->Material("FCAL2CuArKap"),
192  "F2TroffABLogical");
193 
194  G4ThreeVector F2TroffMainTrans(0.,0.,0.);
195  G4ThreeVector F2TroffABTrans(0.,0.,0.);
196  G4RotationMatrix F2TroffRot;
197  G4int i=0;
198  for(i=0 ; i < NCableTroff ; i++)
199  {
200 // G4VPhysicalVolume * PhysicalF2TroffMain =
201  new G4PVPlacement(G4Transform3D(F2TroffRot,F2TroffMainTrans), LogicalF2TroffMain,
202  "F2TroffMainPhysical", LogicalWAbsorber,0,i+1);
203 
204 // G4VPhysicalVolume * PhysicalF2TroffAB =
205  new G4PVPlacement(G4Transform3D(F2TroffRot,F2TroffABTrans), LogicalF2TroffAB,
206  "F2TroffAPhysical", LogicalCuPlate, 0, i+1);
207 
208  F2TroffRot.rotateZ(F2TroffRotZ);
209  }
210 
211  LogicalF2TroffMain->SetVisAttributes(ColorOfCopper);
212  // LogicalF2TroffMain->SetVisAttributes(G4VisAttributes::GetInvisible());
213  LogicalF2TroffAB->SetVisAttributes(ColorOfCopper);
214  // LogicalF2TroffAB->SetVisAttributes(G4VisAttributes::GetInvisible());
215 
216 
217  //----------------------
218  // LArg Gaps + F2 Rod
219  //----------------------
220  G4Tubs * SolidF2LArGap =
221  new G4Tubs("F2LArGapSolid", F2LArGapRmin, F2LArGapRmax, F2LArGapLenght,
222  F2LArGapStartPhi, F2LArGapDphi);
223  G4LogicalVolume * LogicalF2LArGap =
224  new G4LogicalVolume(SolidF2LArGap, FCALMaterials->Material("LiquidArgon"),
225  "F2LArGapLogical");
226 
227  LogicalF2LArGap->SetVisAttributes(ColorOfLarg);
228  // LogicalF2LArGap->SetVisAttributes(G4VisAttributes::GetInvisible());
229 
230  G4Tubs * SolidF2Rod =
231  new G4Tubs("F2RodSolid", F2RodRmin, F2RodRmax, F2RodLenght, F2RodStartPhi, F2RodDphi);
232  G4LogicalVolume * LogicalF2Rod =
233  new G4LogicalVolume(SolidF2Rod, FCALMaterials->Material("Tungsten"),"F2RodLogical");
234 // G4VPhysicalVolume * PhysicalF2Rod =
235  new G4PVPlacement(0,G4ThreeVector(),LogicalF2Rod,"F2RodPhysical",LogicalF2LArGap,0, 0);
236 
237  LogicalF2Rod->SetVisAttributes(ColorOfTungsten);
238  // LogicalF2Rod->SetVisAttributes(G4VisAttributes::GetInvisible());
239 
240  //---------------------------------
241  // Electrod (Rod + LArg) placement
242  //---------------------------------
243  for(i=1; i < NF2LarGap; i++){
244 // G4VPhysicalVolume * PhysicalF2LArGap =
245  new G4PVPlacement(0,G4ThreeVector(F2LArGapPosX[i]*cm,F2LArGapPosY[i]*cm,0.*cm),
246  LogicalF2LArGap,"F2LArGapPhysical",
247  LogicalHadModule, 0, i);
248  };
249 
250  LogicalF2LArGap->SetVisAttributes(ColorOfLarg);
251  // LogicalF2LArGap->SetVisAttributes(G4VisAttributes::GetInvisible());
252 
253 
254  // Sensitive Volumes
256 
257  if(!FcalHadModuleSD)
258  {
259  FcalHadModuleSD = new FCALHadModuleSD("FCALTB/HadModuleSD");
260  SDman->AddNewDetector(FcalHadModuleSD);
261  }
262  LogicalF2LArGap->SetSensitiveDetector(FcalHadModuleSD);
263 
264 
265  return LogicalHadModule;
266 
267 }
static FCALMaterialConsultant * GetInstance()
CLHEP::Hep3Vector G4ThreeVector
Definition: G4Tubs.hh:85
void InitializeGeometry()
int G4int
Definition: G4Types.hh:78
G4Material * Material(G4String)
static constexpr double cm
Definition: G4SIunits.hh:119
HepGeom::Transform3D G4Transform3D
void AddNewDetector(G4VSensitiveDetector *aSD)
Definition: G4SDManager.cc:71
void SetSmartless(G4double s)
static G4SDManager * GetSDMpointer()
Definition: G4SDManager.cc:40
HepRotation & rotateZ(double delta)
Definition: Rotation.cc:92
void SetVisAttributes(const G4VisAttributes *pVA)
void SetSensitiveDetector(G4VSensitiveDetector *pSDetector)

Here is the call graph for this function:

Here is the caller graph for this function:

G4int FCALHadModule::GetF2TileID ( G4int  TileID)

Definition at line 269 of file FCALHadModule.cc.

270 {
271  return F2LArITile[TileID];
272 }

Here is the caller graph for this function:

void FCALHadModule::InitializeGeometry ( )

Definition at line 83 of file FCALHadModule.cc.

83  {
84 
85 #include "FCALHadModuleParameters.input"
86 
87  std::ifstream File
88  ("geom_data/FCal2Electrodes.dat");
89 
90  if(!File) G4cerr << "Failed to open file FCal2Electrode data file" << G4endl;
91  File.seekg(0);
92 
93  NF2LarGap = 0;
94  while(!(File.eof())) {
95  NF2LarGap++;
96  File >> F2LArGapID[NF2LarGap] >> F2LArGapPosX[NF2LarGap] >> F2LArGapPosY[NF2LarGap]
97  >> F2LArIX[NF2LarGap] >> F2LArJY[NF2LarGap] >> F2LArITile[NF2LarGap];
98  };
99 
100  G4cout << "*********" << " Number of Rods in FCAL2 : " << NF2LarGap-1 << G4endl;
101 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
G4GLOB_DLL std::ostream G4cerr

Here is the caller graph for this function:


The documentation for this class was generated from the following files: