 |
ATLAS Offline Software
|
Go to the documentation of this file.
25 constexpr
float cellEtaSize = 0.1;
26 constexpr
float cellPhiSize = 0.1;
30 ISvcLocator* pSvcLocator)
66 "Number of selectors doesn't match number of given fwd-electron selector names"
69 return StatusCode::FAILURE;
77 return StatusCode::SUCCESS;
83 ATH_MSG_INFO(
"====> Forward Egamma Statistics =============");
86 ATH_MSG_INFO(
"=============================================");
88 return StatusCode::SUCCESS;
96 std::make_unique<xAOD::ElectronContainer>(),
97 std::make_unique<xAOD::ElectronAuxContainer>())
113 std::make_unique<CaloClusterCellLinkContainer>())
126 ATH_CHECK(caloDetDescrMgrHandle.isValid());
130 std::vector<ElementLink<xAOD::CaloClusterContainer>>
131 > caloClusterLinks(
"constituentClusterLinks");
135 size_t origClusterIndex = 0;
141 std::vector<ElementLink<xAOD::CaloClusterContainer>> constituentLinks;
150 cluster->getSisterClusterLink();
153 constituentLinks.push_back(sisterCluster);
158 constituentLinks.emplace_back(*inputClusters, origClusterIndex, ctx);
162 cluster->getCellLinks()->getCellContainerLink();
165 std::unique_ptr<xAOD::CaloCluster> newCluster =
169 std::make_unique<xAOD::CaloCluster>(*cluster);
175 caloClusterLinks(*newCluster) = constituentLinks;
176 outClusterContainer->
push_back(std::move(newCluster));
178 size_t index = outClusterContainer->
size() - 1;
180 const std::vector<ElementLink<xAOD::CaloClusterContainer>> clusterLinkVector{clusterLink};
183 egammaRecsFwd.
push_back(std::make_unique<egammaRec>(clusterLinkVector));
197 for (
const egammaRec* egRec : egammaRecsFwd) {
199 return StatusCode::FAILURE;
213 el->setCaloClusterLinks(egRec->caloClusterElementLinks());
219 ++buff_MatchedClusters;
220 el->setTrackParticleLinks(egRec->trackParticleElementLinks());
224 el->setCharge(trackParticle->
charge());
227 " corresponding egammaRec has at least one");
231 el->setTrackCaloMatchValues(
234 egRec->deltaPhiRescaled(),
235 egRec->deltaPhiLast()
252 el->setSelectionisEM(
accept.getCutResultInverted(),
"isEM" +
name);
260 outClusterContainerCellLink);
262 return StatusCode::SUCCESS;
267 const EventContext& ctx,
281 return StatusCode::SUCCESS;
285 ATH_MSG_ERROR(
"EMTrackMatchBuilder is empty, but track matching is enabled");
286 return StatusCode::FAILURE;
291 return StatusCode::FAILURE;
294 return StatusCode::SUCCESS;
static StatusCode finalizeClusters(SG::WriteHandle< CaloClusterCellLinkContainer > &h, xAOD::CaloClusterContainer *pClusterColl)
Finalize clusters (move CaloClusterCellLink to a separate container).
egammaClusterCookieCut::CookieCutPars m_CookieCutPars
static StatusCode AddContainerWriteHandle(SG::WriteHandle< xAOD::CaloClusterContainer > &clusColl)
Creates a new xAOD::CaloClusterContainer in the given WriteHandle + CaloClusterAuxContainer and recor...
Helper class to provide type-safe access to aux data.
float charge() const
Returns the charge.
ToolHandleArray< IAsgForwardElectronIsEMSelector > m_forwardElectronIsEMSelectors
Handle to the selectors.
egammaForwardBuilder(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
StatusCode accept(const xAOD::Muon *mu)
Gaudi::Accumulators::Counter m_AllClusters
Gaudi::Property< bool > m_doCookieCutting
Private member flag to do cookie cutting.
StatusCode RetrieveEMTrackMatchBuilder()
StatusCode ExecObjectQualityTool(const EventContext &ctx, xAOD::Egamma *eg) const
const uint16_t AuthorFwdElectron
Electron reconstructed by the Forward cluster-based algorithm.
const std::string & key() const
Return the StoreGate ID for the referenced object.
Gaudi::Property< std::vector< std::string > > m_forwardElectronIsEMSelectorResultNames
Definition of CaloDetDescrManager.
An algorithm that can be simultaneously executed in multiple threads.
Gaudi::Property< float > m_maxDelR
Size of cone to cookie cut on FCal.
SG::WriteHandleKey< CaloClusterCellLinkContainer > m_outClusterContainerCellLinkKey
Output cluster container cell links: name taken from containter name.
Description of a calorimeter cluster.
virtual StatusCode initialize() override final
Initialize method.
virtual StatusCode execute(const EventContext &ctx) const override final
Execute method.
std::unique_ptr< xAOD::CaloCluster > cookieCut(const xAOD::CaloCluster &cluster, const CaloDetDescrManager &mgr, const DataLink< CaloCellContainer > &cellCont, const egammaClusterCookieCut::CookieCutPars &pars)
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Property< bool > m_doTrackMatching
Private member flag to do the track matching.
Gaudi::Property< int > m_maxDelPhiCells
Size of maximum search window in phi.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
SG::WriteHandleKey< xAOD::CaloClusterContainer > m_outClusterContainerKey
Output cluster container.
ElementLink implementation for ROOT usage.
virtual StatusCode finalize() override final
Finalize method.
void calculate(xAOD::Electron &electron)
ToolHandle< IEMTrackMatchBuilder > m_trackMatchBuilder
Tool to perform track-cluster matching.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
StatusCode initialize(bool used=true)
This class provides the client interface for accessing the detector description information common to...
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
#define ATH_MSG_WARNING(x)
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_topoClusterKey
Input topo cluster type.
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloDetDescrMgrKey
Calorimeter description.
Class describing a TrackParticle.
Gaudi::Accumulators::Counter m_MatchedClusters
ToolHandle< IegammaOQFlagsBuilder > m_objectQualityTool
Tool to perform object quality.
size_type size() const noexcept
Returns the number of elements in the collection.
Gaudi::Property< int > m_maxDelEtaCells
Size of maximum search window in eta.
SG::WriteHandleKey< xAOD::ElectronContainer > m_electronOutputKey
Output electron container.