SToGS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
SToGS_ArraysDF.cc
Go to the documentation of this file.
1 
2 //
3 // ********************************************************************
4 // * License and Disclaimer *
5 // * *
6 // * The Geant4 software is copyright of the Copyright Holders of *
7 // * the Geant4 Collaboration. It is provided under the terms and *
8 // * conditions of the Geant4 Software License, included in the file *
9 // * LICENSE and available at http://cern.ch/geant4/license . These *
10 // * include a list of copyright holders. *
11 // * *
12 // * Neither the authors of this software system, nor their employing *
13 // * institutes,nor the agencies providing financial support for this *
14 // * work make any representation or warranty, express or implied, *
15 // * regarding this software system or assume any liability for its *
16 // * use. Please see the license in the file LICENSE and URL above *
17 // * for the full disclaimer and the limitation of liability. *
18 // * *
19 // * This code implementation is the result of the scientific and *
20 // * technical work of the GEANT4 collaboration. *
21 // * By using, copying, modifying or distributing the software (or *
22 // * any work based on the software) you agree to acknowledge its *
23 // * use in resulting scientific publications, and indicate your *
24 // * acceptance of all terms of the Geant4 Software license. *
25 // ********************************************************************
26 //
27 //
28 
29 // Project includes
30 #include "SToGS_ArraysDF.hh"
31 
32 // list of all specific factories
33 namespace {
34  // all arrays
35  SToGS::ArraysDF theArrays("Arrays/");
36 }
37 
39 {
40  // SToGS::DetectorFactory::theMainFactory()->Clean();
42  MakeInStore("Chateau2Crystal","");
43 
45  MakeInStore("AGATA","180");
46 
48  MakeInStore("EXOGAM","");
49 
51  MakeInStore("FATIMA","");
52 
54  MakeInStore("EUROBALL","III");
55 }
56 
57 G4VPhysicalVolume *SToGS::ArraysDF::Make(G4String name, G4String version_string)
58 {
59  G4VPhysicalVolume *theDetector = 0x0; // G4String detname;
60 
61  if ( name == "Chateau2Crystal" ) {
62  theDetector = MakeAnArrayFromFactory("DetectorFactory/Arrays/Builders/Chateau2Crystal.dfb");
63  }
64  if ( name == "AGATA" ) {
65  if ( version_string == "180" )
66  theDetector = MakeAnArrayFromFactory("DetectorFactory/Arrays/Builders/AGATA_180.dfb");
67  }
68  if ( name == "EXOGAM" ) {
69  if ( version_string == "" )
70  theDetector = MakeAnArrayFromFactory("DetectorFactory/Arrays/Builders/EXOGAM.dfb");
71 
72  }
73  if ( name == "FATIMA" ) {
74  if ( version_string == "" )
75  theDetector = MakeAnArrayFromFactory("DetectorFactory/Arrays/Builders/FATIMA.dfb");
76  }
77  if ( name == "EUROBALL" ) {
78  if ( version_string == "III" )
79  theDetector = MakeAnArrayFromFactory("DetectorFactory/Arrays/Builders/EUROBALL_III.dfb");
80  }
81 
82  return theDetector;
83 }
84 
85 
86 
87 
base class for building standard arrays from pieces in other factories
virtual G4VPhysicalVolume * Make(G4String, G4String)
Should be implemented in any sub factory. It built (C++) a detector and return it.
void MakeInStore(G4String name, G4String version_string)
build in store a particular detector from its names and version. i.e. call th Make method of the sub ...
static G4int SetGCopyNb(G4int val)
virtual void MakeStore()
to be filled with default arrays