ATLAS Offline Software
CaloHadDMCoeffMinim.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 #ifndef CALOLOCALHADCALIB_CALOHADDMCOEFFMINIM_H
6 #define CALOLOCALHADCALIB_CALOHADDMCOEFFMINIM_H
7 
18 #include <vector>
19 #include <string>
20 #include <map>
21 
22 #include <TROOT.h>
23 #include "CaloGeoHelpers/CaloSampling.h"
25 
26 class CaloLocalHadCoeff;
28 class CaloHadDMCoeffData;
29 
30 
32  public :
33 
34  // to handle minuit parameters and fit results
35  class MinimPar {
36  public:
37  std::string name;
38  bool fixIt;
39  double initVal;
40  double initErr;
41  double lowerLim;
42  double upperLim;
43  double value;
44  double error;
45  MinimPar(const std::string& the_name, double the_initVal, double the_initErr,
46  double the_lowerLim, double the_upperLim)
47  : name(the_name),
48  fixIt(true),
49  initVal(the_initVal),
50  initErr(the_initErr),
51  lowerLim(the_lowerLim),
52  upperLim(the_upperLim),
53  value(0.0),
54  error(0.0)
55  { }
56  };
57 
58  // data is used for minimization
59  class MinimSample {
60  public:
61  std::vector<float > clsm_smp_energy_unw;
62  int ibin;
63  double edmtrue;
64  double weight;
65  double sigma2;
66  };
67 
70 
71  CaloLocalHadCoeff * process(CaloHadDMCoeffData *myData, CaloLocalHadCoeff *myHadDMCoeff , bool isSingleParticle=true, bool tbflag=false);
72  void make_report(std::string &sfname);
73  void SetNormalizationType(std::string &stype) {m_NormalizationType = stype;}
74 
75  std::vector<std::string> m_validNames;
76  private:
77  void fcn(Int_t &npar, Double_t *gin, Double_t &f, Double_t *par, Int_t iflag);
78  static void fcnWrapper(Int_t &npar, Double_t *gin, Double_t &f, Double_t *par, Int_t iflag)
79  {
80  s_instance->fcn(npar, gin, f, par, iflag);
81  }
82 
85  std::unique_ptr<CaloLocalHadCoeffHelper> m_HadDMHelper;
87 
91  std::vector<MinimPar > m_minimPars;
92  std::map<int, std::vector<MinimPar > > m_minimResults;
93  std::vector<std::unique_ptr<MinimSample> > m_minimSample;
94  std::vector<MinimSample *> m_minimSubSample;
95  std::vector<int > m_sample_size;
96  double m_engClusMin;
97  double m_engBeamMin;
100 
101  std::string m_NormalizationType;
103 
106 };
107 
108 #endif
109 
CaloHadDMCoeffMinim::m_iBinGlob
int m_iBinGlob
Definition: CaloHadDMCoeffMinim.h:90
CaloHadDMCoeffMinim::MinimSample::ibin
int ibin
Definition: CaloHadDMCoeffMinim.h:62
CaloHadDMCoeffMinim::MinimPar::MinimPar
MinimPar(const std::string &the_name, double the_initVal, double the_initErr, double the_lowerLim, double the_upperLim)
Definition: CaloHadDMCoeffMinim.h:45
CaloHadDMCoeffMinim::MinimPar::initVal
double initVal
Definition: CaloHadDMCoeffMinim.h:39
CaloHadDMCoeffMinim::m_isTestbeam
bool m_isTestbeam
Definition: CaloHadDMCoeffMinim.h:88
CaloHadDMCoeffMinim::m_engClusMin
double m_engClusMin
Definition: CaloHadDMCoeffMinim.h:96
CaloHadDMCoeffMinim::m_validNames
std::vector< std::string > m_validNames
Definition: CaloHadDMCoeffMinim.h:75
CaloHadDMCoeffMinim::m_area_index
int m_area_index
Definition: CaloHadDMCoeffMinim.h:98
ATLAS_NOT_THREAD_SAFE
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
Definition: checker_macros.h:212
CaloHadDMCoeffMinim::s_instance
static CaloHadDMCoeffMinim * s_instance
Definition: CaloHadDMCoeffMinim.h:83
CaloHadDMCoeffMinim::m_NormalizationTypeNumber
int m_NormalizationTypeNumber
Definition: CaloHadDMCoeffMinim.h:102
CaloHadDMCoeffMinim::MinimPar::fixIt
bool fixIt
Definition: CaloHadDMCoeffMinim.h:38
athena.value
value
Definition: athena.py:124
CaloHadDMCoeffMinim::CaloHadDMCoeffMinim
CaloHadDMCoeffMinim(const CaloHadDMCoeffMinim &)
SUSY_SimplifiedModel_PostInclude.process
string process
Definition: SUSY_SimplifiedModel_PostInclude.py:42
CaloHadDMCoeffMinim::MinimPar::upperLim
double upperLim
Definition: CaloHadDMCoeffMinim.h:42
CaloHadDMCoeffMinim::m_HadDMCoeff
CaloLocalHadCoeff * m_HadDMCoeff
Definition: CaloHadDMCoeffMinim.h:86
CaloLocalHadCoeffHelper
Definition: CaloLocalHadCoeffHelper.h:14
CaloHadDMCoeffMinim::m_data
CaloHadDMCoeffData * m_data
Definition: CaloHadDMCoeffMinim.h:84
CaloHadDMCoeffMinim::m_minimPars
std::vector< MinimPar > m_minimPars
Definition: CaloHadDMCoeffMinim.h:91
CaloHadDMCoeffMinim::m_nstep_fcn
int m_nstep_fcn
Definition: CaloHadDMCoeffMinim.h:89
CaloLocalHadCoeff
Hold binned correction data for local hadronic calibration procedure.
Definition: CaloLocalHadCoeff.h:41
CaloHadDMCoeffMinim::MinimPar::initErr
double initErr
Definition: CaloHadDMCoeffMinim.h:40
CaloHadDMCoeffMinim::SetNormalizationType
void SetNormalizationType(std::string &stype)
Definition: CaloHadDMCoeffMinim.h:73
CaloHadDMCoeffData
Data to read from special DeadMaterialTree.
Definition: CaloHadDMCoeffData.h:30
hist_file_dump.f
f
Definition: hist_file_dump.py:135
CaloHadDMCoeffMinim::m_engBeamMin
double m_engBeamMin
Definition: CaloHadDMCoeffMinim.h:97
CaloHadDMCoeffMinim::m_NormalizationType
std::string m_NormalizationType
Definition: CaloHadDMCoeffMinim.h:101
CaloHadDMCoeffMinim::MinimPar
Definition: CaloHadDMCoeffMinim.h:35
MC::isSingleParticle
bool isSingleParticle(const T &p)
Identify a particlegun particle.
Definition: HepMCHelpers.h:74
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
createCoolChannelIdFile.par
par
Definition: createCoolChannelIdFile.py:29
CaloHadDMCoeffMinim::m_HadDMHelper
std::unique_ptr< CaloLocalHadCoeffHelper > m_HadDMHelper
Definition: CaloHadDMCoeffMinim.h:85
CaloHadDMCoeffMinim::m_minimResults
std::map< int, std::vector< MinimPar > > m_minimResults
Definition: CaloHadDMCoeffMinim.h:92
CaloHadDMCoeffMinim::MinimSample::edmtrue
double edmtrue
Definition: CaloHadDMCoeffMinim.h:63
CaloHadDMCoeffMinim::m_sample_size
std::vector< int > m_sample_size
Definition: CaloHadDMCoeffMinim.h:95
CaloHadDMCoeffMinim::MinimSample::clsm_smp_energy_unw
std::vector< float > clsm_smp_energy_unw
Definition: CaloHadDMCoeffMinim.h:61
CaloHadDMCoeffMinim::MinimPar::error
double error
Definition: CaloHadDMCoeffMinim.h:44
CaloHadDMCoeffMinim::m_minimSample
std::vector< std::unique_ptr< MinimSample > > m_minimSample
Definition: CaloHadDMCoeffMinim.h:93
CaloHadDMCoeffMinim::MinimPar::value
double value
Definition: CaloHadDMCoeffMinim.h:43
CaloHadDMCoeffMinim::MinimPar::name
std::string name
Definition: CaloHadDMCoeffMinim.h:37
CaloHadDMCoeffMinim
Definition: CaloHadDMCoeffMinim.h:31
CaloHadDMCoeffMinim::MinimSample::sigma2
double sigma2
Definition: CaloHadDMCoeffMinim.h:65
CaloHadDMCoeffMinim::m_distance_cut
double m_distance_cut
Definition: CaloHadDMCoeffMinim.h:99
CaloHadDMCoeffMinim::fcnWrapper
static void fcnWrapper(Int_t &npar, Double_t *gin, Double_t &f, Double_t *par, Int_t iflag)
Definition: CaloHadDMCoeffMinim.h:78
checker_macros.h
Define macros for attributes used to control the static checker.
error
Definition: IImpactPoint3dEstimator.h:70
CaloHadDMCoeffMinim::MinimSample::weight
double weight
Definition: CaloHadDMCoeffMinim.h:64
CaloHadDMCoeffMinim::MinimSample
Definition: CaloHadDMCoeffMinim.h:59
CaloHadDMCoeffMinim::m_minimSubSample
std::vector< MinimSample * > m_minimSubSample
Definition: CaloHadDMCoeffMinim.h:94
CaloHadDMCoeffMinim::MinimPar::lowerLim
double lowerLim
Definition: CaloHadDMCoeffMinim.h:41