Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GammaRayTelDetectorConstruction Class Reference

#include <GammaRayTelDetectorConstruction.hh>

Inheritance diagram for GammaRayTelDetectorConstruction:
Collaboration diagram for GammaRayTelDetectorConstruction:

Public Member Functions

 GammaRayTelDetectorConstruction ()
 
 ~GammaRayTelDetectorConstruction ()
 
void SetNbOfTKRLayers (G4int)
 
void SetTKRTileSizeXY (G4double)
 
void SetNbOfTKRTiles (G4int)
 
void SetTKRSiliconThickness (G4double)
 
void SetTKRSiliconPitch (G4double)
 
void SetTKRLayerDistance (G4double)
 
void SetTKRViewsDistance (G4double)
 
void SetConverterMaterial (G4String)
 
void SetConverterThickness (G4double)
 
void SetNbOfCALLayers (G4int)
 
void SetNbOfCALBars (G4int)
 
void SetCALBarThickness (G4double)
 
void SetACDThickness (G4double)
 
void SetMagField (G4double)
 
G4VPhysicalVolumeConstruct ()
 
void UpdateGeometry ()
 
void ConstructSDandField ()
 
void PrintPayloadParameters ()
 
G4double GetWorldSizeZ () const
 
G4double GetWorldSizeXY () const
 
G4double GetPayloadSizeZ () const
 
G4double GetPayloadSizeXY () const
 
G4double GetTKRSizeZ () const
 
G4double GetTKRSizeXY () const
 
G4double GetCALSizeZ () const
 
G4double GetCALTKRDistance () const
 
G4double GetTKRSiliconThickness () const
 
G4double GetTKRSiliconTileXY () const
 
G4double GetTKRSiliconPitch () const
 
G4int GetNbOfTKRLayers () const
 
G4int GetNbOfTKRTiles () const
 
G4int GetNbOfTKRStrips () const
 
G4double GetTKRLayerDistance () const
 
G4double GetTKRViewsDistance () const
 
G4double GetTKRActiveTileXY () const
 
G4double GetTKRActiveTileZ () const
 
G4double GetSiliconGuardRing () const
 
G4double GetTilesSeparation () const
 
G4MaterialGetConverterMaterial () const
 
G4double GetConverterThickness () const
 
G4double GetCALBarThickness () const
 
G4int GetNbOfCALLayers () const
 
G4int GetNbOfCALBars () const
 
G4double GetACDThickness () const
 
G4int GetNbOfACDTopTiles () const
 
G4int GetNbOfACDLateralTiles () const
 
- Public Member Functions inherited from G4VUserDetectorConstruction
 G4VUserDetectorConstruction ()
 
virtual ~G4VUserDetectorConstruction ()
 
virtual void CloneSD ()
 
virtual void CloneF ()
 
void RegisterParallelWorld (G4VUserParallelWorld *)
 
G4int ConstructParallelGeometries ()
 
void ConstructParallelSD ()
 
G4int GetNumberOfParallelWorld () const
 
G4VUserParallelWorldGetParallelWorld (G4int i) const
 

Additional Inherited Members

- Protected Member Functions inherited from G4VUserDetectorConstruction
void SetSensitiveDetector (const G4String &logVolName, G4VSensitiveDetector *aSD, G4bool multi=false)
 
void SetSensitiveDetector (G4LogicalVolume *logVol, G4VSensitiveDetector *aSD)
 

Detailed Description

Definition at line 61 of file GammaRayTelDetectorConstruction.hh.

Constructor & Destructor Documentation

GammaRayTelDetectorConstruction::GammaRayTelDetectorConstruction ( )

Definition at line 74 of file GammaRayTelDetectorConstruction.cc.

75  :solidWorld(0),logicWorld(0),physiWorld(0),
76  solidPayload(0),logicPayload(0),physiPayload(0),
77  solidTKR(0),logicTKR(0),physiTKR(0),
78  solidCAL(0),logicCAL(0),physiCAL(0),
79  solidACT(0),logicACT(0),physiACT(0),
80  solidACL1(0),logicACL1(0),physiACL1(0),
81  solidACL2(0),logicACL2(0),physiACL2(0),
82  solidTKRDetectorX(0),logicTKRDetectorX(0),physiTKRDetectorX(0),
83  solidTKRDetectorY(0),logicTKRDetectorY(0),physiTKRDetectorY(0),
84  solidCALLayerX(0),logicCALLayerX(0),physiCALLayerX(0),
85  solidCALLayerY(0),logicCALLayerY(0),physiCALLayerY(0),
86  solidCALDetectorX(0),logicCALDetectorX(0),physiCALDetectorX(0),
87  solidCALDetectorY(0),logicCALDetectorY(0),physiCALDetectorY(0),
88  solidPlane(0),logicPlane(0),physiPlane(0),
89  solidConverter(0),logicConverter(0),physiConverter(0),
90  logicTKRStripX(0),logicTKRStripY(0)
91  // aTKRRegion(0), aCALRegion(0)
92 {
93  // default parameter values of the payload
94 
95  ConverterThickness = 300.*micrometer;
96  TKRSiliconThickness = 400.*micrometer;
97  TKRSiliconTileXY = 9.*cm;
98  TKRSiliconPitch = 200.*micrometer;
99  TKRLayerDistance = 3.*cm;
100  SiliconGuardRing = 1.5*mm;
101  TKRViewsDistance = 1.*mm;
102  NbOfTKRLayers = 15;
103  NbOfTKRTiles = 4;
104  CALBarThickness = 1.5*cm;
105  NbOfCALBars = 12;
106  NbOfCALLayers = 5;
107  ACDThickness = 1.*cm;
108  NbOfACDTopTiles = 1;
109  NbOfACDLateralTiles = 2;
110 
111  TilesSeparation = 100.*micrometer;
112  ACDTKRDistance = 5.*cm;
113  CALTKRDistance = 1.5*cm;
114 
115  //Initialize thread-local sensitive detectors
116  trackerSD.Put(0);
117  calorimeterSD.Put(0);
118  anticoincidenceSD.Put(0);
119 
120  ComputePayloadParameters();
121 
122  // create commands for interactive definition of the payload
123  detectorMessenger = new GammaRayTelDetectorMessenger(this);
124 
125 }
static constexpr double mm
Definition: G4SIunits.hh:115
static constexpr double cm
Definition: G4SIunits.hh:119
void Put(const value_type &val) const
Definition: G4Cache.hh:286
static constexpr double micrometer
Definition: G4SIunits.hh:100

Here is the call graph for this function:

GammaRayTelDetectorConstruction::~GammaRayTelDetectorConstruction ( )

Definition at line 129 of file GammaRayTelDetectorConstruction.cc.

130 { delete detectorMessenger;}

Member Function Documentation

G4VPhysicalVolume * GammaRayTelDetectorConstruction::Construct ( void  )
virtual

Implements G4VUserDetectorConstruction.

Definition at line 134 of file GammaRayTelDetectorConstruction.cc.

135 {
136  DefineMaterials();
137  return ConstructPayload();
138 }
void GammaRayTelDetectorConstruction::ConstructSDandField ( )
virtual

Reimplemented from G4VUserDetectorConstruction.

Definition at line 826 of file GammaRayTelDetectorConstruction.cc.

827 {
828 
829  //
830  // Sensitive Detectors - Tracker
831  //
832  if(trackerSD.Get()==0)
833  {
834  GammaRayTelTrackerSD* SD = new GammaRayTelTrackerSD("TrackerSD");
835  trackerSD.Put(SD);
836  }
837 
839  //Flags the strips as sensitive .
840  if (logicTKRStripX)
841  SetSensitiveDetector(logicTKRStripX,trackerSD.Get()); // ActiveStripX
842  if (logicTKRStripY)
843  SetSensitiveDetector(logicTKRStripY,trackerSD.Get()); // ActiveStripY
844 
845 
846  //
847  // Sensitive Detectors: Calorimeter
848  //
849  if(calorimeterSD.Get()==0)
850  {
851  GammaRayTelCalorimeterSD* SD = new GammaRayTelCalorimeterSD("CalorimeterSD");
852  calorimeterSD.Put(SD);
853  }
854  G4SDManager::GetSDMpointer()->AddNewDetector(calorimeterSD.Get());
855  if (logicCALDetectorX)
856  SetSensitiveDetector(logicCALDetectorX,calorimeterSD.Get()); // BarX
857  if (logicCALDetectorY)
858  SetSensitiveDetector(logicCALDetectorY,calorimeterSD.Get()); // BarY
859 
860  //
861  // Sensitive Detectors: Anticoincidence
862  //
863 
864  if(anticoincidenceSD.Get()==0)
865  {
867  ("AnticoincidenceSD");
868  anticoincidenceSD.Put(SD);
869  }
870  G4SDManager::GetSDMpointer()->AddNewDetector(anticoincidenceSD.Get());
871  if (logicACT)
872  SetSensitiveDetector(logicACT,anticoincidenceSD.Get()); // ACD top
873  if (logicACL1)
874  SetSensitiveDetector(logicACL1,anticoincidenceSD.Get()); // ACD lateral side
875  if (logicACL2)
876  SetSensitiveDetector(logicACL2,anticoincidenceSD.Get()); // ACD lateral side
877 
878  // Create global magnetic field messenger.
879  // Uniform magnetic field is then created automatically if
880  // the field value is not zero.
881  G4ThreeVector fieldValue = G4ThreeVector();
882  fMagFieldMessenger = new G4GlobalMagFieldMessenger(fieldValue);
883  fMagFieldMessenger->SetVerboseLevel(1);
884 
885  // Register the field messenger for deleting
886  G4AutoDelete::Register(fMagFieldMessenger);
887 
888  return;
889 
890 }
void SetVerboseLevel(G4int verboseLevel)
CLHEP::Hep3Vector G4ThreeVector
value_type & Get() const
Definition: G4Cache.hh:282
void Register(T *inst)
Definition: G4AutoDelete.hh:65
void SetSensitiveDetector(const G4String &logVolName, G4VSensitiveDetector *aSD, G4bool multi=false)
void AddNewDetector(G4VSensitiveDetector *aSD)
Definition: G4SDManager.cc:71
static G4SDManager * GetSDMpointer()
Definition: G4SDManager.cc:40
void Put(const value_type &val) const
Definition: G4Cache.hh:286

Here is the call graph for this function:

G4double GammaRayTelDetectorConstruction::GetACDThickness ( ) const
inline

Definition at line 133 of file GammaRayTelDetectorConstruction.hh.

133 {return ACDThickness;};
G4double GammaRayTelDetectorConstruction::GetCALBarThickness ( ) const
inline

Definition at line 129 of file GammaRayTelDetectorConstruction.hh.

129 {return CALBarThickness;};
G4double GammaRayTelDetectorConstruction::GetCALSizeZ ( ) const
inline

Definition at line 109 of file GammaRayTelDetectorConstruction.hh.

109 {return CALSizeZ;};
G4double GammaRayTelDetectorConstruction::GetCALTKRDistance ( ) const
inline

Definition at line 110 of file GammaRayTelDetectorConstruction.hh.

110 {return CALTKRDistance;};
G4Material* GammaRayTelDetectorConstruction::GetConverterMaterial ( ) const
inline

Definition at line 126 of file GammaRayTelDetectorConstruction.hh.

126 {return ConverterMaterial;};
G4double GammaRayTelDetectorConstruction::GetConverterThickness ( ) const
inline

Definition at line 127 of file GammaRayTelDetectorConstruction.hh.

127 {return ConverterThickness;};
G4int GammaRayTelDetectorConstruction::GetNbOfACDLateralTiles ( ) const
inline

Definition at line 135 of file GammaRayTelDetectorConstruction.hh.

135 {return NbOfACDLateralTiles;};

Here is the caller graph for this function:

G4int GammaRayTelDetectorConstruction::GetNbOfACDTopTiles ( ) const
inline

Definition at line 134 of file GammaRayTelDetectorConstruction.hh.

134 {return NbOfACDTopTiles;};

Here is the caller graph for this function:

G4int GammaRayTelDetectorConstruction::GetNbOfCALBars ( ) const
inline

Definition at line 131 of file GammaRayTelDetectorConstruction.hh.

131 {return NbOfCALBars;};

Here is the caller graph for this function:

G4int GammaRayTelDetectorConstruction::GetNbOfCALLayers ( ) const
inline

Definition at line 130 of file GammaRayTelDetectorConstruction.hh.

130 {return NbOfCALLayers;};

Here is the caller graph for this function:

G4int GammaRayTelDetectorConstruction::GetNbOfTKRLayers ( ) const
inline

Definition at line 115 of file GammaRayTelDetectorConstruction.hh.

115 {return NbOfTKRLayers;};

Here is the caller graph for this function:

G4int GammaRayTelDetectorConstruction::GetNbOfTKRStrips ( ) const
inline

Definition at line 117 of file GammaRayTelDetectorConstruction.hh.

117 {return NbOfTKRStrips;};

Here is the caller graph for this function:

G4int GammaRayTelDetectorConstruction::GetNbOfTKRTiles ( ) const
inline

Definition at line 116 of file GammaRayTelDetectorConstruction.hh.

116 {return NbOfTKRTiles;};

Here is the caller graph for this function:

G4double GammaRayTelDetectorConstruction::GetPayloadSizeXY ( ) const
inline

Definition at line 104 of file GammaRayTelDetectorConstruction.hh.

104 {return PayloadSizeXY;};
G4double GammaRayTelDetectorConstruction::GetPayloadSizeZ ( ) const
inline

Definition at line 103 of file GammaRayTelDetectorConstruction.hh.

103 {return PayloadSizeZ;};
G4double GammaRayTelDetectorConstruction::GetSiliconGuardRing ( ) const
inline

Definition at line 123 of file GammaRayTelDetectorConstruction.hh.

123 {return SiliconGuardRing;}
G4double GammaRayTelDetectorConstruction::GetTilesSeparation ( ) const
inline

Definition at line 124 of file GammaRayTelDetectorConstruction.hh.

124 {return TilesSeparation;};
G4double GammaRayTelDetectorConstruction::GetTKRActiveTileXY ( ) const
inline

Definition at line 121 of file GammaRayTelDetectorConstruction.hh.

121 {return TKRActiveTileXY;};
G4double GammaRayTelDetectorConstruction::GetTKRActiveTileZ ( ) const
inline

Definition at line 122 of file GammaRayTelDetectorConstruction.hh.

122 {return TKRActiveTileZ;};
G4double GammaRayTelDetectorConstruction::GetTKRLayerDistance ( ) const
inline

Definition at line 118 of file GammaRayTelDetectorConstruction.hh.

118 {return TKRLayerDistance;};
G4double GammaRayTelDetectorConstruction::GetTKRSiliconPitch ( ) const
inline

Definition at line 114 of file GammaRayTelDetectorConstruction.hh.

114 {return TKRSiliconPitch;};
G4double GammaRayTelDetectorConstruction::GetTKRSiliconThickness ( ) const
inline

Definition at line 112 of file GammaRayTelDetectorConstruction.hh.

112 {return TKRSiliconThickness;};
G4double GammaRayTelDetectorConstruction::GetTKRSiliconTileXY ( ) const
inline

Definition at line 113 of file GammaRayTelDetectorConstruction.hh.

113 {return TKRSiliconTileXY;};
G4double GammaRayTelDetectorConstruction::GetTKRSizeXY ( ) const
inline

Definition at line 107 of file GammaRayTelDetectorConstruction.hh.

107 {return TKRSizeXY;};

Here is the caller graph for this function:

G4double GammaRayTelDetectorConstruction::GetTKRSizeZ ( ) const
inline

Definition at line 106 of file GammaRayTelDetectorConstruction.hh.

106 {return TKRSizeZ;};

Here is the caller graph for this function:

G4double GammaRayTelDetectorConstruction::GetTKRViewsDistance ( ) const
inline

Definition at line 119 of file GammaRayTelDetectorConstruction.hh.

119 {return TKRViewsDistance;};
G4double GammaRayTelDetectorConstruction::GetWorldSizeXY ( ) const
inline

Definition at line 101 of file GammaRayTelDetectorConstruction.hh.

101 {return WorldSizeXY;};

Here is the caller graph for this function:

G4double GammaRayTelDetectorConstruction::GetWorldSizeZ ( ) const
inline

Definition at line 100 of file GammaRayTelDetectorConstruction.hh.

100 {return WorldSizeZ;};

Here is the caller graph for this function:

void GammaRayTelDetectorConstruction::PrintPayloadParameters ( )

Definition at line 892 of file GammaRayTelDetectorConstruction.cc.

893 {
894  G4cout << "\n------------------------------------------------------------"
895  << "\n---> The Tracker is " << NbOfTKRLayers << " layers of: "
896  << ConverterThickness/mm << "mm of " << ConverterMaterial->GetName()
897  << "\n------------------------------------------------------------\n";
898 }
static constexpr double mm
Definition: G4SIunits.hh:115
const G4String & GetName() const
Definition: G4Material.hh:178
G4GLOB_DLL std::ostream G4cout

Here is the call graph for this function:

Here is the caller graph for this function:

void GammaRayTelDetectorConstruction::SetACDThickness ( G4double  val)

Definition at line 983 of file GammaRayTelDetectorConstruction.cc.

984 {
985  ACDThickness = val;
986 }

Here is the caller graph for this function:

void GammaRayTelDetectorConstruction::SetCALBarThickness ( G4double  val)

Definition at line 976 of file GammaRayTelDetectorConstruction.cc.

977 {
978  CALBarThickness = val;
979 }

Here is the caller graph for this function:

void GammaRayTelDetectorConstruction::SetConverterMaterial ( G4String  materialChoice)

Definition at line 905 of file GammaRayTelDetectorConstruction.cc.

906 {
907  // search the material by its name
908  G4Material* pttoMaterial = G4Material::GetMaterial(materialChoice);
909  if (pttoMaterial)
910  {
911  ConverterMaterial = pttoMaterial;
912  logicConverter->SetMaterial(pttoMaterial);
914  }
915 }
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
Definition: G4Material.cc:602
void SetMaterial(G4Material *pMaterial)

Here is the call graph for this function:

Here is the caller graph for this function:

void GammaRayTelDetectorConstruction::SetConverterThickness ( G4double  val)

Definition at line 917 of file GammaRayTelDetectorConstruction.cc.

918 {
919  ConverterThickness = val;
920 }

Here is the caller graph for this function:

void GammaRayTelDetectorConstruction::SetMagField ( G4double  fieldValue)

Definition at line 990 of file GammaRayTelDetectorConstruction.cc.

991 {
992  // Just invoke manually the MT-safe command
993  // /globalField/setValue
994  // instantiated by the GlobalFieldMessenger
995  std::stringstream sss;
996  sss << "/globalField/setValue 0 0 " << fieldValue/tesla << " tesla";
997 
998  G4String command = sss.str();
999  G4cout << "Going to execute: " << command << G4endl;
1000 
1001  G4UImanager* UImanager = G4UImanager::GetUIpointer();
1002  UImanager->ApplyCommand(command);
1003 
1004 }
static constexpr double tesla
Definition: G4SIunits.hh:268
static G4UImanager * GetUIpointer()
Definition: G4UImanager.cc:59
G4GLOB_DLL std::ostream G4cout
static const char sss[MAX_N_PAR+2]
Definition: Evaluator.cc:64
#define G4endl
Definition: G4ios.hh:61
G4int ApplyCommand(const char *aCommand)
Definition: G4UImanager.cc:447

Here is the call graph for this function:

Here is the caller graph for this function:

void GammaRayTelDetectorConstruction::SetNbOfCALBars ( G4int  val)

Definition at line 971 of file GammaRayTelDetectorConstruction.cc.

972 {
973  NbOfCALBars = val;
974 }

Here is the caller graph for this function:

void GammaRayTelDetectorConstruction::SetNbOfCALLayers ( G4int  val)

Definition at line 966 of file GammaRayTelDetectorConstruction.cc.

967 {
968  NbOfCALLayers = val;
969 }

Here is the caller graph for this function:

void GammaRayTelDetectorConstruction::SetNbOfTKRLayers ( G4int  val)

Definition at line 942 of file GammaRayTelDetectorConstruction.cc.

943 {
944  NbOfTKRLayers = val;
945 }

Here is the caller graph for this function:

void GammaRayTelDetectorConstruction::SetNbOfTKRTiles ( G4int  val)

Definition at line 948 of file GammaRayTelDetectorConstruction.cc.

949 {
950  NbOfTKRTiles = val;
951 }

Here is the caller graph for this function:

void GammaRayTelDetectorConstruction::SetTKRLayerDistance ( G4double  val)

Definition at line 953 of file GammaRayTelDetectorConstruction.cc.

954 {
955  TKRLayerDistance = val;
956 }

Here is the caller graph for this function:

void GammaRayTelDetectorConstruction::SetTKRSiliconPitch ( G4double  val)

Definition at line 930 of file GammaRayTelDetectorConstruction.cc.

931 {
932  TKRSiliconPitch = val;
933 }

Here is the caller graph for this function:

void GammaRayTelDetectorConstruction::SetTKRSiliconThickness ( G4double  val)

Definition at line 924 of file GammaRayTelDetectorConstruction.cc.

925 {
926  TKRSiliconThickness = val;
927 }

Here is the caller graph for this function:

void GammaRayTelDetectorConstruction::SetTKRTileSizeXY ( G4double  val)

Definition at line 936 of file GammaRayTelDetectorConstruction.cc.

937 {
938  TKRSiliconTileXY = val;
939 }

Here is the caller graph for this function:

void GammaRayTelDetectorConstruction::SetTKRViewsDistance ( G4double  val)

Definition at line 958 of file GammaRayTelDetectorConstruction.cc.

959 {
960  TKRViewsDistance = val;
961 }

Here is the caller graph for this function:

void GammaRayTelDetectorConstruction::UpdateGeometry ( )

Definition at line 1008 of file GammaRayTelDetectorConstruction.cc.

1009 {
1010  // delete payloadSD;
1011  G4RunManager::GetRunManager()->DefineWorldVolume(ConstructPayload());
1014 
1016 
1017 }
void UpdateMaterialList(G4VPhysicalVolume *currentWorld=0)
virtual void DefineWorldVolume(G4VPhysicalVolume *worldVol, G4bool topologyIsChanged=true)
static G4RegionStore * GetInstance()
void PhysicsHasBeenModified()
void ReinitializeGeometry(G4bool destroyFirst=false, G4bool prop=true)
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:79

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following files: