ATLAS Offline Software
LArLATOMEBuilderAlg.h
Go to the documentation of this file.
1 //Dear emacs, this is -*-c++-*-
2 /*
3  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
4 */
5 
6 #ifndef LARROD_LARLATOMEBUILDERALG_H
7 #define LARROD_LARLATOMEBUILDERALG_H
8 
9 
11 #include "StoreGate/ReadHandle.h"
12 #include "StoreGate/WriteHandle.h"
14 
16 #include "LArElecCalib/ILArOFC.h"
17 #include "LArElecCalib/ILArRamp.h"
25 
26 //Event classes
27 class LArDigitContainer;
28 class LArOnlineID_Base;
29 
31 
32  public:
33  LArLATOMEBuilderAlg(const std::string& name, ISvcLocator* pSvcLocator);
34 
35  StatusCode initialize() override;
36  StatusCode execute(const EventContext& ctx) const override;
37  StatusCode finalize() override;
38 
39 
40  private:
41  // event info input:
42  SG::ReadHandleKey<xAOD::EventInfo> m_eventInfoKey{this,"EventInfo","EventInfo","SG Key of EventInfo object"};
43  //SC digit input:
44  SG::ReadHandleKey<LArDigitContainer> m_digitKey{this, "LArDigitKey","SC", "SG Key of the SC LArDigitContainer"};
45  //LArRawSC output:
46  SG::WriteHandleKey<LArRawSCContainer> m_larRawSCKey{this,"LArRawSCKey","SC_ET_RECO","SG key of the output LArRawSCContainer"};
47 
48  //Conditions input:
49  SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey{this, "CablingSCKey","LArOnOffIdMapSC","SG Key of LArOnOffIdMapping object"};
50 
51  SG::ReadCondHandleKey<ILArPedestal> m_keyPedestalSC{this,"LArPedestalKeySC","LArPedestalSC","SG key of LArPedestal conditions object"};
52  SG::ReadCondHandleKey<ILArOFC> m_keyOFCSC{this,"LArOFCKeySC","LArOFCSC","SG key of LArOFC conditions object"};
53  SG::ReadCondHandleKey<ILArRamp> m_keyRampSC{this,"LArRampKeySC","LArRampSC","SG key of LArRamp conditions object"};
54  SG::ReadCondHandleKey<ILArDAC2uA> m_keyDAC2uASC{this,"LArDAC2uAKeySC","LArDAC2uASC","SG key of LArDAC2uA conditions object"};
55  SG::ReadCondHandleKey<ILAruA2MeV> m_keyuA2MeVSC{this,"LAruA2MeVKeySC","LAruA2MeVSC","SG key of LAruA2MeV conditions object"};
56  SG::ReadCondHandleKey<ILArHVScaleCorr> m_keyHVScaleCorrSC{this,"LArHVScaleCorrKeySC","LArHVScaleCorrSC","SG key of LArHVScaleCorr conditions object"};
57  SG::ReadCondHandleKey<ILArMphysOverMcal> m_keyMphysOverMcalSC{this,"LArMphysOverMcalKeySC","LArMphysOverMcalSC","SG key of LArMphysOverMcal conditions object"};
58 
59 
60  //The following matters only in the MC case, when we have a 32 sample shapes
61  //or we want to test shifted reco
62  Gaudi::Property<int> m_startSample{this,"startEnergy",0,"the first energy to compute with respect to the BCID"};
63  Gaudi::Property<int> m_nEnergies{this, "nEnergies", 1, "how many energies to compute"};
64 
65  Gaudi::Property<bool> m_applyHVCorrection{this, "applyHVCorrection", true, "apply HV correction"};
66  Gaudi::Property<bool> m_applyMphysOverMcal{this, "applyMphysOverMcal", true, "apply MphysOverMcal correction"};
67  Gaudi::Property<bool> m_useR0{this, "useR0", false, "use R0 from Ramp"};
68  Gaudi::Property<bool> m_isADCBas{this, "isADCBas", true, "Digits are ADC BAS"};
69 
70 
71  //Identifier helper
72  const LArOnlineID_Base* m_onlineId = nullptr;
73 
74  static bool floatToInt(float val, int &newval, int hardpoint, int size) ;
75 
76 };
77 
78 
79 
80 #endif
LArLATOMEBuilderAlg::execute
StatusCode execute(const EventContext &ctx) const override
Definition: LArLATOMEBuilderAlg.cxx:56
ILArDAC2uA.h
ILAruA2MeV.h
LArRawSCContainer.h
LArLATOMEBuilderAlg::m_larRawSCKey
SG::WriteHandleKey< LArRawSCContainer > m_larRawSCKey
Definition: LArLATOMEBuilderAlg.h:46
LArLATOMEBuilderAlg::m_eventInfoKey
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
Definition: LArLATOMEBuilderAlg.h:42
LArLATOMEBuilderAlg::floatToInt
static bool floatToInt(float val, int &newval, int hardpoint, int size)
reproduce LDPB package computation in https://gitlab.cern.ch/atlas-lar-online/onlinelatomedb/-/blob/m...
Definition: LArLATOMEBuilderAlg.cxx:314
ILArOFC.h
SG::ReadHandleKey< xAOD::EventInfo >
LArLATOMEBuilderAlg::m_isADCBas
Gaudi::Property< bool > m_isADCBas
Definition: LArLATOMEBuilderAlg.h:68
LArLATOMEBuilderAlg::finalize
StatusCode finalize() override
Definition: LArLATOMEBuilderAlg.cxx:52
LArLATOMEBuilderAlg::m_digitKey
SG::ReadHandleKey< LArDigitContainer > m_digitKey
Definition: LArLATOMEBuilderAlg.h:44
ReadCondHandle.h
ILArMphysOverMcal.h
LArLATOMEBuilderAlg
Definition: LArLATOMEBuilderAlg.h:30
LArLATOMEBuilderAlg::m_onlineId
const LArOnlineID_Base * m_onlineId
Definition: LArLATOMEBuilderAlg.h:72
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
LArLATOMEBuilderAlg::initialize
StatusCode initialize() override
Definition: LArLATOMEBuilderAlg.cxx:29
LArLATOMEBuilderAlg::m_keyOFCSC
SG::ReadCondHandleKey< ILArOFC > m_keyOFCSC
Definition: LArLATOMEBuilderAlg.h:52
LArLATOMEBuilderAlg::m_applyMphysOverMcal
Gaudi::Property< bool > m_applyMphysOverMcal
Definition: LArLATOMEBuilderAlg.h:66
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
WriteHandle.h
Handle class for recording to StoreGate.
LArOnOffIdMapping.h
SG::WriteHandleKey< LArRawSCContainer >
LArLATOMEBuilderAlg::m_keyuA2MeVSC
SG::ReadCondHandleKey< ILAruA2MeV > m_keyuA2MeVSC
Definition: LArLATOMEBuilderAlg.h:55
LArLATOMEBuilderAlg::m_keyPedestalSC
SG::ReadCondHandleKey< ILArPedestal > m_keyPedestalSC
Definition: LArLATOMEBuilderAlg.h:51
LArLATOMEBuilderAlg::m_keyMphysOverMcalSC
SG::ReadCondHandleKey< ILArMphysOverMcal > m_keyMphysOverMcalSC
Definition: LArLATOMEBuilderAlg.h:57
ILArHVScaleCorr.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LArLATOMEBuilderAlg::m_keyDAC2uASC
SG::ReadCondHandleKey< ILArDAC2uA > m_keyDAC2uASC
Definition: LArLATOMEBuilderAlg.h:54
LArLATOMEBuilderAlg::m_keyHVScaleCorrSC
SG::ReadCondHandleKey< ILArHVScaleCorr > m_keyHVScaleCorrSC
Definition: LArLATOMEBuilderAlg.h:56
LArLATOMEBuilderAlg::LArLATOMEBuilderAlg
LArLATOMEBuilderAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: LArLATOMEBuilderAlg.cxx:26
LArLATOMEBuilderAlg::m_nEnergies
Gaudi::Property< int > m_nEnergies
Definition: LArLATOMEBuilderAlg.h:63
AthReentrantAlgorithm.h
LArOnlineID_Base
Helper for the Liquid Argon Calorimeter cell identifiers.
Definition: LArOnlineID_Base.h:105
LArLATOMEBuilderAlg::m_cablingKey
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
Definition: LArLATOMEBuilderAlg.h:49
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
LArLATOMEBuilderAlg::m_applyHVCorrection
Gaudi::Property< bool > m_applyHVCorrection
Definition: LArLATOMEBuilderAlg.h:65
LArLATOMEBuilderAlg::m_startSample
Gaudi::Property< int > m_startSample
Definition: LArLATOMEBuilderAlg.h:62
EventInfo.h
SG::ReadCondHandleKey< LArOnOffIdMapping >
ILArRamp.h
LArLATOMEBuilderAlg::m_keyRampSC
SG::ReadCondHandleKey< ILArRamp > m_keyRampSC
Definition: LArLATOMEBuilderAlg.h:53
ILArPedestal.h
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
LArDigitContainer
Container class for LArDigit.
Definition: LArDigitContainer.h:24
ReadHandle.h
Handle class for reading from StoreGate.
LArLATOMEBuilderAlg::m_useR0
Gaudi::Property< bool > m_useR0
Definition: LArLATOMEBuilderAlg.h:67