Geant4 and Root Class Index
Git Remote Repository UserGuide
Referring to Git Official UserGuide, I introduced the method to using git remote repository here.
The use of gnome-screenshot command
gnome-screenshot command;encrypt this article
geant4DetectorConstruction
geant detector construction
- 几何旋转符合
左手法则
及RotationMatrix的使用
经过验证geant4中的rotate符合左手法则
1 | G4RotationMatrix *rot=new G4RotationMatrix; |
注意,再次对rot重复赋值无效,如对上述代码再作如下操作rot->rotateX(180*degree)
,该操作将无效,不会改变之前的rot;
那么,要对rot再次赋值该怎么办呢?如下:只需在再次赋值前加rot =new G4RotationMatrix
即可;
1 | G4RotationMatrix* rotationMatrix_X = new G4RotationMatrix; |
- G4VParameterisation()的使用
ComputeTransformation
defines where one of the copies is placedComputeDimensions
defines the size of one copy, and a constructor that initializes any member variables that are required.
G4VParameterisation的具体应用可参看Basics/B2/B2b
G4Color选项
颜色的配置
Geant4中的颜色配置由红、绿、蓝、是否透明四个构成;red、green、blue、alpha(opacity/opaque)
1 | G4Colour::G4Colour ( G4double r = 1.0, |
颜色的实例化应用
1.颜色配置实例化
1 | G4Colour white (); //white |
example
1 | G4VisAttributes* Assemble_VisAtt= new G4VisAttributes(G4Colour(0.0,0.0,1.0));//blue |
2.静态公用数据函数实例化
1 | static const G4Colour& White (); |
example
1 | G4Colour myRed(G4Colour::Red()); |
实例化Colour对象后,可以采用如下方式获得函数
1 | G4double G4Colour::GetRed () const; |
Colour Map的应用
1 | G4String G4Colour |
Colours的检索可以采用如下方式
1 | bool G4Colour::GetColour(const G4String& key, G4Colour& result) |
example
1 | G4Colour myColour(G4Colour::Black()); |