82 lines
1.8 KiB
C++
82 lines
1.8 KiB
C++
|
|
#include "BGOHIT.hh"
|
|
|
|
#include "G4UnitsTable.hh"
|
|
#include "G4VVisManager.hh"
|
|
#include "G4Circle.hh"
|
|
#include "G4Colour.hh"
|
|
#include "G4VisAttributes.hh"
|
|
|
|
#include <iomanip>
|
|
|
|
G4ThreadLocal G4Allocator<BGOHit>* BGOHitAllocator = 0;
|
|
|
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|
|
|
BGOHit::BGOHit()
|
|
: G4VHit(),
|
|
fTrackID(-1),
|
|
fBGOID(-1),
|
|
fEdep(0.),
|
|
fPos(G4ThreeVector()),
|
|
fStepLength(0.)
|
|
{
|
|
|
|
}
|
|
|
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|
BGOHit::~BGOHit() {}
|
|
|
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|
|
|
BGOHit::BGOHit(const BGOHit& right)
|
|
: G4VHit()
|
|
{
|
|
fTrackID = right.fTrackID;
|
|
fBGOID = right.fBGOID;
|
|
fEdep = right.fEdep;
|
|
fPos = right.fPos;
|
|
|
|
fStepLength = right.fStepLength;
|
|
|
|
}
|
|
|
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|
|
|
const BGOHit& BGOHit::operator=(const BGOHit& right)
|
|
{
|
|
fTrackID = right.fTrackID;
|
|
fBGOID = right.fBGOID;
|
|
fEdep = right.fEdep;
|
|
fPos = right.fPos;
|
|
|
|
fStepLength = right.fStepLength;
|
|
|
|
return *this;
|
|
}
|
|
|
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|
|
|
G4bool BGOHit::operator==(const BGOHit& right) const
|
|
{
|
|
return ( this == &right ) ? true : false;
|
|
}
|
|
|
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|
|
|
void BGOHit::Print()
|
|
{
|
|
G4cout
|
|
|
|
<< " trackID: " << fTrackID << " Crystal: " << fBGOID
|
|
<< " Edep: "
|
|
<< std::setw(7) << G4BestUnit(fEdep,"Energy")
|
|
<< " StepLen: "
|
|
<< std::setw(7) << G4BestUnit(fStepLength,"Length")
|
|
<< " Position: "
|
|
<< std::setw(7) << G4BestUnit( fPos,"Length")
|
|
<< G4endl;
|
|
}
|
|
|
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|