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

#include <ML2PhaseSpaces.hh>

Public Member Functions

 CML2PhaseSpaces ()
 
 ~CML2PhaseSpaces (void)
 
bool createPlane (G4VPhysicalVolume *PVWorld, G4String name, G4ThreeVector centre, G4ThreeVector halfSize)
 
bool createPlane (G4int idSD_Type, G4int max_N_particles_in_PhSp_File, G4int seed, G4int nMaxParticlesInRamPhaseSpace, G4VPhysicalVolume *PVWorld, G4String name, G4String PhaseSpaceOutFile, G4bool bSavePhaseSpace, G4bool bStopAtPhaseSpace, G4ThreeVector centre, G4ThreeVector halfSize, SPrimaryParticle *primaryParticleData, G4double accTargetZPosition)
 
G4int getCML2SensDetNParticle ()
 
CML2SDWithParticlegetCML2SensitiveDetectorParticle ()
 
void save ()
 

Detailed Description

Definition at line 58 of file ML2PhaseSpaces.hh.

Constructor & Destructor Documentation

CML2PhaseSpaces::CML2PhaseSpaces ( )

Definition at line 47 of file ML2PhaseSpaces.cc.

47  :sensDetParticle(0)
48 {}
CML2PhaseSpaces::~CML2PhaseSpaces ( void  )

Definition at line 50 of file ML2PhaseSpaces.cc.

51 {}

Member Function Documentation

bool CML2PhaseSpaces::createPlane ( G4VPhysicalVolume PVWorld,
G4String  name,
G4ThreeVector  centre,
G4ThreeVector  halfSize 
)

Definition at line 53 of file ML2PhaseSpaces.cc.

54 {
55  // constructor for killer plane
56  bool bCreated=false;
58  G4Box *box;
59  G4LogicalVolume *logVol;
60  box = new G4Box("KBox", halfSize.getX(), halfSize.getY(), halfSize.getZ());
61  logVol = new G4LogicalVolume(box, Vacum, name+"KLV", 0, 0, 0);
62  phVol= new G4PVPlacement(0, centre, name+"KPV", logVol, PVWorld, false, 0);
63 
64  G4Colour color(0.,1.,1.,0.5);
65  G4VisAttributes* simplePhSpVisAtt= new G4VisAttributes(color);
66  simplePhSpVisAtt->SetVisibility(true);
67  simplePhSpVisAtt->SetForceSolid(true);
68  logVol->SetVisAttributes(simplePhSpVisAtt);
69 
70 
71  sensDetParticle=new CML2SDWithParticle();
73  SDManager->AddNewDetector(sensDetParticle);
74  logVol->SetSensitiveDetector(sensDetParticle);
75  bCreated=true;
76  return bCreated;
77 }
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
Definition: G4Box.hh:64
double getY() const
static G4NistManager * Instance()
void SetForceSolid(G4bool=true)
double getX() const
void SetVisibility(G4bool=true)
void AddNewDetector(G4VSensitiveDetector *aSD)
Definition: G4SDManager.cc:71
static G4SDManager * GetSDMpointer()
Definition: G4SDManager.cc:40
double getZ() const

Here is the call graph for this function:

Here is the caller graph for this function:

bool CML2PhaseSpaces::createPlane ( G4int  idSD_Type,
G4int  max_N_particles_in_PhSp_File,
G4int  seed,
G4int  nMaxParticlesInRamPhaseSpace,
G4VPhysicalVolume PVWorld,
G4String  name,
G4String  PhaseSpaceOutFile,
G4bool  bSavePhaseSpace,
G4bool  bStopAtPhaseSpace,
G4ThreeVector  centre,
G4ThreeVector  halfSize,
SPrimaryParticle primaryParticleData,
G4double  accTargetZPosition 
)

Definition at line 79 of file ML2PhaseSpaces.cc.

80 {
81  // constructor for phase space plane
82  bool bCreated=false;
84  G4Box *box;
85  G4LogicalVolume *logVol;
86  box = new G4Box(name+"Box", halfSize.getX(), halfSize.getY(), halfSize.getZ());
87  logVol = new G4LogicalVolume(box, Vacum, name+"LV", 0, 0, 0);
88  phVol= new G4PVPlacement(0, centre, name+"PV", logVol, PVWorld, false, 0);
89 
90  G4VisAttributes* simplePhSpVisAtt= new G4VisAttributes(G4Colour::Yellow());
91  simplePhSpVisAtt->SetVisibility(true);
92  simplePhSpVisAtt->SetForceSolid(true);
93  logVol->SetVisAttributes(simplePhSpVisAtt);
94 
95  sensDetParticle=new CML2SDWithParticle(idSD_Type, max_N_particles_in_PhSp_File, seed, nMaxParticlesInRamPhaseSpace, name, PhaseSpaceOutFile, bSavePhaseSpace, bStopAtPhaseSpace, primaryParticleData, accTargetZPosition);
97  SDManager->AddNewDetector(sensDetParticle);
98  logVol->SetSensitiveDetector(sensDetParticle);
99  bCreated=true;
100  return bCreated;
101 }
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
Definition: G4Box.hh:64
double getY() const
static G4NistManager * Instance()
void SetForceSolid(G4bool=true)
double getX() const
long seed
Definition: chem4.cc:68
void SetVisibility(G4bool=true)
void AddNewDetector(G4VSensitiveDetector *aSD)
Definition: G4SDManager.cc:71
static G4SDManager * GetSDMpointer()
Definition: G4SDManager.cc:40
double getZ() const
static G4Colour Yellow()
Definition: G4Colour.hh:153

Here is the call graph for this function:

G4int CML2PhaseSpaces::getCML2SensDetNParticle ( )
inline

Definition at line 65 of file ML2PhaseSpaces.hh.

65 {return sensDetParticle->getTotalNumberOfParticles();}

Here is the call graph for this function:

Here is the caller graph for this function:

CML2SDWithParticle* CML2PhaseSpaces::getCML2SensitiveDetectorParticle ( )
inline

Definition at line 66 of file ML2PhaseSpaces.hh.

66 {return sensDetParticle->getCML2SensitiveDetectorParticle();}
CML2SDWithParticle * getCML2SensitiveDetectorParticle()

Here is the call graph for this function:

void CML2PhaseSpaces::save ( )
inline

Definition at line 67 of file ML2PhaseSpaces.hh.

67 {sensDetParticle->save();}

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: