Import Geant4 7.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 12:11:21 +02:00
parent 516dbf1a58
commit d93e1e39a9
5384 changed files with 125662 additions and 82444 deletions
@@ -20,7 +20,7 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: A01DriftChamberHit.cc,v 1.5 2003/07/11 21:32:02 duns Exp $
// $Id: A01DriftChamberHit.cc,v 1.7 2005/06/07 10:50:02 perl Exp $
// --------------------------------------------------------------
//
#include "A01DriftChamberHit.hh"
@@ -28,6 +28,11 @@
#include "G4VVisManager.hh"
#include "G4Circle.hh"
#include "G4Colour.hh"
#include "G4AttDefStore.hh"
#include "G4AttDef.hh"
#include "G4AttValue.hh"
#include "G4UIcommand.hh"
#include "G4UnitsTable.hh"
#include "G4VisAttributes.hh"
#include "G4LogicalVolume.hh"
@@ -85,6 +90,71 @@ void A01DriftChamberHit::Draw()
}
}
const std::map<G4String,G4AttDef>* A01DriftChamberHit::GetAttDefs() const
{
G4bool isNew;
std::map<G4String,G4AttDef>* store
= G4AttDefStore::GetInstance("A01DriftChamberHit",isNew);
if (isNew) {
G4String HitType("HitType");
(*store)[HitType] = G4AttDef(HitType,"Hit Type","Bookkeeping","","G4String");
G4String ID("ID");
(*store)[ID] = G4AttDef(ID,"ID","Bookkeeping","","G4int");
G4String Column("Column");
(*store)[Column] = G4AttDef(Column,"Column ID","Bookkeeping","","G4int");
G4String Row("Row");
(*store)[Row] = G4AttDef(Row,"Row ID","Bookkeeping","","G4int");
//G4String Time("Time");
//(*store)[Time] = G4AttDef(Time,"Time","Physics","G4BestUnit","G4double");
G4String Energy("Energy");
(*store)[Energy] = G4AttDef(Energy,"Energy Deposited","Physics","G4BestUnit","G4double");
G4String Pos("Pos");
(*store)[Pos] = G4AttDef(Pos, "Position",
"Physics","G4BestUnit","G4ThreeVector");
G4String LVol("LVol");
(*store)[LVol] = G4AttDef(LVol,"Logical Volume","Bookkeeping","","G4String");
}
return store;
}
std::vector<G4AttValue>* A01DriftChamberHit::CreateAttValues() const
{
std::vector<G4AttValue>* values = new std::vector<G4AttValue>;
values->push_back(G4AttValue("HitType","DriftChamberHit",""));
values->push_back
(G4AttValue("ID",G4UIcommand::ConvertToString(layerID),""));
values->push_back
(G4AttValue("Column"," ",""));
values->push_back
(G4AttValue("Row"," ",""));
//values->push_back
// (G4AttValue("Time",G4BestUnit(time,"Time"),""));
G4double noEnergy = 0.*MeV;
values->push_back
(G4AttValue("Energy",G4BestUnit(noEnergy,"Energy"),""));
values->push_back
(G4AttValue("Pos",G4BestUnit(worldPos,"Length"),""));
values->push_back
(G4AttValue("LVol"," ",""));
return values;
}
void A01DriftChamberHit::Print()
{
G4cout << " Layer[" << layerID << "] : time " << time/ns
@@ -20,13 +20,18 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: A01EmCalorimeterHit.cc,v 1.6 2003/10/14 18:58:18 perl Exp $
// $Id: A01EmCalorimeterHit.cc,v 1.8 2005/06/07 10:50:02 perl Exp $
// --------------------------------------------------------------
//
#include "A01EmCalorimeterHit.hh"
#include "G4VVisManager.hh"
#include "G4Colour.hh"
#include "G4AttDefStore.hh"
#include "G4AttDef.hh"
#include "G4AttValue.hh"
#include "G4UIcommand.hh"
#include "G4UnitsTable.hh"
#include "G4VisAttributes.hh"
#include "G4LogicalVolume.hh"
#include "G4ios.hh"
@@ -94,6 +99,75 @@ void A01EmCalorimeterHit::Draw()
}
}
const std::map<G4String,G4AttDef>* A01EmCalorimeterHit::GetAttDefs() const
{
G4bool isNew;
std::map<G4String,G4AttDef>* store
= G4AttDefStore::GetInstance("A01EmCalorimeterHit",isNew);
if (isNew) {
G4String HitType("HitType");
(*store)[HitType] = G4AttDef(HitType,"Hit Type","Bookkeeping","","G4String");
G4String ID("ID");
(*store)[ID] = G4AttDef(ID,"ID","Bookkeeping","","G4int");
G4String Column("Column");
(*store)[Column] = G4AttDef(Column,"Column ID","Bookkeeping","","G4int");
G4String Row("Row");
(*store)[Row] = G4AttDef(Row,"Row ID","Bookkeeping","","G4int");
//G4String Time("Time");
//(*store)[Time] = G4AttDef(Time,"Time","Physics","G4BestUnit","G4double");
G4String Energy("Energy");
(*store)[Energy] = G4AttDef(Energy,"Energy Deposited","Physics","G4BestUnit","G4double");
G4String Pos("Pos");
(*store)[Pos] = G4AttDef(Pos, "Position",
"Physics","G4BestUnit","G4ThreeVector");
G4String LVol("LVol");
(*store)[LVol] = G4AttDef(LVol,"Logical Volume","Bookkeeping","","G4String");
}
return store;
}
std::vector<G4AttValue>* A01EmCalorimeterHit::CreateAttValues() const
{
std::vector<G4AttValue>* values = new std::vector<G4AttValue>;
values->push_back(G4AttValue("HitType","EmCalorimeterHit",""));
values->push_back
(G4AttValue("ID",G4UIcommand::ConvertToString(cellID),""));
values->push_back
(G4AttValue("Column"," ",""));
values->push_back
(G4AttValue("Row"," ",""));
//G4double noTime = 0.*s;
//values->push_back
// (G4AttValue("Time",G4BestUnit(noTime,"Time"),""));
values->push_back
(G4AttValue("Energy",G4BestUnit(edep,"Energy"),""));
values->push_back
(G4AttValue("Pos",G4BestUnit(pos,"Length"),""));
if (pLogV)
values->push_back
(G4AttValue("LVol",pLogV->GetName(),""));
else
values->push_back
(G4AttValue("LVol"," ",""));
return values;
}
void A01EmCalorimeterHit::Print()
{
G4cout << " Cell[" << cellID << "] " << edep/MeV << " (MeV)" << G4endl;
@@ -20,7 +20,7 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: A01EventAction.cc,v 1.6 2003/10/13 01:55:54 asaim Exp $
// $Id: A01EventAction.cc,v 1.7 2005/05/26 05:44:24 duns Exp $
// --------------------------------------------------------------
//
@@ -148,29 +148,22 @@ void A01EventAction::EndOfEventAction(const G4Event* evt)
{
int n_hit = DHC1->entries();
dc1Hits->fill(n_hit);
for(int i2=0;i2<5;i2++)
for(int i1=0;i1<n_hit;i1++)
{
for(int i1=0;i1<n_hit;i1++)
{
A01DriftChamberHit* aHit = (*DHC1)[i1];
G4ThreeVector localPos = aHit->GetLocalPos();
if (dc1XY) dc1XY->fill(localPos.x(), localPos.y());
}
A01DriftChamberHit* aHit = (*DHC1)[i1];
G4ThreeVector localPos = aHit->GetLocalPos();
if (dc1XY) dc1XY->fill(localPos.x(), localPos.y());
}
}
if (DHC2 && dc2Hits)
{
int n_hit = DHC2->entries();
dc2Hits->fill(n_hit);
for(int i2=0;i2<5;i2++)
for(int i1=0;i1<n_hit;i1++)
{
for(int i1=0;i1<n_hit;i1++)
{
A01DriftChamberHit* aHit = (*DHC2)[i1];
G4ThreeVector localPos = aHit->GetLocalPos();
if (dc2XY) dc2XY->fill(localPos.x(), localPos.y());
}
A01DriftChamberHit* aHit = (*DHC2)[i1];
G4ThreeVector localPos = aHit->GetLocalPos();
if (dc2XY) dc2XY->fill(localPos.x(), localPos.y());
}
}
@@ -20,7 +20,7 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: A01HadCalorimeterHit.cc,v 1.5 2003/10/14 18:58:20 perl Exp $
// $Id: A01HadCalorimeterHit.cc,v 1.7 2005/06/07 10:50:02 perl Exp $
// --------------------------------------------------------------
//
@@ -31,6 +31,11 @@
#include "G4Box.hh"
#include "G4VVisManager.hh"
#include "G4Colour.hh"
#include "G4AttDefStore.hh"
#include "G4AttDef.hh"
#include "G4AttValue.hh"
#include "G4UIcommand.hh"
#include "G4UnitsTable.hh"
#include "G4VisAttributes.hh"
#include "G4LogicalVolume.hh"
#include "G4ios.hh"
@@ -94,6 +99,71 @@ void A01HadCalorimeterHit::Draw()
}
}
const std::map<G4String,G4AttDef>* A01HadCalorimeterHit::GetAttDefs() const
{
G4bool isNew;
std::map<G4String,G4AttDef>* store
= G4AttDefStore::GetInstance("A01HadCalorimeterHit",isNew);
if (isNew) {
G4String HitType("HitType");
(*store)[HitType] = G4AttDef(HitType,"Hit Type","Bookkeeping","","G4String");
G4String ID("ID");
(*store)[ID] = G4AttDef(ID,"ID","Bookkeeping","","G4int");
G4String Column("Column");
(*store)[Column] = G4AttDef(Column,"Column ID","Bookkeeping","","G4int");
G4String Row("Row");
(*store)[Row] = G4AttDef(Row,"Row ID","Bookkeeping","","G4int");
// G4String Time("Time");
//(*store)[Time] = G4AttDef(Time,"Time","Physics","G4BestUnit","G4double");
G4String Energy("Energy");
(*store)[Energy] = G4AttDef(Energy,"Energy Deposited","Physics","G4BestUnit","G4double");
G4String Pos("Pos");
(*store)[Pos] = G4AttDef(Pos, "Position",
"Physics","G4BestUnit","G4ThreeVector");
G4String LVol("LVol");
(*store)[LVol] = G4AttDef(LVol,"Logical Volume","Bookkeeping","","G4String");
}
return store;
}
std::vector<G4AttValue>* A01HadCalorimeterHit::CreateAttValues() const
{
std::vector<G4AttValue>* values = new std::vector<G4AttValue>;
values->push_back(G4AttValue("HitType","HadCalorimeterHit",""));
values->push_back
(G4AttValue("ID"," ",""));
values->push_back
(G4AttValue("Column",G4UIcommand::ConvertToString(columnID),""));
values->push_back
(G4AttValue("Row",G4UIcommand::ConvertToString(rowID),""));
//G4double noTime = 0.*s;
//values->push_back
// (G4AttValue("Time",G4BestUnit(noTime,"Time"),""));
values->push_back
(G4AttValue("Energy",G4BestUnit(edep,"Energy"),""));
values->push_back
(G4AttValue("Pos",G4BestUnit(pos,"Length"),""));
values->push_back
(G4AttValue("LVol"," ",""));
return values;
}
void A01HadCalorimeterHit::Print()
{
G4cout << " Cell[" << rowID << ", " << columnID << "] " << edep/MeV << " (MeV) " << pos << G4endl;
@@ -20,13 +20,18 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: A01HodoscopeHit.cc,v 1.5 2003/10/14 18:58:22 perl Exp $
// $Id: A01HodoscopeHit.cc,v 1.7 2005/06/07 10:50:02 perl Exp $
// --------------------------------------------------------------
//
#include "A01HodoscopeHit.hh"
#include "G4VVisManager.hh"
#include "G4Circle.hh"
#include "G4Colour.hh"
#include "G4AttDefStore.hh"
#include "G4AttDef.hh"
#include "G4AttValue.hh"
#include "G4UIcommand.hh"
#include "G4UnitsTable.hh"
#include "G4VisAttributes.hh"
#include "G4ios.hh"
@@ -82,6 +87,75 @@ void A01HodoscopeHit::Draw()
}
}
const std::map<G4String,G4AttDef>* A01HodoscopeHit::GetAttDefs() const
{
G4bool isNew;
std::map<G4String,G4AttDef>* store
= G4AttDefStore::GetInstance("A01HodoscopeHit",isNew);
if (isNew) {
G4String HitType("HitType");
(*store)[HitType] = G4AttDef(HitType,"Hit Type","Bookkeeping","","G4String");
G4String ID("ID");
(*store)[ID] = G4AttDef(ID,"ID","Bookkeeping","","G4int");
G4String Column("Column");
(*store)[Column] = G4AttDef(Column,"Column ID","Bookkeeping","","G4int");
G4String Row("Row");
(*store)[Row] = G4AttDef(Row,"Row ID","Bookkeeping","","G4int");
//G4String Time("Time");
//(*store)[Time] = G4AttDef(Time,"Time","Physics","G4BestUnit","G4double");
G4String Energy("Energy");
(*store)[Energy] = G4AttDef(Energy,"Energy Deposited","Physics","G4BestUnit","G4double");
G4String Pos("Pos");
(*store)[Pos] = G4AttDef(Pos, "Position",
"Physics","G4BestUnit","G4ThreeVector");
G4String LVol("LVol");
(*store)[LVol] = G4AttDef(LVol,"Logical Volume","Bookkeeping","","G4String");
}
return store;
}
std::vector<G4AttValue>* A01HodoscopeHit::CreateAttValues() const
{
std::vector<G4AttValue>* values = new std::vector<G4AttValue>;
values->push_back(G4AttValue("HitType","HodoscopeHit",""));
values->push_back
(G4AttValue("ID",G4UIcommand::ConvertToString(id),""));
values->push_back
(G4AttValue("Column"," ",""));
values->push_back
(G4AttValue("Row"," ",""));
//values->push_back
// (G4AttValue("Time",G4BestUnit(time,"Time"),""));
G4double noEnergy = 0.*MeV;
values->push_back
(G4AttValue("Energy",G4BestUnit(noEnergy,"Energy"),""));
values->push_back
(G4AttValue("Pos",G4BestUnit(pos,"Length"),""));
if (pLogV)
values->push_back
(G4AttValue("LVol",pLogV->GetName(),""));
else
values->push_back
(G4AttValue("LVol"," ",""));
return values;
}
void A01HodoscopeHit::Print()
{
G4cout << " Hodoscope[" << id << "] " << time/ns << " (nsec)" << G4endl;
@@ -1,134 +0,0 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: A01VisManager.cc,v 1.4 2003/11/13 15:10:55 johna Exp $
// --------------------------------------------------------------
//
#ifdef G4VIS_USE
#include "A01VisManager.hh"
// Supported drivers...
// Not needing external packages or libraries...
#include "G4ASCIITree.hh"
#include "G4DAWNFILE.hh"
#include "G4GAGTree.hh"
#include "G4HepRepFile.hh"
#include "G4HepRep.hh"
#include "G4RayTracer.hh"
#include "G4VRML1File.hh"
#include "G4VRML2File.hh"
// Needing external packages or libraries...
#ifdef G4VIS_USE_DAWN
#include "G4FukuiRenderer.hh"
#endif
#ifdef G4VIS_USE_OPENGLX
#include "G4OpenGLImmediateX.hh"
#include "G4OpenGLStoredX.hh"
#endif
#ifdef G4VIS_USE_OPENGLWIN32
#include "G4OpenGLImmediateWin32.hh"
#include "G4OpenGLStoredWin32.hh"
#endif
#ifdef G4VIS_USE_OPENGLXM
#include "G4OpenGLImmediateXm.hh"
#include "G4OpenGLStoredXm.hh"
#endif
#ifdef G4VIS_USE_OIX
#include "G4OpenInventorX.hh"
#endif
#ifdef G4VIS_USE_OIWIN32
#include "G4OpenInventorWin32.hh"
#endif
#ifdef G4VIS_USE_VRML
#include "G4VRML1.hh"
#include "G4VRML2.hh"
#endif
A01VisManager::A01VisManager () {}
void A01VisManager::RegisterGraphicsSystems () {
// Graphics Systems not needing external packages or libraries...
RegisterGraphicsSystem (new G4ASCIITree);
RegisterGraphicsSystem (new G4DAWNFILE);
RegisterGraphicsSystem (new G4GAGTree);
RegisterGraphicsSystem (new G4HepRepFile);
RegisterGraphicsSystem (new G4HepRep);
RegisterGraphicsSystem (new G4RayTracer);
RegisterGraphicsSystem (new G4VRML1File);
RegisterGraphicsSystem (new G4VRML2File);
// Graphics systems needing external packages or libraries...
#ifdef G4VIS_USE_DAWN
RegisterGraphicsSystem (new G4FukuiRenderer);
#endif
#ifdef G4VIS_USE_OPENGLX
RegisterGraphicsSystem (new G4OpenGLImmediateX);
RegisterGraphicsSystem (new G4OpenGLStoredX);
#endif
#ifdef G4VIS_USE_OPENGLWIN32
RegisterGraphicsSystem (new G4OpenGLImmediateWin32);
RegisterGraphicsSystem (new G4OpenGLStoredWin32);
#endif
#ifdef G4VIS_USE_OPENGLXM
RegisterGraphicsSystem (new G4OpenGLImmediateXm);
RegisterGraphicsSystem (new G4OpenGLStoredXm);
#endif
#ifdef G4VIS_USE_OIX
RegisterGraphicsSystem (new G4OpenInventorX);
#endif
#ifdef G4VIS_USE_OIWIN32
RegisterGraphicsSystem (new G4OpenInventorWin32);
#endif
#ifdef G4VIS_USE_VRML
RegisterGraphicsSystem (new G4VRML1);
RegisterGraphicsSystem (new G4VRML2);
#endif
if (fVerbose > 0) {
G4cout <<
"\nYou have successfully chosen to use the following graphics systems."
<< G4endl;
PrintAvailableGraphicsSystems ();
}
}
#endif