Geant4  10.00.p03
ML2Acc1.hh
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 // The code was written by :
27 // ^Claudio Andenna claudio.andenna@ispesl.it, claudio.andenna@iss.infn.it
28 // *Barbara Caccia barbara.caccia@iss.it
29 // with the support of Pablo Cirrone (LNS, INFN Catania Italy)
30 // with the contribute of Alessandro Occhigrossi*
31 //
32 // ^INAIL DIPIA - ex ISPESL and INFN Roma, gruppo collegato Sanità, Italy
33 // *Istituto Superiore di Sanità and INFN Roma, gruppo collegato Sanità, Italy
34 // Viale Regina Elena 299, 00161 Roma (Italy)
35 // tel (39) 06 49902246
36 // fax (39) 06 49387075
37 //
38 // more information:
39 // http://g4advancedexamples.lngs.infn.it/Examples/medical-linac
40 //
41 //*******************************************************//
42 
43 
44 #ifndef CML2Acc1H
45 #define CML2Acc1H
46 
47 #include "G4VPhysicalVolume.hh"
48 #include "G4LogicalVolume.hh"
49 #include "G4Box.hh"
50 #include "G4Cons.hh"
51 #include "G4Tubs.hh"
52 #include "G4VisAttributes.hh"
53 #include "G4PVPlacement.hh"
54 #include "G4NistManager.hh"
55 
56 #include "G4BooleanSolid.hh"
57 #include "G4IntersectionSolid.hh"
58 #include "G4UnionSolid.hh"
59 #include "G4SubtractionSolid.hh"
60 #include "ML2SinputData.hh"
61 #include "G4ProductionCuts.hh"
62 
63 class CML2Acc1Messenger;
64 class CML2Acc1
65 {
66 public:
67  CML2Acc1(void);
68  ~CML2Acc1(void);
69  static CML2Acc1* GetInstance(void);
71  void reset();
72  inline void setJaw1X(G4double val){jaw1XAperture=val;}
73  inline void setJaw2X(G4double val){jaw2XAperture=val;}
74  inline void setJaw1Y(G4double val){jaw1YAperture=val;}
75  inline void setJaw2Y(G4double val){jaw2YAperture=val;}
76  inline void setIsoCentre(G4double val){isoCentre=val;}
77  inline void setidEnergy(G4int val){idEnergy=val;}
78  inline void setLeavesAx(G4double val){leavesA.push_back(val);}
79  inline void setLeavesBx(G4double val){leavesB.push_back(val);}
80  inline int getidEnergy(){return idEnergy;}
82  void writeInfo();
83 private:
85  std::vector <G4double> leavesA, leavesB;
88  static CML2Acc1 * instance;
89 
90  G4Material * otherMaterials(const G4String materialName);
91  void SetJawAperture(G4int idJaw, G4ThreeVector &centre, G4ThreeVector halfSize, G4double aperture, G4RotationMatrix *cRotation);
92  bool target();
93  bool primaryCollimator();
94  bool BeWindow();
95  bool flatteningFilter();
96  bool ionizationChamber();
97  bool mirror();
98  bool Jaw1X();
99  bool Jaw2X();
100  bool Jaw1Y();
101  bool Jaw2Y();
102  bool MLC();
103 
124 
125 };
126 
127 #endif
128 
G4double isoCentre
Definition: ML2Acc1.hh:84
CML2Acc1Messenger * acc1Messenger
Definition: ML2Acc1.hh:87
G4VPhysicalVolume * targetB_phys
Definition: ML2Acc1.hh:106
G4VPhysicalVolume * BeWTubePV
Definition: ML2Acc1.hh:109
G4VPhysicalVolume * targetA_phys
Definition: ML2Acc1.hh:105
void setJaw2Y(G4double val)
Definition: ML2Acc1.hh:75
CLHEP::Hep3Vector G4ThreeVector
CLHEP::HepRotation G4RotationMatrix
G4double jaw1XAperture
Definition: ML2Acc1.hh:84
G4VPhysicalVolume * phVol1X
Definition: ML2Acc1.hh:119
G4VPhysicalVolume * PCUtubeP2PV
Definition: ML2Acc1.hh:115
G4int idEnergy
Definition: ML2Acc1.hh:86
bool Jaw1Y()
Definition: ML2Acc1.cc:690
G4VPhysicalVolume * PCUtubeP3PV
Definition: ML2Acc1.hh:117
static CML2Acc1 * instance
Definition: ML2Acc1.hh:88
G4VPhysicalVolume * MirrorTubePV
Definition: ML2Acc1.hh:118
int G4int
Definition: G4Types.hh:78
void setJaw1X(G4double val)
Definition: ML2Acc1.hh:72
G4VPhysicalVolume * UpperCollimator_phys
Definition: ML2Acc1.hh:107
G4double jaw1YAperture
Definition: ML2Acc1.hh:84
void setLeavesBx(G4double val)
Definition: ML2Acc1.hh:79
bool flatteningFilter()
Definition: ML2Acc1.cc:384
bool MLC()
Definition: ML2Acc1.cc:763
std::vector< G4double > leavesA
Definition: ML2Acc1.hh:85
void Construct(G4VPhysicalVolume *PVWorld, G4double isoCentre)
Definition: ML2Acc1.cc:156
void SetJawAperture(G4int idJaw, G4ThreeVector &centre, G4ThreeVector halfSize, G4double aperture, G4RotationMatrix *cRotation)
Definition: ML2Acc1.cc:549
G4double jaw2YAperture
Definition: ML2Acc1.hh:84
void setLeavesAx(G4double val)
Definition: ML2Acc1.hh:78
void setidEnergy(G4int val)
Definition: ML2Acc1.hh:77
bool BeWindow()
Definition: ML2Acc1.cc:357
G4VPhysicalVolume * phVol2Y
Definition: ML2Acc1.hh:122
void setIsoCentre(G4double val)
Definition: ML2Acc1.hh:76
G4VPhysicalVolume * phVol2X
Definition: ML2Acc1.hh:120
bool primaryCollimator()
Definition: ML2Acc1.cc:251
bool Jaw1X()
Definition: ML2Acc1.cc:618
CML2Acc1(void)
Definition: ML2Acc1.cc:48
bool target()
Definition: ML2Acc1.cc:178
G4VPhysicalVolume * phVol1Y
Definition: ML2Acc1.hh:121
void writeInfo()
Definition: ML2Acc1.cc:66
G4VPhysicalVolume * PCUtubeP1PV
Definition: ML2Acc1.hh:113
G4double jaw2XAperture
Definition: ML2Acc1.hh:84
bool ionizationChamber()
Definition: ML2Acc1.cc:435
G4Material * otherMaterials(const G4String materialName)
Definition: ML2Acc1.cc:72
void reset()
Definition: ML2Acc1.cc:172
std::vector< G4double > leavesB
Definition: ML2Acc1.hh:85
void setJaw1Y(G4double val)
Definition: ML2Acc1.hh:74
G4VPhysicalVolume * PCUtubeW2PV
Definition: ML2Acc1.hh:114
int getidEnergy()
Definition: ML2Acc1.hh:80
G4VPhysicalVolume * PCUtubeW1PV
Definition: ML2Acc1.hh:112
bool Jaw2Y()
Definition: ML2Acc1.cc:726
G4VPhysicalVolume * leafPhys
Definition: ML2Acc1.hh:123
G4VPhysicalVolume * FFL1A_1PV
Definition: ML2Acc1.hh:110
void setJaw2X(G4double val)
Definition: ML2Acc1.hh:73
G4double getBeforeJaws_Z_PhaseSpacePosition()
Definition: ML2Acc1.hh:81
double G4double
Definition: G4Types.hh:76
static CML2Acc1 * GetInstance(void)
Definition: ML2Acc1.cc:58
bool Jaw2X()
Definition: ML2Acc1.cc:654
~CML2Acc1(void)
Definition: ML2Acc1.cc:53
G4VPhysicalVolume * PCUtubeW3PV
Definition: ML2Acc1.hh:116
G4VPhysicalVolume * FFL2_1PV
Definition: ML2Acc1.hh:111
G4VPhysicalVolume * CylMinusCone_phys
Definition: ML2Acc1.hh:108
G4VPhysicalVolume * PVWorld
Definition: ML2Acc1.hh:104
bool mirror()
Definition: ML2Acc1.cc:521