Import Geant4 8.2.0 source tree
This commit is contained in:
@@ -30,6 +30,11 @@
|
||||
#include "G4Colour.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4UIcommand.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
#include "G4AttValue.hh"
|
||||
#include "G4AttDef.hh"
|
||||
#include "G4AttCheck.hh"
|
||||
|
||||
G4Allocator<ExN04CalorimeterHit> ExN04CalorimeterHitAllocator;
|
||||
|
||||
@@ -70,6 +75,8 @@ G4int ExN04CalorimeterHit::operator==(const ExN04CalorimeterHit &right) const
|
||||
return ((ZCellID==right.ZCellID)&&(PhiCellID==right.PhiCellID));
|
||||
}
|
||||
|
||||
std::map<G4String,G4AttDef> ExN04CalorimeterHit::fAttDefs;
|
||||
|
||||
void ExN04CalorimeterHit::Draw()
|
||||
{
|
||||
G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
|
||||
@@ -81,12 +88,41 @@ void ExN04CalorimeterHit::Draw()
|
||||
if(pVA) attribs = *pVA;
|
||||
G4Colour colour(1.,0.,0.);
|
||||
attribs.SetColour(colour);
|
||||
attribs.SetForceWireframe(false);
|
||||
attribs.SetForceSolid(true);
|
||||
pVVisManager->Draw(*pLogV,attribs,trans);
|
||||
}
|
||||
}
|
||||
|
||||
const std::map<G4String,G4AttDef>* ExN04CalorimeterHit::GetAttDefs() const
|
||||
{
|
||||
// G4AttDefs have to have long life. Use static member...
|
||||
if (fAttDefs.empty()) {
|
||||
fAttDefs["HitType"] =
|
||||
G4AttDef("HitType","Type of hit","Physics","","G4String");
|
||||
fAttDefs["ZID"] = G4AttDef("ZID","Z Cell ID","Physics","","G4int");
|
||||
fAttDefs["PhiID"] = G4AttDef("PhiID","Phi Cell ID","Physics","","G4int");
|
||||
fAttDefs["EDep"] =
|
||||
G4AttDef("EDep","Energy deposited","Physics","G4BestUnit","G4double");
|
||||
}
|
||||
return &fAttDefs;
|
||||
}
|
||||
|
||||
std::vector<G4AttValue>* ExN04CalorimeterHit::CreateAttValues() const
|
||||
{
|
||||
// Create expendable G4AttsValues for picking...
|
||||
std::vector<G4AttValue>* attValues = new std::vector<G4AttValue>;
|
||||
attValues->push_back
|
||||
(G4AttValue("HitType","ExN04CalorimeterHit",""));
|
||||
attValues->push_back
|
||||
(G4AttValue("ZID",G4UIcommand::ConvertToString(ZCellID),""));
|
||||
attValues->push_back
|
||||
(G4AttValue("PhiID",G4UIcommand::ConvertToString(PhiCellID),""));
|
||||
attValues->push_back
|
||||
(G4AttValue("EDep",G4BestUnit(edep,"Energy"),""));
|
||||
//G4cout << "Checking...\n" << G4AttCheck(attValues, GetAttDefs());
|
||||
return attValues;
|
||||
}
|
||||
|
||||
void ExN04CalorimeterHit::Print()
|
||||
{;}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#include "G4Tubs.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4Material.hh"
|
||||
|
||||
#include "G4VisAttributes.hh"
|
||||
|
||||
ExN04CalorimeterROGeometry::ExN04CalorimeterROGeometry()
|
||||
: G4VReadOutGeometry()
|
||||
@@ -65,6 +65,7 @@ G4VPhysicalVolume* ExN04CalorimeterROGeometry::Build()
|
||||
G4Box *ROWorldBox = new G4Box("ROWorldBox", expHall_x, expHall_y, expHall_z);
|
||||
G4LogicalVolume *ROWorldLog = new G4LogicalVolume(ROWorldBox, dummyMat,
|
||||
"ROWorldLogical", 0, 0, 0);
|
||||
ROWorldLog->SetVisAttributes(G4VisAttributes::Invisible);
|
||||
G4PVPlacement *ROWorldPhys = new G4PVPlacement(0,G4ThreeVector(),
|
||||
"ROWorldPhysical",
|
||||
ROWorldLog,
|
||||
|
||||
@@ -76,11 +76,11 @@ G4bool ExN04CalorimeterSD::ProcessHits(G4Step*aStep,G4TouchableHistory*ROhist)
|
||||
ExN04CalorimeterHit* calHit
|
||||
= new ExN04CalorimeterHit
|
||||
(physVol->GetLogicalVolume(),copyIDinZ,copyIDinPhi);
|
||||
G4RotationMatrix rotM;
|
||||
if(physVol->GetObjectRotation()) rotM = *(physVol->GetObjectRotation());
|
||||
calHit->SetEdep( edep );
|
||||
calHit->SetPos( physVol->GetTranslation() );
|
||||
calHit->SetRot( rotM );
|
||||
G4AffineTransform aTrans = ROhist->GetHistory()->GetTopTransform();
|
||||
aTrans.Invert();
|
||||
calHit->SetPos(aTrans.NetTranslation());
|
||||
calHit->SetRot(aTrans.NetRotation());
|
||||
G4int icell = CalCollection->insert( calHit );
|
||||
CellID[copyIDinZ][copyIDinPhi] = icell - 1;
|
||||
if(verboseLevel>0)
|
||||
|
||||
@@ -125,10 +125,7 @@ G4VPhysicalVolume* ExN04DetectorConstruction::Construct()
|
||||
G4VPhysicalVolume * experimentalHall_phys
|
||||
= new G4PVPlacement(0,G4ThreeVector(),experimentalHall_log,"expHall_P",
|
||||
0,false,0);
|
||||
G4VisAttributes* experimentalHallVisAtt
|
||||
= new G4VisAttributes(G4Colour(1.0,1.0,1.0));
|
||||
experimentalHallVisAtt->SetForceWireframe(true);
|
||||
experimentalHall_log->SetVisAttributes(experimentalHallVisAtt);
|
||||
experimentalHall_log->SetVisAttributes(G4VisAttributes::GetInvisible());
|
||||
|
||||
//------------------------------ tracker
|
||||
G4VSolid * tracker_tubs
|
||||
@@ -141,7 +138,6 @@ G4VPhysicalVolume* ExN04DetectorConstruction::Construct()
|
||||
experimentalHall_log,false,0);
|
||||
G4VisAttributes* tracker_logVisAtt
|
||||
= new G4VisAttributes(G4Colour(1.0,0.0,1.0));
|
||||
tracker_logVisAtt->SetForceWireframe(true);
|
||||
tracker_log->SetVisAttributes(tracker_logVisAtt);
|
||||
|
||||
//------------------------------ tracker layers
|
||||
@@ -193,7 +189,6 @@ G4VPhysicalVolume* ExN04DetectorConstruction::Construct()
|
||||
kXAxis, nocaloLayers, calorimeterParam);
|
||||
G4VisAttributes* caloLayer_logVisAtt
|
||||
= new G4VisAttributes(G4Colour(0.7,1.0,0.0));
|
||||
caloLayer_logVisAtt->SetForceWireframe(true);
|
||||
caloLayer_log->SetVisAttributes(caloLayer_logVisAtt);
|
||||
|
||||
//------------------------------ muon counters
|
||||
@@ -239,6 +234,7 @@ G4VPhysicalVolume* ExN04DetectorConstruction::Construct()
|
||||
G4String ROgeometryName = "CalorimeterROGeom";
|
||||
G4VReadOutGeometry* calRO = new ExN04CalorimeterROGeometry(ROgeometryName);
|
||||
calRO->BuildROGeometry();
|
||||
calRO->SetName(ROgeometryName);
|
||||
calorimeterSD->SetROgeometry(calRO);
|
||||
SDman->AddNewDetector(calorimeterSD);
|
||||
calorimeter_log->SetSensitiveDetector(calorimeterSD);
|
||||
|
||||
@@ -29,7 +29,10 @@
|
||||
#include "G4Circle.hh"
|
||||
#include "G4Colour.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
|
||||
#include "G4UnitsTable.hh"
|
||||
#include "G4AttValue.hh"
|
||||
#include "G4AttDef.hh"
|
||||
#include "G4AttCheck.hh"
|
||||
|
||||
G4Allocator<ExN04MuonHit> ExN04MuonHitAllocator;
|
||||
|
||||
@@ -58,6 +61,8 @@ G4int ExN04MuonHit::operator==(const ExN04MuonHit &right) const
|
||||
return (this==&right) ? 1 : 0;
|
||||
}
|
||||
|
||||
std::map<G4String,G4AttDef> ExN04MuonHit::fAttDefs;
|
||||
|
||||
void ExN04MuonHit::Draw()
|
||||
{
|
||||
G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
|
||||
@@ -73,6 +78,26 @@ void ExN04MuonHit::Draw()
|
||||
}
|
||||
}
|
||||
|
||||
const std::map<G4String,G4AttDef>* ExN04MuonHit::GetAttDefs() const
|
||||
{
|
||||
// G4AttDefs have to have long life. Use static member...
|
||||
if (fAttDefs.empty()) {
|
||||
fAttDefs["HitType"] =
|
||||
G4AttDef("HitType","Type of hit","Physics","","G4String");
|
||||
}
|
||||
return &fAttDefs;
|
||||
}
|
||||
|
||||
std::vector<G4AttValue>* ExN04MuonHit::CreateAttValues() const
|
||||
{
|
||||
// Create expendable G4AttsValues for picking...
|
||||
std::vector<G4AttValue>* attValues = new std::vector<G4AttValue>;
|
||||
attValues->push_back
|
||||
(G4AttValue("HitType","ExN04MuonHit",""));
|
||||
//G4cout << "Checking...\n" << G4AttCheck(attValues, GetAttDefs());
|
||||
return attValues;
|
||||
}
|
||||
|
||||
void ExN04MuonHit::Print()
|
||||
{;}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: ExN04RunAction.cc,v 1.5 2006/06/29 17:51:44 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: ExN04SteppingVerbose.cc,v 1.4 2006/06/29 17:51:55 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
// GEANT4 tag $Name: geant4-08-02 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -29,7 +29,10 @@
|
||||
#include "G4Circle.hh"
|
||||
#include "G4Colour.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
|
||||
#include "G4UnitsTable.hh"
|
||||
#include "G4AttValue.hh"
|
||||
#include "G4AttDef.hh"
|
||||
#include "G4AttCheck.hh"
|
||||
|
||||
G4Allocator<ExN04TrackerHit> ExN04TrackerHitAllocator;
|
||||
|
||||
@@ -58,6 +61,8 @@ G4int ExN04TrackerHit::operator==(const ExN04TrackerHit &right) const
|
||||
return (this==&right) ? 1 : 0;
|
||||
}
|
||||
|
||||
std::map<G4String,G4AttDef> ExN04TrackerHit::fAttDefs;
|
||||
|
||||
void ExN04TrackerHit::Draw()
|
||||
{
|
||||
G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
|
||||
@@ -73,6 +78,26 @@ void ExN04TrackerHit::Draw()
|
||||
}
|
||||
}
|
||||
|
||||
const std::map<G4String,G4AttDef>* ExN04TrackerHit::GetAttDefs() const
|
||||
{
|
||||
// G4AttDefs have to have long life. Use static member...
|
||||
if (fAttDefs.empty()) {
|
||||
fAttDefs["HitType"] =
|
||||
G4AttDef("HitType","Type of hit","Physics","","G4String");
|
||||
}
|
||||
return &fAttDefs;
|
||||
}
|
||||
|
||||
std::vector<G4AttValue>* ExN04TrackerHit::CreateAttValues() const
|
||||
{
|
||||
// Create expendable G4AttsValues for picking...
|
||||
std::vector<G4AttValue>* attValues = new std::vector<G4AttValue>;
|
||||
attValues->push_back
|
||||
(G4AttValue("HitType","ExN04TrackerHit",""));
|
||||
//G4cout << "Checking...\n" << G4AttCheck(attValues, GetAttDefs());
|
||||
return attValues;
|
||||
}
|
||||
|
||||
void ExN04TrackerHit::Print()
|
||||
{;}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user