ATLAS Offline Software
LArHVScaleCorrTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 //Dear emacs, this is -*-c++-*-
6 
7 #ifndef LARRECUTILS_LARHVSCALECORRTOOL_H
8 #define LARRECUTILS_LARHVSCALECORRTOOL_H
9 
10 #include <string>
11 #include <vector>
12 #include "GaudiKernel/MsgStream.h"
13 
14 class CaloCell_ID;
15 class LArEM_ID;
16 class LArHEC_ID;
17 class LArFCAL_ID;
18 class CaloDetDescrElement;
19 
21 public:
22 
23  //Internal representation of voltage & current per cell:
24  struct HV_t {
25  HV_t(float ihv, float iweight) : hv(ihv), weight(iweight) {};
26  float hv=0.0; //voltage, potentially current*R corrected
27  float weight=0.0;
28  };
29 
30  typedef std::vector<HV_t> voltageCell_t;
31 
32 
33  LArHVScaleCorrTool(const CaloCell_ID* caloCellID, MsgStream& msg, const std::vector<std::string>& fixHVStrings);
34 
35  LArHVScaleCorrTool() = delete;
36 
37  // destructor
38  virtual ~LArHVScaleCorrTool() = default;
39 
40  float getHVScale(const CaloDetDescrElement* calodde, const voltageCell_t& hvlist,
41  MsgStream& msg) const;
42 
43  private:
44 
48  const float m_T0;
49 
50 
51  float Scale_barrel(const float hv) const;
52  float Scale_FCAL1(const float hv) const;
53  float champ_e(float hv, float d) const;
54  float vdrift(float e,float tempe) const;
55  float InvCharge(float e) const;
56  float Respo(float e,float e_nominal,float tempe) const;
57  float t_drift (float e, float e_nominal,float d, float tempe) const;
58  float EMEC_nominal(const float eta_r) const;
59  float EMEC_gap(const float eta_r, float Zeta) const;
60  void buildFixHVList(const std::vector<std::string>& fixHVStrings, MsgStream& msg);
61 
62 
63 
64  /*##########################################################################
65  definitions of new functions and variables units
66  ---------------------------------------------------------------------
67  d gap distancia between cells in calorimeters cm
68  nominal subdetector nominal voltage volt
69  E electric field in the cell kvolt/cm
70  E_nominal nominal electric field in the cell kvolt/cm
71  T temperature of cryostat Kelvin
72  Zsamp Z coordinate for samplings in EMEC mm
73  champ_e computes electric field kvolt/cm
74  vdrift computes drift velocity mm/micro_s
75  Charge computes recombination charge Coulomb
76  Respo computes the correction factors to HV!=nominal -
77  t_drift computes drift times ns
78  EMEC_nominal finds nominal voltages in EMEC volt
79  EMEC_gap finds gap distances in EMEC mm
80  ##########################################################################
81  */
82 
83  struct HVfix_t {
84  unsigned int subdet; // 0-1-2-3 for EMB-EMEC-HEC-FCAL
85  unsigned int layer_min;
86  unsigned int layer_max;
87  float eta_min;
88  float eta_max;
89  float phi_min;
90  float phi_max;
91  float corr;
92  };
93 
94  std::vector<HVfix_t> m_HVfix;
95 
96 };
97 
98 #endif
LArHVScaleCorrTool::m_larem_id
const LArEM_ID * m_larem_id
Definition: LArHVScaleCorrTool.h:45
LArHVScaleCorrTool::Scale_barrel
float Scale_barrel(const float hv) const
Definition: LArHVScaleCorrTool.cxx:264
LArHVScaleCorrTool::champ_e
float champ_e(float hv, float d) const
Definition: LArHVScaleCorrTool.cxx:185
hist_file_dump.d
d
Definition: hist_file_dump.py:137
LArHVScaleCorrTool::HVfix_t::eta_max
float eta_max
Definition: LArHVScaleCorrTool.h:88
CaloDetDescrElement
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:66
LArHVScaleCorrTool::m_T0
const float m_T0
Definition: LArHVScaleCorrTool.h:48
LArHEC_ID
Helper class for LArHEC offline identifiers.
Definition: LArHEC_ID.h:85
LArHVScaleCorrTool::Respo
float Respo(float e, float e_nominal, float tempe) const
Definition: LArHVScaleCorrTool.cxx:215
LArHVScaleCorrTool::HVfix_t::phi_max
float phi_max
Definition: LArHVScaleCorrTool.h:90
LArHVScaleCorrTool::vdrift
float vdrift(float e, float tempe) const
Definition: LArHVScaleCorrTool.cxx:197
LArHVScaleCorrTool::HV_t::HV_t
HV_t(float ihv, float iweight)
Definition: LArHVScaleCorrTool.h:25
LArHVScaleCorrTool
Definition: LArHVScaleCorrTool.h:20
LArHVScaleCorrTool::getHVScale
float getHVScale(const CaloDetDescrElement *calodde, const voltageCell_t &hvlist, MsgStream &msg) const
Definition: LArHVScaleCorrTool.cxx:26
LArHVScaleCorrTool::HVfix_t::corr
float corr
Definition: LArHVScaleCorrTool.h:91
LArHVScaleCorrTool::HVfix_t::layer_max
unsigned int layer_max
Definition: LArHVScaleCorrTool.h:86
LArHVScaleCorrTool::m_HVfix
std::vector< HVfix_t > m_HVfix
Definition: LArHVScaleCorrTool.h:94
LArHVScaleCorrTool::m_larhec_id
const LArHEC_ID * m_larhec_id
Definition: LArHVScaleCorrTool.h:46
LArHVScaleCorrTool::voltageCell_t
std::vector< HV_t > voltageCell_t
Definition: LArHVScaleCorrTool.h:30
LArHVScaleCorrTool::~LArHVScaleCorrTool
virtual ~LArHVScaleCorrTool()=default
LArHVScaleCorrTool::HVfix_t::phi_min
float phi_min
Definition: LArHVScaleCorrTool.h:89
LArHVScaleCorrTool::HVfix_t::eta_min
float eta_min
Definition: LArHVScaleCorrTool.h:87
LArHVScaleCorrTool::m_larfcal_id
const LArFCAL_ID * m_larfcal_id
Definition: LArHVScaleCorrTool.h:47
LArHVScaleCorrTool::buildFixHVList
void buildFixHVList(const std::vector< std::string > &fixHVStrings, MsgStream &msg)
Definition: LArHVScaleCorrTool.cxx:313
CaloCell_ID
Helper class for offline cell identifiers.
Definition: CaloCell_ID.h:34
LArHVScaleCorrTool::EMEC_nominal
float EMEC_nominal(const float eta_r) const
Definition: LArHVScaleCorrTool.cxx:231
LArHVScaleCorrTool::LArHVScaleCorrTool
LArHVScaleCorrTool()=delete
LArHVScaleCorrTool::InvCharge
float InvCharge(float e) const
Definition: LArHVScaleCorrTool.cxx:206
LArHVScaleCorrTool::HVfix_t::subdet
unsigned int subdet
Definition: LArHVScaleCorrTool.h:84
LArHVScaleCorrTool::EMEC_gap
float EMEC_gap(const float eta_r, float Zeta) const
Definition: LArHVScaleCorrTool.cxx:244
LArHVScaleCorrTool::HVfix_t
Definition: LArHVScaleCorrTool.h:83
LArHVScaleCorrTool::Scale_FCAL1
float Scale_FCAL1(const float hv) const
Definition: LArHVScaleCorrTool.cxx:252
LArHVScaleCorrTool::HV_t
Definition: LArHVScaleCorrTool.h:24
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
LArEM_ID
Helper class for LArEM offline identifiers.
Definition: LArEM_ID.h:118
LArHVScaleCorrTool::HV_t::weight
float weight
Definition: LArHVScaleCorrTool.h:27
LArHVScaleCorrTool::HVfix_t::layer_min
unsigned int layer_min
Definition: LArHVScaleCorrTool.h:85
LArHVScaleCorrTool::HV_t::hv
float hv
Definition: LArHVScaleCorrTool.h:26
LArFCAL_ID
Helper class for LArFCAL offline identifiers.
Definition: LArFCAL_ID.h:60
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
LArHVScaleCorrTool::t_drift
float t_drift(float e, float e_nominal, float d, float tempe) const
Definition: LArHVScaleCorrTool.cxx:224