ATLAS Offline Software
LArDigitThinner.h
Go to the documentation of this file.
1 //Dear emacs, this is -*-c++-*-
2 /*
3  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
4 */
5 
6 
15 #ifndef LARROD_LArDigitThinner_H
16 #define LARROD_LArDigitThinner_H
17 
20 //#include "Identifier/HWIdentifier.h"
21 
22 #include "StoreGate/ReadHandle.h"
23 #include "StoreGate/WriteHandle.h"
26 #include "CxxUtils/CachedValue.h"
27 
28 #include <vector>
29 #include <string>
30 #include <mutex>
31 
32 class CaloCell_ID;
33 class LArOnlineID;
34 class LArOnOffIdMapping;
35 class LArDigitContainer;
37 
39 {
40  public:
41  LArDigitThinner(const std::string& name,
42  ISvcLocator* pSvcLocator);
43 
45 
46  StatusCode initialize() override;
47  StatusCode execute(const EventContext& ctx) const override;
48  StatusCode finalize() override;
49 
50  private:
51 
53 
55  int getRegion(const HWIdentifier chid) const;
56 
57  const std::vector<int>& initCutValues(const EventContext& ctx) const;
58 
61 
62  //std::vector<int> m_seen, m_passed;
63 
66 
67  SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey{this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"};
68 
69  //Event input:
70  SG::ReadHandleKey<LArDigitContainer> m_inputKey{this, "InputContainerName","LArDigitContainer_MC", "SG Key of LArDigitContainer"};
71  SG::ReadHandleKey<LArRawChannelContainer> m_rawChannelKey{this,"RawChannelContainerName","LArRawChannels", "SG key of the LArRawChannelContainer"};
72 
73  //Event output:
74  SG::WriteHandleKey<ConstDigitCont_t> m_outputKey{this, "OutputContainerName","LArDigitContainer_Thinned", "SG Key of thinned LArDigitContainer"};
75 
76  CxxUtils::CachedValue<std::vector<int> > m_energyCuts; //cut for each cell - indexed by online hash id
77 
78 };
79 
80 #endif
LArDigitThinner::EMB0
@ EMB0
Definition: LArDigitThinner.h:54
LArDigitThinner::m_caloCellId
const CaloCell_ID * m_caloCellId
Definition: LArDigitThinner.h:65
LArDigitThinner::m_energyCut_fcal
int m_energyCut_fcal
Definition: LArDigitThinner.h:60
LArDigitThinner
Definition: LArDigitThinner.h:39
LArDigitThinner::m_energyCuts
CxxUtils::CachedValue< std::vector< int > > m_energyCuts
Definition: LArDigitThinner.h:76
ConstDataVector.h
DataVector adapter that acts like it holds const pointers.
LArDigitThinner::m_energyCuts_barrel
std::vector< int > m_energyCuts_barrel
Definition: LArDigitThinner.h:59
LArDigitThinner::Position
Position
Definition: LArDigitThinner.h:54
LArDigitThinner::EMEC2
@ EMEC2
Definition: LArDigitThinner.h:54
LArDigitThinner::HEC
@ HEC
Definition: LArDigitThinner.h:54
SG::ReadHandleKey< LArDigitContainer >
LArDigitThinner::EMB1
@ EMB1
Definition: LArDigitThinner.h:54
HWIdentifier
Definition: HWIdentifier.h:13
LArDigitThinner::ConstDigitCont_t
ConstDataVector< LArDigitContainer > ConstDigitCont_t
Definition: LArDigitThinner.h:52
ReadCondHandle.h
LArDigitThinner::LArDigitThinner
LArDigitThinner(const std::string &name, ISvcLocator *pSvcLocator)
Definition: LArDigitThinner.cxx:17
LArDigitThinner::m_rawChannelKey
SG::ReadHandleKey< LArRawChannelContainer > m_rawChannelKey
Definition: LArDigitThinner.h:71
LArDigitThinner::m_energyCut_hec
int m_energyCut_hec
Definition: LArDigitThinner.h:60
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
WriteHandle.h
Handle class for recording to StoreGate.
LArOnOffIdMapping.h
LArDigitThinner::EMB2
@ EMB2
Definition: LArDigitThinner.h:54
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition: StoreGate/StoreGate/WriteHandleKey.h:40
LArDigitThinner::initialize
StatusCode initialize() override
Definition: LArDigitThinner.cxx:31
LArDigitThinner::EMB3
@ EMB3
Definition: LArDigitThinner.h:54
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LArDigitThinner::m_inputKey
SG::ReadHandleKey< LArDigitContainer > m_inputKey
Definition: LArDigitThinner.h:70
LArDigitThinner::execute
StatusCode execute(const EventContext &ctx) const override
Definition: LArDigitThinner.cxx:128
CxxUtils::CachedValue
Cached value with atomic update.
Definition: CachedValue.h:55
LArDigitThinner::DISCONNECTED
@ DISCONNECTED
Definition: LArDigitThinner.h:54
CaloCell_ID
Helper class for offline cell identifiers.
Definition: CaloCell_ID.h:34
LArDigitThinner::initCutValues
const std::vector< int > & initCutValues(const EventContext &ctx) const
Definition: LArDigitThinner.cxx:71
AthReentrantAlgorithm.h
CachedValue.h
Cached value with atomic update.
LArDigitThinner::getRegion
int getRegion(const HWIdentifier chid) const
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
LArDigitThinner::FCAL
@ FCAL
Definition: LArDigitThinner.h:54
LArOnlineID
Definition: LArOnlineID.h:20
SG::ReadCondHandleKey< LArOnOffIdMapping >
LArDigitThinner::finalize
StatusCode finalize() override
Definition: LArDigitThinner.cxx:122
ConstDataVector
DataVector adapter that acts like it holds const pointers.
Definition: ConstDataVector.h:76
LArDigitContainer
Container class for LArDigit.
Definition: LArDigitContainer.h:24
LArDigitThinner::m_cablingKey
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
Definition: LArDigitThinner.h:67
LArDigitThinner::m_onlineID
const LArOnlineID * m_onlineID
Definition: LArDigitThinner.h:64
ReadHandle.h
Handle class for reading from StoreGate.
LArDigitThinner::EMEC3
@ EMEC3
Definition: LArDigitThinner.h:54
LArDigitThinner::~LArDigitThinner
~LArDigitThinner()
LArDigitThinner::EMEC1
@ EMEC1
Definition: LArDigitThinner.h:54
LArDigitThinner::m_energyCuts_endcap
std::vector< int > m_energyCuts_endcap
Definition: LArDigitThinner.h:59
LArDigitThinner::m_outputKey
SG::WriteHandleKey< ConstDigitCont_t > m_outputKey
Definition: LArDigitThinner.h:74
LArDigitThinner::EMEC0
@ EMEC0
Definition: LArDigitThinner.h:54
LArRawChannelContainer
Container for LArRawChannel (IDC using LArRawChannelCollection)
Definition: LArRawChannelContainer.h:26
LArOnOffIdMapping
Definition: LArOnOffIdMapping.h:20