ATLAS Offline Software
CaloHadDMCoeff2.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef CALOCONDITIONS_CALOHADDMCOEFF2_H
6 #define CALOCONDITIONS_CALOHADDMCOEFF2_H
7 
18 #include "AthenaKernel/CLASS_DEF.h"
19 #include <vector>
20 #include <string>
21 #include <fstream>
22 
24  public:
27  struct HadDMDimension {
28  std::string m_title;
29  int m_type;
30  int m_nbins;
31  float m_vMin;
32  float m_vMax;
33  float m_bin_size;
34  int xloc;
35  std::vector<float > m_vBins;
36 
37  HadDMDimension() : m_type(0), m_nbins(0), m_vMin(0.0), m_vMax(0.0), m_bin_size(0.0), xloc(0) {};
38  };
39  struct HadDMArea {
40  std::string m_title;
41  int m_indx;
42  int m_is_on;
43  int m_type;
44  int m_nPars;
45  int m_offset;
46  int m_length;
51 
52  HadDMArea() : m_indx(0), m_is_on(0), m_type(0), m_nPars(0), m_offset(0), m_length(0) {};
53  };
54  typedef std::vector<float> HadDMCoeff;
55 
56  // Default Constructor
60 
61  // methods to deal with DM areas
62  inline int getSizeDMAreaSet() const { return (int)m_DMAreaSet.size(); }
63  void addHadDMArea(const HadDMArea & theArea);
64  void setHadDMArea(const int n_area, const HadDMArea & theArea);
65  const HadDMArea * getHadDMArea(int n_area) const;
66 
67  // methods to deal with DM coefficients
68  inline int getSizeDMCoeffSet() const { return (int)m_DMCoeffSet.size(); }
69  void addHadDMCoeff(const HadDMCoeff & theData);
70  void setHadDMCoeff(const int iBin, const HadDMCoeff & theData);
71  const HadDMCoeff * getHadDMCoeff(const int & iBin) const;
72  const HadDMCoeff * getHadDMCoeff(const int & n_area, const float & cls_emfrac, const float & cls_ener, const float & cls_lambda, const float & cls_eta) const;
73 
74  // methods to get DM coefficients bin number
75  int getBinFrac(const int dm_area, const float & cls_frac) const;
76  int getBinEner(const int dm_area, const float & cls_ener) const;
77  int getBinLambda(const int dm_area, const float & cls_lambda) const;
78  int getBinEta(const int dm_area, const float & cls_eta) const;
79  int getBin(const int n_area, const float &cls_em_frac, const float &cls_energy, const float &cls_lambda, const float &cls_eta) const;
80 
81  // Accessories
82  void PrintData(std::ostream &ff) const;
83  int bin2indexes(const int iBin, std::vector<int> &v_dim_indx) const;
84 
85  private:
86  std::vector<HadDMCoeff> m_DMCoeffSet;
87  std::vector<HadDMArea> m_DMAreaSet;
88  std::vector<int > m_area_offsets;
89 };
90 //Class Identifier obtained by
91 //'clid CaloHadDMCoeff2'
92 CLASS_DEF(CaloHadDMCoeff2, 249025083,1)
93 
94 #endif
CaloHadDMCoeff2::kAREA_SMPW
@ kAREA_SMPW
Definition: CaloHadDMCoeff2.h:26
CaloHadDMCoeff2::HadDMDimension::m_vMax
float m_vMax
Definition: CaloHadDMCoeff2.h:32
CaloHadDMCoeff2::HadDMDimension::m_bin_size
float m_bin_size
Definition: CaloHadDMCoeff2.h:33
CaloHadDMCoeff2::getSizeDMAreaSet
int getSizeDMAreaSet() const
Definition: CaloHadDMCoeff2.h:62
CaloHadDMCoeff2::HadDMArea::m_is_on
int m_is_on
Definition: CaloHadDMCoeff2.h:42
CaloHadDMCoeff2::kDIM_HAND
@ kDIM_HAND
Definition: CaloHadDMCoeff2.h:25
CaloHadDMCoeff2::kAREA_LOOKUP
@ kAREA_LOOKUP
Definition: CaloHadDMCoeff2.h:26
CaloHadDMCoeff2::CaloHadDMCoeff2
CaloHadDMCoeff2()
CaloHadDMCoeff2
Dead material correction coefficients.
Definition: CaloHadDMCoeff2.h:23
CaloHadDMCoeff2::setHadDMArea
void setHadDMArea(const int n_area, const HadDMArea &theArea)
Definition: CaloHadDMCoeff2.cxx:45
CaloHadDMCoeff2::PrintData
void PrintData(std::ostream &ff) const
Definition: CaloHadDMCoeff2.cxx:199
CaloHadDMCoeff2::getBin
int getBin(const int n_area, const float &cls_em_frac, const float &cls_energy, const float &cls_lambda, const float &cls_eta) const
Definition: CaloHadDMCoeff2.cxx:126
CaloHadDMCoeff2::HadDMArea::m_offset
int m_offset
Definition: CaloHadDMCoeff2.h:45
CaloHadDMCoeff2::bin2indexes
int bin2indexes(const int iBin, std::vector< int > &v_dim_indx) const
Definition: CaloHadDMCoeff2.cxx:168
CaloHadDMCoeff2::addHadDMCoeff
void addHadDMCoeff(const HadDMCoeff &theData)
Definition: CaloHadDMCoeff2.cxx:63
CaloHadDMCoeff2::HadDMArea::m_dimEta
HadDMDimension m_dimEta
Definition: CaloHadDMCoeff2.h:50
CaloHadDMCoeff2::m_DMCoeffSet
std::vector< HadDMCoeff > m_DMCoeffSet
Definition: CaloHadDMCoeff2.h:86
CaloHadDMCoeff2::HadDMDimension::HadDMDimension
HadDMDimension()
Definition: CaloHadDMCoeff2.h:37
CaloHadDMCoeff2::HadDMArea
Definition: CaloHadDMCoeff2.h:39
CaloHadDMCoeff2::HadDMDimension::m_nbins
int m_nbins
Definition: CaloHadDMCoeff2.h:30
CaloHadDMCoeff2::HadDMDimension::m_vBins
std::vector< float > m_vBins
Definition: CaloHadDMCoeff2.h:35
CaloHadDMCoeff2::getBinEta
int getBinEta(const int dm_area, const float &cls_eta) const
Definition: CaloHadDMCoeff2.cxx:117
CaloHadDMCoeff2::setHadDMCoeff
void setHadDMCoeff(const int iBin, const HadDMCoeff &theData)
Definition: CaloHadDMCoeff2.cxx:68
CaloHadDMCoeff2::key_area_type
key_area_type
Definition: CaloHadDMCoeff2.h:26
CaloHadDMCoeff2::getHadDMArea
const HadDMArea * getHadDMArea(int n_area) const
Definition: CaloHadDMCoeff2.cxx:50
D3PDSizeSummary.ff
ff
Definition: D3PDSizeSummary.py:305
CaloHadDMCoeff2::HadDMArea::HadDMArea
HadDMArea()
Definition: CaloHadDMCoeff2.h:52
CaloHadDMCoeff2::operator=
CaloHadDMCoeff2 & operator=(const CaloHadDMCoeff2 &other)
Definition: CaloHadDMCoeff2.cxx:25
CaloHadDMCoeff2::HadDMDimension
Definition: CaloHadDMCoeff2.h:27
CaloHadDMCoeff2::m_DMAreaSet
std::vector< HadDMArea > m_DMAreaSet
Definition: CaloHadDMCoeff2.h:87
CaloHadDMCoeff2::key_dim_type
key_dim_type
Definition: CaloHadDMCoeff2.h:25
CaloHadDMCoeff2::HadDMArea::m_type
int m_type
Definition: CaloHadDMCoeff2.h:43
CaloHadDMCoeff2::HadDMArea::m_indx
int m_indx
Definition: CaloHadDMCoeff2.h:41
CaloHadDMCoeff2::HadDMArea::m_title
std::string m_title
Definition: CaloHadDMCoeff2.h:40
CaloHadDMCoeff2::kAREA_PROF
@ kAREA_PROF
Definition: CaloHadDMCoeff2.h:26
CaloHadDMCoeff2::HadDMArea::m_dimLambda
HadDMDimension m_dimLambda
Definition: CaloHadDMCoeff2.h:49
CaloHadDMCoeff2::getHadDMCoeff
const HadDMCoeff * getHadDMCoeff(const int &iBin) const
Definition: CaloHadDMCoeff2.cxx:73
CaloHadDMCoeff2::CaloHadDMCoeff2
CaloHadDMCoeff2(const CaloHadDMCoeff2 &other)
CaloHadDMCoeff2::HadDMArea::m_dimFrac
HadDMDimension m_dimFrac
Definition: CaloHadDMCoeff2.h:47
CaloHadDMCoeff2::getBinEner
int getBinEner(const int dm_area, const float &cls_ener) const
Definition: CaloHadDMCoeff2.cxx:96
CaloHadDMCoeff2::HadDMArea::m_dimEner
HadDMDimension m_dimEner
Definition: CaloHadDMCoeff2.h:48
CaloHadDMCoeff2::HadDMCoeff
std::vector< float > HadDMCoeff
Definition: CaloHadDMCoeff2.h:54
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
CaloHadDMCoeff2::addHadDMArea
void addHadDMArea(const HadDMArea &theArea)
Definition: CaloHadDMCoeff2.cxx:39
CaloHadDMCoeff2::getBinFrac
int getBinFrac(const int dm_area, const float &cls_frac) const
Definition: CaloHadDMCoeff2.cxx:88
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
CaloHadDMCoeff2::HadDMArea::m_length
int m_length
Definition: CaloHadDMCoeff2.h:46
CaloHadDMCoeff2::HadDMDimension::m_type
int m_type
Definition: CaloHadDMCoeff2.h:29
CaloHadDMCoeff2::HadDMArea::m_nPars
int m_nPars
Definition: CaloHadDMCoeff2.h:44
CaloHadDMCoeff2::HadDMDimension::xloc
int xloc
Definition: CaloHadDMCoeff2.h:34
CaloHadDMCoeff2::getBinLambda
int getBinLambda(const int dm_area, const float &cls_lambda) const
Definition: CaloHadDMCoeff2.cxx:109
CaloHadDMCoeff2::getSizeDMCoeffSet
int getSizeDMCoeffSet() const
Definition: CaloHadDMCoeff2.h:68
CaloHadDMCoeff2::HadDMDimension::m_vMin
float m_vMin
Definition: CaloHadDMCoeff2.h:31
CaloHadDMCoeff2::m_area_offsets
std::vector< int > m_area_offsets
Definition: CaloHadDMCoeff2.h:88
CaloHadDMCoeff2::kDIM_FLAT
@ kDIM_FLAT
Definition: CaloHadDMCoeff2.h:25
CLASS_DEF.h
macros to associate a CLID to a type
CaloHadDMCoeff2::HadDMDimension::m_title
std::string m_title
Definition: CaloHadDMCoeff2.h:28