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 }
HFShowerG4Hit.h
HFShowerG4Hit::theHitId
G4int theHitId
Definition: HFShowerG4Hit.h:28
HFShowerG4Hit::HFShowerG4Hit
HFShowerG4Hit()
Definition: HFShowerG4Hit.cc:7
protons_cff.time
time
Definition: protons_cff.py:39
operator<<
std::ostream & operator<<(std::ostream &os, const HFShowerG4Hit &hit)
Definition: HFShowerG4Hit.cc:37
HFShowerG4Hit::theTime
G4double theTime
Definition: HFShowerG4Hit.h:31
HFShowerG4Hit::momDir
G4ThreeVector momDir
Definition: HFShowerG4Hit.h:34
HFShowerG4Hit
Definition: HFShowerG4Hit.h:15
HFShowerG4Hit::localPos
G4ThreeVector localPos
Definition: HFShowerG4Hit.h:32
HFShowerG4Hit::theEdep
G4double theEdep
Definition: HFShowerG4Hit.h:30
HFShowerG4Hit::~HFShowerG4Hit
~HFShowerG4Hit() override
Definition: HFShowerG4Hit.cc:12
HFShowerG4Hit::globalPos
G4ThreeVector globalPos
Definition: HFShowerG4Hit.h:33
fHFShowerG4HitAllocator
G4ThreadLocal G4Allocator< HFShowerG4Hit > * fHFShowerG4HitAllocator
Definition: HFShowerG4Hit.cc:5
HFShowerG4Hit::theTrackId
G4int theTrackId
Definition: HFShowerG4Hit.h:29
HFShowerG4Hit::operator==
G4int operator==(const HFShowerG4Hit &right) const
Definition: HFShowerG4Hit.cc:35
HFShowerG4Hit::operator=
const HFShowerG4Hit & operator=(const HFShowerG4Hit &right)
Definition: HFShowerG4Hit.cc:24
hit
Definition: SiStripHitEffFromCalibTree.cc:88