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 }
operator<<
std::ostream & operator<<(std::ostream &os, const FiberG4Hit &hit)
Definition: FiberG4Hit.cc:38
FiberG4Hit::theTowerId
G4int theTowerId
Definition: FiberG4Hit.h:27
FiberG4Hit::operator=
const FiberG4Hit & operator=(const FiberG4Hit &right)
Definition: FiberG4Hit.cc:26
hgcalTowerProducer_cfi.tower
tower
Definition: hgcalTowerProducer_cfi.py:3
FiberG4Hit::theLogV
const G4LogicalVolume * theLogV
Definition: FiberG4Hit.h:34
FiberG4Hit::theHitPos
math::XYZPoint theHitPos
Definition: FiberG4Hit.h:32
FiberG4Hit::theNpe
G4int theNpe
Definition: FiberG4Hit.h:30
FiberG4Hit
Definition: FiberG4Hit.h:14
FiberG4Hit::theDepth
G4int theDepth
Definition: FiberG4Hit.h:28
FiberG4Hit.h
fFiberG4HitAllocator
G4ThreadLocal G4Allocator< FiberG4Hit > * fFiberG4HitAllocator
Definition: FiberG4Hit.cc:4
LEDCalibrationChannels.depth
depth
Definition: LEDCalibrationChannels.py:65
FiberG4Hit::theTime
G4double theTime
Definition: FiberG4Hit.h:31
FiberG4Hit::~FiberG4Hit
~FiberG4Hit() override
Definition: FiberG4Hit.cc:15
FiberG4Hit::operator==
G4int operator==(const FiberG4Hit &right) const
Definition: FiberG4Hit.cc:36
FiberG4Hit::FiberG4Hit
FiberG4Hit()
Definition: FiberG4Hit.cc:6
hit
Definition: SiStripHitEffFromCalibTree.cc:88