CMS 3D CMS Logo

HFShowerG4Hit.cc
Go to the documentation of this file.
2 
3 #include <iostream>
4 
5 G4ThreadLocal G4Allocator<HFShowerG4Hit>* fHFShowerG4HitAllocator = nullptr;
6 
7 HFShowerG4Hit::HFShowerG4Hit() : theHitId(0), theTrackId(0), theEdep(0), theTime(0) {}
8 
9 HFShowerG4Hit::HFShowerG4Hit(G4int hitId, G4int tkID, double edep, double time)
10  : theHitId(hitId), theTrackId(tkID), theEdep(edep), theTime(time) {}
11 
13 
15  theHitId = right.theHitId;
16  theTrackId = right.theTrackId;
17  theEdep = right.theEdep;
18  theTime = right.theTime;
19  localPos = right.localPos;
20  globalPos = right.globalPos;
21  momDir = right.momDir;
22 }
23 
25  theHitId = right.theHitId;
26  theTrackId = right.theTrackId;
27  theEdep = right.theEdep;
28  theTime = right.theTime;
29  localPos = right.localPos;
30  globalPos = right.globalPos;
31  momDir = right.momDir;
32  return *this;
33 }
34 
35 int HFShowerG4Hit::operator==(const HFShowerG4Hit& right) const { return (this == &right) ? 1 : 0; }
36 
37 std::ostream& operator<<(std::ostream& os, const HFShowerG4Hit& hit) {
38  os << " Data of this HFShowerG4Hit: ID " << hit.hitId() << " Track ID " << hit.trackId() << " Edep " << hit.edep()
39  << " Time " << hit.time() << " Position (Local) " << hit.localPosition() << ", "
40  << " (Global) " << hit.globalPosition() << " Momentum " << hit.primaryMomDir() << "\n";
41  return os;
42 }
G4ThreeVector primaryMomDir() const
Definition: HFShowerG4Hit.h:52
const HFShowerG4Hit & operator=(const HFShowerG4Hit &right)
G4ThreadLocal G4Allocator< HFShowerG4Hit > * fHFShowerG4HitAllocator
Definition: HFShowerG4Hit.cc:5
G4double theEdep
Definition: HFShowerG4Hit.h:30
G4int hitId() const
Definition: HFShowerG4Hit.h:46
G4ThreeVector localPos
Definition: HFShowerG4Hit.h:32
~HFShowerG4Hit() override
G4int operator==(const HFShowerG4Hit &right) const
G4ThreeVector localPosition() const
Definition: HFShowerG4Hit.h:50
G4int trackId() const
Definition: HFShowerG4Hit.h:47
G4double edep() const
Definition: HFShowerG4Hit.h:48
std::ostream & operator<<(std::ostream &os, const HFShowerG4Hit &hit)
G4double theTime
Definition: HFShowerG4Hit.h:31
G4ThreeVector momDir
Definition: HFShowerG4Hit.h:34
G4ThreeVector globalPos
Definition: HFShowerG4Hit.h:33
G4ThreeVector globalPosition() const
Definition: HFShowerG4Hit.h:51
G4double time() const
Definition: HFShowerG4Hit.h:49