Geant4  10.02.p03
CML2Acc1 Class Reference

#include <ML2Acc1.hh>

Collaboration diagram for CML2Acc1:

Public Member Functions

 CML2Acc1 (void)
 
 ~CML2Acc1 (void)
 
void Construct (G4VPhysicalVolume *PVWorld, G4double isoCentre)
 
void reset ()
 
void setJaw1X (G4double val)
 
void setJaw2X (G4double val)
 
void setJaw1Y (G4double val)
 
void setJaw2Y (G4double val)
 
void setIsoCentre (G4double val)
 
void setidEnergy (G4int val)
 
void setLeavesAx (G4double val)
 
void setLeavesBx (G4double val)
 
int getidEnergy ()
 
G4double getBeforeJaws_Z_PhaseSpacePosition ()
 
void writeInfo ()
 

Static Public Member Functions

static CML2Acc1GetInstance (void)
 

Private Member Functions

G4MaterialotherMaterials (const G4String materialName)
 
void SetJawAperture (G4int idJaw, G4ThreeVector &centre, G4ThreeVector halfSize, G4double aperture, G4RotationMatrix *cRotation)
 
bool target ()
 
bool primaryCollimator ()
 
bool BeWindow ()
 
bool flatteningFilter ()
 
bool ionizationChamber ()
 
bool mirror ()
 
bool Jaw1X ()
 
bool Jaw2X ()
 
bool Jaw1Y ()
 
bool Jaw2Y ()
 
bool MLC ()
 

Private Attributes

G4double jaw1XAperture
 
G4double jaw2XAperture
 
G4double jaw1YAperture
 
G4double jaw2YAperture
 
G4double isoCentre
 
std::vector< G4doubleleavesA
 
std::vector< G4doubleleavesB
 
G4int idEnergy
 
CML2Acc1Messengeracc1Messenger
 
G4VPhysicalVolumePVWorld
 
G4VPhysicalVolumetargetA_phys
 
G4VPhysicalVolumetargetB_phys
 
G4VPhysicalVolumeUpperCollimator_phys
 
G4VPhysicalVolumeCylMinusCone_phys
 
G4VPhysicalVolumeBeWTubePV
 
G4VPhysicalVolumeFFL1A_1PV
 
G4VPhysicalVolumeFFL2_1PV
 
G4VPhysicalVolumePCUtubeW1PV
 
G4VPhysicalVolumePCUtubeP1PV
 
G4VPhysicalVolumePCUtubeW2PV
 
G4VPhysicalVolumePCUtubeP2PV
 
G4VPhysicalVolumePCUtubeW3PV
 
G4VPhysicalVolumePCUtubeP3PV
 
G4VPhysicalVolumeMirrorTubePV
 
G4VPhysicalVolumephVol1X
 
G4VPhysicalVolumephVol2X
 
G4VPhysicalVolumephVol1Y
 
G4VPhysicalVolumephVol2Y
 
G4VPhysicalVolumeleafPhys
 

Static Private Attributes

static CML2Acc1instance = 0
 

Detailed Description

Definition at line 64 of file ML2Acc1.hh.

Constructor & Destructor Documentation

◆ CML2Acc1()

CML2Acc1::CML2Acc1 ( void  )

Definition at line 48 of file ML2Acc1.cc.

49 {
51 }
CML2Acc1Messenger * acc1Messenger
Definition: ML2Acc1.hh:87
Here is the caller graph for this function:

◆ ~CML2Acc1()

CML2Acc1::~CML2Acc1 ( void  )

Definition at line 53 of file ML2Acc1.cc.

54 {
55 }

Member Function Documentation

◆ BeWindow()

bool CML2Acc1::BeWindow ( )
private

Definition at line 357 of file ML2Acc1.cc.

358 {
359  bool bCreated=false;
361  G4Region *regVol;
362  G4VisAttributes* simpleAlSVisAtt;
363  // Region for cuts
364  regVol= new G4Region("BeWindow");
366  cuts->SetProductionCut(0.1*cm);
367  regVol->SetProductionCuts(cuts);
368 
369  G4Tubs* BeWTube = new G4Tubs("BeWindowTube", 0., 36.*mm, 0.2*mm, 0.*deg, 360.*deg);
370  G4LogicalVolume *BeWTubeLV = new G4LogicalVolume(BeWTube, Be, "BeWTubeLV", 0, 0, 0);
371  BeWTubePV=new G4PVPlacement(0, G4ThreeVector(0.,0.,100.*mm), "BeWTubePV", BeWTubeLV,
372  PVWorld, false, 0);
373 
374  simpleAlSVisAtt= new G4VisAttributes(G4Colour::Yellow());
375  simpleAlSVisAtt->SetVisibility(true);
376 // simpleAlSVisAtt->SetForceSolid(true);
377  BeWTubeLV->SetVisAttributes(simpleAlSVisAtt);
378  BeWTubeLV->SetRegion(regVol);
379  regVol->AddRootLogicalVolume(BeWTubeLV);
380 
381  bCreated=true;
382  return bCreated;
383 }
static const double cm
Definition: G4SIunits.hh:118
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
G4VPhysicalVolume * BeWTubePV
Definition: ML2Acc1.hh:109
CLHEP::Hep3Vector G4ThreeVector
void AddRootLogicalVolume(G4LogicalVolume *lv)
Definition: G4Region.cc:290
void SetVisibility(G4bool)
Definition: G4Tubs.hh:85
void SetProductionCut(G4double cut, G4int index=-1)
static G4NistManager * Instance()
void SetRegion(G4Region *reg)
static const double deg
Definition: G4SIunits.hh:151
void SetProductionCuts(G4ProductionCuts *cut)
static G4Colour Yellow()
Definition: G4Colour.hh:153
static const double mm
Definition: G4SIunits.hh:114
void SetVisAttributes(const G4VisAttributes *pVA)
G4VPhysicalVolume * PVWorld
Definition: ML2Acc1.hh:104
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Construct()

void CML2Acc1::Construct ( G4VPhysicalVolume PVWorld,
G4double  isoCentre 
)

Definition at line 156 of file ML2Acc1.cc.

157 {
158  PVWorld=PWorld;
159  setIsoCentre(iso);
160  target();
161  BeWindow();
164  mirror();
166  MLC();
167  Jaw1X();
168  Jaw2X();
169  Jaw1Y();
170  Jaw2Y();
171 }
bool Jaw1Y()
Definition: ML2Acc1.cc:690
bool flatteningFilter()
Definition: ML2Acc1.cc:384
bool MLC()
Definition: ML2Acc1.cc:763
bool BeWindow()
Definition: ML2Acc1.cc:357
void setIsoCentre(G4double val)
Definition: ML2Acc1.hh:76
bool primaryCollimator()
Definition: ML2Acc1.cc:251
bool Jaw1X()
Definition: ML2Acc1.cc:618
bool target()
Definition: ML2Acc1.cc:178
bool ionizationChamber()
Definition: ML2Acc1.cc:435
bool Jaw2Y()
Definition: ML2Acc1.cc:726
bool Jaw2X()
Definition: ML2Acc1.cc:654
bool mirror()
Definition: ML2Acc1.cc:521
Here is the call graph for this function:
Here is the caller graph for this function:

◆ flatteningFilter()

bool CML2Acc1::flatteningFilter ( )
private

Definition at line 384 of file ML2Acc1.cc.

385 {
386  switch (idEnergy)
387  {
388  case 6:
389  G4double z0, h0;
390  G4ThreeVector centre, halSize;
392  // Region for cuts
393  G4Region *regVol;
394  regVol= new G4Region("flatfilterR");
396  cuts->SetProductionCut(0.5*cm);
397  regVol->SetProductionCuts(cuts);
398 
399  G4VisAttributes* simpleAlSVisAtt;
400 
401  // one
402  z0=130.0*mm;
403  h0=5.0/2.*cm;
404  centre.set(0.,0.,z0);
405  G4Cons *FFL1A_1Cone = new G4Cons("FFL1A_1", 0.*cm, 0.3*cm, 0.*cm, 5.*cm, h0, 0.*deg, 360.*deg);
406  G4LogicalVolume *FFL1A_1LV = new G4LogicalVolume(FFL1A_1Cone, Cu, "FFL1A_1LV", 0, 0, 0);
407  FFL1A_1PV=new G4PVPlacement(0, centre, "FFL1A_1PV", FFL1A_1LV, PVWorld, false, 0);
408 
409  // two
410  z0+=h0;
411  h0=0.081/2.*cm;
412  z0+=h0;
413  centre.setZ(z0);
414  z0+=h0;
415  G4Tubs *FFL2_1Tube = new G4Tubs("FFL6_1", 0.*cm, 2.5*cm, h0, 0.*deg, 360.*deg);
416  G4LogicalVolume *FFL2_1LV = new G4LogicalVolume(FFL2_1Tube, Cu, "FFL2_1LV", 0, 0, 0);
417  FFL2_1PV=new G4PVPlacement(0, centre, "FFL2_1PV", FFL2_1LV, PVWorld, false, 0);
418 
419  simpleAlSVisAtt= new G4VisAttributes(G4Colour::Red());
420  simpleAlSVisAtt->SetVisibility(true);
421 // simpleAlSVisAtt->SetForceSolid(true);
422  FFL1A_1LV->SetVisAttributes(simpleAlSVisAtt);
423  FFL2_1LV->SetVisAttributes(simpleAlSVisAtt);
424 
425  FFL1A_1LV->SetRegion(regVol);
426  FFL2_1LV->SetRegion(regVol);
427 
428  regVol->AddRootLogicalVolume(FFL1A_1LV);
429  regVol->AddRootLogicalVolume(FFL2_1LV);
430  return true;
431  break;
432  }
433  return false;
434 }
void set(double x, double y, double z)
static const double cm
Definition: G4SIunits.hh:118
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
void AddRootLogicalVolume(G4LogicalVolume *lv)
Definition: G4Region.cc:290
void SetVisibility(G4bool)
Definition: G4Tubs.hh:85
G4int idEnergy
Definition: ML2Acc1.hh:86
void SetProductionCut(G4double cut, G4int index=-1)
static G4NistManager * Instance()
void setZ(double)
void SetRegion(G4Region *reg)
static const double deg
Definition: G4SIunits.hh:151
Definition: G4Cons.hh:83
void SetProductionCuts(G4ProductionCuts *cut)
static G4Colour Red()
Definition: G4Colour.hh:148
G4VPhysicalVolume * FFL1A_1PV
Definition: ML2Acc1.hh:110
double G4double
Definition: G4Types.hh:76
static const double mm
Definition: G4SIunits.hh:114
void SetVisAttributes(const G4VisAttributes *pVA)
G4VPhysicalVolume * FFL2_1PV
Definition: ML2Acc1.hh:111
G4VPhysicalVolume * PVWorld
Definition: ML2Acc1.hh:104
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getBeforeJaws_Z_PhaseSpacePosition()

G4double CML2Acc1::getBeforeJaws_Z_PhaseSpacePosition ( )
inline

Definition at line 81 of file ML2Acc1.hh.

81 {return 215.;}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getidEnergy()

int CML2Acc1::getidEnergy ( )
inline

Definition at line 80 of file ML2Acc1.hh.

80 {return idEnergy;}
G4int idEnergy
Definition: ML2Acc1.hh:86

◆ GetInstance()

CML2Acc1 * CML2Acc1::GetInstance ( void  )
static

Definition at line 58 of file ML2Acc1.cc.

59 {
60  if (instance == 0)
61  {
62  instance = new CML2Acc1();
63  }
64  return instance;
65 }
static CML2Acc1 * instance
Definition: ML2Acc1.hh:88
CML2Acc1(void)
Definition: ML2Acc1.cc:48
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ionizationChamber()

bool CML2Acc1::ionizationChamber ( )
private

Definition at line 435 of file ML2Acc1.cc.

436 {
437  bool bCreated=false;
438 
440  G4VisAttributes* simpleAlSVisAtt;
441  // Region for cuts
442  G4Region *regVol;
443  regVol= new G4Region("ionizationChamber");
445  cuts->SetProductionCut(0.1*cm);
446  regVol->SetProductionCuts(cuts);
447 
448  G4Tubs* ICTubeW = new G4Tubs("ionizationChamberTube", 0., 2.*2.54*10.*mm, 0.016*25.4*mm, 0.*deg, 360.*deg);
449  G4Tubs* ICTubeP = new G4Tubs("ionizationChamberTube", 0., 2.*2.54*10.*mm, 0.010*25.4*mm, 0.*deg, 360.*deg);
450 
451  G4ThreeVector centre;
452  // W1
453  centre.set(0.,0.,157.*mm);
454  G4LogicalVolume *PCUTubeW1LV = new G4LogicalVolume(ICTubeW, material, "ionizationChamberTubeW1LV", 0, 0, 0);
455  PCUtubeW1PV=new G4PVPlacement(0, centre, "ionizationChamberTubeW1PV", PCUTubeW1LV, PVWorld, false, 0);
456  simpleAlSVisAtt= new G4VisAttributes(G4Colour::Blue());
457  simpleAlSVisAtt->SetVisibility(true);
458 // simpleAlSVisAtt->SetForceSolid(true);
459  PCUTubeW1LV->SetVisAttributes(simpleAlSVisAtt);
460  PCUTubeW1LV->SetRegion(regVol);
461  regVol->AddRootLogicalVolume(PCUTubeW1LV);
462 
463  // P1
464  centre.set(0.,0.,158.*mm);
465  G4LogicalVolume *PCUTubeP1LV = new G4LogicalVolume(ICTubeP, material, "ionizationChamberTubeP1LV", 0, 0, 0);
466  PCUtubeP1PV=new G4PVPlacement(0, centre, "ionizationChamberTubeP1PV", PCUTubeP1LV, PVWorld, false, 0);
467  simpleAlSVisAtt= new G4VisAttributes(G4Colour::Yellow());
468  simpleAlSVisAtt->SetVisibility(true);
469 // simpleAlSVisAtt->SetForceSolid(true);
470  PCUTubeP1LV->SetVisAttributes(simpleAlSVisAtt);
471  PCUTubeP1LV->SetRegion(regVol);
472  regVol->AddRootLogicalVolume(PCUTubeP1LV);
473 
474  // W2
475  centre.set(0.,0.,159.*mm);
476  G4LogicalVolume *PCUTubeW2LV = new G4LogicalVolume(ICTubeW, material, "ionizationChamberTubeW2LV", 0, 0, 0);
477  PCUtubeW2PV=new G4PVPlacement(0, centre, "ionizationChamberTubeW2PV", PCUTubeW2LV, PVWorld, false, 0);
478  simpleAlSVisAtt= new G4VisAttributes(G4Colour::Blue());
479  simpleAlSVisAtt->SetVisibility(true);
480 // simpleAlSVisAtt->SetForceSolid(true);
481  PCUTubeW2LV->SetVisAttributes(simpleAlSVisAtt);
482  PCUTubeW2LV->SetRegion(regVol);
483  regVol->AddRootLogicalVolume(PCUTubeW2LV);
484 
485  // P2
486  centre.set(0.,0.,160.*mm);
487  G4LogicalVolume *PCUTubeP2LV = new G4LogicalVolume(ICTubeP, material, "ionizationChamberTubeP2LV", 0, 0, 0);
488  PCUtubeP2PV=new G4PVPlacement(0, centre, "ionizationChamberTubeP2PV", PCUTubeP2LV, PVWorld, false, 0);
489  simpleAlSVisAtt= new G4VisAttributes(G4Colour::Yellow());
490  simpleAlSVisAtt->SetVisibility(true);
491 // simpleAlSVisAtt->SetForceSolid(true);
492  PCUTubeP2LV->SetVisAttributes(simpleAlSVisAtt);
493  PCUTubeP2LV->SetRegion(regVol);
494  regVol->AddRootLogicalVolume(PCUTubeP2LV);
495 
496  // W3
497  centre.set(0.,0.,161.*mm);
498  G4LogicalVolume *PCUTubeW3LV = new G4LogicalVolume(ICTubeW, material, "ionizationChamberTubeW3LV", 0, 0, 0);
499  PCUtubeW3PV=new G4PVPlacement(0, centre, "ionizationChamberTubeW3PV", PCUTubeW3LV, PVWorld, false, 0);
500  simpleAlSVisAtt= new G4VisAttributes(G4Colour::Blue());
501  simpleAlSVisAtt->SetVisibility(true);
502 // simpleAlSVisAtt->SetForceSolid(true);
503  PCUTubeW3LV->SetVisAttributes(simpleAlSVisAtt);
504  PCUTubeW3LV->SetRegion(regVol);
505  regVol->AddRootLogicalVolume(PCUTubeW3LV);
506 
507  // P3
508  centre.set(0.,0.,162.*mm);
509  G4LogicalVolume *PCUTubeP3LV = new G4LogicalVolume(ICTubeP, material, "ionizationChamberTubeP3LV", 0, 0, 0);
510  PCUtubeP3PV=new G4PVPlacement(0, centre, "ionizationChamberTubeP3PV", PCUTubeP3LV, PVWorld, false, 0);
511  simpleAlSVisAtt= new G4VisAttributes(G4Colour::Yellow());
512  simpleAlSVisAtt->SetVisibility(true);
513 // simpleAlSVisAtt->SetForceSolid(true);
514  PCUTubeP3LV->SetVisAttributes(simpleAlSVisAtt);
515  PCUTubeP3LV->SetRegion(regVol);
516  regVol->AddRootLogicalVolume(PCUTubeP3LV);
517 
518  bCreated=true;
519  return bCreated;
520 }
void set(double x, double y, double z)
static const double cm
Definition: G4SIunits.hh:118
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
void AddRootLogicalVolume(G4LogicalVolume *lv)
Definition: G4Region.cc:290
G4VPhysicalVolume * PCUtubeP2PV
Definition: ML2Acc1.hh:115
void SetVisibility(G4bool)
Definition: G4Tubs.hh:85
void SetProductionCut(G4double cut, G4int index=-1)
G4VPhysicalVolume * PCUtubeP3PV
Definition: ML2Acc1.hh:117
static G4NistManager * Instance()
string material
Definition: eplot.py:19
void SetRegion(G4Region *reg)
static const double deg
Definition: G4SIunits.hh:151
static G4Colour Blue()
Definition: G4Colour.hh:150
G4VPhysicalVolume * PCUtubeP1PV
Definition: ML2Acc1.hh:113
G4VPhysicalVolume * PCUtubeW2PV
Definition: ML2Acc1.hh:114
void SetProductionCuts(G4ProductionCuts *cut)
G4VPhysicalVolume * PCUtubeW1PV
Definition: ML2Acc1.hh:112
static G4Colour Yellow()
Definition: G4Colour.hh:153
static const double mm
Definition: G4SIunits.hh:114
void SetVisAttributes(const G4VisAttributes *pVA)
G4VPhysicalVolume * PCUtubeW3PV
Definition: ML2Acc1.hh:116
G4VPhysicalVolume * PVWorld
Definition: ML2Acc1.hh:104
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Jaw1X()

bool CML2Acc1::Jaw1X ( )
private

Definition at line 618 of file ML2Acc1.cc.

619 {
620  bool bCreated=false;
621  G4Material *steel1=otherMaterials("steel1");
622  G4String name="Jaws1X";
623  G4Box *box;
624  G4LogicalVolume *logVol;
625  G4VisAttributes* simpleAlSVisAtt;
626 
627  G4ThreeVector centre, halfSize;
628  G4RotationMatrix *cRotation=new G4RotationMatrix();
629  centre.set(0.,0.,(320.+80./2.)*mm);
630  halfSize.set(45.*mm, 93.*mm, 78./2.*mm);
631  box = new G4Box(name+"Box", halfSize.getX(), halfSize.getY(), halfSize.getZ());
632  logVol = new G4LogicalVolume(box, steel1, name+"LV", 0, 0, 0);
633  SetJawAperture(1, centre, halfSize, jaw1XAperture, cRotation);
634  phVol1X= new G4PVPlacement(cRotation, centre, name+"PV", logVol, PVWorld, false, 0);
635 
636  // Region for cuts
637  G4Region *regVol;
638  regVol= new G4Region(name+"R");
640  cuts->SetProductionCut(2.*cm);
641  regVol->SetProductionCuts(cuts);
642  logVol->SetRegion(regVol);
643  regVol->AddRootLogicalVolume(logVol);
644 
645  // Visibility
646  simpleAlSVisAtt= new G4VisAttributes(G4Colour::Blue());
647  simpleAlSVisAtt->SetVisibility(true);
648 // simpleAlSVisAtt->SetForceSolid(true);
649  logVol->SetVisAttributes(simpleAlSVisAtt);
650 
651  bCreated=true;
652  return bCreated;
653 }
void set(double x, double y, double z)
static const double cm
Definition: G4SIunits.hh:118
void AddRootLogicalVolume(G4LogicalVolume *lv)
Definition: G4Region.cc:290
CLHEP::HepRotation G4RotationMatrix
G4double jaw1XAperture
Definition: ML2Acc1.hh:84
Definition: G4Box.hh:64
G4VPhysicalVolume * phVol1X
Definition: ML2Acc1.hh:119
G4String name
Definition: TRTMaterials.hh:40
void SetVisibility(G4bool)
void SetProductionCut(G4double cut, G4int index=-1)
double getY() const
void SetJawAperture(G4int idJaw, G4ThreeVector &centre, G4ThreeVector halfSize, G4double aperture, G4RotationMatrix *cRotation)
Definition: ML2Acc1.cc:549
double getX() const
static G4Colour Blue()
Definition: G4Colour.hh:150
double getZ() const
G4Material * otherMaterials(const G4String materialName)
Definition: ML2Acc1.cc:72
void SetProductionCuts(G4ProductionCuts *cut)
static const double mm
Definition: G4SIunits.hh:114
G4VPhysicalVolume * PVWorld
Definition: ML2Acc1.hh:104
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Jaw1Y()

bool CML2Acc1::Jaw1Y ( )
private

Definition at line 690 of file ML2Acc1.cc.

691 {
692  bool bCreated=false;
693  G4Material *steel1=otherMaterials("steel1");
694  G4String name="Jaws1Y";
695  G4Box *box;
696  G4LogicalVolume *logVol;
697  G4VisAttributes* simpleAlSVisAtt;
698 
699  G4ThreeVector centre, halfSize;
700  G4RotationMatrix *cRotation=new G4RotationMatrix();
701  centre.set(0.,0.,(230.+80./2.)*mm);
702  halfSize.set(93.*mm, 35.*mm, 78./2.*mm);
703  box = new G4Box(name+"Box", halfSize.getX(), halfSize.getY(), halfSize.getZ());
704  logVol = new G4LogicalVolume(box, steel1, name+"LV", 0, 0, 0);
705  SetJawAperture(3, centre, halfSize, jaw1YAperture, cRotation);
706  phVol1Y= new G4PVPlacement(cRotation, centre, name+"PV", logVol, PVWorld, false, 0);
707 
708  // Region for cuts
709  G4Region *regVol;
710  regVol= new G4Region(name+"R");
712  cuts->SetProductionCut(2.*cm);
713  regVol->SetProductionCuts(cuts);
714  logVol->SetRegion(regVol);
715  regVol->AddRootLogicalVolume(logVol);
716 
717  // Visibility
718  simpleAlSVisAtt= new G4VisAttributes(G4Colour::Red());
719  simpleAlSVisAtt->SetVisibility(true);
720 // simpleAlSVisAtt->SetForceSolid(true);
721  logVol->SetVisAttributes(simpleAlSVisAtt);
722 
723  bCreated=true;
724  return bCreated;
725 }
void set(double x, double y, double z)
static const double cm
Definition: G4SIunits.hh:118
void AddRootLogicalVolume(G4LogicalVolume *lv)
Definition: G4Region.cc:290
CLHEP::HepRotation G4RotationMatrix
Definition: G4Box.hh:64
G4String name
Definition: TRTMaterials.hh:40
void SetVisibility(G4bool)
void SetProductionCut(G4double cut, G4int index=-1)
G4double jaw1YAperture
Definition: ML2Acc1.hh:84
double getY() const
void SetJawAperture(G4int idJaw, G4ThreeVector &centre, G4ThreeVector halfSize, G4double aperture, G4RotationMatrix *cRotation)
Definition: ML2Acc1.cc:549
double getX() const
double getZ() const
G4VPhysicalVolume * phVol1Y
Definition: ML2Acc1.hh:121
G4Material * otherMaterials(const G4String materialName)
Definition: ML2Acc1.cc:72
void SetProductionCuts(G4ProductionCuts *cut)
static G4Colour Red()
Definition: G4Colour.hh:148
static const double mm
Definition: G4SIunits.hh:114
G4VPhysicalVolume * PVWorld
Definition: ML2Acc1.hh:104
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Jaw2X()

bool CML2Acc1::Jaw2X ( )
private

Definition at line 654 of file ML2Acc1.cc.

655 {
656  bool bCreated=false;
657  G4Material *steel1=otherMaterials("steel1");
658  G4String name="Jaws2X";
659  G4Box *box;
660  G4LogicalVolume *logVol;
661  G4VisAttributes* simpleAlSVisAtt;
662 
663  G4ThreeVector centre, halfSize;
664  G4RotationMatrix *cRotation=new G4RotationMatrix();
665  centre.set(0.,0.,(320.+80./2.)*mm);
666  halfSize.set(45.*mm, 93.*mm, 78./2.*mm);
667  box = new G4Box(name+"Box", halfSize.getX(), halfSize.getY(), halfSize.getZ());
668  logVol = new G4LogicalVolume(box, steel1, name+"LV", 0, 0, 0);
669  SetJawAperture(2, centre, halfSize, jaw2XAperture, cRotation);
670  phVol2X= new G4PVPlacement(cRotation, centre, name+"PV", logVol, PVWorld, false, 0);
671 
672  // Region for cuts
673  G4Region *regVol;
674  regVol= new G4Region(name+"R");
676  cuts->SetProductionCut(2.*cm);
677  regVol->SetProductionCuts(cuts);
678  logVol->SetRegion(regVol);
679  regVol->AddRootLogicalVolume(logVol);
680 
681  // Visibility
682  simpleAlSVisAtt= new G4VisAttributes(G4Colour::Cyan());
683  simpleAlSVisAtt->SetVisibility(true);
684 // simpleAlSVisAtt->SetForceSolid(true);
685  logVol->SetVisAttributes(simpleAlSVisAtt);
686 
687  bCreated=true;
688  return bCreated;
689 }
void set(double x, double y, double z)
static const double cm
Definition: G4SIunits.hh:118
void AddRootLogicalVolume(G4LogicalVolume *lv)
Definition: G4Region.cc:290
CLHEP::HepRotation G4RotationMatrix
Definition: G4Box.hh:64
G4String name
Definition: TRTMaterials.hh:40
void SetVisibility(G4bool)
void SetProductionCut(G4double cut, G4int index=-1)
double getY() const
void SetJawAperture(G4int idJaw, G4ThreeVector &centre, G4ThreeVector halfSize, G4double aperture, G4RotationMatrix *cRotation)
Definition: ML2Acc1.cc:549
double getX() const
double getZ() const
G4VPhysicalVolume * phVol2X
Definition: ML2Acc1.hh:120
static G4Colour Cyan()
Definition: G4Colour.hh:151
G4double jaw2XAperture
Definition: ML2Acc1.hh:84
G4Material * otherMaterials(const G4String materialName)
Definition: ML2Acc1.cc:72
void SetProductionCuts(G4ProductionCuts *cut)
static const double mm
Definition: G4SIunits.hh:114
G4VPhysicalVolume * PVWorld
Definition: ML2Acc1.hh:104
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Jaw2Y()

bool CML2Acc1::Jaw2Y ( )
private

Definition at line 726 of file ML2Acc1.cc.

727 {
728  bool bCreated=false;
729  G4Material *steel1=otherMaterials("steel1");
730  G4String name="Jaws2Y";
731  G4Box *box;
732  G4LogicalVolume *logVol;
733  G4VisAttributes* simpleAlSVisAtt;
734 
735  G4ThreeVector centre, halfSize;
736  G4RotationMatrix *cRotation=new G4RotationMatrix();
737  centre.set(0.,0.,(230.+80./2.)*mm);
738  halfSize.set(93.*mm, 35.*mm, 78./2.*mm);
739  box = new G4Box(name+"Box", halfSize.getX(), halfSize.getY(), halfSize.getZ());
740  logVol = new G4LogicalVolume(box, steel1, name+"LV", 0, 0, 0);
741  SetJawAperture(4, centre, halfSize, jaw2YAperture, cRotation);
742  phVol2Y= new G4PVPlacement(cRotation, centre, name+"PV", logVol, PVWorld, false, 0);
743 
744  // Region for cuts
745 
746  G4Region *regVol;
747  regVol= new G4Region(name+"R");
749  cuts->SetProductionCut(2.*cm);
750  regVol->SetProductionCuts(cuts);
751  logVol->SetRegion(regVol);
752  regVol->AddRootLogicalVolume(logVol);
753 
754  // Visibility
755  simpleAlSVisAtt= new G4VisAttributes(G4Colour::Magenta());
756  simpleAlSVisAtt->SetVisibility(true);
757 // simpleAlSVisAtt->SetForceSolid(true);
758  logVol->SetVisAttributes(simpleAlSVisAtt);
759 
760  bCreated=true;
761  return bCreated;
762 }
void set(double x, double y, double z)
static const double cm
Definition: G4SIunits.hh:118
void AddRootLogicalVolume(G4LogicalVolume *lv)
Definition: G4Region.cc:290
CLHEP::HepRotation G4RotationMatrix
Definition: G4Box.hh:64
G4String name
Definition: TRTMaterials.hh:40
void SetVisibility(G4bool)
static G4Colour Magenta()
Definition: G4Colour.hh:152
void SetProductionCut(G4double cut, G4int index=-1)
double getY() const
void SetJawAperture(G4int idJaw, G4ThreeVector &centre, G4ThreeVector halfSize, G4double aperture, G4RotationMatrix *cRotation)
Definition: ML2Acc1.cc:549
G4double jaw2YAperture
Definition: ML2Acc1.hh:84
double getX() const
G4VPhysicalVolume * phVol2Y
Definition: ML2Acc1.hh:122
double getZ() const
G4Material * otherMaterials(const G4String materialName)
Definition: ML2Acc1.cc:72
void SetProductionCuts(G4ProductionCuts *cut)
static const double mm
Definition: G4SIunits.hh:114
G4VPhysicalVolume * PVWorld
Definition: ML2Acc1.hh:104
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mirror()

bool CML2Acc1::mirror ( )
private

Definition at line 521 of file ML2Acc1.cc.

522 {
523  bool bCreated=false;
525  G4VisAttributes* simpleAlSVisAtt;
526  // Region for cuts
527  G4Region *regVol;
528  regVol= new G4Region("Mirror");
530  cuts->SetProductionCut(0.1*cm);
531  regVol->SetProductionCuts(cuts);
532 
533  G4Tubs* MirrorTube = new G4Tubs("MirrorTube", 0., 63.*mm, .5*mm, 0.*deg, 360.*deg);
534  G4LogicalVolume *MirrorTubeLV = new G4LogicalVolume(MirrorTube, MYLAR, "MirrorTubeLV", 0, 0, 0);
535  G4RotationMatrix *cRotation=new G4RotationMatrix();
536  cRotation->rotateY(12.0*deg);
537  MirrorTubePV=new G4PVPlacement(cRotation, G4ThreeVector(0., 0., 175.*mm), "MirrorTubePV", MirrorTubeLV,PVWorld, false, 0);
538 
539  simpleAlSVisAtt= new G4VisAttributes(G4Colour::Green());
540  simpleAlSVisAtt->SetVisibility(true);
541 // simpleAlSVisAtt->SetForceSolid(true);
542  MirrorTubeLV->SetVisAttributes(simpleAlSVisAtt);
543  MirrorTubeLV->SetRegion(regVol);
544  regVol->AddRootLogicalVolume(MirrorTubeLV);
545  bCreated=true;
546  return bCreated;
547 }
static const double cm
Definition: G4SIunits.hh:118
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
CLHEP::Hep3Vector G4ThreeVector
void AddRootLogicalVolume(G4LogicalVolume *lv)
Definition: G4Region.cc:290
CLHEP::HepRotation G4RotationMatrix
static G4Colour Green()
Definition: G4Colour.hh:149
void SetVisibility(G4bool)
Definition: G4Tubs.hh:85
void SetProductionCut(G4double cut, G4int index=-1)
HepRotation & rotateY(double delta)
Definition: Rotation.cc:79
G4VPhysicalVolume * MirrorTubePV
Definition: ML2Acc1.hh:118
static G4NistManager * Instance()
void SetRegion(G4Region *reg)
static const double deg
Definition: G4SIunits.hh:151
void SetProductionCuts(G4ProductionCuts *cut)
static const double mm
Definition: G4SIunits.hh:114
void SetVisAttributes(const G4VisAttributes *pVA)
G4VPhysicalVolume * PVWorld
Definition: ML2Acc1.hh:104
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MLC()

bool CML2Acc1::MLC ( )
private

Definition at line 763 of file ML2Acc1.cc.

764 {
765  bool bCreated=false;
766  // material
768  G4VisAttributes* simpleAlSVisAtt;
769  // Region for cuts
770  G4Region *regVol;
771  regVol= new G4Region("MLCR");
773  cuts->SetProductionCut(1.0*cm);
774  regVol->SetProductionCuts(cuts);
775 
776  G4ThreeVector boxSize;
777 
778  G4ThreeVector centreStart;
779  centreStart.set(0.,0.,(330.+600.)/2.*mm);
780 
781  boxSize.set(6./2.*mm, 180./2.*mm, 50./2.*mm);
782 
783  // single leaf
784  G4Box* boxLeaf =new G4Box("LeafBox", boxSize.getX(), boxSize.getY(), boxSize.getZ());
785 
786  G4LogicalVolume *leafLVA = new G4LogicalVolume(boxLeaf, Fe, "leafSolidALV", 0, 0, 0);
787  G4LogicalVolume *leafLVB = new G4LogicalVolume(boxLeaf, Fe, "leafSolidBLV", 0, 0, 0);
788 
789  simpleAlSVisAtt= new G4VisAttributes(G4Colour::Cyan());
790  simpleAlSVisAtt->SetVisibility(true);
791 // simpleAlSVisAtt->SetForceSolid(true);
792  leafLVA->SetVisAttributes(simpleAlSVisAtt);
793  leafLVA->SetRegion(regVol);
794  regVol->AddRootLogicalVolume(leafLVA);
795 
796  simpleAlSVisAtt= new G4VisAttributes(G4Colour::Green());
797  simpleAlSVisAtt->SetVisibility(true);
798 // simpleAlSVisAtt->SetForceSolid(true);
799  leafLVB->SetVisAttributes(simpleAlSVisAtt);
800  leafLVB->SetRegion(regVol);
801  regVol->AddRootLogicalVolume(leafLVB);
802 
803  int i;
804  G4String PVname;
805  int j=0;
806 
807  G4ThreeVector centre;
808  int nhalfLeaves=(int)(leavesA.size()/2.);
809  centre= centreStart + G4ThreeVector(-nhalfLeaves*boxSize.getX(), 0.,0.);
810  for (i=1;i<(int)leavesA.size(); i++)
811  {
812  G4String str;
813  char appo[10];
814  sprintf(appo,"%d",i);
815  str=appo;
816  PVname="leafA"+str;
817  centre.setX(centre.getX()+boxSize.getX()*2.);
818  centre.setY(-boxSize.getY()-leavesA[i]);
819  leafPhys=new G4PVPlacement(0, centre, PVname, leafLVA, PVWorld, false, i);
820  j++;
821  }
822  nhalfLeaves=(int)(leavesB.size()/2.);
823  centre=centreStart+G4ThreeVector(-nhalfLeaves*boxSize.getX(), 0.,0.);
824  for (i=1;i<(int)leavesB.size(); i++)
825  {
826  G4String str;
827  char appo[10];
828  sprintf(appo,"%d",i);
829  str=appo;
830  PVname="leafB"+str;
831  centre.setX(centre.getX()+boxSize.getX()*2.);
832  centre.setY(+boxSize.getY()+leavesB[i]);
833  leafPhys=new G4PVPlacement(0, centre, PVname, leafLVB, PVWorld, false, i);
834  j++;
835  }
836  bCreated=true;
837  return bCreated;
838 }
void set(double x, double y, double z)
static const double cm
Definition: G4SIunits.hh:118
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
CLHEP::Hep3Vector G4ThreeVector
void AddRootLogicalVolume(G4LogicalVolume *lv)
Definition: G4Region.cc:290
static G4Colour Green()
Definition: G4Colour.hh:149
Definition: G4Box.hh:64
void SetVisibility(G4bool)
void SetProductionCut(G4double cut, G4int index=-1)
void setY(double)
static G4NistManager * Instance()
void setX(double)
std::vector< G4double > leavesA
Definition: ML2Acc1.hh:85
void SetRegion(G4Region *reg)
double getY() const
double getX() const
double getZ() const
static G4Colour Cyan()
Definition: G4Colour.hh:151
std::vector< G4double > leavesB
Definition: ML2Acc1.hh:85
void SetProductionCuts(G4ProductionCuts *cut)
G4VPhysicalVolume * leafPhys
Definition: ML2Acc1.hh:123
static const double mm
Definition: G4SIunits.hh:114
void SetVisAttributes(const G4VisAttributes *pVA)
G4VPhysicalVolume * PVWorld
Definition: ML2Acc1.hh:104
Here is the call graph for this function:
Here is the caller graph for this function:

◆ otherMaterials()

G4Material * CML2Acc1::otherMaterials ( const G4String  materialName)
private

Definition at line 72 of file ML2Acc1.cc.

73 {
74  G4Material * material=0;
75  G4double A, Z, d;
76  G4String name;
77 
78  // General elements
79 
80  A = 12.011*g/mole;
81  G4Element* elC = new G4Element("Carbon","C",Z = 6.,A);
82 
83  A = 30.974*g/mole;
84  G4Element* elP = new G4Element("Phosphorus","P",Z = 15.,A);
85 
86  A = 32.064*g/mole;
87  G4Element* elS = new G4Element("Sulfur","S",Z = 16.,A);
88 
89  A = 55.85*g/mole;
90  G4Element* elFe = new G4Element("Iron","Fe",Z = 26.,A);
91 
92  A = 51.9961*g/mole;
93  G4Element* elCr = new G4Element("Cromium","Cr", Z = 24.,A);
94 
95  A = 54.94*g/mole;
96  G4Element* elMn = new G4Element("Manganese","Mn", Z = 25.,A);
97 
98  A = 58.69*g/mole;
99  G4Element* elNi = new G4Element("Nickel","Ni", Z = 28.,A);
100 
101  A = 28.09*g/mole;
102  G4Element* elSi = new G4Element("Silicon","Si", Z = 14.,A);
103 
104  A = 183.84*g/mole;
105  G4Element* elW = new G4Element("Tungsten","W", Z = 74.,A);
106 
107  if (materialName=="steel1")
108  {
109  d = 7.76 *g/cm3;
110  G4Material* steel1 = new G4Material("steel1", d,4);
111  steel1 -> AddElement(elFe, 0.935);
112  steel1 -> AddElement(elS,0.01);
113  steel1 -> AddElement(elMn,0.05);
114  steel1 -> AddElement(elC,0.005);
115  material=steel1;
116  }
117  else if (materialName=="steel2")
118  {
119  d = 8.19*g/cm3;
120  G4Material* steel2 = new G4Material("steel2", d,5);
121  steel2 -> AddElement(elFe, 0.759);
122  steel2 -> AddElement(elNi, 0.11);
123  steel2 -> AddElement(elSi,0.01);
124  steel2 -> AddElement(elCr,0.12);
125  steel2 -> AddElement(elP,0.001);
126  material=steel2;
127  }
128  else if (materialName=="steel3")
129  {
130  d = 8.19*g/cm3;
131  G4Material* steel3 = new G4Material("steel3", d,5);
132  steel3 -> AddElement(elFe, 0.69);
133  steel3 -> AddElement(elNi, 0.1);
134  steel3 -> AddElement(elSi,0.01);
135  steel3 -> AddElement(elCr,0.18);
136  steel3 -> AddElement(elMn,0.02);
137  material=steel3;
138  }
139  else if (materialName=="EZcut")
140  {
141  d = 7.9*g/cm3;
142  G4Material* EZcut20 = new G4Material("EZcut", d,2);
143  EZcut20 -> AddElement(elFe, 0.98);
144  EZcut20 -> AddElement(elMn,0.02);
145  material=EZcut20;
146  }
147  else if (materialName=="W")
148  {
149  d = 15*g/cm3;
150  G4Material* W = new G4Material("W", d,1);
151  W -> AddElement(elW, 1.);
152  material=W;
153  }
154  return material;
155 }
Float_t d
G4String name
Definition: TRTMaterials.hh:40
G4Element * elC
Definition: TRTMaterials.hh:48
string material
Definition: eplot.py:19
function g(Y1, Y2, PT2)
Definition: hijing1.383.f:5206
double A(double temperature)
Float_t Z
static const double cm3
Definition: G4SIunits.hh:120
static const double mole
Definition: G4SIunits.hh:283
double G4double
Definition: G4Types.hh:76
Air AddElement(elN,.7)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ primaryCollimator()

bool CML2Acc1::primaryCollimator ( )
private

Definition at line 251 of file ML2Acc1.cc.

252 {
253 
254  // materials
255 
256  G4Material* Vacuum = G4NistManager::Instance()->FindOrBuildMaterial("G4_Galactic");
258 
259  // colors
260 
261  G4Colour magenta (1.0, 0.0, 1.0);
262 
263  //---------rotation matrix first collimator --------
264 
265  G4RotationMatrix* rotateMatrix=new G4RotationMatrix();
266  rotateMatrix->rotateX(180.0*deg);
267 
268  //-------------------- the first collimator upper----------------
269 
270 
271  G4double innerRadiusOfTheTubeEx = 1.0*cm;
272  G4double outerRadiusOfTheTubeEx = 8.*cm;
273  G4double hightOfTheTubeEx = 3.0*cm;
274  G4double startAngleOfTheTubeEx = 0.*deg;
275  G4double spanningAngleOfTheTubeEx = 360.*deg;
276  G4Tubs* UpperCollimator = new G4Tubs("UpperCollimator",innerRadiusOfTheTubeEx,
277  outerRadiusOfTheTubeEx,hightOfTheTubeEx,
278  startAngleOfTheTubeEx,spanningAngleOfTheTubeEx);
279  G4LogicalVolume *UpperCollimator_log = new G4LogicalVolume(UpperCollimator,W,"UpperCollimator_log",0,0,0);
280 
281  G4double UpperCollimatorPosX = 0.*cm;
282  G4double UpperCollimatorPosY = 0.*cm;
283  G4double UpperCollimatorPosZ = -1.*cm;
285  G4ThreeVector(UpperCollimatorPosX,UpperCollimatorPosY,
286  UpperCollimatorPosZ),"UpperCollimator",
287  UpperCollimator_log,PVWorld,false,0);
288 
289 
290  //-------------------- the first collimator lower----------------
291 
292  G4double pRmin1 = 0.*cm;
293 
294  G4double pRmax1 = 0.5*cm;
295  G4double pRmin2 = 0.*cm;
296  G4double pRmax2 = 1.7658592*cm;
297  G4double hightOfTheCone =3.2*cm;
298  G4double startAngleOfTheCone = 0.*deg;
299  G4double spanningAngleOfTheCone = 360.*deg;
300 
301  G4Cons* collim_cone = new G4Cons("collim_cone",pRmin1,pRmax1,pRmin2,
302  pRmax2,hightOfTheCone,startAngleOfTheCone,
303  spanningAngleOfTheCone);
304  G4LogicalVolume *collim_log = new G4LogicalVolume(collim_cone,Vacuum,"collim_log",0,0,0);
305 
306 
307  G4double innerRadiusOfTheTube = 0.*cm;
308  G4double outerRadiusOfTheTube = 8.*cm;
309  G4double hightOfTheTube = 3.1*cm;
310  G4double startAngleOfTheTube = 0.*deg;
311  G4double spanningAngleOfTheTube = 360.*deg;
312  G4Tubs* tracker_tube = new G4Tubs("tracker_tube",innerRadiusOfTheTube,
313  outerRadiusOfTheTube,hightOfTheTube,
314  startAngleOfTheTube,spanningAngleOfTheTube);
315 // G4LogicalVolume *tracker_log = new G4LogicalVolume(tracker_tube,W,"tracker_log",0,0,0);
316 
317 
318  G4SubtractionSolid* CylMinusCone = new G4SubtractionSolid("Cyl-Cone",
319  tracker_tube,collim_cone);
320  G4LogicalVolume *CylMinusCone_log = new G4LogicalVolume(CylMinusCone,W,"CylminusCone_log",0,0,0);
321  G4double CminusCPos_x = 0.*cm;
322  G4double CminusCPos_y = 0.*cm;
323  G4double CminusCPos_z = +6.2*cm;
324  CylMinusCone_phys = new G4PVPlacement(rotateMatrix,
325  G4ThreeVector(CminusCPos_x,CminusCPos_y,CminusCPos_z),
326  "CylMinusCone",CylMinusCone_log,PVWorld,false,0);
327 
328 //--------- Visualization attributes -------------------------------
329  G4VisAttributes* simpleTungstenWVisAtt= new G4VisAttributes(magenta);
330  simpleTungstenWVisAtt->SetVisibility(true);
331 // simpleTungstenWVisAtt->SetForceSolid(true);
332  collim_log->SetVisAttributes(simpleTungstenWVisAtt);
333 
334 
335  CylMinusCone_log->SetVisAttributes(simpleTungstenWVisAtt);
336  UpperCollimator_log->SetVisAttributes(simpleTungstenWVisAtt);
337 
338  // *********** REGIONS for CUTS
339 
340  G4Region *regVol;
341  regVol= new G4Region("PrymCollR");
343  cuts->SetProductionCut(0.1*cm);
344  regVol->SetProductionCuts(cuts);
345 
346  collim_log->SetRegion(regVol);
347  regVol->AddRootLogicalVolume(collim_log);
348 
349  CylMinusCone_log->SetRegion(regVol);
350  regVol->AddRootLogicalVolume(CylMinusCone_log);
351 
352  UpperCollimator_log->SetRegion(regVol);
353  regVol->AddRootLogicalVolume(UpperCollimator_log);
354 
355  return true;
356 }
static const double cm
Definition: G4SIunits.hh:118
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
CLHEP::Hep3Vector G4ThreeVector
void AddRootLogicalVolume(G4LogicalVolume *lv)
Definition: G4Region.cc:290
HepRotation & rotateX(double delta)
Definition: Rotation.cc:66
CLHEP::HepRotation G4RotationMatrix
void SetVisibility(G4bool)
Definition: G4Tubs.hh:85
void SetProductionCut(G4double cut, G4int index=-1)
static G4NistManager * Instance()
G4VPhysicalVolume * UpperCollimator_phys
Definition: ML2Acc1.hh:107
void SetRegion(G4Region *reg)
static const double deg
Definition: G4SIunits.hh:151
Definition: G4Cons.hh:83
void SetProductionCuts(G4ProductionCuts *cut)
double G4double
Definition: G4Types.hh:76
void SetVisAttributes(const G4VisAttributes *pVA)
G4VPhysicalVolume * CylMinusCone_phys
Definition: ML2Acc1.hh:108
G4VPhysicalVolume * PVWorld
Definition: ML2Acc1.hh:104
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reset()

void CML2Acc1::reset ( )

Definition at line 172 of file ML2Acc1.cc.

173 {
174  leavesA.clear();
175  leavesB.clear();
176 }
std::vector< G4double > leavesA
Definition: ML2Acc1.hh:85
std::vector< G4double > leavesB
Definition: ML2Acc1.hh:85
Here is the caller graph for this function:

◆ setidEnergy()

void CML2Acc1::setidEnergy ( G4int  val)
inline

Definition at line 77 of file ML2Acc1.hh.

77 {idEnergy=val;}
G4int idEnergy
Definition: ML2Acc1.hh:86
Here is the caller graph for this function:

◆ setIsoCentre()

void CML2Acc1::setIsoCentre ( G4double  val)
inline

Definition at line 76 of file ML2Acc1.hh.

76 {isoCentre=val;}
G4double isoCentre
Definition: ML2Acc1.hh:84
Here is the caller graph for this function:

◆ setJaw1X()

void CML2Acc1::setJaw1X ( G4double  val)
inline

Definition at line 72 of file ML2Acc1.hh.

72 {jaw1XAperture=val;}
G4double jaw1XAperture
Definition: ML2Acc1.hh:84
Here is the caller graph for this function:

◆ setJaw1Y()

void CML2Acc1::setJaw1Y ( G4double  val)
inline

Definition at line 74 of file ML2Acc1.hh.

74 {jaw1YAperture=val;}
G4double jaw1YAperture
Definition: ML2Acc1.hh:84
Here is the caller graph for this function:

◆ setJaw2X()

void CML2Acc1::setJaw2X ( G4double  val)
inline

Definition at line 73 of file ML2Acc1.hh.

73 {jaw2XAperture=val;}
G4double jaw2XAperture
Definition: ML2Acc1.hh:84
Here is the caller graph for this function:

◆ setJaw2Y()

void CML2Acc1::setJaw2Y ( G4double  val)
inline

Definition at line 75 of file ML2Acc1.hh.

75 {jaw2YAperture=val;}
G4double jaw2YAperture
Definition: ML2Acc1.hh:84
Here is the caller graph for this function:

◆ SetJawAperture()

void CML2Acc1::SetJawAperture ( G4int  idJaw,
G4ThreeVector centre,
G4ThreeVector  halfSize,
G4double  aperture,
G4RotationMatrix cRotation 
)
private

Definition at line 549 of file ML2Acc1.cc.

550 {
551  using namespace std;
552  G4double theta, x, y, z, dx, dy, dz;
553  x=centre.getX();
554  y=centre.getY();
555  z=centre.getZ();
556  theta=fabs(atan(aperture/isoCentre));
557  dx=halfSize.getX();
558  dy=halfSize.getY();
559  dz=halfSize.getZ();
560 
561 // G4double p1x, p1y, p2x, p2y;
562 
563  switch (idJaw)
564  {
565  case 1: //idJaw1XV2100:
566  centre.set(z*sin(theta)+dx*cos(theta), y, z*cos(theta)-dx*sin(theta));
567 // beta=fabs(atan(dx/dz));
568 // R=std::sqrt(dx*dx+dz*dz);
569 // p1x=centre.getX()-R*sin(theta+beta);
570 // p1y=centre.getZ()-R*cos(theta+beta);
571 // p2x=centre.getX()+R*sin(theta-beta);
572 // p2y=centre.getZ()+R*cos(theta-beta);
573 
574  cRotation->rotateY(-theta);
575  halfSize.set(fabs(dx*cos(theta)+dz*sin(theta)), fabs(dy), fabs(dz*cos(theta)+dx*sin(theta)));
576  break;
577  case 2: //idJaw2XV2100:
578  centre.set(-(z*sin(theta)+dx*cos(theta)), y, z*cos(theta)-dx*sin(theta));
579 // beta=fabs(atan(dx/dz));
580 // R=std::sqrt(dx*dx+dz*dz);
581 // p1x=centre.getX()+R*sin(theta+beta);
582 // p1y=centre.getZ()-R*cos(theta+beta);
583 // p2x=centre.getX()-R*sin(theta-beta);
584 // p2y=centre.getZ()+R*cos(theta-beta);
585 
586  cRotation->rotateY(theta);
587  halfSize.set(fabs(dx*cos(theta)+dz*sin(theta)), fabs(dy), fabs(dz*cos(theta)+dx*sin(theta)));
588  break;
589  case 3: //idJaw1YV2100:
590  centre.set(x, z*sin(theta)+dy*cos(theta), z*cos(theta)-dy*sin(theta));
591 // beta=fabs(atan(dy/dz));
592 // R=std::sqrt(dy*dy+dz*dz);
593 // p1x=centre.getY()-R*sin(theta+beta);
594 // p1y=centre.getZ()-R*cos(theta+beta);
595 // p2x=centre.getY()+R*sin(theta-beta);
596 // p2y=centre.getZ()+R*cos(theta-beta);
597 
598  cRotation->rotateX(theta);
599  halfSize.set(fabs(dx), fabs(dy*cos(theta)+dz*sin(theta)), fabs(dz*cos(theta)+dy*sin(theta)));
600  break;
601  case 4: //idJaw2YV2100:
602  centre.set(x, -(z*sin(theta)+dy*cos(theta)), z*cos(theta)-dy*sin(theta));
603 // beta=fabs(atan(dy/dz));
604 // R=std::sqrt(dy*dy+dz*dz);
605 // p1x=centre.getY()+R*sin(theta+beta);
606 // p1y=centre.getZ()-R*cos(theta+beta);
607 // p2x=centre.getY()-R*sin(theta-beta);
608 // p2y=centre.getZ()+R*cos(theta-beta);
609 
610  cRotation->rotateX(-theta);
611  halfSize.set(fabs(dx), fabs(dy*cos(theta)+dz*sin(theta)), fabs(dz*cos(theta)+dy*sin(theta)));
612  break;
613  }
614 }
void set(double x, double y, double z)
G4double isoCentre
Definition: ML2Acc1.hh:84
HepRotation & rotateX(double delta)
Definition: Rotation.cc:66
HepRotation & rotateY(double delta)
Definition: Rotation.cc:79
Double_t y
double getY() const
double getX() const
double getZ() const
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setLeavesAx()

void CML2Acc1::setLeavesAx ( G4double  val)
inline

Definition at line 78 of file ML2Acc1.hh.

78 {leavesA.push_back(val);}
std::vector< G4double > leavesA
Definition: ML2Acc1.hh:85
Here is the caller graph for this function:

◆ setLeavesBx()

void CML2Acc1::setLeavesBx ( G4double  val)
inline

Definition at line 79 of file ML2Acc1.hh.

79 {leavesB.push_back(val);}
std::vector< G4double > leavesB
Definition: ML2Acc1.hh:85
Here is the caller graph for this function:

◆ target()

bool CML2Acc1::target ( )
private

Definition at line 178 of file ML2Acc1.cc.

179 {
180  switch (idEnergy)
181  {
182  case 6:
183  // materials
184 
187 
188  // colors
189 
190  G4Colour cyan (0.0, 1.0, 1.0);
191  G4Colour magenta (1.0, 0.0, 1.0);
192 
193  // volumes
194  // beam line along z axis
195 //------------------------target 6MV------------------------
196  G4double targetADim_x = 0.6*cm;
197  G4double targetADim_y = 0.6*cm;
198  G4double targetADim_z = 0.04445*cm;
199  G4Box* targetA_box = new G4Box("targetA_box",targetADim_x,targetADim_y,targetADim_z);
200  G4LogicalVolume *targetA_log = new G4LogicalVolume(targetA_box,W,"targetA_log",0,0,0);
201  G4double targetAPos_x = 0.0*m;
202  G4double targetAPos_y = 0.0*m;
203  G4double targetAPos_z = 0.20055*cm;
204  targetA_phys = new G4PVPlacement(0,
205  G4ThreeVector(targetAPos_x,targetAPos_y,targetAPos_z),
206  "targetA",targetA_log,PVWorld,false,0);
207 
208  G4double targetBDim_x = 0.6*cm;
209  G4double targetBDim_y = 0.6*cm;
210  G4double targetBDim_z = 0.07874*cm;
211  G4Box* targetB_box = new G4Box("targetB_box",targetBDim_x,targetBDim_y,targetBDim_z);
212  G4LogicalVolume *targetB_log = new G4LogicalVolume(targetB_box,Cu,"targetB_log",0,0,0);
213  G4double targetBPos_x = 0.0*m;
214  G4double targetBPos_y = 0.0*m;
215  G4double targetBPos_z = 0.07736*cm;
216  targetB_phys = new G4PVPlacement(0,
217  G4ThreeVector(targetBPos_x,targetBPos_y,targetBPos_z),
218  "targetB",targetB_log,PVWorld,false,0);
219 
220 
221  // *********** REGIONS for CUTS
222 
223  G4Region *regVol;
224  regVol= new G4Region("targetR");
226  cuts->SetProductionCut(0.1*cm);
227  regVol->SetProductionCuts(cuts);
228 
229  targetA_log->SetRegion(regVol);
230  regVol->AddRootLogicalVolume(targetA_log);
231  targetB_log->SetRegion(regVol);
232  regVol->AddRootLogicalVolume(targetB_log);
233 
234  // Visualization attributes
235 
236  G4VisAttributes* simpleWSVisAtt, *simpleCuSVisAtt;
237  simpleWSVisAtt= new G4VisAttributes(magenta);
238  simpleWSVisAtt->SetVisibility(true);
239 // simpleWSVisAtt->SetForceSolid(true);
240  simpleCuSVisAtt= new G4VisAttributes(cyan);
241  simpleCuSVisAtt->SetVisibility(true);
242 // simpleCuSVisAtt->SetForceSolid(true);
243  targetA_log->SetVisAttributes(simpleWSVisAtt);
244  targetB_log->SetVisAttributes(simpleCuSVisAtt);
245 
246  return true;
247  break;
248  }
249  return false;
250 }
static const double cm
Definition: G4SIunits.hh:118
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
G4VPhysicalVolume * targetB_phys
Definition: ML2Acc1.hh:106
G4VPhysicalVolume * targetA_phys
Definition: ML2Acc1.hh:105
CLHEP::Hep3Vector G4ThreeVector
void AddRootLogicalVolume(G4LogicalVolume *lv)
Definition: G4Region.cc:290
Definition: G4Box.hh:64
void SetVisibility(G4bool)
G4int idEnergy
Definition: ML2Acc1.hh:86
void SetProductionCut(G4double cut, G4int index=-1)
static G4NistManager * Instance()
void SetRegion(G4Region *reg)
void SetProductionCuts(G4ProductionCuts *cut)
static const double m
Definition: G4SIunits.hh:128
double G4double
Definition: G4Types.hh:76
void SetVisAttributes(const G4VisAttributes *pVA)
G4VPhysicalVolume * PVWorld
Definition: ML2Acc1.hh:104
Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeInfo()

void CML2Acc1::writeInfo ( )

Definition at line 66 of file ML2Acc1.cc.

67 {
68  std::cout <<"\n\n\tnominal beam energy: "<<idEnergy << G4endl;
69  std::cout <<"\tJaw X aperture: 1) "<< jaw1XAperture/mm<<"[mm]\t2) " << jaw2XAperture/mm<< " [mm]"<< G4endl;
70  std::cout <<"\tJaw Y aperture: 1) "<< jaw1YAperture/mm<<"[mm]\t2) " << jaw2YAperture/mm<< " [mm]\n"<< G4endl;
71 }
G4double jaw1XAperture
Definition: ML2Acc1.hh:84
G4int idEnergy
Definition: ML2Acc1.hh:86
G4double jaw1YAperture
Definition: ML2Acc1.hh:84
G4double jaw2YAperture
Definition: ML2Acc1.hh:84
G4double jaw2XAperture
Definition: ML2Acc1.hh:84
#define G4endl
Definition: G4ios.hh:61
static const double mm
Definition: G4SIunits.hh:114
Here is the caller graph for this function:

Member Data Documentation

◆ acc1Messenger

CML2Acc1Messenger* CML2Acc1::acc1Messenger
private

Definition at line 87 of file ML2Acc1.hh.

◆ BeWTubePV

G4VPhysicalVolume* CML2Acc1::BeWTubePV
private

Definition at line 109 of file ML2Acc1.hh.

◆ CylMinusCone_phys

G4VPhysicalVolume* CML2Acc1::CylMinusCone_phys
private

Definition at line 108 of file ML2Acc1.hh.

◆ FFL1A_1PV

G4VPhysicalVolume* CML2Acc1::FFL1A_1PV
private

Definition at line 110 of file ML2Acc1.hh.

◆ FFL2_1PV

G4VPhysicalVolume* CML2Acc1::FFL2_1PV
private

Definition at line 111 of file ML2Acc1.hh.

◆ idEnergy

G4int CML2Acc1::idEnergy
private

Definition at line 86 of file ML2Acc1.hh.

◆ instance

CML2Acc1 * CML2Acc1::instance = 0
staticprivate

Definition at line 88 of file ML2Acc1.hh.

◆ isoCentre

G4double CML2Acc1::isoCentre
private

Definition at line 84 of file ML2Acc1.hh.

◆ jaw1XAperture

G4double CML2Acc1::jaw1XAperture
private

Definition at line 84 of file ML2Acc1.hh.

◆ jaw1YAperture

G4double CML2Acc1::jaw1YAperture
private

Definition at line 84 of file ML2Acc1.hh.

◆ jaw2XAperture

G4double CML2Acc1::jaw2XAperture
private

Definition at line 84 of file ML2Acc1.hh.

◆ jaw2YAperture

G4double CML2Acc1::jaw2YAperture
private

Definition at line 84 of file ML2Acc1.hh.

◆ leafPhys

G4VPhysicalVolume* CML2Acc1::leafPhys
private

Definition at line 123 of file ML2Acc1.hh.

◆ leavesA

std::vector<G4double> CML2Acc1::leavesA
private

Definition at line 85 of file ML2Acc1.hh.

◆ leavesB

std::vector<G4double> CML2Acc1::leavesB
private

Definition at line 85 of file ML2Acc1.hh.

◆ MirrorTubePV

G4VPhysicalVolume* CML2Acc1::MirrorTubePV
private

Definition at line 118 of file ML2Acc1.hh.

◆ PCUtubeP1PV

G4VPhysicalVolume* CML2Acc1::PCUtubeP1PV
private

Definition at line 113 of file ML2Acc1.hh.

◆ PCUtubeP2PV

G4VPhysicalVolume* CML2Acc1::PCUtubeP2PV
private

Definition at line 115 of file ML2Acc1.hh.

◆ PCUtubeP3PV

G4VPhysicalVolume* CML2Acc1::PCUtubeP3PV
private

Definition at line 117 of file ML2Acc1.hh.

◆ PCUtubeW1PV

G4VPhysicalVolume* CML2Acc1::PCUtubeW1PV
private

Definition at line 112 of file ML2Acc1.hh.

◆ PCUtubeW2PV

G4VPhysicalVolume* CML2Acc1::PCUtubeW2PV
private

Definition at line 114 of file ML2Acc1.hh.

◆ PCUtubeW3PV

G4VPhysicalVolume* CML2Acc1::PCUtubeW3PV
private

Definition at line 116 of file ML2Acc1.hh.

◆ phVol1X

G4VPhysicalVolume* CML2Acc1::phVol1X
private

Definition at line 119 of file ML2Acc1.hh.

◆ phVol1Y

G4VPhysicalVolume* CML2Acc1::phVol1Y
private

Definition at line 121 of file ML2Acc1.hh.

◆ phVol2X

G4VPhysicalVolume* CML2Acc1::phVol2X
private

Definition at line 120 of file ML2Acc1.hh.

◆ phVol2Y

G4VPhysicalVolume* CML2Acc1::phVol2Y
private

Definition at line 122 of file ML2Acc1.hh.

◆ PVWorld

G4VPhysicalVolume* CML2Acc1::PVWorld
private

Definition at line 104 of file ML2Acc1.hh.

◆ targetA_phys

G4VPhysicalVolume* CML2Acc1::targetA_phys
private

Definition at line 105 of file ML2Acc1.hh.

◆ targetB_phys

G4VPhysicalVolume* CML2Acc1::targetB_phys
private

Definition at line 106 of file ML2Acc1.hh.

◆ UpperCollimator_phys

G4VPhysicalVolume* CML2Acc1::UpperCollimator_phys
private

Definition at line 107 of file ML2Acc1.hh.


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