7 #include "gutsConventions.h"
10 #include "G4VVisManager.hh"
11 #include "G4Circle.hh"
12 #include "G4VisAttributes.hh"
22 colorSchema(std::move(cScheme)),
30 averageTime = UNINITIALIZEDNUMBERQUANTITY;
31 avgGlobalPosition = G4ThreeVector(UNINITIALIZEDNUMBERQUANTITY, UNINITIALIZEDNUMBERQUANTITY, UNINITIALIZEDNUMBERQUANTITY);
32 avgLocalPosition = G4ThreeVector(UNINITIALIZEDNUMBERQUANTITY, UNINITIALIZEDNUMBERQUANTITY, UNINITIALIZEDNUMBERQUANTITY);
33 processName = UNINITIALIZEDSTRINGQUANTITY;
45 vector <GIdentifier> gids =
getGID();
46 ttid.reserve(gids.size());
47 for (
auto &gid: gids) {
49 ttid.push_back(gid.getValue());
63 G4VVisManager *pVVisManager = G4VVisManager::GetConcreteInstance();
70 if (globalPositions.empty())
return;
72 G4Circle circle(globalPositions[0]);
73 circle.SetFillStyle(G4Circle::filled);
78 circle.SetScreenSize(10);
79 circle.SetVisAttributes(G4VisAttributes(colour_hit));
80 }
else if (etot == 0) {
81 circle.SetScreenSize(8);
82 circle.SetVisAttributes(G4VisAttributes(colour_passby));
85 pVVisManager->Draw(circle);
96 bool GHit::setColorSchema() {
98 colour_hit = G4Colour(1.0, 0.0, 0.0);
99 colour_passby = G4Colour(0.0, 1.0, 0.0);
Represents a hit in the detector.
GTouchable * getGTouchable() const
Returns the GTouchable associated with the hit.
void addHitInfosForBitset(HitBitSet hbs, const G4Step *thisStep)
Adds hit information based on a HitBitSet.
GHit(GTouchable *gt, HitBitSet hbs, const G4Step *thisStep=nullptr, std::string cScheme="default")
Constructor for GHit.
std::vector< GIdentifier > getGID() const
Returns the detector element identity.
bool is_same_hit(GHit *hit)
Compare two ghits.
void Draw() override
Draws the hit using Geant4 visualization.
double getTotalEnergyDeposited()
Computes the total energy deposited.
std::vector< int > getTTID()
Returns the touchable identity values as integers.
std::bitset< NHITBITS > HitBitSet
G4ThreadLocal G4Allocator< GHit > * GHitAllocator