Professional Documents
Culture Documents
Descripción.
Geometría.
http://conferences.fnal.gov/g4tutorial/g4cd/Documentation/WorkshopExercises/Exercise1.html
Partículas.
http://conferences.fnal.gov/g4tutorial/g4cd/Documentation/WorkshopExercises/Exercise2.html
Sensibilidad.
http://conferences.fnal.gov/g4tutorial/g4cd/Documentation/WorkshopExercises/Exercise3.html
A01DetectorConstruction::A01DetectorConstruction()
: air(0), argonGas(0), scintillator(0),
…
{ messenger = new A01DetectorConstMessenger(this);
magneticField = new A01MagneticField();
…
A01DetectorConstruction::~A01DetectorConstruction()
{ delete magneticField;
delete armRotation;
...
// campo magnetico
static G4bool fieldIsInitialized = false;
if(!fieldIsInitialized)
{ G4FieldManager* fieldMgr = G4TransportationManager::GetTransportationManager()->GetFieldManager();
fieldMgr->SetDetectorField(magneticField);
fieldMgr->CreateChordFinder(magneticField);
fieldIsInitialized = true;
}
Geant4 Low Energy Electromagnetic Physics Working Group
Hodoscopes (centelladores)
Primero definimos los
materiales (Plomo, Iodo,
Cesio)
En
A01Detectorconstruction.hh
definimos los punteros a
G4Material plomo y CsI.
Inicializamos en cero ( Cs(0),
plomo(0) ) en
A01Detectorconstruction.cc
...
Material: Plomo density: 11.350 g/cm3 RadL: 5.437 cm Nucl.Int.Length: 38.899
cm Imean: 820.000 eV
---> Element: Plomo ( ) Z = 82.0 N = 2007.2 A = 2007.19 g/mole ElmMassFraction:
100.00 % ElmAbundance 100.00 %
G4VPhysicalVolume*
A01DetectorConstruction::Construct()
{
//
G4VSensitiveDetector* hodoscope1;
G4VSensitiveDetector* chamber1;
G4VSensitiveDetector* hodoscope2;
G4VSensitiveDetector* camara2;
A01EventAction::A01EventAction()
{
G4String colName;
G4SDManager* SDman = G4SDManager::GetSDMpointer();
HHC1ID = SDman->GetCollectionID(colName="hodoscope1/hodoscopeColl");
DHC1ID = SDman->GetCollectionID(colName="chamber1/driftChamberColl");
//colocando ID
HHC2ID = SDman->GetCollectionID(colName="hodoscope2/hodoscopeColl");
DHC2ID = SDman->GetCollectionID(colName="camara2/driftChamberColl");
...
//
if(HHC2)
{ int n_hit = HHC2->entries();
G4cout << "Hodoscope 2 tiene " << n_hit << " colisiones." << G4endl;
for(int i1=0;i1<n_hit;i1++)
{
A01HodoscopeHit* aHit = (*HHC2)[i1];
aHit->Print();
}
}
}
Parte de A01HadCalorimeter.cc
A01HadCalorimeter::A01HadCalorimeter(G4String name)
:G4VSensitiveDetector(name)
{
//definimos coleccion de hits
G4String HCname;
collectionName.insert(HCname="HadCalorimeterColl");
HCID = -1;