 |
ATLAS Offline Software
|
Go to the documentation of this file.
24 constexpr
float cellEtaSize = 0.1;
25 constexpr
float cellPhiSize = 0.1;
29 ISvcLocator* pSvcLocator)
65 "Number of selectors doesn't match number of given fwd-electron selector names"
68 return StatusCode::FAILURE;
83 return StatusCode::SUCCESS;
89 ATH_MSG_INFO(
"====> Forward Egamma Statistics =============");
92 ATH_MSG_INFO(
"=============================================");
94 return StatusCode::SUCCESS;
102 std::make_unique<xAOD::ElectronContainer>(),
103 std::make_unique<xAOD::ElectronAuxContainer>())
119 std::make_unique<CaloClusterCellLinkContainer>())
132 ATH_CHECK(caloDetDescrMgrHandle.isValid());
136 std::vector<ElementLink<xAOD::CaloClusterContainer>>
137 > caloClusterLinks(
"constituentClusterLinks");
141 size_t origClusterIndex = 0;
145 std::pair<float,float> nPVmu = this->
getnPVmu(ctx);
146 gei.
nPV = nPVmu.first;
147 gei.
acmu = nPVmu.second;
156 std::vector<ElementLink<xAOD::CaloClusterContainer>> constituentLinks;
165 cluster->getSisterClusterLink();
168 constituentLinks.push_back(sisterCluster);
173 constituentLinks.emplace_back(*inputClusters, origClusterIndex, ctx);
177 cluster->getCellLinks()->getCellContainerLink();
180 std::unique_ptr<xAOD::CaloCluster> newCluster =
184 std::make_unique<xAOD::CaloCluster>(*cluster);
186 if (!newCluster || newCluster->
size() == 0) {
187 ATH_MSG_DEBUG(
"Could not build a new cluster, or has 0 cell");
193 {
ATH_MSG_ERROR(
"Problem executing MVA cluster tool for fwd electron"); }
195 caloClusterLinks(*newCluster) = constituentLinks;
196 outClusterContainer->
push_back(std::move(newCluster));
198 size_t index = outClusterContainer->
size() - 1;
200 const std::vector<ElementLink<xAOD::CaloClusterContainer>> clusterLinkVector{clusterLink};
203 egammaRecsFwd.
push_back(std::make_unique<egammaRec>(clusterLinkVector));
217 for (
const egammaRec* egRec : egammaRecsFwd) {
219 return StatusCode::FAILURE;
233 el->setCaloClusterLinks(egRec->caloClusterElementLinks());
239 ++buff_MatchedClusters;
240 el->setTrackParticleLinks(egRec->trackParticleElementLinks());
244 el->setCharge(trackParticle->
charge());
247 " corresponding egammaRec has at least one");
251 el->setTrackCaloMatchValues(
254 egRec->deltaPhiRescaled(),
255 egRec->deltaPhiLast()
272 el->setSelectionisEM(
accept.getCutResultInverted(),
"isEM" +
name);
280 outClusterContainerCellLink);
282 return StatusCode::SUCCESS;
287 const EventContext& ctx,
301 return StatusCode::SUCCESS;
305 ATH_MSG_ERROR(
"EMTrackMatchBuilder is empty, but track matching is enabled");
306 return StatusCode::FAILURE;
311 return StatusCode::FAILURE;
314 return StatusCode::SUCCESS;
318 const EventContext& ctx)
const {
325 <<
" container, returning nPV = 0");
327 for (
const auto *vtx : *vtxCont) {
340 return std::make_pair(npv,
mu);
SG::ReadHandleKey< xAOD::EventInfo > m_eiKey
Input EventInfo for fwd energy calibration.
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.
#define ATH_MSG_VERBOSE(x)
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.
Gaudi::Property< bool > m_doEnergyCal
Private member flag to do energy calibration.
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.
const_pointer_type get() const
Dereference the pointer, but don't cache anything.
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.
size_t size() const
size method (forwarded from CaloClusterCellLink obj)
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)
std::pair< unsigned int, float > getnPVmu(const EventContext &ctx) const
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.
A structure holding some global event information.
#define ATH_MSG_WARNING(x)
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_topoClusterKey
Input topo cluster type.
SG::ReadHandleKey< xAOD::VertexContainer > m_pVtxKey
Input primary vertices for fwd energy calibration.
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloDetDescrMgrKey
Calorimeter description.
Class describing a TrackParticle.
ServiceHandle< IegammaMVASvc > m_MVACalibSvc
Handle to the MVA calibration service.
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.
float actualInteractionsPerCrossing() const
Average interactions per crossing for the current BCID - for in-time pile-up.