ATLAS Offline Software
CaloCellPositionShift.h
Go to the documentation of this file.
1 // Dear emacs, this is -*- c++ -*-.
2 
3 /*
4  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5 */
6 
15 #ifndef CALOREC_CALOCELLPOSITIONSHIFT_H
16 #define CALOREC_CALOCELLPOSITIONSHIFT_H
17 
18 
19 #include "AthenaKernel/CLASS_DEF.h"
20 #include "AthenaKernel/CondCont.h"
21 #include <vector>
22 
23 namespace CaloRec {
24 
31  {
32  public:
33  typedef std::vector<float> contType;
34  typedef contType::size_type size_type;
35 
36  //** Default Constructor
38 
39  //** Standard constructor, resize vector and set elements to 0.
41 
42 
43  //** access to shift in X
44  inline float deltaX(const size_type& hashID) const
45  {return m_deltaX[hashID];}
46  //** access to shift in Y
47  inline float deltaY(const size_type& hashID) const
48  {return m_deltaY[hashID];}
49  //** access to shift in Z
50  inline float deltaZ(const size_type& hashID) const
51  {return m_deltaZ[hashID];}
52 
53  //** set dx shift
54  inline void set_deltaX(const size_type& hashID,float dx)
55  {if(hashID<m_deltaX.size()) m_deltaX[hashID]=dx;}
56  //** set dy shift
57  inline void set_deltaY(const size_type& hashID,float dy)
58  {if(hashID<m_deltaY.size()) m_deltaY[hashID]=dy;}
59  //** set dz shift
60  inline void set_deltaZ(const size_type& hashID,float dz)
61  {if(hashID<m_deltaZ.size()) m_deltaZ[hashID]=dz;}
62 
63  //** resize underlying vector (new elements will be 1.0)
64  void resize(const size_type& size);
65 
66  size_type size() const
67  {return m_deltaX.size();}
68 
69  private:
73 
74 
75  };//end class
76 }// end namespace
77 
79 CONDCONT_DEF(CaloRec::CaloCellPositionShift,219045687);
80 
81 #endif
CondCont.h
Hold mappings of ranges to condition objects.
CaloRec::CaloCellPositionShift::set_deltaZ
void set_deltaZ(const size_type &hashID, float dz)
Definition: CaloCellPositionShift.h:60
CaloRec::CaloCellPositionShift::CaloCellPositionShift
CaloCellPositionShift()
Definition: CaloCellPositionShift.h:37
CaloRec::CaloCellPositionShift::size
size_type size() const
Definition: CaloCellPositionShift.h:66
CaloRec::CaloCellPositionShift::size_type
contType::size_type size_type
Definition: CaloCellPositionShift.h:34
CaloRec::CaloCellPositionShift
Container for a cell-level rescaling-factors, typically obtained by Z->ee intercalibration.
Definition: CaloCellPositionShift.h:31
CaloRec::CaloCellPositionShift::contType
std::vector< float > contType
Definition: CaloCellPositionShift.h:33
CaloRec::CaloCellPositionShift::m_deltaZ
contType m_deltaZ
Definition: CaloCellPositionShift.h:72
CaloRec::CaloCellPositionShift::deltaZ
float deltaZ(const size_type &hashID) const
Definition: CaloCellPositionShift.h:50
CaloRec::CaloCellPositionShift::m_deltaX
contType m_deltaX
Definition: CaloCellPositionShift.h:70
CaloRec
Namespace for helper functions.
Definition: CaloCellFactor.h:22
CaloRec::CaloCellPositionShift::resize
void resize(const size_type &size)
Definition: CaloCellPositionShift.cxx:12
makeTRTBarrelCans.dy
tuple dy
Definition: makeTRTBarrelCans.py:21
CaloRec::CaloCellPositionShift::m_deltaY
contType m_deltaY
Definition: CaloCellPositionShift.h:71
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:64
makeTRTBarrelCans.dx
tuple dx
Definition: makeTRTBarrelCans.py:20
CONDCONT_DEF
CONDCONT_DEF(CaloRec::CaloCellPositionShift, 219045687)
CaloRec::CaloCellPositionShift::set_deltaY
void set_deltaY(const size_type &hashID, float dy)
Definition: CaloCellPositionShift.h:57
CaloRec::CaloCellPositionShift::set_deltaX
void set_deltaX(const size_type &hashID, float dx)
Definition: CaloCellPositionShift.h:54
CLASS_DEF.h
macros to associate a CLID to a type
CaloRec::CaloCellPositionShift::deltaX
float deltaX(const size_type &hashID) const
Definition: CaloCellPositionShift.h:44
CaloRec::CaloCellPositionShift::deltaY
float deltaY(const size_type &hashID) const
Definition: CaloCellPositionShift.h:47