CMS 3D CMS Logo

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