|
Geant4 examples
|
Tracker hit class. More...
#include <Doxymodules_basic.h>
Public Member Functions | |
| B2TrackerHit () | |
| B2TrackerHit (const B2TrackerHit &) | |
| virtual | ~B2TrackerHit () |
| const B2TrackerHit & | operator= (const B2TrackerHit &) |
| G4int | operator== (const B2TrackerHit &) const |
| void * | operator new (size_t) |
| void | operator delete (void *) |
| virtual void | Draw () |
| virtual void | Print () |
| void | SetTrackID (G4int track) |
| void | SetChamberNb (G4int chamb) |
| void | SetEdep (G4double de) |
| void | SetPos (G4ThreeVector xyz) |
| G4int | GetTrackID () const |
| G4int | GetChamberNb () const |
| G4double | GetEdep () const |
| G4ThreeVector | GetPos () const |
Private Attributes | |
| G4int | fTrackID |
| G4int | fChamberNb |
| G4double | fEdep |
| G4ThreeVector | fPos |
Tracker hit class.
It defines data members to store the trackID, chamberNb, energy deposit, and position of charged particles in a selected volume:
Definition at line 46 of file Doxymodules_basic.h.
| B2TrackerHit::B2TrackerHit | ( | ) |
Definition at line 44 of file B2TrackerHit.cc.
: G4VHit(), fTrackID(-1), fChamberNb(-1), fEdep(0.), fPos(G4ThreeVector()) {}
| B2TrackerHit::B2TrackerHit | ( | const B2TrackerHit & | right | ) |
Definition at line 58 of file B2TrackerHit.cc.
: G4VHit() { fTrackID = right.fTrackID; fChamberNb = right.fChamberNb; fEdep = right.fEdep; fPos = right.fPos; }
| B2TrackerHit::~B2TrackerHit | ( | ) | [virtual] |
Definition at line 54 of file B2TrackerHit.cc.
{}
| const B2TrackerHit & B2TrackerHit::operator= | ( | const B2TrackerHit & | right | ) |
Definition at line 69 of file B2TrackerHit.cc.
{
fTrackID = right.fTrackID;
fChamberNb = right.fChamberNb;
fEdep = right.fEdep;
fPos = right.fPos;
return *this;
}
| G4int B2TrackerHit::operator== | ( | const B2TrackerHit & | right | ) | const |
Definition at line 81 of file B2TrackerHit.cc.
{
return ( this == &right ) ? 1 : 0;
}
| void * B2TrackerHit::operator new | ( | size_t | ) | [inline] |
Definition at line 91 of file B2TrackerHit.hh.
{
void *hit;
hit = (void *) B2TrackerHitAllocator.MallocSingle();
return hit;
}
| void B2TrackerHit::operator delete | ( | void * | hit | ) | [inline] |
Definition at line 100 of file B2TrackerHit.hh.
{
B2TrackerHitAllocator.FreeSingle((B2TrackerHit*) hit);
}
| void B2TrackerHit::Draw | ( | ) | [virtual] |
Reimplemented from G4VHit.
Definition at line 88 of file B2TrackerHit.cc.
{
G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
if(pVVisManager)
{
G4Circle circle(fPos);
circle.SetScreenSize(2.);
circle.SetFillStyle(G4Circle::filled);
G4Colour colour(1.,0.,0.);
G4VisAttributes attribs(colour);
circle.SetVisAttributes(attribs);
pVVisManager->Draw(circle);
}
}
| void B2TrackerHit::Print | ( | ) | [virtual] |
Reimplemented from G4VHit.
Definition at line 105 of file B2TrackerHit.cc.
{
G4cout
<< " trackID: " << fTrackID << " chamberNb: " << fChamberNb
<< "Edep: "
<< std::setw(7) << G4BestUnit(fEdep,"Energy")
<< " Position: "
<< std::setw(7) << G4BestUnit( fPos,"Length")
<< G4endl;
}
| void B2TrackerHit::SetTrackID | ( | G4int | track | ) | [inline] |
Definition at line 64 of file B2TrackerHit.hh.
{ fTrackID = track; };
| void B2TrackerHit::SetChamberNb | ( | G4int | chamb | ) | [inline] |
Definition at line 65 of file B2TrackerHit.hh.
{ fChamberNb = chamb; };
| void B2TrackerHit::SetEdep | ( | G4double | de | ) | [inline] |
Definition at line 66 of file B2TrackerHit.hh.
{ fEdep = de; };
| void B2TrackerHit::SetPos | ( | G4ThreeVector | xyz | ) | [inline] |
Definition at line 67 of file B2TrackerHit.hh.
{ fPos = xyz; };
| G4int B2TrackerHit::GetTrackID | ( | ) | const [inline] |
Definition at line 70 of file B2TrackerHit.hh.
{ return fTrackID; };
| G4int B2TrackerHit::GetChamberNb | ( | ) | const [inline] |
Definition at line 71 of file B2TrackerHit.hh.
{ return fChamberNb; };
| G4double B2TrackerHit::GetEdep | ( | ) | const [inline] |
Definition at line 72 of file B2TrackerHit.hh.
{ return fEdep; };
| G4ThreeVector B2TrackerHit::GetPos | ( | ) | const [inline] |
Definition at line 73 of file B2TrackerHit.hh.
{ return fPos; };
G4int B2TrackerHit::fTrackID [private] |
Definition at line 73 of file B2TrackerHit.hh.
G4int B2TrackerHit::fChamberNb [private] |
Definition at line 78 of file B2TrackerHit.hh.
G4double B2TrackerHit::fEdep [private] |
Definition at line 79 of file B2TrackerHit.hh.
G4ThreeVector B2TrackerHit::fPos [private] |
Definition at line 80 of file B2TrackerHit.hh.
1.7.4