24 #include "G4ProductionCuts.hh"
34 G4cout << G4endl <<
"###### Calling QweakSimGEM::QweakGEM() " << G4endl << G4endl;
255 G4cout << G4endl <<
"###### Calling QweakSimGEM::ConstructComponent() " << G4endl << G4endl;
270 G4cout << G4endl <<
"###### QweakSimGEM: Define GEM_MasterContainer_Solid" << G4endl << G4endl;
272 G4Box* GEM_MasterContainer_Solid =
new G4Box(
"GEM_MasterContainer_Sol",
278 G4cout << G4endl <<
"###### QweakSimGEM: Define GEM_MasterContainer_Logical " << G4endl << G4endl;
281 GEM_MasterContainer_Material,
282 "GEM_MasterContainer_Log",
291 G4double roationAngleInTheta = 0.0*degree;
296 G4cout << G4endl <<
"###### QweakSimGEM: Define GEM_MasterContainerFront_Physical" << G4endl << G4endl;
299 position_MasterContainerFront,
300 "GEM_MasterContainerFront_Physical",
310 G4cout << G4endl <<
"###### QweakSimGEM: Define GEM_MasterContainerBack_Physical" << G4endl << G4endl;
313 position_MasterContainerBack,
314 "GEM_MasterContainerBack_Physical",
327 G4cout << G4endl <<
"###### QweakSimGEM: Define GEM_OuterFrame_Solid" << G4endl << G4endl;
329 G4Box* GEM_OuterFrame_Solid =
new G4Box(
"GEM_OuterFrame_Sol",
335 G4cout << G4endl <<
"###### QweakSimGEM: Define GEM_InnerFrame_Solid" << G4endl << G4endl;
337 G4Box* GEM_InnerFrame_Solid =
new G4Box(
"GEM_InnerFrame_Sol",
344 G4cout << G4endl <<
"###### QweakSimGEM: Define GEM_Frame_Solid" << G4endl << G4endl;
347 GEM_OuterFrame_Solid,
348 GEM_InnerFrame_Solid);
351 G4cout << G4endl <<
"###### QweakSimGEM: Define GEM_Frame_Logical" << G4endl << G4endl;
359 G4ThreeVector position_Frame = G4ThreeVector(0. , 0. , 0.);
361 G4cout << G4endl <<
"###### QweakSimGEM: Define GEM_Frame_Physical" << G4endl << G4endl;
366 "GEM_Frame_Physical",
379 G4cout << G4endl <<
"###### QweakSimGEM: Define GEM_SubContainer_Solid" << G4endl << G4endl;
381 G4Box* GEM_SubContainer_Solid =
new G4Box(
"GEM_OuterFrame_Sol",
386 G4cout << G4endl <<
"###### QweakSimGEM: Define GEM_SubContainer_Logical" << G4endl << G4endl;
389 GEM_SubContainer_Material,
390 "GEM_SubContainer_Log",
395 G4ThreeVector position_SubContainer = G4ThreeVector(0. , 0. , 0.);
397 G4cout << G4endl <<
"###### QweakSimGEM: Define GEM_SubContainer_Physical" << G4endl << G4endl;
400 position_SubContainer,
402 "GEM_SubContainer_Physical",
419 G4cout << G4endl <<
"###### QweakSimGEM: Define GEM_MiddleFoilContainer_Solid" << G4endl << G4endl;
421 G4Box* GEM_MiddleFoilContainer_Solid =
new G4Box(
"GEM_MiddleFoilContainer_Sol",
427 G4cout << G4endl <<
"###### QweakSimGEM: Define GEM_MiddleFoilContainer_Logical" << G4endl << G4endl;
430 GEM_SubContainer_Material,
431 "GEM_MiddleFoilContainer_Log",
437 G4Box* GEM_KaptonMiddleFoil_Solid =
new G4Box(
"GEM_KaptonMiddleFoil_Sol",
443 G4cout << G4endl <<
"###### QweakSimGEM: Define GEM_KaptonMiddleFoil_Logical" << G4endl << G4endl;
447 "GEM_KaptonMiddleFoil_Log",
452 G4ThreeVector(0. , 0. , 0. ),
454 "GEM_KaptonMiddleFoil_Physical",
465 G4cout << G4endl <<
"###### QweakSimGEM: Define GEM_CopperLayer_Solid" << G4endl << G4endl;
467 G4Box* GEM_CopperLayer_Solid =
new G4Box(
"GEM_CopperLayer_Sol",
473 G4cout << G4endl <<
"###### QweakSimGEM: Define GEM_CopperMiddleFoil_Logical" << G4endl << G4endl;
476 GEM_CopperLayer_Material,
477 "GEM_CopperMiddleFoil_Log",
481 G4cout << G4endl <<
"###### QweakSimGEM: Define GEM_CopperMiddleFoil_Physical" << G4endl << G4endl;
485 G4double _LocalPostionInZ_TopCopperLayer =
488 G4double _LocalPostionInZ_BottomCopperLayer =
496 G4ThreeVector(0. , 0. , _LocalPostionInZ_TopCopperLayer ),
498 "GEM_TopCopperMiddleFoil_Physical",
507 G4ThreeVector(0. , 0. , _LocalPostionInZ_BottomCopperLayer ),
509 "GEM_BottomCopperMiddleFoil_Physical",
519 G4double GEM_MiddleFoil_PositionInZ[3] = {7*mm, 9*mm, 11*mm};
522 G4cout << G4endl <<
"###### QweakSimGEM: Define GEM_MiddleFoilContainer_Physical" << G4endl << G4endl;
524 for( G4int index = 0; index < 3; index++){
527 G4ThreeVector(0. , 0. , -1.0*GEM_MiddleFoil_PositionInZ[index] + 0.5*
GEMFrame_Thickness),
529 "GEM_MiddleFoilContainer_Physical",
549 G4cout << G4endl <<
"###### QweakSimGEM: Define GEM_AnodeReadoutPlaneContainer_Solid" << G4endl << G4endl;
551 G4Box* GEM_AnodeReadoutPlaneContainer_Solid =
552 new G4Box(
"GEM_AnodeReadoutPlaneContainer_Sol",
558 G4cout << G4endl <<
"###### QweakSimGEM: Define GEM_AnodeReadoutPlaneContainer_Logical" << G4endl << G4endl;
562 "GEM_AnodeReadoutPlaneContainer_Log",
570 G4cout << G4endl <<
"###### QweakSimGEM: Define GEM_AnodeReadoutBoard_Solid" << G4endl << G4endl;
572 G4Box* GEM_AnodeReadoutBoard_Solid =
new G4Box(
"GEM_AnodeReadoutBoard_Sol",
578 G4cout << G4endl <<
"###### QweakSimGEM: Define GEM_AnodeReadoutBoard_Logical" << G4endl << G4endl;
582 "GEM_AnodeReadoutBoard_Log",
586 G4cout << G4endl <<
"###### QweakSimGEM: Define GEM_AnodeReadoutBoard_Physical" << G4endl << G4endl;
591 G4double _LocalPostionInZ_AnodeReadoutBoard =
596 G4ThreeVector(0. , 0. , _LocalPostionInZ_AnodeReadoutBoard ),
598 "GEM_AnodeReadoutBoard_Physical",
610 G4cout << G4endl <<
"###### QweakSimGEM: Define GEM_AnodeCopperLayer_Solid" << G4endl << G4endl;
612 G4Box* GEM_AnodeCopperLayer_Solid =
new G4Box(
"GEM_AnodeCopperLayer_Sol",
618 G4cout << G4endl <<
"###### QweakSimGEM: Define GEM_AnodeCopperLayer_Logical" << G4endl << G4endl;
621 GEM_CopperLayer_Material,
622 "GEM_AnodeCopperLayer_Log",
626 G4cout << G4endl <<
"###### QweakSimGEM: Define GEM_AnodeCopperLayer_Physical" << G4endl << G4endl;
631 G4double _LocalPostionInZ_AnodeCopperLayer =
637 G4ThreeVector(0. , 0. , _LocalPostionInZ_AnodeCopperLayer ),
639 "GEM_AnodeCopperLayer_Physical",
655 G4double _LocalPostionInZ_AnodeReadoutPlaneContainer =
662 G4ThreeVector(0. , 0. , _LocalPostionInZ_AnodeReadoutPlaneContainer ),
664 "GEM_AnodeReadoutPlaneContainer_Physical",
682 G4cout << G4endl <<
"###### QweakSimGEM: Define GEM_CathodeHVPlaneContainer_Solid" << G4endl << G4endl;
684 G4Box* GEM_CathodeHVPlaneContainer_Solid =
685 new G4Box(
"GEM_CathodeHVPlaneContainer_Sol",
691 G4cout << G4endl <<
"###### QweakSimGEM: Define GEM_CathodeHVPlaneContainer_Logical" << G4endl << G4endl;
695 "GEM_CathodeHVPlaneContainer_Log",
703 G4cout << G4endl <<
"###### QweakSimGEM: Define GEM_CathodeCopperLayer_Solid" << G4endl << G4endl;
705 G4Box* GEM_CathodeHVCopperLayer_Solid =
new G4Box(
"GEM_CathodeHVCopperLayer_Sol",
711 G4cout << G4endl <<
"###### QweakSimGEM: Define GEM_CathodeHVCopperLayer_Logical" << G4endl << G4endl;
714 GEM_CopperLayer_Material,
715 "GEM_CathodeHVCopperLayer_Log",
719 G4cout << G4endl <<
"###### QweakSimGEM: Define GEM_CathodeCopperLayer_Physical" << G4endl << G4endl;
724 G4double _LocalPostionInZ_CathodeHVCopperLayer =
729 G4ThreeVector(0. , 0. , _LocalPostionInZ_CathodeHVCopperLayer ),
731 "GEM_CathodeHVCopperLayer_Physical",
751 G4ThreeVector(0. , 0. , _LocalPostionInZ_CathodeHVPlaneContainer ),
753 "GEM_CathodeHVPlaneContainer_Physical",
763 G4cout << G4endl <<
"###### QweakSimGEM: Setting Sensitive Detectors " << G4endl << G4endl;
769 G4SDManager* SDman = G4SDManager::GetSDMpointer();
787 G4cout << G4endl <<
"###### QweakSimGEM: Setting Attributes " << G4endl << G4endl;
789 G4Colour orange (241/255.,224/255.,0/255.);
790 G4Colour gray (210/255.,213/255.,210/255.);
792 G4Colour red (255/255., 0/255.,0/255.);
793 G4Colour green ( 0/255., 255/255.,0/255.);
794 G4Color green_yellow (173/255., 255/255., 47/255.);
857 G4ProductionCuts* cuts = 0;
861 fRegGasDet =
new G4Region(
"DriftCellRegion_GEM");
862 cuts =
new G4ProductionCuts();
873 cuts->SetProductionCut(
fGammaCut,
"gamma");
884 G4cout << G4endl <<
"###### Leaving QweakSimGEM::ConstructComponent() " << G4endl << G4endl;
894 G4Material* pttoMaterial = G4Material::GetMaterial(materialName);
897 G4cout <<
"==== Changing GEM MasterContainer Material: Looking up Material " << G4endl;
899 G4cout <<
"==== Changing GEM MasterContainer Material: Now the GEM MasterContainer is made of " << materialName << G4endl;
902 G4cerr <<
"==== ERROR: Changing GEM MasterContainer Material failed" << G4endl;
911 G4Material* pttoMaterial = G4Material::GetMaterial(materialName);
914 G4cout <<
"==== Changing GEM SubContainer Material: Looking up Material " << G4endl;
916 G4cout <<
"==== Changing GEM SubContainer Material: Now the GEM SubContainer is made of " << materialName << G4endl;
919 G4cerr <<
"==== ERROR: Changing GEM SubContainer Material failed" << G4endl;
928 G4Material* pttoMaterial = G4Material::GetMaterial(materialName);
931 G4cout <<
"==== Changing GEM Frame Material: Looking up Material " << G4endl;
933 G4cout <<
"==== Changing GEM Frame Material: Now the GEM Plane is made of " << materialName << G4endl;
936 G4cerr <<
"==== ERROR: Changing GEM Frame Material failed" << G4endl;
983 G4cout << G4endl <<
"###### Calling QweakSimGEM::SetFrontGEM_CenterPositionInX() " << G4endl << G4endl;
991 G4cout << G4endl <<
"###### Leaving QweakSimGEM::SetFrontGEM_CenterPositionInX() " << G4endl << G4endl;
997 G4cout << G4endl <<
"###### Calling QweakSimGEM::SetFrontGEM_CenterPositionInY() " << G4endl << G4endl;
1005 G4cout << G4endl <<
"###### Leaving QweakSimGEM::SetFrontGEM_CenterPositionInY() " << G4endl << G4endl;
1011 G4cout << G4endl <<
"###### Calling QweakSimGEM::SetFrontGEM_CenterPositionInZ() " << G4endl << G4endl;
1019 G4cout << G4endl <<
"###### Leaving QweakSimGEM::SetFrontGEM_CenterPositionInZ() " << G4endl << G4endl;
1026 G4cout << G4endl <<
"###### Calling QweakSimGEM::SetBackGEM_CenterPositionInX() " << G4endl << G4endl;
1034 G4cout << G4endl <<
"###### Leaving QweakSimGEM::SetBackGEM_CenterPositionInX() " << G4endl << G4endl;
1040 G4cout << G4endl <<
"###### Calling QweakSimGEM::SetBackGEM_CenterPositionInY() " << G4endl << G4endl;
1048 G4cout << G4endl <<
"###### Leaving QweakSimGEM::SetBackGEM_CenterPositionInY() " << G4endl << G4endl;
1054 G4cout << G4endl <<
"###### Calling QweakSimGEM::SetBackGEM_CenterPositionInZ() " << G4endl << G4endl;
1062 G4cout << G4endl <<
"###### Leaving QweakSimGEM::SetBackGEM_CenterPositionInZ() " << G4endl << G4endl;
1068 G4cout << G4endl <<
"###### Calling QweakSimGEM::SetGEM_FrontChamber_RotationAngleInPhi() " << G4endl << G4endl;
1070 G4ThreeVector Translation_MasterContainerFront;
1073 Translation_MasterContainerFront.setX(cos(GEM_phiangle)*GEMFront_RadialDistance) ;
1074 Translation_MasterContainerFront.setY(sin(GEM_phiangle)*GEMFront_RadialDistance) ;
1084 G4cout << G4endl <<
"###### Leaving QweakSimGEM::SetGEM_RotationAngleInPhi() " << G4endl << G4endl;
1090 G4cout << G4endl <<
"###### Calling QweakSimGEM::SetGEM_BackChamber_RotationAngleInPhi() " << G4endl << G4endl;
1092 G4ThreeVector Translation_MasterContainerBack;
1095 Translation_MasterContainerBack.setX(cos(GEM_phiangle)*GEMBack_RadialDistance) ;
1096 Translation_MasterContainerBack.setY(sin(GEM_phiangle)*GEMBack_RadialDistance) ;
1106 G4cout << G4endl <<
"###### Leaving QweakSimGEM::SetGEM_BackChamber_RotationAngleInPhi() " << G4endl << G4endl;
G4VisAttributes * GEM_CopperMiddleFoil_VisAtt
G4double GEM_CenterBack_YPos
G4SubtractionSolid * GEM_Frame_Solid
G4VSensitiveDetector * GEMdriftChamberSD
G4double AluFrame_InnerWidth
static QweakSimMaterial * GetInstance()
G4VisAttributes * GEM_CathodeHVPlaneContainer_VisAtt
G4VPhysicalVolume * GEM_MasterContainerFront_Physical
G4double GEMFrame_Thickness
G4VisAttributes * GEM_CathodeHVCopperLayer_VisAtt
G4VisAttributes * GEM_MiddleFoilContainer_VisAtt
QweakSimGEMMessenger * GEM_Messenger
G4VisAttributes * GEM_Frame_VisAtt
G4double GEM_CenterFront_ZPos
G4double GEMFrame_BorderWidthInY
G4VisAttributes * GEM_AnodeReadoutPlaneContainer_VisAtt
void SetGEM_MasterContainerMaterial(G4String)
static const G4bool pSurfChk
G4VPhysicalVolume * GEM_MiddleFoilContainer_Physical
G4LogicalVolume * GEM_Frame_Logical
G4double GEM_G10AnodeBoard_Thickness
G4VisAttributes * GEM_KaptonMiddleFoil_VisAtt
void SetFrontGEM_CenterPositionInZ(G4double zPos)
G4LogicalVolume * GEM_MasterContainer_Logical
G4VisAttributes * GEM_AnodeCopperLayer_VisAtt
void SetFrontGEM_CenterPositionInX(G4double xPos)
G4LogicalVolume * GEM_CathodeHVPlaneContainer_Logical
G4double GEM_BackChamber_RotationAngleInPhi
G4LogicalVolume * GEM_AnodeCopperLayer_Logical
G4double AluFrame_Thickness
void SetGEM_FrameMaterial(G4String)
G4VPhysicalVolume * GEM_SubContainer_Physical
G4double GEM_KaptonAnodeFoil_Thickness
G4VisAttributes * GEM_SubContainer_VisAtt
G4double GEM_CenterFront_YPos
G4double GEM_CenterBack_XPos
void SetBackGEM_CenterPositionInZ(G4double zPos)
G4Material * GetMaterial(G4String material)
G4VPhysicalVolume * GEM_CathodeHVCopperLayer_Physical
G4VPhysicalVolume * GEM_BottomCopperMiddleFoil_Physical
G4VPhysicalVolume * GEM_AnodeCopperLayer_Physical
G4double GEMFrame_OuterWidth
G4LogicalVolume * GEM_AnodeReadoutPlaneContainer_Logical
G4RotationMatrix * Rotation_BackChamber_GEM
G4LogicalVolume * GEM_AnodeReadoutBoard_Logical
G4double GEMFrame_InnerWidth
G4VPhysicalVolume * GEM_MasterContainerBack_Physical
G4VPhysicalVolume * GEM_CathodeHVPlaneContainer_Physical
G4double GEM_CenterFront_XPos
Scans the input file for /GEM/xyz commands.
G4double GEM_CopperLayer_Thickness
QweakSimMaterial * pMaterial
G4double AluFrame_OuterLength
G4double GEMFrame_OuterLength
void ConstructComponent(G4VPhysicalVolume *)
G4double AluFrame_InnerLength
void SetGEM_BackChamber_RotationAngleInPhi(G4double GEM_phiangleBack)
G4double GEM_FrontChamber_RotationAngleInPhi
void SetFrontGEM_CenterPositionInY(G4double yPos)
G4double GEM_KaptonMiddleFoil_Thickness
G4double GEM_KaptonCathodeFoil_Thickness
G4LogicalVolume * GEM_KaptonMiddleFoil_Logical
G4double GEMFrame_InnerLength
void SetBackGEM_CenterPositionInY(G4double yPos)
void SetGEM_SubContainerMaterial(G4String)
void SetGEM_FrontChamber_RotationAngleInPhi(G4double GEM_phiangleFront)
G4double AluFrame_OuterWidth
G4VPhysicalVolume * GEM_AnodeReadoutPlaneContainer_Physical
G4VisAttributes * GEM_AnodeReadoutBoard_VisAtt
Checks for a valid GEM ReadoutPlane hit and stores the hit information (I know there is no wire plane...
G4RotationMatrix * Rotation_FrontChamber_GEM
G4VPhysicalVolume * GEM_AnodeReadoutBoard_Physical
G4VisAttributes * GEM_MasterContainer_VisAtt
void SetBackGEM_CenterPositionInX(G4double xPos)
G4LogicalVolume * GEM_SubContainer_Logical
G4VPhysicalVolume * GEM_TopCopperMiddleFoil_Physical
G4LogicalVolume * GEM_CathodeHVCopperLayer_Logical
G4LogicalVolume * GEM_CopperMiddleFoil_Logical
G4VPhysicalVolume * GEM_KaptonMiddleFoil_Physical
G4double GEMFrame_BorderWidthInX
G4VPhysicalVolume * GEM_Frame_Physical
G4double GEM_CenterBack_ZPos
G4LogicalVolume * GEM_MiddleFoilContainer_Logical