CMS 3D CMS Logo

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 }
CaloGVHit
Definition: CaloGVHit.h:30
operator<<
std::ostream & operator<<(std::ostream &os, const CaloGVHit &hit)
Definition: CaloGVHit.cc:36
CaloGVHit::~CaloGVHit
~CaloGVHit()
Definition: CaloGVHit.cc:12
CaloGVHit::CaloGVHit
CaloGVHit()
Definition: CaloGVHit.cc:6
CaloGVHit::hadr_
double hadr_
Definition: CaloGVHit.h:66
CaloGVHit.h
CaloGVHit::eventID_
int eventID_
Definition: CaloGVHit.h:64
CaloGVHit::addEnergyDeposit
void addEnergyDeposit(double em, double hd)
Definition: CaloGVHit.cc:29
CaloGVHit::getHadr
double getHadr() const
Definition: CaloGVHit.h:42
CaloGVHit::getEM
double getEM() const
Definition: CaloGVHit.h:39
CaloGVHit::elem_
double elem_
Definition: CaloGVHit.h:65
CaloGVHit::hitID_
CaloHitID hitID_
Definition: CaloGVHit.h:67
hit
Definition: SiStripHitEffFromCalibTree.cc:88
CaloGVHit::operator=
const CaloGVHit & operator=(const CaloGVHit &right)
Definition: CaloGVHit.cc:21