File indexing completed on 2023-03-17 11:24:40
0001 #include "SimG4CMS/ShowerLibraryProducer/interface/HFShowerG4Hit.h"
0002
0003 #include <iostream>
0004
0005 G4ThreadLocal G4Allocator<HFShowerG4Hit>* fHFShowerG4HitAllocator = nullptr;
0006
0007 HFShowerG4Hit::HFShowerG4Hit() : theHitId(0), theTrackId(0), theEdep(0), theTime(0) {}
0008
0009 HFShowerG4Hit::HFShowerG4Hit(G4int hitId, G4int tkID, double edep, double time)
0010 : theHitId(hitId), theTrackId(tkID), theEdep(edep), theTime(time) {}
0011
0012 HFShowerG4Hit::~HFShowerG4Hit() {}
0013
0014 HFShowerG4Hit::HFShowerG4Hit(const HFShowerG4Hit& right) {
0015 theHitId = right.theHitId;
0016 theTrackId = right.theTrackId;
0017 theEdep = right.theEdep;
0018 theTime = right.theTime;
0019 localPos = right.localPos;
0020 globalPos = right.globalPos;
0021 momDir = right.momDir;
0022 }
0023
0024 const HFShowerG4Hit& HFShowerG4Hit::operator=(const HFShowerG4Hit& right) {
0025 theHitId = right.theHitId;
0026 theTrackId = right.theTrackId;
0027 theEdep = right.theEdep;
0028 theTime = right.theTime;
0029 localPos = right.localPos;
0030 globalPos = right.globalPos;
0031 momDir = right.momDir;
0032 return *this;
0033 }
0034
0035 int HFShowerG4Hit::operator==(const HFShowerG4Hit& right) const { return (this == &right) ? 1 : 0; }
0036
0037 std::ostream& operator<<(std::ostream& os, const HFShowerG4Hit& hit) {
0038 os << " Data of this HFShowerG4Hit: ID " << hit.hitId() << " Track ID " << hit.trackId() << " Edep " << hit.edep()
0039 << " Time " << hit.time() << " Position (Local) " << hit.localPosition() << ", "
0040 << " (Global) " << hit.globalPosition() << " Momentum " << hit.primaryMomDir() << "\n";
0041 return os;
0042 }