100 lines
2.5 KiB
C++
100 lines
2.5 KiB
C++
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|
|
|
#include "sr1ShieldHit.hh"
|
|
#include "G4UnitsTable.hh"
|
|
#include "G4VVisManager.hh"
|
|
#include "G4Circle.hh"
|
|
#include "G4Colour.hh"
|
|
#include "G4VisAttributes.hh"
|
|
#include <fstream>
|
|
#include <iostream>
|
|
#include "G4ios.hh"
|
|
#include "G4MagneticField.hh"
|
|
#include "G4FieldManager.hh"
|
|
#include "G4TransportationManager.hh"
|
|
#include <iomanip>
|
|
#include "globals.hh"
|
|
#include "G4Transform3D.hh"
|
|
#include "G4ProcessManager.hh"
|
|
#include "G4Track.hh"
|
|
#include "G4ThreeVector.hh"
|
|
#include "G4Event.hh"
|
|
#include "G4EventManager.hh"
|
|
#include "G4RunManager.hh"
|
|
#include "G4Run.hh"
|
|
|
|
G4Allocator<sr1ShieldHit> sr1ShieldHitAllocator;
|
|
|
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|
|
|
sr1ShieldHit::sr1ShieldHit() {}
|
|
|
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|
|
|
sr1ShieldHit::~sr1ShieldHit() {}
|
|
|
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|
|
|
sr1ShieldHit::sr1ShieldHit(const sr1ShieldHit& right)
|
|
: G4VHit()
|
|
{
|
|
|
|
trackID = right.trackID;
|
|
particle_name = right.particle_name;
|
|
edep = right.edep;
|
|
pos = right.pos;
|
|
pol = right.pol;
|
|
logicalvolume = right.logicalvolume;
|
|
}
|
|
|
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|
|
|
const sr1ShieldHit& sr1ShieldHit::operator=(const sr1ShieldHit& right)
|
|
{
|
|
|
|
trackID = right.trackID;
|
|
particle_name = right.particle_name;
|
|
edep = right.edep;
|
|
pos = right.pos;
|
|
pol = right.pol;
|
|
logicalvolume=right.logicalvolume;
|
|
return *this;
|
|
}
|
|
|
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|
|
|
G4int sr1ShieldHit::operator==(const sr1ShieldHit& right) const
|
|
{
|
|
return (this==&right) ? 1 : 0;
|
|
}
|
|
|
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|
|
|
void sr1ShieldHit::Draw()
|
|
{
|
|
G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
|
|
if(pVVisManager)
|
|
{
|
|
G4Circle circle(pos);
|
|
circle.SetScreenSize(0.04);
|
|
circle.SetFillStyle(G4Circle::filled);
|
|
G4Colour colour(1.,0.,0.);
|
|
G4VisAttributes attribs(colour);
|
|
circle.SetVisAttributes(attribs);
|
|
pVVisManager->Draw(circle);
|
|
}
|
|
}
|
|
|
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|
|
|
void sr1ShieldHit::Print()
|
|
{
|
|
|
|
G4EventManager* fEventManager = G4EventManager::GetEventManager();
|
|
fEventManager->AbortCurrentEvent();
|
|
|
|
}
|
|
|
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
|
|