Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RE01CalorimeterHit Class Reference

#include <RE01CalorimeterHit.hh>

Inheritance diagram for RE01CalorimeterHit:
Collaboration diagram for RE01CalorimeterHit:

Public Member Functions

 RE01CalorimeterHit (G4LogicalVolume *logVol, G4int z, G4int phi)
 
virtual ~RE01CalorimeterHit ()
 
voidoperator new (size_t)
 
void operator delete (void *aHit)
 
virtual void Draw ()
 
virtual void Print ()
 
virtual const std::map
< G4String, G4AttDef > * 
GetAttDefs () const
 
virtual std::vector< G4AttValue > * CreateAttValues () const
 
G4int GetZ ()
 
G4int GetPhi ()
 
void SetEdep (G4double de)
 
void AddEdep (G4double de)
 
G4double GetEdep ()
 
G4double GetEdepByATrack ()
 
void ClearEdepByATrack ()
 
void SetPos (G4ThreeVector xyz)
 
void SetRot (G4RotationMatrix rmat)
 
void SetTrackInformation (const G4Track *aTrack)
 
RE01TrackInformationGetTrackInformation ()
 
- Public Member Functions inherited from G4VHit
 G4VHit ()
 
virtual ~G4VHit ()
 
G4int operator== (const G4VHit &right) const
 

Detailed Description

Definition at line 49 of file RE01CalorimeterHit.hh.

Constructor & Destructor Documentation

RE01CalorimeterHit::RE01CalorimeterHit ( G4LogicalVolume logVol,
G4int  z,
G4int  phi 
)

Definition at line 49 of file RE01CalorimeterHit.cc.

51  :G4VHit(), fZCellID(z), fPhiCellID(phi), fEdep(0.0),
52  fPos(0),fRot(0.,0.,0.),fPLogV(logVol),fEdepByATrack(0.0),fTrackInfo()
53 {;}
G4VHit()
Definition: G4VHit.cc:34
tuple z
Definition: test.py:28
RE01CalorimeterHit::~RE01CalorimeterHit ( )
virtual

Definition at line 56 of file RE01CalorimeterHit.cc.

57 {;}

Member Function Documentation

void RE01CalorimeterHit::AddEdep ( G4double  de)
inline

Definition at line 67 of file RE01CalorimeterHit.hh.

68  { fEdep += de; fEdepByATrack += de; }
void RE01CalorimeterHit::ClearEdepByATrack ( )
inline

Definition at line 73 of file RE01CalorimeterHit.hh.

74  { fEdepByATrack = 0.; fTrackInfo = RE01TrackInformation(); }
std::vector< G4AttValue > * RE01CalorimeterHit::CreateAttValues ( ) const
virtual

Reimplemented from G4VHit.

Definition at line 113 of file RE01CalorimeterHit.cc.

114 {
115  std::vector<G4AttValue>* values = new std::vector<G4AttValue>;
116 
117  values->push_back(G4AttValue("HitType","RE01CalorimeterHit",""));
118 
119  values->push_back
120  (G4AttValue("ZCellID",G4UIcommand::ConvertToString(fZCellID),""));
121 
122  values->push_back
123  (G4AttValue("PhiCellID",G4UIcommand::ConvertToString(fPhiCellID),""));
124 
125  values->push_back
126  (G4AttValue("Energy",G4BestUnit(fEdep,"Energy"),""));
127 
128  values->push_back
129  (G4AttValue("ETrack",G4BestUnit(fEdepByATrack,"Energy"),""));
130 
131  values->push_back
132  (G4AttValue("Pos",G4BestUnit(fPos,"Length"),""));
133 
134  if (fPLogV)
135  values->push_back
136  (G4AttValue("LVol",fPLogV->GetName(),""));
137  else
138  values->push_back
139  (G4AttValue("LVol"," ",""));
140 
141  return values;
142 }
static G4String ConvertToString(G4bool boolVal)
Definition: G4UIcommand.cc:372
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
const G4String & GetName() const

Here is the call graph for this function:

void RE01CalorimeterHit::Draw ( )
virtual

Reimplemented from G4VHit.

Definition at line 60 of file RE01CalorimeterHit.cc.

61 {
63  if(pVVisManager)
64  {
65  G4Transform3D trans(fRot,fPos);
66  G4VisAttributes attribs;
67  const G4VisAttributes* pVA = fPLogV->GetVisAttributes();
68  if(pVA) attribs = *pVA;
69  G4Colour colour(1.,0.,0.);
70  attribs.SetColour(colour);
71  attribs.SetForceWireframe(false);
72  attribs.SetForceSolid(true);
73  pVVisManager->Draw(*fPLogV,attribs,trans);
74  }
75 }
virtual void Draw(const G4Circle &, const G4Transform3D &objectTransformation=G4Transform3D())=0
void SetColour(const G4Colour &)
static G4VVisManager * GetConcreteInstance()
void SetForceSolid(G4bool=true)
const G4VisAttributes * GetVisAttributes() const
void SetForceWireframe(G4bool=true)

Here is the call graph for this function:

const std::map< G4String, G4AttDef > * RE01CalorimeterHit::GetAttDefs ( ) const
virtual

Reimplemented from G4VHit.

Definition at line 78 of file RE01CalorimeterHit.cc.

79 {
80  G4bool isNew;
81  std::map<G4String,G4AttDef>* store
82  = G4AttDefStore::GetInstance("RE01CalorimeterHit",isNew);
83  if (isNew) {
84  G4String hitType("HitType");
85  (*store)[hitType] = G4AttDef(hitType,"Hit Type","Physics","","G4String");
86 
87  G4String zCellID("ZCellID");
88  (*store)[zCellID] = G4AttDef(zCellID,"Z Cell ID","Physics","","G4int");
89 
90  G4String phiCellID("PhiCellID");
91  (*store)[phiCellID] = G4AttDef(phiCellID,"Phi Cell ID","Physics","","G4int");
92 
93  G4String energy("Energy");
94  (*store)[energy] = G4AttDef(energy,"Energy Deposited","Physics","G4BestUnit",
95  "G4double");
96 
97  G4String eTrack("ETrack");
98  (*store)[eTrack] = G4AttDef(eTrack,"Energy Deposited By Track","Physics",
99  "G4BestUnit","G4double");
100 
101  G4String pos("Pos");
102  (*store)[pos] = G4AttDef(pos, "Position",
103  "Physics","G4BestUnit","G4ThreeVector");
104 
105  G4String lvol("LVol");
106  (*store)[lvol] = G4AttDef(lvol,"Logical Volume","Physics","","G4String");
107  }
108 
109  return store;
110 }
bool G4bool
Definition: G4Types.hh:79
G4double energy(const ThreeVector &p, const G4double m)
std::map< G4String, G4AttDef > * GetInstance(const G4String &storeKey, G4bool &isNew)
static const G4double pos

Here is the call graph for this function:

G4double RE01CalorimeterHit::GetEdep ( )
inline

Definition at line 69 of file RE01CalorimeterHit.hh.

70  { return fEdep; }
G4double RE01CalorimeterHit::GetEdepByATrack ( )
inline

Definition at line 71 of file RE01CalorimeterHit.hh.

72  { return fEdepByATrack; }
G4int RE01CalorimeterHit::GetPhi ( )
inline

Definition at line 64 of file RE01CalorimeterHit.hh.

64 { return fPhiCellID; }
RE01TrackInformation* RE01CalorimeterHit::GetTrackInformation ( )
inline

Definition at line 85 of file RE01CalorimeterHit.hh.

86  { return &fTrackInfo; }
G4int RE01CalorimeterHit::GetZ ( )
inline

Definition at line 63 of file RE01CalorimeterHit.hh.

63 { return fZCellID; }
void RE01CalorimeterHit::operator delete ( void aHit)
inline

Definition at line 111 of file RE01CalorimeterHit.hh.

112 {
113  RE01CalorimeterHitAllocator->FreeSingle((RE01CalorimeterHit*) aHit);
114 }
G4ThreadLocal G4Allocator< RE01CalorimeterHit > * RE01CalorimeterHitAllocator
void * RE01CalorimeterHit::operator new ( size_t  )
inline

Definition at line 104 of file RE01CalorimeterHit.hh.

105 {
108  return (void *) RE01CalorimeterHitAllocator->MallocSingle();
109 }
G4ThreadLocal G4Allocator< RE01CalorimeterHit > * RE01CalorimeterHitAllocator
void RE01CalorimeterHit::Print ( void  )
virtual

Reimplemented from G4VHit.

Definition at line 145 of file RE01CalorimeterHit.cc.

146 {
147  G4cout << "Cell[" << fZCellID << "," << fPhiCellID << "] "
148  << fEdep/GeV << " [GeV]" << G4endl;
149 }
G4GLOB_DLL std::ostream G4cout
static constexpr double GeV
Definition: G4SIunits.hh:217
#define G4endl
Definition: G4ios.hh:61
void RE01CalorimeterHit::SetEdep ( G4double  de)
inline

Definition at line 65 of file RE01CalorimeterHit.hh.

66  { fEdep = de; fEdepByATrack = de; }

Here is the caller graph for this function:

void RE01CalorimeterHit::SetPos ( G4ThreeVector  xyz)
inline

Definition at line 75 of file RE01CalorimeterHit.hh.

76  { fPos = xyz; }

Here is the caller graph for this function:

void RE01CalorimeterHit::SetRot ( G4RotationMatrix  rmat)
inline

Definition at line 77 of file RE01CalorimeterHit.hh.

78  { fRot = rmat; }

Here is the caller graph for this function:

void RE01CalorimeterHit::SetTrackInformation ( const G4Track aTrack)
inline

Definition at line 79 of file RE01CalorimeterHit.hh.

80  {
81  RE01TrackInformation* anInfo =
83  fTrackInfo = *anInfo;
84  }
G4VUserTrackInformation * GetUserInformation() const

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following files: