LCIO  02.17
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CalorimeterHitImpl.cc
Go to the documentation of this file.
2 
3 namespace IMPL{
4 
6  _cellID0(0),
7  _cellID1(0),
8  _energy(0.),
9  _energyError(0.),
10  _time(0.),
11  _type(0),
12  _rawHit(0) {
13  _position[0] = 0. ;
14  _position[1] = 0. ;
15  _position[2] = 0. ;
16  }
17 
18 
20  }
21 
23  return _cellID0 ;
24  }
25 
27  return _cellID1 ;
28  }
29 
31  return _energy ;
32  }
33 
35  return _energyError ;
36  }
37 
39  return _time ;
40  }
41 
42  const float* CalorimeterHitImpl::getPosition() const {
43  return _position ;
44  }
45 
47  return _type ;
48  }
50  return _rawHit ;
51  }
52 
54  checkAccess("CalorimeterHitImpl::setCellID0") ;
55  _cellID0 = id0 ;
56  }
57 
59  checkAccess("CalorimeterHitImpl::setCellID1") ;
60  _cellID1 = id1 ;
61  }
62 
64  checkAccess("CalorimeterHitImpl::setEnergy") ;
65  _energy = en ;
66  }
67 
69  checkAccess("CalorimeterHitImpl::setEnergyError") ;
70  _energyError = enerr ;
71  }
72 
74  checkAccess("CalorimeterHitImpl::setTime") ;
75  _time = t ;
76  }
77 
78  void CalorimeterHitImpl::setPosition(const float pos[3]){
79  checkAccess("CalorimeterHitImpl::setPosition") ;
80  _position[0] = pos[0] ;
81  _position[1] = pos[1] ;
82  _position[2] = pos[2] ;
83  }
84 
85 
86  void CalorimeterHitImpl::setType(int type) {
87  checkAccess("CalorimeterHitImpl::setType") ;
88  _type = type ;
89  }
90 
92  checkAccess("CalorimeterHitImpl::setRawHit") ;
93  _rawHit = rawHit ;
94  }
95 
96 } // namespace IMPL
The generic object that is held in an LCCollection.
Definition: LCObject.h:30
virtual EVENT::LCObject * getRawHit() const
The RawCalorimeterHit.
void setCellID1(int id1)
Sets the second cell id; Only store if the flag word (bit RCHBIT_ID1) of the collection is set...
void setEnergy(float en)
Sets the energy/amplitude.
CalorimeterHitImpl()
Default constructor, initializes values to 0.
void setRawHit(EVENT::LCObject *rawHit)
virtual float getTime() const
Returns the time of the hit in [ns].
virtual int getCellID1() const
Returns the second detector specific (geometrical) cell id.
void setEnergyError(float enerr)
Sets the error of the hit energy.
virtual ~CalorimeterHitImpl()
Destructor.
virtual int getType() const
Type of hit.
void setTime(float t)
Sets the time.
void setCellID0(int id0)
Sets the first cell id;.
virtual float getEnergy() const
Returns the energy of the hit.
virtual int getCellID0() const
Returns the detector specific (geometrical) cell id.
virtual const float * getPosition() const
Returns the position of the hit in world coordinates.
virtual float getEnergyError() const
Returns the error of the hit energy.
void setPosition(const float pos[3])
Sets the position.