Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
FCALEMModule Class Reference

#include <FCALEMModule.hh>

Public Member Functions

 FCALEMModule ()
 
 ~FCALEMModule ()
 
G4LogicalVolumeConstruct ()
 
void InitializeGeometry ()
 
G4int GetF1TileID (G4int)
 
G4double GetF1LArGapPosX (G4int)
 

Detailed Description

Definition at line 45 of file FCALEMModule.hh.

Constructor & Destructor Documentation

FCALEMModule::FCALEMModule ( )

Definition at line 61 of file FCALEMModule.cc.

61  :
62  FcalEmModuleSD(0)
63  {
64  F1LArGapID = new G4int[2400];
65  F1LArIX = new G4int[2400];
66  F1LArJY = new G4int[2400];
67  F1LArITile = new G4int[2400];
68  F1LArGapPosX = new G4double[2400];
69  F1LArGapPosY = new G4double[2400];
70 }
int G4int
Definition: G4Types.hh:78
double G4double
Definition: G4Types.hh:76
FCALEMModule::~FCALEMModule ( )

Definition at line 73 of file FCALEMModule.cc.

73  {
74  delete [] F1LArGapID;
75  delete [] F1LArGapPosX;
76  delete [] F1LArGapPosY;
77  delete [] F1LArIX;
78  delete [] F1LArJY;
79  delete [] F1LArITile;
80 }

Member Function Documentation

G4LogicalVolume * FCALEMModule::Construct ( void  )

Definition at line 102 of file FCALEMModule.cc.

References G4SDManager::AddNewDetector(), python.hepunit::cm, FCALMaterialConsultant::construct(), G4SDManager::GetSDMpointer(), InitializeGeometry(), G4VisAttributes::Invisible, FCALMaterialConsultant::Material(), CLHEP::HepRotation::rotateZ(), G4LogicalVolume::SetSensitiveDetector(), G4LogicalVolume::SetSmartless(), and G4LogicalVolume::SetVisAttributes().

Referenced by FCALCryostatVolumes::Construct().

103 {
104  //-----------------------------
105  // construction of materials
106  //-----------------------------
107  FCALMaterialConsultant * FCALMaterials = new FCALMaterialConsultant();
108  FCALMaterials->construct();
109 
110  G4VisAttributes * ColorOfEMModule = new G4VisAttributes(G4Colour(1.,0.,0.5));
111 // G4VisAttributes * ColorOfLArg = new G4VisAttributes(G4Colour(0.,0.,1.));
112 
113  //----------------------------
114  // Read Parameters
115  //----------------------------
117 
118 //-----------------------------------------
119 // Logical to be returned (FCAL EM module)
120 //-----------------------------------------
121  G4Tubs * SolidEmModule =
122  new G4Tubs("EmModuleSold", EmModuleRMin, EmModuleRMax, EmModuleLenght,
123  EmModuleStartPhi,EmModuleDPhi);
124  G4LogicalVolume * LogicalEmModule =
125  new G4LogicalVolume(SolidEmModule, FCALMaterials->Material("Copper"),
126  "EmModuleLogical");
127 
128  LogicalEmModule->SetSmartless(FCALEmSmart);
129 
130  LogicalEmModule->SetVisAttributes(ColorOfEMModule);
131  // LogicalEmModule->SetVisAttributes(G4VisAttributes::Invisible);
132 
133 
134 //---------------------
135 // FCAL Cable Troff
136 //---------------------
137  G4Tubs * SolidF1CableTroff =
138  new G4Tubs("F1CableTroffSolid", F1CableTroffRMin, F1CableTroffRMax,
139  F1CableTroffLenght, F1CableTroffStartPhi, F1CableTroffDPhi);
140  G4LogicalVolume * LogicalF1CableTroff =
141  new G4LogicalVolume(SolidF1CableTroff, FCALMaterials->Material("FCAL1CuArKap"),
142  "F1CableTroffLogical");
143 
144  G4ThreeVector F1CableTroffTrans(0.,0.,0.);
145  G4RotationMatrix F1CableTroffRot;
146 
147  G4int i=0;
148  for(i=0 ; i < NCableTroff ; i++)
149  {
150 // G4VPhysicalVolume * PhysicalF1CableTroff =
151  new G4PVPlacement(G4Transform3D(F1CableTroffRot,F1CableTroffTrans),
152  LogicalF1CableTroff,"F1CableTroffPhysical",
153  LogicalEmModule,0,i+1);
154 
155  F1CableTroffRot.rotateZ(F1CableTroffRotZ);
156  }
157 
158  LogicalF1CableTroff->SetVisAttributes(ColorOfEMModule);
159  // LogicalF1CableTroff->SetVisAttributes(G4VisAttributes::Invisible);
160 
161 
162  //----------------------
163  // LArg gaps
164  //----------------------
165 
166  G4Tubs * SolidF1LArGap =
167  new G4Tubs("F1LArGapSolid",F1LArGapRmin, F1LArGapRmax, F1LArGapLenght,
168  F1LArGapStartPhi,F1LArGapDPhi);
169 
170  G4LogicalVolume * LogicalF1LArGap =
171  new G4LogicalVolume(SolidF1LArGap, FCALMaterials->Material("LiquidArgon"),
172  "LArg Gap");
173 
174  for(i=1; i < NF1LarGap; i++){
175 // G4VPhysicalVolume * PhysicalF1LArGap =
176  new G4PVPlacement(0,G4ThreeVector(F1LArGapPosX[i]*cm,F1LArGapPosY[i]*cm,0.*cm),
177  LogicalF1LArGap,"F1LArGapPhysical", LogicalEmModule, 0, i);
178  };
179 
180  // LogicalF1LArGap->SetVisAttributes(ColorOfLArg);
182 
183 
184  // Sensitive Volumes
186 
187  if(!FcalEmModuleSD)
188  {
189  FcalEmModuleSD = new FCALEMModuleSD("FCALTB/EmModuleSD");
190  SDman->AddNewDetector(FcalEmModuleSD);
191  }
192  LogicalF1LArGap->SetSensitiveDetector(FcalEmModuleSD);
193 
194 
195 
196  return LogicalEmModule;
197 
198 }
CLHEP::Hep3Vector G4ThreeVector
static FCALMaterialConsultant * construct()
void InitializeGeometry()
Definition: FCALEMModule.cc:83
Definition: G4Tubs.hh:84
int G4int
Definition: G4Types.hh:78
G4Material * Material(G4String)
HepGeom::Transform3D G4Transform3D
void AddNewDetector(G4VSensitiveDetector *aSD)
Definition: G4SDManager.cc:67
void SetSmartless(G4double s)
static G4SDManager * GetSDMpointer()
Definition: G4SDManager.cc:40
static const G4VisAttributes Invisible
HepRotation & rotateZ(double delta)
Definition: Rotation.cc:92
void SetVisAttributes(const G4VisAttributes *pVA)
void SetSensitiveDetector(G4VSensitiveDetector *pSDetector)
G4double FCALEMModule::GetF1LArGapPosX ( G4int  GapID)

Definition at line 204 of file FCALEMModule.cc.

205 { return F1LArGapPosX[GapID]; }
G4int FCALEMModule::GetF1TileID ( G4int  GapID)

Definition at line 201 of file FCALEMModule.cc.

Referenced by FCALEMModuleSD::ProcessHits().

202 { return F1LArITile[GapID]; }
void FCALEMModule::InitializeGeometry ( )

Definition at line 83 of file FCALEMModule.cc.

References G4cerr, G4cout, and G4endl.

Referenced by Construct(), and FCALEMModuleSD::Initialize().

83  {
84 #include "FCALEMModuleParameters.input"
85  std::ifstream File
86  ("geom_data/FCal1Electrodes.dat");
87 
88  if(!File) G4cerr << "Failed to open file FCal1Electrodes data file " << G4endl;
89  File.seekg(0);
90 
91  NF1LarGap = 0;
92  while(!(File.eof())) {
93  NF1LarGap++;
94  File >> F1LArGapID[NF1LarGap] >> F1LArGapPosX[NF1LarGap] >> F1LArGapPosY[NF1LarGap]
95  >> F1LArIX[NF1LarGap] >> F1LArJY[NF1LarGap] >> F1LArITile[NF1LarGap];
96  };
97  G4cout << "********" << " Number of Rods in FCAL1 : " << NF1LarGap-1 << G4endl;;
98 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
G4GLOB_DLL std::ostream G4cerr

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