ATLAS Offline Software
CaloHadDMCoeff.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_CALOHADDMCOEFF_H
6 #define CALOCONDITIONS_CALOHADDMCOEFF_H
7 
18 #include "AthenaKernel/CLASS_DEF.h"
19 #include <vector>
20 #include <string>
21 #include <cstdio>
22 
24  public:
25  struct HadDMArea {
26  std::string m_title;
27  int m_indx;
28  int m_is_on;
29  float m_MinFrac;
30  float m_MaxFrac;
31  std::vector<float> m_FracBins;
32  float m_MinEner;
33  float m_MaxEner;
34  std::vector<float> m_EnerBins;
35  float m_MinEta;
36  float m_MaxEta;
37  std::vector<float> m_EtaBins;
38  int m_nPars;
39  int m_offset;
40  HadDMArea() : m_indx(0), m_is_on(0), m_MinFrac(0.0), m_MaxFrac(0.0),
41  m_MinEner(0.0), m_MaxEner(0.0), m_MinEta(0.0), m_MaxEta(0.0),
42  m_nPars(0), m_offset(0) {};
43  };
44  typedef std::vector<float> HadDMCoeff;
45 
50 
51  const HadDMCoeff * getHadDMCoeff(const int & dm_area, const float & cls_emfrac, const float & cls_ener, const float & cls_eta) const;
52  inline const HadDMCoeff * getHadDMCoeff(const int & iBin) const
53  {
54  if ( iBin > -1 && iBin < (int)m_DMCoeffSet.size() ) {
55  return (& m_DMCoeffSet[iBin]);
56  }else{
57  return 0;
58  }
59  }
60 
61  const HadDMArea * getHadDMArea(int n_area) const;
62  void addHadDMCoeff(const HadDMCoeff & theData);
63  void setHadDMCoeff(const int iBin, const HadDMCoeff & theData);
64  void addHadDMArea(const HadDMArea & theArea);
65  void setHadDMArea(const int n_area, const HadDMArea & theArea);
66  void PrintData(FILE *fout = stdout) const;
67 
68  inline int getSizeDMAreaSet() const {return (int)m_DMAreaSet.size();}
69  inline int getSizeDMCoeffSet() const {return (int)m_DMCoeffSet.size();}
70  int getBinFrac(const int dm_area, const float & cls_frac) const;
71  int getBinEner(const int dm_area, const float & cls_ener) const;
72  int getBinEta(const int dm_area, const float & cls_eta) const;
73  int getBin(const int & n_dm_area, const float & cls_frac, const float & cls_ener, const float & cls_eta) const;
74  int getBin(const int & n_dm_area, const int & ifrac, const int & iener, const int & ieta) const;
75 
76  private:
77  std::vector<HadDMCoeff> m_DMCoeffSet;
78  std::vector<HadDMArea> m_DMAreaSet;
79 };
80 //Class Identifier obtained by
81 //'clid CaloHadDMCoeff'
82 CLASS_DEF(CaloHadDMCoeff,227697804,1)
83 
84 #endif
CaloHadDMCoeff::HadDMArea::m_MaxEta
float m_MaxEta
Definition: CaloHadDMCoeff.h:36
CaloHadDMCoeff::m_DMAreaSet
std::vector< HadDMArea > m_DMAreaSet
Definition: CaloHadDMCoeff.h:78
CaloHadDMCoeff::addHadDMArea
void addHadDMArea(const HadDMArea &theArea)
Definition: CaloHadDMCoeff.cxx:58
CaloHadDMCoeff::getBinFrac
int getBinFrac(const int dm_area, const float &cls_frac) const
Definition: CaloHadDMCoeff.cxx:73
CaloHadDMCoeff::HadDMArea::m_FracBins
std::vector< float > m_FracBins
Definition: CaloHadDMCoeff.h:31
CaloHadDMCoeff::HadDMArea::m_MaxEner
float m_MaxEner
Definition: CaloHadDMCoeff.h:33
CaloHadDMCoeff::getHadDMArea
const HadDMArea * getHadDMArea(int n_area) const
Definition: CaloHadDMCoeff.cxx:36
CaloHadDMCoeff::HadDMArea::m_is_on
int m_is_on
Definition: CaloHadDMCoeff.h:28
get_generator_info.stdout
stdout
Definition: get_generator_info.py:40
CaloHadDMCoeff::HadDMCoeff
std::vector< float > HadDMCoeff
Definition: CaloHadDMCoeff.h:44
CaloHadDMCoeff::HadDMArea::m_EnerBins
std::vector< float > m_EnerBins
Definition: CaloHadDMCoeff.h:34
CaloHadDMCoeff::getBinEner
int getBinEner(const int dm_area, const float &cls_ener) const
Definition: CaloHadDMCoeff.cxx:90
CaloHadDMCoeff::HadDMArea::m_MinEta
float m_MinEta
Definition: CaloHadDMCoeff.h:35
CaloHadDMCoeff::m_DMCoeffSet
std::vector< HadDMCoeff > m_DMCoeffSet
Definition: CaloHadDMCoeff.h:77
CaloHadDMCoeff::setHadDMCoeff
void setHadDMCoeff(const int iBin, const HadDMCoeff &theData)
Definition: CaloHadDMCoeff.cxx:52
CaloHadDMCoeff::HadDMArea::m_title
std::string m_title
Definition: CaloHadDMCoeff.h:26
CaloHadDMCoeff::getHadDMCoeff
const HadDMCoeff * getHadDMCoeff(const int &dm_area, const float &cls_emfrac, const float &cls_ener, const float &cls_eta) const
Definition: CaloHadDMCoeff.cxx:29
CaloHadDMCoeff::addHadDMCoeff
void addHadDMCoeff(const HadDMCoeff &theData)
Definition: CaloHadDMCoeff.cxx:46
CaloHadDMCoeff::HadDMArea::m_offset
int m_offset
Definition: CaloHadDMCoeff.h:39
dqt_zlumi_alleff_HIST.fout
fout
Definition: dqt_zlumi_alleff_HIST.py:59
CaloHadDMCoeff::HadDMArea::m_EtaBins
std::vector< float > m_EtaBins
Definition: CaloHadDMCoeff.h:37
CaloHadDMCoeff::HadDMArea
Definition: CaloHadDMCoeff.h:25
CaloHadDMCoeff::CaloHadDMCoeff
CaloHadDMCoeff()
Default Constructor.
CaloHadDMCoeff::HadDMArea::m_nPars
int m_nPars
Definition: CaloHadDMCoeff.h:38
CaloHadDMCoeff::getBinEta
int getBinEta(const int dm_area, const float &cls_eta) const
Definition: CaloHadDMCoeff.cxx:107
CaloHadDMCoeff::operator=
CaloHadDMCoeff & operator=(const CaloHadDMCoeff &other)
Definition: CaloHadDMCoeff.cxx:19
CaloHadDMCoeff::HadDMArea::m_MinFrac
float m_MinFrac
Definition: CaloHadDMCoeff.h:29
CaloHadDMCoeff::getBin
int getBin(const int &n_dm_area, const float &cls_frac, const float &cls_ener, const float &cls_eta) const
Definition: CaloHadDMCoeff.cxx:120
CaloHadDMCoeff
Definition: CaloHadDMCoeff.h:23
CaloHadDMCoeff::PrintData
void PrintData(FILE *fout=stdout) const
Definition: CaloHadDMCoeff.cxx:145
CaloHadDMCoeff::getHadDMCoeff
const HadDMCoeff * getHadDMCoeff(const int &iBin) const
Definition: CaloHadDMCoeff.h:52
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
CaloHadDMCoeff::CaloHadDMCoeff
CaloHadDMCoeff(const CaloHadDMCoeff &other)
CaloHadDMCoeff::HadDMArea::m_indx
int m_indx
Definition: CaloHadDMCoeff.h:27
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
CaloHadDMCoeff::getSizeDMCoeffSet
int getSizeDMCoeffSet() const
Definition: CaloHadDMCoeff.h:69
CaloHadDMCoeff::HadDMArea::HadDMArea
HadDMArea()
Definition: CaloHadDMCoeff.h:40
CaloHadDMCoeff::setHadDMArea
void setHadDMArea(const int n_area, const HadDMArea &theArea)
Definition: CaloHadDMCoeff.cxx:64
CaloHadDMCoeff::getSizeDMAreaSet
int getSizeDMAreaSet() const
Definition: CaloHadDMCoeff.h:68
CLASS_DEF.h
macros to associate a CLID to a type
CaloHadDMCoeff::HadDMArea::m_MaxFrac
float m_MaxFrac
Definition: CaloHadDMCoeff.h:30
CaloHadDMCoeff::HadDMArea::m_MinEner
float m_MinEner
Definition: CaloHadDMCoeff.h:32