ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHG4RICHDetector.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PHG4RICHDetector.cc
1 // $$Id: PHG4RICHDetector.cc,v 1.1 2013/10/01 00:33:00 jinhuang Exp $$
2 
11 #include "PHG4RICHDetector.h"
12 #include "PHG4RICHSteppingAction.h"
13 
14 #include <g4main/PHG4Detector.h> // for PHG4Detector
15 
16 #include <Geant4/G4ProductionCuts.hh> // for G4ProductionCuts
17 #include <Geant4/G4Region.hh> // for G4Region
18 #include <Geant4/G4RegionStore.hh>
19 
20 #include <boost/foreach.hpp>
21 
22 #include <map>
23 #include <sstream>
24 
25 class PHCompositeNode;
26 
27 using namespace std;
28 using namespace ePHENIXRICH;
29 
31  : PHG4Detector(subsys, Node, dnam)
32  , ePHENIXRICHConstruction(subsys, g)
33  , _region(nullptr)
34 {
35 }
36 
38  : PHG4Detector(subsys, Node, dnam)
39  , ePHENIXRICHConstruction(subsys)
40  , _region(nullptr)
41 {
42 }
43 
45 {
46  const G4RegionStore *theRegionStore = G4RegionStore::GetInstance();
47  G4ProductionCuts *gcuts = new G4ProductionCuts(*(theRegionStore->GetRegion("DefaultRegionForTheWorld")->GetProductionCuts()));
48  _region = new G4Region("REGION_RICH");
49  _region->SetProductionCuts(gcuts);
51 
52  ePHENIXRICHConstruction::Construct_RICH(logicWorld);
53 
54  BOOST_FOREACH (map_log_vol_t::value_type &vol_pair, map_log_vol)
55  {
56  _region->AddRootLogicalVolume(vol_pair.second);
57  }
58 }