File indexing completed on 2025-01-18 09:57:51
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063
0064
0065
0066
0067 #ifndef G3VOLTABLEENTRY_HH
0068 #define G3VOLTABLEENTRY_HH 1
0069
0070 #include "globals.hh"
0071 #include "G3Pos.hh"
0072 #include "G3Division.hh"
0073 #include <vector>
0074
0075 class G4LogicalVolume;
0076 class G4Material;
0077 class G4VSolid;
0078
0079 class G3VolTableEntry
0080 {
0081 public:
0082
0083 G3VolTableEntry(G4String& vname, G4String& shape, G4double* rpar,
0084 G4int npar, G4int nmed, G4VSolid* solid,
0085 G4bool hasNegPars);
0086 virtual ~G3VolTableEntry();
0087
0088
0089 G4bool operator == ( const G3VolTableEntry& vte) const;
0090
0091
0092 void AddG3Pos(G3Pos* aG3Pos);
0093 void AddDaughter(G3VolTableEntry* aDaughter);
0094 void AddMother(G3VolTableEntry* aDaughter);
0095 void AddClone(G3VolTableEntry* aDaughter);
0096 void AddOverlap(G3VolTableEntry* aOverlap);
0097 void ReplaceDaughter(G3VolTableEntry* vteOld, G3VolTableEntry* vteNew);
0098 void ReplaceMother(G3VolTableEntry* vteOld, G3VolTableEntry* vteNew);
0099 G3VolTableEntry* FindDaughter(const G4String& vname);
0100 G3VolTableEntry* FindMother(const G4String& vname);
0101 G3VolTableEntry* FindClone(const G4String& vname);
0102 void PrintSolidInfo();
0103
0104
0105 void SetName(G4String name);
0106 void SetLV(G4LogicalVolume* lv);
0107 void SetSolid(G4VSolid* solid);
0108 void SetNmed(G4int nmed);
0109 void SetNRpar(G4int npar, G4double* Rpar);
0110 void SetDivision(G3Division* division);
0111 void SetHasNegPars(G4bool hasNegPars);
0112 void SetHasMANY(G4bool hasMANY);
0113 void ClearG3PosCopy(G4int copy);
0114 void ClearDivision();
0115
0116
0117 G4String GetName();
0118 G4String GetShape();
0119 G4int GetNmed();
0120 G4int GetNpar();
0121 G4double* GetRpar();
0122 G4int NPCopies();
0123 G3Pos* GetG3PosCopy(G4int copy=0);
0124 G3Division* GetDivision();
0125 G4bool HasNegPars();
0126 G4bool HasMANY();
0127 G4VSolid* GetSolid();
0128 G4LogicalVolume* GetLV();
0129 G4int GetNoDaughters();
0130 G4int GetNoMothers();
0131 G4int GetNoClones();
0132 G4int GetNoOverlaps();
0133 G3VolTableEntry* GetDaughter(G4int i);
0134 G3VolTableEntry* GetMother(G4int i);
0135 G3VolTableEntry* GetMother();
0136
0137 G3VolTableEntry* GetClone(G4int i);
0138 G3VolTableEntry* GetMasterClone();
0139 std::vector<G3VolTableEntry*>* GetOverlaps();
0140
0141 private:
0142 G4String fVname;
0143 G4String fShape;
0144 G4double* fRpar;
0145 G4int fNpar;
0146 G4int fNmed;
0147 G4VSolid* fSolid;
0148 G4LogicalVolume* fLV;
0149 G4bool fHasNegPars;
0150 G4bool fHasMANY;
0151 std::vector<G3VolTableEntry*> fDaughters;
0152 std::vector<G3VolTableEntry*> fMothers;
0153 std::vector<G3VolTableEntry*> fClones;
0154 std::vector<G3VolTableEntry*> fOverlaps;
0155 std::vector<G3Pos*> fG3Pos;
0156 G3Division* fDivision;
0157 };
0158
0159
0160
0161 inline void G3VolTableEntry::SetDivision(G3Division* division)
0162 { fDivision = division; }
0163
0164 inline G3Division* G3VolTableEntry::GetDivision()
0165 { return fDivision; }
0166
0167 #endif