G4UMDPixelHit.cc
Go to the documentation of this file.
1 #include "G4UMDPixelHit.h"
2 
3 #include <G4VVisManager.hh>
4 #include <G4Circle.hh>
5 #include <G4Colour.hh>
6 #include <G4VisAttributes.hh>
7 #include <G4SystemOfUnits.hh>
8 
9 
10 namespace G4StationSimulatorOG {
11 
12  G4ThreadLocal G4Allocator<G4UMDPixelHit>* gG4UMDPixelHitAllocator;
13 
14 
15  void
17  {
18  // Re-draw only the UMDPixels that have a opticalphoton hit (i.e, only the triggered pixels)
19  // Need a physical volume to be able to draw anything
20  if (fDrawIt && fHitPhysVol) {
21 
22  G4VVisManager* const m = G4VVisManager::GetConcreteInstance();
23 
24  if (m) {
25  G4VisAttributes attribs(G4Colour::Red());
26  attribs.SetForceSolid(true);
27 
28  // Retrieve geometric characteristic of the hit volume.
29  // If a rotation or traslation are defined, retrieve them
30  G4RotationMatrix rot;
31  if (fHitPhysVol->GetRotation())
32  rot = *fHitPhysVol->GetRotation();
33  G4Transform3D trans(rot, fHitPhysVol->GetTranslation()); // Create transform
34  // Now draw it
35  m->Draw(*fHitPhysVol, attribs, trans);
36  }
37 
38  }
39  }
40 
41 }
G4ThreadLocal G4Allocator< G4UMDPixelHit > * gG4UMDPixelHitAllocator
string Red(const string &str)
constexpr double m
Definition: AugerUnits.h:121

, generated on Tue Sep 26 2023.