#include <JetCaloClusterThinning.h>
|
std::atomic< unsigned int > | m_ntotTopo |
|
std::atomic< unsigned int > | m_npassTopo |
|
StringProperty | m_streamName |
|
SG::ThinningHandleKey< xAOD::CaloClusterContainer > | m_TopoClSGKey { this, "TopoClCollectionSGKey", "CaloCalTopoCluster", "" } |
|
SG::ReadHandleKey< xAOD::JetContainer > | m_sgKey { this, "SGKey", "", "SG key of jet container to thin" } |
|
Gaudi::Property< std::vector< std::string > > | m_addClusterSGKey { this, "AdditionalClustersKey", {}, ""} |
|
SG::ThinningHandleKey< xAOD::CaloClusterContainer > | m_tmpAddClusterKey { this, "TmpAddClustersKey","LCOriginTopoClusters",""} |
|
std::vector< SG::ThinningHandleKey< xAOD::CaloClusterContainer > > | m_addClusterKeys |
|
std::string | m_selectionString |
|
Definition at line 28 of file JetCaloClusterThinning.h.
◆ JetCaloClusterThinning()
DerivationFramework::JetCaloClusterThinning::JetCaloClusterThinning |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ ~JetCaloClusterThinning()
DerivationFramework::JetCaloClusterThinning::~JetCaloClusterThinning |
( |
| ) |
|
|
virtualdefault |
◆ doThinning()
StatusCode DerivationFramework::JetCaloClusterThinning::doThinning |
( |
| ) |
const |
|
overridevirtual |
Definition at line 86 of file JetCaloClusterThinning.cxx.
88 const EventContext& ctx = Gaudi::Hive::currentContext();
95 unsigned int nTopoClusters = importedTopoCaloCluster->size();
96 if (nTopoClusters == 0)
97 return StatusCode::SUCCESS;
100 std::vector<bool> topomask;
101 topomask.assign(nTopoClusters,
false);
107 importedJets = importedJetsHandle.ptr();
108 if (importedJets ==
nullptr) {
110 <<
" found in StoreGate!");
111 return StatusCode::FAILURE;
113 unsigned int nJets(importedJets->size());
115 return StatusCode::SUCCESS;
116 std::vector<const xAOD::Jet*> jetToCheck;
121 std::vector<int>
entries = m_parser->evaluateAsVector();
125 ATH_MSG_ERROR(
"Sizes incompatible! Are you sure your selection string "
126 "used jets objects??");
127 return StatusCode::FAILURE;
130 for (
unsigned int i = 0;
i < nJets; ++
i)
132 jetToCheck.push_back((*importedJets)[
i]);
135 if(jetToCheck.empty())
136 return StatusCode::SUCCESS;
139 const auto&
links =
jet->constituentLinks();
140 for(
const auto& link :
links ) {
142 if( ! link.isValid() ) {
145 topomask.at( link.index() ) =
true;
151 const auto&
links =
jet->constituentLinks();
152 for(
const auto& link :
links ) {
154 if( ! link.isValid() ) {
157 topomask.at( link.index() ) =
true;
163 for (
unsigned int i = 0;
i < nTopoClusters; ++
i) {
169 importedTopoCaloCluster.keep(topomask);
173 tempClusters.keep(topomask);
176 return StatusCode::SUCCESS;
◆ finalize()
StatusCode DerivationFramework::JetCaloClusterThinning::finalize |
( |
| ) |
|
|
overridevirtual |
◆ initialize()
StatusCode DerivationFramework::JetCaloClusterThinning::initialize |
( |
| ) |
|
|
overridevirtual |
Definition at line 41 of file JetCaloClusterThinning.cxx.
47 <<
"as the source collection for topo calo clusters");
50 return StatusCode::FAILURE;
53 "Calo clusters associated with objects in "
55 <<
" will be retained in this format with the rest being thinned away");
71 return StatusCode::SUCCESS;
◆ setJetClustersMask() [1/2]
void DerivationFramework::JetCaloClusterThinning::setJetClustersMask |
( |
std::vector< bool > & |
, |
|
|
const xAOD::JetContainer *& |
|
|
) |
| const |
|
private |
◆ setJetClustersMask() [2/2]
void DerivationFramework::JetCaloClusterThinning::setJetClustersMask |
( |
std::vector< bool > & |
, |
|
|
std::vector< const xAOD::Jet * > & |
|
|
) |
| const |
|
private |
◆ m_addClusterKeys
◆ m_addClusterSGKey
Gaudi::Property<std::vector<std::string> > DerivationFramework::JetCaloClusterThinning::m_addClusterSGKey { this, "AdditionalClustersKey", {}, ""} |
|
private |
◆ m_npassTopo
std::atomic<unsigned int> DerivationFramework::JetCaloClusterThinning::m_npassTopo |
|
private |
◆ m_ntotTopo
std::atomic<unsigned int> DerivationFramework::JetCaloClusterThinning::m_ntotTopo |
|
mutableprivate |
◆ m_selectionString
std::string DerivationFramework::JetCaloClusterThinning::m_selectionString |
|
private |
◆ m_sgKey
◆ m_streamName
StringProperty DerivationFramework::JetCaloClusterThinning::m_streamName |
|
private |
Initial value:{ this,
"StreamName",
"",
"Name of the stream being thinned" }
Definition at line 44 of file JetCaloClusterThinning.h.
◆ m_tmpAddClusterKey
◆ m_TopoClSGKey
The documentation for this class was generated from the following files: