CMS 3D CMS Logo

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