CMS 3D CMS Logo

FiberG4Hit.cc
Go to the documentation of this file.
2 #include <iostream>
3 
4 G4ThreadLocal G4Allocator<FiberG4Hit>* fFiberG4HitAllocator = nullptr;
5 
6 FiberG4Hit::FiberG4Hit() : theTowerId(0), theDepth(0), theTrackId(0), theNpe(0), theTime(0), theLogV(nullptr) {
7  theHitPos.SetCoordinates(0., 0., 0.);
8 }
9 
10 FiberG4Hit::FiberG4Hit(G4LogicalVolume* logVol, G4int tower, G4int depth, G4int tkID)
11  : theTowerId(tower), theDepth(depth), theTrackId(tkID), theNpe(0), theTime(0), theLogV(logVol) {
12  theHitPos.SetCoordinates(0., 0., 0.);
13 }
14 
16 
18  theTowerId = right.theTowerId;
19  theDepth = right.theDepth;
20  theNpe = right.theNpe;
21  theTime = right.theTime;
22  theHitPos = right.theHitPos;
23  theLogV = right.theLogV;
24 }
25 
27  theTowerId = right.theTowerId;
28  theDepth = right.theDepth;
29  theNpe = right.theNpe;
30  theTime = right.theTime;
31  theHitPos = right.theHitPos;
32  theLogV = right.theLogV;
33  return *this;
34 }
35 
36 int FiberG4Hit::operator==(const FiberG4Hit& right) const { return (this == &right) ? 1 : 0; }
37 
38 std::ostream& operator<<(std::ostream& os, const FiberG4Hit& hit) {
39  os << " Data of this FiberG4Hit are:\n"
40  << " TowerId ID: " << hit.towerId() << "\n"
41  << " Depth : " << hit.depth() << "\n"
42  << " Track ID : " << hit.trackId() << "\n"
43  << " Nb. of Cerenkov Photons : " << hit.npe() << "\n"
44  << " Time :" << hit.time() << " at " << hit.hitPos() << "\n"
45  << "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n";
46  return os;
47 }
~FiberG4Hit() override
Definition: FiberG4Hit.cc:15
G4double theTime
Definition: FiberG4Hit.h:31
G4int operator==(const FiberG4Hit &right) const
Definition: FiberG4Hit.cc:36
G4int theTowerId
Definition: FiberG4Hit.h:27
std::ostream & operator<<(std::ostream &os, const FiberG4Hit &hit)
Definition: FiberG4Hit.cc:38
G4ThreadLocal G4Allocator< FiberG4Hit > * fFiberG4HitAllocator
Definition: FiberG4Hit.cc:4
const FiberG4Hit & operator=(const FiberG4Hit &right)
Definition: FiberG4Hit.cc:26
const G4LogicalVolume * theLogV
Definition: FiberG4Hit.h:34
G4int theNpe
Definition: FiberG4Hit.h:30
math::XYZPoint theHitPos
Definition: FiberG4Hit.h:32
G4int theDepth
Definition: FiberG4Hit.h:28