Import Geant4 10.3.0 source tree
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: B5HodoscopeHit.cc 76474 2013-11-11 10:36:34Z gcosmo $
|
||||
// $Id: B5HodoscopeHit.cc 101036 2016-11-04 09:00:23Z gcosmo $
|
||||
//
|
||||
/// \file B5HodoscopeHit.cc
|
||||
/// \brief Implementation of the B5HodoscopeHit class
|
||||
@@ -48,8 +48,9 @@ G4ThreadLocal G4Allocator<B5HodoscopeHit>* B5HodoscopeHitAllocator;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
B5HodoscopeHit::B5HodoscopeHit(G4int i,G4double t)
|
||||
: G4VHit(), fId(i), fTime(t), fPos(0), fPLogV(0)
|
||||
B5HodoscopeHit::B5HodoscopeHit(G4int id,G4double time)
|
||||
: G4VHit(),
|
||||
fId(id), fTime(time), fPos(0.), fPLogV(nullptr)
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -60,106 +61,104 @@ B5HodoscopeHit::~B5HodoscopeHit()
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
B5HodoscopeHit::B5HodoscopeHit(const B5HodoscopeHit &right)
|
||||
: G4VHit() {
|
||||
fId = right.fId;
|
||||
fTime = right.fTime;
|
||||
fPos = right.fPos;
|
||||
fRot = right.fRot;
|
||||
fPLogV = right.fPLogV;
|
||||
}
|
||||
: G4VHit(),
|
||||
fId(right.fId),
|
||||
fTime(right.fTime),
|
||||
fPos(right.fPos),
|
||||
fRot(right.fRot),
|
||||
fPLogV(right.fPLogV)
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
const B5HodoscopeHit& B5HodoscopeHit::operator=(const B5HodoscopeHit &right)
|
||||
{
|
||||
fId = right.fId;
|
||||
fTime = right.fTime;
|
||||
fPos = right.fPos;
|
||||
fRot = right.fRot;
|
||||
fPLogV = right.fPLogV;
|
||||
return *this;
|
||||
fId = right.fId;
|
||||
fTime = right.fTime;
|
||||
fPos = right.fPos;
|
||||
fRot = right.fRot;
|
||||
fPLogV = right.fPLogV;
|
||||
return *this;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
int B5HodoscopeHit::operator==(const B5HodoscopeHit &/*right*/) const
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void B5HodoscopeHit::Draw()
|
||||
{
|
||||
G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
|
||||
if (pVVisManager)
|
||||
{
|
||||
G4Transform3D trans(fRot.inverse(),fPos);
|
||||
G4VisAttributes attribs;
|
||||
const G4VisAttributes* pVA = fPLogV->GetVisAttributes();
|
||||
if (pVA) attribs = *pVA;
|
||||
G4Colour colour(0.,1.,1.);
|
||||
attribs.SetColour(colour);
|
||||
attribs.SetForceSolid(true);
|
||||
pVVisManager->Draw(*fPLogV,attribs,trans);
|
||||
}
|
||||
auto visManager = G4VVisManager::GetConcreteInstance();
|
||||
if (! visManager) return;
|
||||
|
||||
G4Transform3D trans(fRot.inverse(),fPos);
|
||||
G4VisAttributes attribs;
|
||||
auto pVA = fPLogV->GetVisAttributes();
|
||||
if (pVA) attribs = *pVA;
|
||||
G4Colour colour(0.,1.,1.);
|
||||
attribs.SetColour(colour);
|
||||
attribs.SetForceSolid(true);
|
||||
visManager->Draw(*fPLogV,attribs,trans);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
const std::map<G4String,G4AttDef>* B5HodoscopeHit::GetAttDefs() const
|
||||
{
|
||||
G4bool isNew;
|
||||
std::map<G4String,G4AttDef>* store
|
||||
= G4AttDefStore::GetInstance("B5HodoscopeHit",isNew);
|
||||
G4bool isNew;
|
||||
auto store = G4AttDefStore::GetInstance("B5HodoscopeHit",isNew);
|
||||
|
||||
if (isNew) {
|
||||
(*store)["HitType"]
|
||||
= G4AttDef("HitType","Hit Type","Physics","","G4String");
|
||||
|
||||
(*store)["ID"]
|
||||
= G4AttDef("ID","ID","Physics","","G4int");
|
||||
|
||||
(*store)["Time"]
|
||||
= G4AttDef("Time","Time","Physics","G4BestUnit","G4double");
|
||||
|
||||
(*store)["Pos"]
|
||||
= G4AttDef("Pos","Position","Physics","G4BestUnit","G4ThreeVector");
|
||||
|
||||
(*store)["LVol"]
|
||||
= G4AttDef("LVol","Logical Volume","Physics","","G4String");
|
||||
}
|
||||
return store;
|
||||
if (isNew) {
|
||||
(*store)["HitType"]
|
||||
= G4AttDef("HitType","Hit Type","Physics","","G4String");
|
||||
|
||||
(*store)["ID"]
|
||||
= G4AttDef("ID","ID","Physics","","G4int");
|
||||
|
||||
(*store)["Time"]
|
||||
= G4AttDef("Time","Time","Physics","G4BestUnit","G4double");
|
||||
|
||||
(*store)["Pos"]
|
||||
= G4AttDef("Pos","Position","Physics","G4BestUnit","G4ThreeVector");
|
||||
|
||||
(*store)["LVol"]
|
||||
= G4AttDef("LVol","Logical Volume","Physics","","G4String");
|
||||
}
|
||||
return store;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
std::vector<G4AttValue>* B5HodoscopeHit::CreateAttValues() const
|
||||
{
|
||||
std::vector<G4AttValue>* values = new std::vector<G4AttValue>;
|
||||
|
||||
values
|
||||
->push_back(G4AttValue("HitType","HodoscopeHit",""));
|
||||
values
|
||||
->push_back(G4AttValue("ID",G4UIcommand::ConvertToString(fId),""));
|
||||
values
|
||||
->push_back(G4AttValue("Time",G4BestUnit(fTime,"Time"),""));
|
||||
values
|
||||
->push_back(G4AttValue("Pos",G4BestUnit(fPos,"Length"),""));
|
||||
|
||||
if (fPLogV)
|
||||
values->push_back(G4AttValue("LVol",fPLogV->GetName(),""));
|
||||
else
|
||||
values->push_back(G4AttValue("LVol"," ",""));
|
||||
|
||||
return values;
|
||||
auto values = new std::vector<G4AttValue>;
|
||||
|
||||
values
|
||||
->push_back(G4AttValue("HitType","HodoscopeHit",""));
|
||||
values
|
||||
->push_back(G4AttValue("ID",G4UIcommand::ConvertToString(fId),""));
|
||||
values
|
||||
->push_back(G4AttValue("Time",G4BestUnit(fTime,"Time"),""));
|
||||
values
|
||||
->push_back(G4AttValue("Pos",G4BestUnit(fPos,"Length"),""));
|
||||
|
||||
if (fPLogV)
|
||||
values->push_back(G4AttValue("LVol",fPLogV->GetName(),""));
|
||||
else
|
||||
values->push_back(G4AttValue("LVol"," ",""));
|
||||
|
||||
return values;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void B5HodoscopeHit::Print()
|
||||
{
|
||||
G4cout << " Hodoscope[" << fId << "] " << fTime/ns << " (nsec)" << G4endl;
|
||||
G4cout << " Hodoscope[" << fId << "] " << fTime/ns << " (nsec)" << G4endl;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Reference in New Issue
Block a user