ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
ZDC_SimFiberHit Class Reference

#include <ZDC_SimFiberHit.h>

Collaboration diagram for ZDC_SimFiberHit:

Public Member Functions

 ZDC_SimFiberHit ()
 Default constructor. More...
 
 ZDC_SimFiberHit (Identifier id, int nphot, double edep)
 Standard constructor. More...
 
 ZDC_SimFiberHit (const ZDC_SimFiberHit &right)
 Copy constructor. More...
 
Identifier getID () const
 
double getEdep () const
 
int getNPhotons () const
 
ZDC_SimFiberHitoperator= (const ZDC_SimFiberHit &right)
 Assignment operator. More...
 
bool operator== (const ZDC_SimFiberHit &h) const
 Just for checking if the ID is the same. More...
 
bool operator< (const ZDC_SimFiberHit &h) const
 Check if the ID is less than the compared hit. More...
 
ZDC_SimFiberHit operator+ (const ZDC_SimFiberHit &h)
 Addition operator. More...
 
ZDC_SimFiberHit operator+= (const ZDC_SimFiberHit &h)
 
void Add (int nphot, double edep)
 
void Add (ZDC_SimFiberHit &h)
 
bool Equals (const ZDC_SimFiberHit &h) const
 

Private Attributes

Identifier m_ID
 
int m_Nphotons
 
double m_Edep
 

Detailed Description

Definition at line 10 of file ZDC_SimFiberHit.h.

Constructor & Destructor Documentation

◆ ZDC_SimFiberHit() [1/3]

ZDC_SimFiberHit::ZDC_SimFiberHit ( )
inline

Default constructor.

Should never be used

Definition at line 17 of file ZDC_SimFiberHit.h.

18  : m_ID(Identifier()),
19  m_Nphotons(-1),
20  m_Edep(-1)
21  {}

◆ ZDC_SimFiberHit() [2/3]

ZDC_SimFiberHit::ZDC_SimFiberHit ( Identifier  id,
int  nphot,
double  edep 
)
inline

Standard constructor.

Parameters
idVolume identifier
nphotNumber of photons generated in this volume
edepEnergy deposited as light in this volume

Definition at line 29 of file ZDC_SimFiberHit.h.

30  : m_ID(id),
31  m_Nphotons(nphot),
32  m_Edep(edep)
33  {}

◆ ZDC_SimFiberHit() [3/3]

ZDC_SimFiberHit::ZDC_SimFiberHit ( const ZDC_SimFiberHit right)
inline

Copy constructor.

Definition at line 36 of file ZDC_SimFiberHit.h.

37  : m_ID (right.m_ID),
38  m_Nphotons (right.m_Nphotons),
39  m_Edep (right.m_Edep)
40  {
41  }

Member Function Documentation

◆ Add() [1/2]

void ZDC_SimFiberHit::Add ( int  nphot,
double  edep 
)
inline

Definition at line 99 of file ZDC_SimFiberHit.h.

99  {
100  m_Nphotons += nphot;
101  m_Edep += edep;
102  }

◆ Add() [2/2]

void ZDC_SimFiberHit::Add ( ZDC_SimFiberHit h)
inline

Definition at line 104 of file ZDC_SimFiberHit.h.

104  {
105  m_Nphotons += h.m_Nphotons;
106  m_Edep += h.m_Edep;
107  }

◆ Equals()

bool ZDC_SimFiberHit::Equals ( const ZDC_SimFiberHit h) const
inline

Definition at line 110 of file ZDC_SimFiberHit.h.

110  {
111  return (m_ID == h.m_ID);
112  };

◆ getEdep()

double ZDC_SimFiberHit::getEdep ( ) const
inline

Definition at line 45 of file ZDC_SimFiberHit.h.

45 { return m_Edep; }

◆ getID()

Identifier ZDC_SimFiberHit::getID ( ) const
inline

Definition at line 44 of file ZDC_SimFiberHit.h.

44 { return m_ID; }

◆ getNPhotons()

int ZDC_SimFiberHit::getNPhotons ( ) const
inline

Definition at line 46 of file ZDC_SimFiberHit.h.

46 { return m_Nphotons; }

◆ operator+()

ZDC_SimFiberHit ZDC_SimFiberHit::operator+ ( const ZDC_SimFiberHit h)
inline

Addition operator.

Parameters
h
Returns

Definition at line 84 of file ZDC_SimFiberHit.h.

84  {
85  return ZDC_SimFiberHit(m_ID, m_Nphotons + h.m_Nphotons, m_Edep + h.m_Edep);
86  }

◆ operator+=()

ZDC_SimFiberHit ZDC_SimFiberHit::operator+= ( const ZDC_SimFiberHit h)
inline
Parameters
h
Returns

Definition at line 93 of file ZDC_SimFiberHit.h.

93  {
94  m_Nphotons += h.m_Nphotons;
95  m_Edep += h.m_Edep;
96  return *this;
97  }

◆ operator<()

bool ZDC_SimFiberHit::operator< ( const ZDC_SimFiberHit h) const
inline

Check if the ID is less than the compared hit.

If they are the same, check if Nphotons is less than the compared hit

Parameters
hHit being compared against
Returns
True if the ID or Nphotons is less than the compared hit. False otherwise

Definition at line 71 of file ZDC_SimFiberHit.h.

71  {
72  if(m_ID != h.m_ID){
73  return m_ID < h.m_ID;
74  }else{
75  return m_Nphotons < h.m_Nphotons;
76  }
77  }

◆ operator=()

ZDC_SimFiberHit& ZDC_SimFiberHit::operator= ( const ZDC_SimFiberHit right)
inline

Assignment operator.

Definition at line 51 of file ZDC_SimFiberHit.h.

52  {
53  m_ID = right.m_ID;
54  m_Nphotons = right.m_Nphotons;
55  m_Edep = right.m_Edep;
56  return *this;
57  }

◆ operator==()

bool ZDC_SimFiberHit::operator== ( const ZDC_SimFiberHit h) const
inline

Just for checking if the ID is the same.

Definition at line 62 of file ZDC_SimFiberHit.h.

62  {
63  return (m_ID == h.m_ID);
64  }

Member Data Documentation

◆ m_Edep

double ZDC_SimFiberHit::m_Edep
private

Definition at line 119 of file ZDC_SimFiberHit.h.

◆ m_ID

Identifier ZDC_SimFiberHit::m_ID
private

Definition at line 117 of file ZDC_SimFiberHit.h.

◆ m_Nphotons

int ZDC_SimFiberHit::m_Nphotons
private

Definition at line 118 of file ZDC_SimFiberHit.h.


The documentation for this class was generated from the following file:
ZDC_SimFiberHit::m_Nphotons
int m_Nphotons
Definition: ZDC_SimFiberHit.h:118
ZDC_SimFiberHit::m_ID
Identifier m_ID
Definition: ZDC_SimFiberHit.h:112
h
ZDC_SimFiberHit::m_Edep
double m_Edep
Definition: ZDC_SimFiberHit.h:119
ZDC_SimFiberHit::ZDC_SimFiberHit
ZDC_SimFiberHit()
Default constructor.
Definition: ZDC_SimFiberHit.h:17
Identifier
Definition: IdentifierFieldParser.cxx:14