![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
27 constexpr
float cellEtaSize = 0.1;
28 constexpr
float cellPhiSize = 0.1;
30 template <
typename...
T>
32 std::unique_ptr<xAOD::CaloCluster>&
dest,
34 for (
const auto& momentId : {momentIds...}) {
36 src.retrieveMoment(momentId, moment);
37 dest->insertMoment(momentId, moment);
43 ISvcLocator* pSvcLocator)
77 "Number of selectors doesn't match number of given fwd-electron selector names"
80 return StatusCode::FAILURE;
88 return StatusCode::SUCCESS;
94 ATH_MSG_INFO(
"====> Forward Egamma Statistics =============");
97 ATH_MSG_INFO(
"=============================================");
99 return StatusCode::SUCCESS;
107 std::make_unique<xAOD::ElectronContainer>(),
108 std::make_unique<xAOD::ElectronAuxContainer>())
124 std::make_unique<CaloClusterCellLinkContainer>())
137 ATH_CHECK(caloDetDescrMgrHandle.isValid());
141 std::vector<ElementLink<xAOD::CaloClusterContainer>>
142 > caloClusterLinks(
"constituentClusterLinks");
146 size_t origClusterIndex = 0;
152 std::vector<ElementLink<xAOD::CaloClusterContainer>> constituentLinks;
161 cluster->getSisterClusterLink();
164 constituentLinks.push_back(sisterCluster);
169 constituentLinks.emplace_back(*inputClusters, origClusterIndex, ctx);
173 cluster->getCellLinks()->getCellContainerLink();
176 std::unique_ptr<xAOD::CaloCluster> newCluster =
178 cookieCut(*cluster, *calodetdescrmgr, cellCont) :
179 std::make_unique<xAOD::CaloCluster>(*cluster);
185 caloClusterLinks(*newCluster) = constituentLinks;
186 outClusterContainer->
push_back(std::move(newCluster));
188 size_t index = outClusterContainer->
size() - 1;
190 const std::vector<ElementLink<xAOD::CaloClusterContainer>> clusterLinkVector{clusterLink};
193 egammaRecsFwd.
push_back(std::make_unique<egammaRec>(clusterLinkVector));
207 for (
const egammaRec* egRec : egammaRecsFwd) {
209 return StatusCode::FAILURE;
223 el->setCaloClusterLinks(egRec->caloClusterElementLinks());
229 ++buff_MatchedClusters;
230 el->setTrackParticleLinks(egRec->trackParticleElementLinks());
234 el->setCharge(trackParticle->
charge());
237 " corresponding egammaRec has at least one");
241 el->setTrackCaloMatchValues(
244 egRec->deltaPhiRescaled(),
245 egRec->deltaPhiLast()
262 el->setSelectionisEM(
accept.getCutResultInverted(),
"isEM" +
name);
270 outClusterContainerCellLink);
272 return StatusCode::SUCCESS;
277 const EventContext& ctx,
291 return StatusCode::SUCCESS;
295 ATH_MSG_ERROR(
"EMTrackMatchBuilder is empty, but track matching is enabled");
296 return StatusCode::FAILURE;
301 return StatusCode::FAILURE;
304 return StatusCode::SUCCESS;
319 const bool isEC = cp0.
emaxEC >= cp0.emaxF;
320 const float eta = isEC ? cp0.etaEC : cp0.etaF;
321 const float phi = isEC ? cp0.phiEC : cp0.phiF;
327 ATH_MSG_ERROR(
"CaloClusterStoreHelper::makeCluster failed.");
347 for (; cellItr != cellEnd; ++cellItr) {
354 const bool excludeCell = isEC ?
static std::unique_ptr< xAOD::CaloCluster > makeCluster(const CaloCellContainer *cellCont)
Creates a valid CaloCluster with a private Aux-Store and CellLink container.
@ SECOND_R
Second Moment in .
Find the reference position (eta, phi) relative to which cells are restricted.
static StatusCode finalizeClusters(SG::WriteHandle< CaloClusterCellLinkContainer > &h, xAOD::CaloClusterContainer *pClusterColl)
Finalize clusters (move CaloClusterCellLink to a separate container).
virtual double phi() const override final
get phi (through CaloDetDescrElement)
Scalar phi() const
phi method
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.
Scalar eta() const
pseudorapidity method
ToolHandleArray< IAsgForwardElectronIsEMSelector > m_forwardElectronIsEMSelectors
Handle to the selectors.
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
egammaForwardBuilder(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
StatusCode accept(const xAOD::Muon *mu)
Gaudi::Accumulators::Counter m_AllClusters
@ deltaEta2
difference between the cluster eta (second sampling) and the eta of the track extrapolated to the sec...
const_iterator begin() const
const begin method
Gaudi::Property< bool > m_doCookieCutting
Private member flag to do cookie cutting.
@ CENTER_LAMBDA
Shower depth at Cluster Centroid.
StatusCode RetrieveEMTrackMatchBuilder()
StatusCode ExecObjectQualityTool(const EventContext &ctx, xAOD::Egamma *eg) const
unsigned index() const
Accessor for the index of the cell in the CaloCellContainer.
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
@ ENG_FRAC_MAX
Energy fraction of hottest cell.
Definition of CaloDetDescrManager.
weight_t weight() const
Accessor for weight associated to this cell.
An algorithm that can be simultaneously executed in multiple threads.
@ SECOND_LAMBDA
Second Moment in .
Gaudi::Property< float > m_maxDelR
Size of cone to cookie cut on FCal.
Bookkeeping of cells that make up a cluster Simplified replacement for CaloCellLink,...
SG::WriteHandleKey< CaloClusterCellLinkContainer > m_outClusterContainerCellLinkKey
Output cluster container cell links: name taken from containter name.
@ SECOND_ENG_DENS
Second Moment in E/V.
Description of a calorimeter cluster.
virtual StatusCode initialize() override final
Initialize method.
double deltaEta(const I4Momentum &p1, const I4Momentum &p2)
Computes efficiently .
virtual StatusCode execute(const EventContext &ctx) const override final
Execute method.
::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.
bool addCell(const unsigned cellIdx, const weight_t weight=1.0)
Method to add a cell to the cluster.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
const CaloClusterCellLink * getCellLinks() const
Get a pointer to the CaloClusterCellLink object (const version)
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.
@ deltaPhi2
difference between the cluster phi (second sampling) and the phi of the track extrapolated to the sec...
value_type push_back(value_type pElem)
Add an element to the end of the collection.
StatusCode initialize(bool used=true)
std::unique_ptr< xAOD::CaloCluster > cookieCut(const xAOD::CaloCluster &cluster, const CaloDetDescrManager &mgr, const DataLink< CaloCellContainer > &cellCont) const
Remove cells that are too far from the center of mass.
const_iterator end() const
const end method
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.
@ SIGNIFICANCE
Cluster significance.
#define ATH_MSG_WARNING(x)
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_topoClusterKey
Input topo cluster type.
static void calculateKine(xAOD::CaloCluster *clu, const bool useweight=true, const bool updateLayers=true, const bool useGPUCriteria=false)
Helper class to calculate cluster kinematics based on cells.
@ LATERAL
Normalized lateral moment.
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloDetDescrMgrKey
Calorimeter description.
Class describing a TrackParticle.
bool hasSampling(const CaloSample s) const
Checks if certain smapling contributes to cluster.
@ LONGITUDINAL
Normalized longitudinal moment.
const_iterator to loop over cells belonging to a cluster
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.
virtual double eta() const override final
get eta (through CaloDetDescrElement)
Gaudi::Property< int > m_maxDelEtaCells
Size of maximum search window in eta.
SG::WriteHandleKey< xAOD::ElectronContainer > m_electronOutputKey
Output electron container.