ATLAS Offline Software
LArPhysWaveHECTool.h
Go to the documentation of this file.
1 //Dear emacs, this is -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 
8 #ifndef LARPHYSWAVEHECTOOL_H
9 #define LARPHYSWAVEHECTOOL_H
10 
12 
17 
19 
20 // includes from calib2physHEC.h:
21 #include <stdio.h>
22 #include <math.h>
23 #include <Rtypes.h>
24 #include <TSpline.h>
25 #include <TF1.h>
26 #include <TFile.h>
27 #include <TMinuit.h>
28 #include <TROOT.h>
29 #include <TApplication.h>
30 #include <TProfile.h>
31 #include <TGraphErrors.h>
32 #include <TGraph.h>
33 #include <iostream>
34 #include <vector>
35 
36 static const InterfaceID IID_LArPhysWaveHECTool("LArPhysWaveHECTool", 1 , 0);
37 
39 {
40  public:
41 
42  // Retrieve interface ID
43  static const InterfaceID& interfaceID() { return IID_LArPhysWaveHECTool; }
44 
45  LArPhysWaveHECTool(const std::string& type, const std::string& name,
46  const IInterface* parent ) ;
47 
48  virtual ~LArPhysWaveHECTool();
49 
50  virtual StatusCode initialize();
51  virtual StatusCode finalize(){return StatusCode::SUCCESS;}
52 
53 
54  StatusCode makeLArPhysWaveHEC(LArWFParams& wfParams, LArCaliWave &caliWave,
55  LArPhysWave & predLArPhysWave, const LArPhysWave & LArIdealPhysWave,
56  float & MphysMcali, const HWIdentifier& chid, const int gain,
57  int & LArPhysWaveFlag);
58 
59 // StatusCode makeLArPhysWaveHEC(const LArWFParams &, const LArCaliWave &,
60 // int region, int layer,
61 // LArPhysWave & predLArPhysWave,
62 // float & MphysMcali, const HWIdentifier& chid,
63 // unsigned gain, int & LArPhysWaveFlag);
64 
65  //double MphysMcali() const { return m_MphysMcali ; }
66 
67  private:
68  static const int DEFAULT ;
69  //LArCaliWave m_gCali;
70  //LArPhysWave m_gPhys;
71  const LArPhysWave* m_gIdealPhys = nullptr;
72 
73  const LArOnlineID_Base* m_onlineHelper = nullptr;
74  // bool m_verb;
75  //int m_region, m_layer ;
76  bool m_normalizeCali , m_timeOriginShift , m_subtractBaseline;
77  bool m_isSC;
78 
79  double m_TcalMin, m_TcalMax, m_TcalAverage,
80  m_FstepMin, m_FstepMax, m_FstepAverage;
81 
82  // std::vector<bool> m_injPointCorrLayer, m_injPointUseTauR ;
83 
84  double m_Omega0 = 0.0, m_Taur = 0.0;
85  unsigned m_Tstart = 0U;
86  double m_MinAmp;
87  //void predict_phys_HEC(const HWIdentifier& chid, unsigned gain);
88  void predict_phys_HEC(LArWFParams& wfParams, LArCaliWave &caliWave,
89  LArPhysWave & predLArPhysWave,
90  float & MphysMcali, const HWIdentifier& chid, const int gain);
91 
92  TF1* CaliWave2PhysWaveHEC(TProfile *pcal, Double_t *par, double *parCL, TF1 *& deriv,Bool_t uset0, Bool_t norm, int adc, Double_t *xmax ,bool gsl_flag);
93 
94  //Double_t DTp(Double_t *tt, Double_t *par);
95  //Double_t Tp(Double_t *tt, Double_t *par);
96  //Double_t Tp_gsl(Double_t *tt, Double_t *par);
97  //Double_t Tp4_gsl(Double_t t);
98  //Double_t Tp5_gsl(Double_t t);
99 };
100 
101 #endif
PlotCalibFromCool.norm
norm
Definition: PlotCalibFromCool.py:100
LArPhysWaveHECTool::finalize
virtual StatusCode finalize()
Definition: LArPhysWaveHECTool.h:51
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
initialize
void initialize()
Definition: run_EoverP.cxx:894
CaloCondBlobAlgs_fillNoiseFromASCII.gain
gain
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:110
LArPhysWave.h
LArWFParams
Definition: LArWFParams.h:20
HWIdentifier
Definition: HWIdentifier.h:13
LArCaliWave.h
LArPhysWave
Definition: LArPhysWave.h:14
LArCaliWave
Definition: LArCaliWave.h:44
LArPhysWaveHECTool::m_isSC
bool m_isSC
Definition: LArPhysWaveHECTool.h:77
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LArPhysWaveHECTool::m_TcalMin
double m_TcalMin
Definition: LArPhysWaveHECTool.h:79
AthAlgTool.h
LArPhysWaveHECTool::m_MinAmp
double m_MinAmp
Definition: LArPhysWaveHECTool.h:86
test_pyathena.parent
parent
Definition: test_pyathena.py:15
LArPhysWaveHECTool
Definition: LArPhysWaveHECTool.h:39
LArPhysWaveHECTool::m_timeOriginShift
bool m_timeOriginShift
Definition: LArPhysWaveHECTool.h:76
LArOnlineID_Base
Helper for the Liquid Argon Calorimeter cell identifiers.
Definition: LArOnlineID_Base.h:105
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
createCoolChannelIdFile.par
par
Definition: createCoolChannelIdFile.py:29
TProfile
Definition: rootspy.cxx:515
LArWaveHelper.h
LArPhysWaveHECTool::DEFAULT
static const int DEFAULT
Definition: LArPhysWaveHECTool.h:68
ReadFloatFromCool.adc
adc
Definition: ReadFloatFromCool.py:48
LArWFParams.h
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
xmax
double xmax
Definition: listroot.cxx:61
LArPhysWaveHECTool::m_FstepMin
double m_FstepMin
Definition: LArPhysWaveHECTool.h:80
AthAlgTool
Definition: AthAlgTool.h:26
checker_macros.h
Define macros for attributes used to control the static checker.
LArPhysWaveHECTool::interfaceID
static const InterfaceID & interfaceID()
Definition: LArPhysWaveHECTool.h:43