Geant4  10.02.p03
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 ()
 
void * operator 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
 

Private Attributes

G4int fZCellID
 
G4int fPhiCellID
 
G4double fEdep
 
G4ThreeVector fPos
 
G4RotationMatrix fRot
 
const G4LogicalVolumefPLogV
 
G4double fEdepByATrack
 
RE01TrackInformation fTrackInfo
 

Detailed Description

Definition at line 49 of file RE01CalorimeterHit.hh.

Constructor & Destructor Documentation

◆ RE01CalorimeterHit()

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 {;}
RE01TrackInformation fTrackInfo
G4VHit()
Definition: G4VHit.cc:34
G4RotationMatrix fRot
const G4LogicalVolume * fPLogV

◆ ~RE01CalorimeterHit()

RE01CalorimeterHit::~RE01CalorimeterHit ( )
virtual

Definition at line 56 of file RE01CalorimeterHit.cc.

57 {;}

Member Function Documentation

◆ AddEdep()

void RE01CalorimeterHit::AddEdep ( G4double  de)
inline

Definition at line 67 of file RE01CalorimeterHit.hh.

68  { fEdep += de; fEdepByATrack += de; }

◆ ClearEdepByATrack()

void RE01CalorimeterHit::ClearEdepByATrack ( )
inline

◆ CreateAttValues()

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
121 
122  values->push_back
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:371
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
const G4String & GetName() const
const G4LogicalVolume * fPLogV
Here is the call graph for this function:

◆ Draw()

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 &)
void SetForceWireframe(G4bool)
static G4VVisManager * GetConcreteInstance()
void SetForceSolid(G4bool)
G4RotationMatrix fRot
const G4VisAttributes * GetVisAttributes() const
const G4LogicalVolume * fPLogV
Here is the call graph for this function:

◆ GetAttDefs()

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 }
double energy
Definition: plottest35.C:25
bool G4bool
Definition: G4Types.hh:79
std::map< G4String, G4AttDef > * GetInstance(const G4String &storeKey, G4bool &isNew)
static const G4double pos
Here is the call graph for this function:

◆ GetEdep()

G4double RE01CalorimeterHit::GetEdep ( )
inline

Definition at line 69 of file RE01CalorimeterHit.hh.

70  { return fEdep; }

◆ GetEdepByATrack()

G4double RE01CalorimeterHit::GetEdepByATrack ( )
inline

Definition at line 71 of file RE01CalorimeterHit.hh.

72  { return fEdepByATrack; }

◆ GetPhi()

G4int RE01CalorimeterHit::GetPhi ( )
inline

Definition at line 64 of file RE01CalorimeterHit.hh.

64 { return fPhiCellID; }

◆ GetTrackInformation()

RE01TrackInformation* RE01CalorimeterHit::GetTrackInformation ( )
inline

Definition at line 85 of file RE01CalorimeterHit.hh.

86  { return &fTrackInfo; }
RE01TrackInformation fTrackInfo

◆ GetZ()

G4int RE01CalorimeterHit::GetZ ( )
inline

Definition at line 63 of file RE01CalorimeterHit.hh.

63 { return fZCellID; }

◆ operator delete()

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

◆ operator new()

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

◆ Print()

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 const double GeV
Definition: G4SIunits.hh:214
#define G4endl
Definition: G4ios.hh:61

◆ SetEdep()

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:

◆ SetPos()

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:

◆ SetRot()

void RE01CalorimeterHit::SetRot ( G4RotationMatrix  rmat)
inline

Definition at line 77 of file RE01CalorimeterHit.hh.

78  { fRot = rmat; }
G4RotationMatrix fRot
Here is the caller graph for this function:

◆ SetTrackInformation()

void RE01CalorimeterHit::SetTrackInformation ( const G4Track *  aTrack)
inline

Definition at line 79 of file RE01CalorimeterHit.hh.

80  {
81  RE01TrackInformation* anInfo =
82  (RE01TrackInformation*)(aTrack->GetUserInformation());
83  fTrackInfo = *anInfo;
84  }
RE01TrackInformation fTrackInfo
Here is the caller graph for this function:

Member Data Documentation

◆ fEdep

G4double RE01CalorimeterHit::fEdep
private

Definition at line 91 of file RE01CalorimeterHit.hh.

◆ fEdepByATrack

G4double RE01CalorimeterHit::fEdepByATrack
private

Definition at line 95 of file RE01CalorimeterHit.hh.

◆ fPhiCellID

G4int RE01CalorimeterHit::fPhiCellID
private

Definition at line 90 of file RE01CalorimeterHit.hh.

◆ fPLogV

const G4LogicalVolume* RE01CalorimeterHit::fPLogV
private

Definition at line 94 of file RE01CalorimeterHit.hh.

◆ fPos

G4ThreeVector RE01CalorimeterHit::fPos
private

Definition at line 92 of file RE01CalorimeterHit.hh.

◆ fRot

G4RotationMatrix RE01CalorimeterHit::fRot
private

Definition at line 93 of file RE01CalorimeterHit.hh.

◆ fTrackInfo

RE01TrackInformation RE01CalorimeterHit::fTrackInfo
private

Definition at line 96 of file RE01CalorimeterHit.hh.

◆ fZCellID

G4int RE01CalorimeterHit::fZCellID
private

Definition at line 89 of file RE01CalorimeterHit.hh.


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