Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-23 09:19:39

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 ///////////////////////////////////////////////////////////////////////////////
0027 // File: CCalG4Hall.cc
0028 // Description: CCalG4Hall Geometry factory class to construct G4 geometry 
0029 //              of the experimental hall
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 //#define debug
0047 //#define pdebug
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   //Pointers to the Rotation Matrices and to the Materials
0061   CCalMaterialFactory* matfact       = CCalMaterialFactory::getInstance();
0062 
0063   //Experimental Hall. The mother volume....
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   //Hadron Calorimeter
0097   CCalG4Hcal* hcal = new CCalG4Hcal("HadronCalorimeter");
0098   addDetector(hcal);
0099   AddCCalG4Able(hcal);
0100 
0101   //Crystal matrix
0102   CCalG4Ecal* ecal = new CCalG4Ecal("CrystalMatrixModule");
0103   ecal->setType(CCalG4Ecal::module1);
0104   addDetector(ecal);
0105   AddCCalG4Able(ecal);
0106 }
0107 
0108 
0109 void CCalG4Hall::constructSensitive() {}