ATLAS Offline Software
Loading...
Searching...
No Matches
DerivedG4PhysicalVolume.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef G4MyPhysicalVolume_h
6#define G4MyPhysicalVolume_h
7
8#include "G4VPhysicalVolume.hh"
9#include "G4RotationMatrix.hh"
10#include "G4ThreeVector.hh"
11#include "G4LogicalVolume.hh"
12#include "G4String.hh"
13#include "G4VPVParameterisation.hh"
14
15
16class G4MyPhysicalVolume : public G4VPhysicalVolume {
17
18public:
19
20 G4MyPhysicalVolume( G4RotationMatrix *pRot,
21 const G4ThreeVector &tlate,
22 const G4String& pName,
23 G4LogicalVolume* pLogical,
24 G4VPhysicalVolume* pPhysical ) : G4VPhysicalVolume(pRot, tlate, pName, pLogical, pPhysical)
25 {
26
27 }
28
30
31 G4int GetCopyNo() const final
32 {
33 return copyNo;
34 }
35
36 void SetCopyNo(G4int CopyNo) final
37 {
38 copyNo = CopyNo;
39 }
40 void SetVolumeType(EVolume volumetype){ fTypeOfVolume = volumetype ;}
41
42 G4bool IsMany() const final { return true; }
43
44 G4bool IsReplicated() const final { return true; }
45
46 G4bool IsParameterised() const final { return true; }
47
48 G4VPVParameterisation* GetParameterisation() const final { return nullptr; }
49
50 void GetReplicationData(EAxis& axis, G4int& nReplicas, G4double& width, G4double& offset, G4bool& consuming) const final
51 {
52 axis = (EAxis)1;
53 nReplicas = 0;
54 width = 0.0;
55 offset = 0.0;
56 consuming = true;
57 }
58
59 G4bool IsRegularStructure() const final { return true; }
60
61 G4int GetRegularStructureId() const final { return 0; }
62
63 EVolume VolumeType()const{ return fTypeOfVolume; }
64
65 G4int copyNo{};
66
67private:
68
69 EVolume fTypeOfVolume{kNormal};
70
71};
72#endif
const double width
void SetVolumeType(EVolume volumetype)
G4bool IsReplicated() const final
G4VPVParameterisation * GetParameterisation() const final
G4bool IsParameterised() const final
void GetReplicationData(EAxis &axis, G4int &nReplicas, G4double &width, G4double &offset, G4bool &consuming) const final
G4bool IsRegularStructure() const final
void SetCopyNo(G4int CopyNo) final
G4bool IsMany() const final
G4int GetCopyNo() const final
G4MyPhysicalVolume(G4RotationMatrix *pRot, const G4ThreeVector &tlate, const G4String &pName, G4LogicalVolume *pLogical, G4VPhysicalVolume *pPhysical)
G4int GetRegularStructureId() const final