CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CaloGVHit.cc
Go to the documentation of this file.
2 #include <iostream>
3 
4 #include "G4SystemOfUnits.hh"
5 
7  eventID_ = 0;
8  elem_ = 0.;
9  hadr_ = 0.;
10 }
11 
13 
15  eventID_ = right.eventID_;
16  elem_ = right.elem_;
17  hadr_ = right.hadr_;
18  hitID_ = right.hitID_;
19 }
20 
22  eventID_ = right.eventID_;
23  elem_ = right.elem_;
24  hadr_ = right.hadr_;
25  hitID_ = right.hitID_;
26  return *this;
27 }
28 
29 void CaloGVHit::addEnergyDeposit(double em, double hd) {
30  elem_ += em;
31  hadr_ += hd;
32 }
33 
34 void CaloGVHit::addEnergyDeposit(const CaloGVHit& aHit) { addEnergyDeposit(aHit.getEM(), aHit.getHadr()); }
35 
36 std::ostream& operator<<(std::ostream& os, const CaloGVHit& hit) {
37  os << " Data of this CaloGVHit are:"
38  << " EventID: " << hit.getEventID() << " HitID: " << hit.getID() << " EnergyDeposit (EM): " << hit.getEM()
39  << " (Had): " << hit.getHadr() << "\n";
40  return os;
41 }
CaloHitID getID() const
Definition: CaloGVHit.h:54
const CaloGVHit & operator=(const CaloGVHit &right)
Definition: CaloGVHit.cc:21
int eventID_
Definition: CaloGVHit.h:64
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:167
int getEventID() const
Definition: CaloGVHit.h:45
double getEM() const
Definition: CaloGVHit.h:39
~CaloGVHit()
Definition: CaloGVHit.cc:12
double getHadr() const
Definition: CaloGVHit.h:42
void addEnergyDeposit(double em, double hd)
Definition: CaloGVHit.cc:29
double hadr_
Definition: CaloGVHit.h:66
CaloGVHit()
Definition: CaloGVHit.cc:6
CaloHitID hitID_
Definition: CaloGVHit.h:67
double elem_
Definition: CaloGVHit.h:65