VMC Examples Version 6.6
Loading...
Searching...
No Matches
A01DetectorConstruction.hh
Go to the documentation of this file.
1#ifndef A01DetectorConstruction_h
2#define A01DetectorConstruction_h 1
3
4//
5// ********************************************************************
6// * License and Disclaimer *
7// * *
8// * The Geant4 software is copyright of the Copyright Holders of *
9// * the Geant4 Collaboration. It is provided under the terms and *
10// * conditions of the Geant4 Software License, included in the file *
11// * LICENSE and available at http://cern.ch/geant4/license . These *
12// * include a list of copyright holders. *
13// * *
14// * Neither the authors of this software system, nor their employing *
15// * institutes,nor the agencies providing financial support for this *
16// * work make any representation or warranty, express or implied, *
17// * regarding this software system or assume any liability for its *
18// * use. Please see the license in the file LICENSE and URL above *
19// * for the full disclaimer and the limitation of liability. *
20// * *
21// * This code implementation is the result of the scientific and *
22// * technical work of the GEANT4 collaboration. *
23// * By using, copying, modifying or distributing the software (or *
24// * any work based on the software) you agree to acknowledge its *
25// * use in resulting scientific publications, and indicate your *
26// * acceptance of all terms of the Geant4 Software license. *
27// ********************************************************************
28//
29// $Id$
30// --------------------------------------------------------------
31//
32
33//------------------------------------------------
34// The Virtual Monte Carlo examples
35// Copyright (C) 2007 - 2014 Ivana Hrivnacova
36// All rights reserved.
37//
38// For the licensing terms see geant4_vmc/LICENSE.
39// Contact: root-vmc@cern.ch
40//-------------------------------------------------
41
42/// \file A01DetectorConstruction.hh
43/// \brief Definition of the A01DetectorConstruction class
44///
45/// Geant4 example A01 adapted to Virtual Monte Carlo
46
47#include "globals.hh"
48#include "G4VUserDetectorConstruction.hh"
49#include "G4RotationMatrix.hh"
50#include "G4FieldManager.hh"
51
52class B5MagneticField;
53
54class G4VPhysicalVolume;
55class G4LogicalVolume;
56class G4GenericMessenger;
57class G4FieldManager;
58class G4VisAttributes;
59
60/// \ingroup A01
61/// \brief The detector construction (defined via Geant4)
62
64{
65 public:
66 A01DetectorConstruction(G4bool useLocalMagField);
68
69 virtual G4VPhysicalVolume* Construct();
70 virtual void ConstructSDandField();
71 void SetArmAngle(G4double val);
72 inline G4double GetArmAngle() { return fArmAngle; }
73
74 void ConstructMaterials();
75
76 private:
77 void DefineCommands();
78
79 G4GenericMessenger* fMessenger;
80
81 static G4ThreadLocal B5MagneticField* fMagneticField;
82 static G4ThreadLocal G4FieldManager* fFieldMgr;
83
84 G4LogicalVolume* fMagneticLogical;
85
86 std::vector<G4VisAttributes*> fVisAttributes;
87
88 G4double fArmAngle;
89 G4RotationMatrix* fArmRotation;
90 G4VPhysicalVolume* fSecondArmPhys;
91
93};
94
95#endif
96
The detector construction (defined via Geant4)
virtual G4VPhysicalVolume * Construct()
static G4ThreadLocal G4FieldManager * fFieldMgr
static G4ThreadLocal B5MagneticField * fMagneticField
A01DetectorConstruction(G4bool useLocalMagField)
std::vector< G4VisAttributes * > fVisAttributes
Magnetic field.