ATLAS Offline Software
JetCaloClusterThinning.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // JetCaloClusterThinning.h, (c) ATLAS Detector software
7 // @author Danilo E. Ferreira de Lima <dferreir@cern.ch>
9 
10 #ifndef DERIVATIONFRAMEWORKCALO_JETCALOCLUSTERTHINNING_H
11 #define DERIVATIONFRAMEWORKCALO_JETCALOCLUSTERTHINNING_H
12 
19 #include "xAODJet/Jet.h"
20 #include "xAODJet/JetContainer.h"
21 #include <atomic>
22 #include <string>
23 
25 
26 namespace DerivationFramework {
27 
29  : public extends<ExpressionParserUser<AthAlgTool>, IThinningTool>
30 {
31 public:
32  JetCaloClusterThinning(const std::string& t,
33  const std::string& n,
34  const IInterface* p);
36  virtual StatusCode initialize() override;
37  virtual StatusCode finalize() override;
38  virtual StatusCode doThinning() const override;
39 
40 private:
41  mutable std::atomic<unsigned int> m_ntotTopo,
42  m_npassTopo; //, m_ntotFrwd, m_npassFrwd;
43 
44  StringProperty m_streamName{ this,
45  "StreamName",
46  "",
47  "Name of the stream being thinned" };
49  m_TopoClSGKey{ this, "TopoClCollectionSGKey", "CaloCalTopoCluster", "" };
51  m_sgKey{ this, "SGKey", "", "SG key of jet container to thin" };
52 
53  Gaudi::Property<std::vector<std::string>> m_addClusterSGKey{ this, "AdditionalClustersKey", {}, ""};
54  SG::ThinningHandleKey<xAOD::CaloClusterContainer> m_tmpAddClusterKey{ this, "TmpAddClustersKey","LCOriginTopoClusters",""};
55  std::vector<SG::ThinningHandleKey<xAOD::CaloClusterContainer>> m_addClusterKeys;
56 
57  std::string m_selectionString;
58 
59  void setJetClustersMask(std::vector<bool>&, const xAOD::JetContainer*&) const;
60  void setJetClustersMask(std::vector<bool>&, std::vector<const xAOD::Jet*>&) const;
61 
62 };
63 
64 }
65 
66 #endif // DERIVATIONFRAMEWORK_JETCALOCLUSTERTHINNING_H
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
DerivationFramework::JetCaloClusterThinning::m_addClusterSGKey
Gaudi::Property< std::vector< std::string > > m_addClusterSGKey
Definition: JetCaloClusterThinning.h:53
Jet.h
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
DerivationFramework::JetCaloClusterThinning::initialize
virtual StatusCode initialize() override
Definition: JetCaloClusterThinning.cxx:41
SG::ThinningHandleKey
HandleKey object for adding thinning to an object.
Definition: ThinningHandleKey.h:38
ExpressionParserUser.h
IThinningTool.h
DerivationFramework::JetCaloClusterThinning::m_addClusterKeys
std::vector< SG::ThinningHandleKey< xAOD::CaloClusterContainer > > m_addClusterKeys
Definition: JetCaloClusterThinning.h:55
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
DerivationFramework::JetCaloClusterThinning::m_tmpAddClusterKey
SG::ThinningHandleKey< xAOD::CaloClusterContainer > m_tmpAddClusterKey
Definition: JetCaloClusterThinning.h:54
DerivationFramework::JetCaloClusterThinning::setJetClustersMask
void setJetClustersMask(std::vector< bool > &, const xAOD::JetContainer *&) const
DerivationFramework::JetCaloClusterThinning
Definition: JetCaloClusterThinning.h:30
DerivationFramework::JetCaloClusterThinning::JetCaloClusterThinning
JetCaloClusterThinning(const std::string &t, const std::string &n, const IInterface *p)
Definition: JetCaloClusterThinning.cxx:23
DerivationFramework::JetCaloClusterThinning::m_sgKey
SG::ReadHandleKey< xAOD::JetContainer > m_sgKey
Definition: JetCaloClusterThinning.h:51
DerivationFramework::JetCaloClusterThinning::m_selectionString
std::string m_selectionString
Definition: JetCaloClusterThinning.h:57
CaloCluster.h
beamspotman.n
n
Definition: beamspotman.py:731
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
DerivationFramework::JetCaloClusterThinning::m_TopoClSGKey
SG::ThinningHandleKey< xAOD::CaloClusterContainer > m_TopoClSGKey
Definition: JetCaloClusterThinning.h:49
DerivationFramework::JetCaloClusterThinning::setJetClustersMask
void setJetClustersMask(std::vector< bool > &, std::vector< const xAOD::Jet * > &) const
DerivationFramework
THE reconstruction tool.
Definition: ParticleSortingAlg.h:24
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
DerivationFramework::JetCaloClusterThinning::m_ntotTopo
std::atomic< unsigned int > m_ntotTopo
Definition: JetCaloClusterThinning.h:41
DerivationFramework::JetCaloClusterThinning::m_npassTopo
std::atomic< unsigned int > m_npassTopo
Definition: JetCaloClusterThinning.h:42
DerivationFramework::JetCaloClusterThinning::finalize
virtual StatusCode finalize() override
Definition: JetCaloClusterThinning.cxx:75
JetContainer.h
ThinningHandleKey.h
HandleKey object for adding thinning to an object.
CaloClusterContainer.h
DerivationFramework::JetCaloClusterThinning::~JetCaloClusterThinning
virtual ~JetCaloClusterThinning()
DerivationFramework::JetCaloClusterThinning::m_streamName
StringProperty m_streamName
Definition: JetCaloClusterThinning.h:44
DerivationFramework::JetCaloClusterThinning::doThinning
virtual StatusCode doThinning() const override
Definition: JetCaloClusterThinning.cxx:86