File indexing completed on 2025-02-23 09:19:39
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 #include "CCalG4Hall.hh"
0032
0033 #include "CCalMaterialFactory.hh"
0034
0035 #include "CCalG4Hcal.hh"
0036 #include "CCalG4Ecal.hh"
0037
0038 #include "CCalutils.hh"
0039
0040 #include "G4SystemOfUnits.hh"
0041 #include "G4LogicalVolume.hh"
0042 #include "G4ThreeVector.hh"
0043 #include "G4PVPlacement.hh"
0044 #include "G4Box.hh"
0045
0046
0047
0048
0049
0050 CCalG4Hall::CCalG4Hall( const G4String &name ) : CCalHall(name), CCalG4Able(name) {}
0051
0052
0053 CCalG4Hall::~CCalG4Hall() {}
0054
0055
0056 G4VPhysicalVolume* CCalG4Hall::constructIn( G4VPhysicalVolume* mother ) {
0057
0058 G4cout << "==>> Constructing CCalG4Hall..." << G4endl;
0059
0060
0061 CCalMaterialFactory* matfact = CCalMaterialFactory::getInstance();
0062
0063
0064 #ifdef debug
0065 G4cout << tab << "Building experimental Hall geometry...." << G4endl;
0066 #endif
0067
0068 G4Box* solid = new G4Box(Name(), getDx_2Hall()*mm, getDy_2Hall()*mm,
0069 getDy_2Hall()*mm);
0070 #ifdef debug
0071 G4cout << solid->GetName() << " made of " << getMaterial() << " of dimension "
0072 << getDx_2Hall()*mm << " " << getDy_2Hall()*mm << " "
0073 << getDy_2Hall()*mm << " (all in mm)" << G4endl;
0074 #endif
0075
0076 G4Material* matter = matfact->findMaterial(getMaterial());
0077 G4LogicalVolume* glog = new G4LogicalVolume (solid, matter, Name(), 0, 0, 0);
0078 setVisType(CCalVisualisable::PseudoVolumes,glog);
0079
0080 G4VPhysicalVolume* volume = new G4PVPlacement(0,G4ThreeVector(),Name(),
0081 glog,mother,false,0);
0082 #ifdef pdebug
0083 G4String name("Null");
0084 if (mother != 0) name = mother->GetName();
0085 G4cout << glog->GetName() << " number 1 positioned in " << name
0086 << " at (0,0,0) with no rotation" << G4endl;
0087 #endif
0088
0089 G4cout << "<<== End of CCalG4Hall construction ..." << G4endl;
0090
0091 return volume;
0092 }
0093
0094
0095 void CCalG4Hall::constructDaughters() {
0096
0097 CCalG4Hcal* hcal = new CCalG4Hcal("HadronCalorimeter");
0098 addDetector(hcal);
0099 AddCCalG4Able(hcal);
0100
0101
0102 CCalG4Ecal* ecal = new CCalG4Ecal("CrystalMatrixModule");
0103 ecal->setType(CCalG4Ecal::module1);
0104 addDetector(ecal);
0105 AddCCalG4Able(ecal);
0106 }
0107
0108
0109 void CCalG4Hall::constructSensitive() {}