CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
G4int depth() const
Definition: FiberG4Hit.h:45
G4double theTime
Definition: FiberG4Hit.h:31
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:167
G4int operator==(const FiberG4Hit &right) const
Definition: FiberG4Hit.cc:36
G4int theTowerId
Definition: FiberG4Hit.h:27
G4int towerId() const
Definition: FiberG4Hit.h:44
G4double time() const
Definition: FiberG4Hit.h:49
const FiberG4Hit & operator=(const FiberG4Hit &right)
Definition: FiberG4Hit.cc:26
math::XYZPoint hitPos() const
Definition: FiberG4Hit.h:48
const G4LogicalVolume * theLogV
Definition: FiberG4Hit.h:34
G4int theNpe
Definition: FiberG4Hit.h:30
G4int npe() const
Definition: FiberG4Hit.h:47
math::XYZPoint theHitPos
Definition: FiberG4Hit.h:32
G4ThreadLocal G4Allocator< FiberG4Hit > * fFiberG4HitAllocator
Definition: FiberG4Hit.cc:4
G4int theDepth
Definition: FiberG4Hit.h:28
G4int trackId() const
Definition: FiberG4Hit.h:46