| 1 | //
|
|---|
| 2 | // ********************************************************************
|
|---|
| 3 | // * DISCLAIMER *
|
|---|
| 4 | // * *
|
|---|
| 5 | // * The following disclaimer summarizes all the specific disclaimers *
|
|---|
| 6 | // * of contributors to this software. The specific disclaimers,which *
|
|---|
| 7 | // * govern, are listed with their locations in: *
|
|---|
| 8 | // * http://cern.ch/geant4/license *
|
|---|
| 9 | // * *
|
|---|
| 10 | // * Neither the authors of this software system, nor their employing *
|
|---|
| 11 | // * institutes,nor the agencies providing financial support for this *
|
|---|
| 12 | // * work make any representation or warranty, express or implied, *
|
|---|
| 13 | // * regarding this software system or assume any liability for its *
|
|---|
| 14 | // * use. *
|
|---|
| 15 | // * *
|
|---|
| 16 | // * This code implementation is the intellectual property of the *
|
|---|
| 17 | // * GEANT4 collaboration. *
|
|---|
| 18 | // * By copying, distributing or modifying the Program (or any work *
|
|---|
| 19 | // * based on the Program) you indicate your acceptance of this *
|
|---|
| 20 | // * statement, and all its terms. *
|
|---|
| 21 | // ********************************************************************
|
|---|
| 22 | //
|
|---|
| 23 | // The code was written by :
|
|---|
| 24 | // ^Claudio Andenna claudio.andenna@iss.infn.it, claudio.andenna@ispesl.it
|
|---|
| 25 | // *Barbara Caccia barbara.caccia@iss.it
|
|---|
| 26 | // with the support of Pablo Cirrone (LNS, INFN Catania Italy)
|
|---|
| 27 | //
|
|---|
| 28 | // ^ISPESL and INFN Roma, gruppo collegato Sanità , Italy
|
|---|
| 29 | // *Istituto Superiore di Sanità and INFN Roma, gruppo collegato Sanità , Italy
|
|---|
| 30 | // Viale Regina Elena 299, 00161 Roma (Italy)
|
|---|
| 31 | // tel (39) 06 49902246
|
|---|
| 32 | // fax (39) 06 49387075
|
|---|
| 33 | //
|
|---|
| 34 | // more information:
|
|---|
| 35 | // http://g4advancedexamples.lngs.infn.it/Examples/medical-linac
|
|---|
| 36 | //
|
|---|
| 37 | //*******************************************************//
|
|---|
| 38 |
|
|---|
| 39 |
|
|---|
| 40 | #ifndef CML2PhantomConstructionH
|
|---|
| 41 | #define CML2PhantomConstructionH
|
|---|
| 42 |
|
|---|
| 43 | #include "globals.hh"
|
|---|
| 44 | #include "G4VPhysicalVolume.hh"
|
|---|
| 45 | #include "G4LogicalVolume.hh"
|
|---|
| 46 | #include "G4Box.hh"
|
|---|
| 47 |
|
|---|
| 48 | #include "ML2SinputData.hh"
|
|---|
| 49 | #include "ML2Ph_FullWater.hh"
|
|---|
| 50 | #include "ML2Ph_BoxInBox.hh"
|
|---|
| 51 |
|
|---|
| 52 | class CML2PhantomConstructionMessenger;
|
|---|
| 53 | class CPh_HalfWaterAir;
|
|---|
| 54 | class CPh_FullWater;
|
|---|
| 55 | class CML2PhantomConstruction
|
|---|
| 56 | {
|
|---|
| 57 | public:
|
|---|
| 58 | CML2PhantomConstruction(void);
|
|---|
| 59 | ~CML2PhantomConstruction(void);
|
|---|
| 60 | static CML2PhantomConstruction* GetInstance(void);
|
|---|
| 61 | void Construct(G4VPhysicalVolume *PVWorld, G4int saving_in_ROG_Voxels_every_events, G4int seed, G4String ROGOutFile, G4bool bSaveROG);
|
|---|
| 62 | inline G4int getTotalNumberOfEvents()
|
|---|
| 63 | {
|
|---|
| 64 | if (this->phantomName="fullWater")
|
|---|
| 65 | {return this->Ph_fullWater->getTotalNumberOfEvents();}
|
|---|
| 66 | else if (this->phantomName="BoxInBox")
|
|---|
| 67 | {return this->Ph_BoxInBox->getTotalNumberOfEvents();}
|
|---|
| 68 | return 0;
|
|---|
| 69 | };
|
|---|
| 70 | inline void setPhantomName(G4String val){this->phantomName=val;};
|
|---|
| 71 | inline void setPhantom_nVoxelsX(G4int val){this->nVoxelsX=val;};
|
|---|
| 72 | inline void setPhantom_nVoxelsY(G4int val){this->nVoxelsY=val;};
|
|---|
| 73 | inline void setPhantom_nVoxelsZ(G4int val){this->nVoxelsZ=val;};
|
|---|
| 74 | inline void setPhantomSpecficationsFileName(G4String val){this->PhantomSpecficationsFileName=val;};
|
|---|
| 75 | inline void setPhantomRotationX(G4double val){this->rotationX=val;};
|
|---|
| 76 | inline void setPhantomRotationY(G4double val){this->rotationY=val;};
|
|---|
| 77 | inline void setPhantomRotationZ(G4double val){this->rotationZ=val;};
|
|---|
| 78 | private:
|
|---|
| 79 | void design(void);
|
|---|
| 80 | CML2PhantomConstructionMessenger *phantomContstructionMessenger;
|
|---|
| 81 | static CML2PhantomConstruction * instance;
|
|---|
| 82 | G4int nVoxelsX, nVoxelsY, nVoxelsZ;
|
|---|
| 83 | G4String phantomName, PhantomSpecficationsFileName;
|
|---|
| 84 |
|
|---|
| 85 | G4RotationMatrix *rotation;
|
|---|
| 86 | G4VPhysicalVolume *PVPhmWorld;
|
|---|
| 87 |
|
|---|
| 88 | G4double rotationX, rotationY, rotationZ;
|
|---|
| 89 | CML2Ph_FullWater *Ph_fullWater;
|
|---|
| 90 | CML2Ph_BoxInBox *Ph_BoxInBox;
|
|---|
| 91 | };
|
|---|
| 92 | #endif
|
|---|
| 93 |
|
|---|