![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
29 constexpr
float cellEtaSize = 0.1;
30 constexpr
float cellPhiSize = 0.1;
32 template <
typename...
T>
34 std::unique_ptr<xAOD::CaloCluster>&
dest,
36 for (
const auto& momentId : {momentIds...}) {
38 src.retrieveMoment(momentId, moment);
39 dest->insertMoment(momentId, moment);
45 ISvcLocator* pSvcLocator)
79 "Number of selectors doesn't match number of given fwd-electron selector names"
82 return StatusCode::FAILURE;
90 return StatusCode::SUCCESS;
96 ATH_MSG_INFO(
"====> Forward Egamma Statistics =============");
99 ATH_MSG_INFO(
"=============================================");
101 return StatusCode::SUCCESS;
109 std::make_unique<xAOD::ElectronContainer>(),
110 std::make_unique<xAOD::ElectronAuxContainer>())
126 std::make_unique<CaloClusterCellLinkContainer>())
139 ATH_CHECK(caloDetDescrMgrHandle.isValid());
143 std::vector<ElementLink<xAOD::CaloClusterContainer>>
144 > caloClusterLinks(
"constituentClusterLinks");
148 size_t origClusterIndex = 0;
154 std::vector<ElementLink<xAOD::CaloClusterContainer>> constituentLinks;
163 cluster->getSisterClusterLink();
166 constituentLinks.push_back(sisterCluster);
171 constituentLinks.emplace_back(*inputClusters, origClusterIndex, ctx);
175 cluster->getCellLinks()->getCellContainerLink();
178 std::unique_ptr<xAOD::CaloCluster> newCluster =
180 cookieCut(*cluster, *calodetdescrmgr, cellCont) :
181 std::make_unique<xAOD::CaloCluster>(*cluster);
187 caloClusterLinks(*newCluster) = constituentLinks;
188 outClusterContainer->
push_back(std::move(newCluster));
190 size_t index = outClusterContainer->
size() - 1;
192 const std::vector<ElementLink<xAOD::CaloClusterContainer>> clusterLinkVector{clusterLink};
195 egammaRecsFwd.
push_back(std::make_unique<egammaRec>(clusterLinkVector));
209 for (
const egammaRec* egRec : egammaRecsFwd) {
211 return StatusCode::FAILURE;
225 el->setCaloClusterLinks(egRec->caloClusterElementLinks());
231 ++buff_MatchedClusters;
232 el->setTrackParticleLinks(egRec->trackParticleElementLinks());
236 el->setCharge(trackParticle->
charge());
239 " corresponding egammaRec has at least one");
243 el->setTrackCaloMatchValues(
246 egRec->deltaPhiRescaled(),
247 egRec->deltaPhiLast()
264 el->setSelectionisEM(
accept.getCutResultInverted(),
"isEM" +
name);
272 outClusterContainerCellLink);
274 return StatusCode::SUCCESS;
279 const EventContext& ctx,
293 return StatusCode::SUCCESS;
297 ATH_MSG_ERROR(
"EMTrackMatchBuilder is empty, but track matching is enabled");
298 return StatusCode::FAILURE;
303 return StatusCode::FAILURE;
306 return StatusCode::SUCCESS;
321 const bool isEC = cp0.
emaxEC >= cp0.emaxF;
322 const float eta = isEC ? cp0.etaEC : cp0.etaF;
323 const float phi = isEC ? cp0.phiEC : cp0.phiF;
329 ATH_MSG_ERROR(
"CaloClusterStoreHelper::makeCluster failed.");
349 for (; cellItr != cellEnd; ++cellItr) {
356 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.
double deltaPhi(double phiA, double phiB)
delta Phi in range [-pi,pi[
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.