Geant4_10
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);
70  void Construct(G4VPhysicalVolume *PVWorld, G4double isoCentre);
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:
84  G4double jaw1XAperture, jaw2XAperture, jaw1YAperture, jaw2YAperture, isoCentre;
85  std::vector <G4double> leavesA, leavesB;
86  G4int idEnergy;
87  CML2Acc1Messenger *acc1Messenger;
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 
104  G4VPhysicalVolume * PVWorld;
105  G4VPhysicalVolume *targetA_phys;
106  G4VPhysicalVolume *targetB_phys;
107  G4VPhysicalVolume *UpperCollimator_phys;
108  G4VPhysicalVolume *CylMinusCone_phys;
109  G4VPhysicalVolume *BeWTubePV;
110  G4VPhysicalVolume *FFL1A_1PV;
111  G4VPhysicalVolume *FFL2_1PV;
112  G4VPhysicalVolume *PCUtubeW1PV;
113  G4VPhysicalVolume *PCUtubeP1PV;
114  G4VPhysicalVolume *PCUtubeW2PV;
115  G4VPhysicalVolume *PCUtubeP2PV;
116  G4VPhysicalVolume *PCUtubeW3PV;
117  G4VPhysicalVolume *PCUtubeP3PV;
118  G4VPhysicalVolume *MirrorTubePV;
119  G4VPhysicalVolume *phVol1X;
120  G4VPhysicalVolume *phVol2X;
121  G4VPhysicalVolume *phVol1Y;
122  G4VPhysicalVolume *phVol2Y;
123  G4VPhysicalVolume *leafPhys;
124 
125 };
126 
127 #endif
128 
void setJaw2Y(G4double val)
Definition: ML2Acc1.hh:75
const XML_Char * target
Definition: expat.h:268
int G4int
Definition: G4Types.hh:78
void setJaw1X(G4double val)
Definition: ML2Acc1.hh:72
void setLeavesBx(G4double val)
Definition: ML2Acc1.hh:79
void Construct(G4VPhysicalVolume *PVWorld, G4double isoCentre)
Definition: ML2Acc1.cc:156
void setLeavesAx(G4double val)
Definition: ML2Acc1.hh:78
void setidEnergy(G4int val)
Definition: ML2Acc1.hh:77
void setIsoCentre(G4double val)
Definition: ML2Acc1.hh:76
CML2Acc1(void)
Definition: ML2Acc1.cc:48
void writeInfo()
Definition: ML2Acc1.cc:66
void reset()
Definition: ML2Acc1.cc:172
void setJaw1Y(G4double val)
Definition: ML2Acc1.hh:74
int getidEnergy()
Definition: ML2Acc1.hh:80
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
~CML2Acc1(void)
Definition: ML2Acc1.cc:53