ATLAS Offline Software
Loading...
Searching...
No Matches
egammaSuperClusterBuilderBase Class Referenceabstract

Base class for electronSuperClusterBuilder photonSuperClusterBuilder egammaSuperClusterBuilder This class cannot be instantiated by itself since the execute method is not implemented. More...

#include <egammaSuperClusterBuilderBase.h>

Inheritance diagram for egammaSuperClusterBuilderBase:
Collaboration diagram for egammaSuperClusterBuilderBase:

Public Member Functions

virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
virtual void setFilterPassed (bool state, const EventContext &ctx) const
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Member Functions

 egammaSuperClusterBuilderBase (const std::string &name, ISvcLocator *pSvcLocator)
 Protected constructor since this class should not be instantiated by itself.
virtual StatusCode initialize () override
 should be called by the derived class in the initialize phase
virtual StatusCode execute (const EventContext &ctx) const override
 should be called by the derived class in the execute phase
virtual xAOD::EgammaParameters::EgammaType getEgammaRecType (const egammaRec *egRec) const =0
virtual bool egammaRecPassesSelection (const egammaRec *egRec) const
virtual StatusCode redoMatching (const EventContext &ctx, SG::WriteHandle< EgammaRecContainer > &newEgammaRecs) const
virtual std::vector< std::size_t > searchForSecondaryClusters (std::size_t egammaInd, const EgammaRecContainer *egammaRecs, std::vector< bool > &isUsed) const =0
bool matchesInWindow (const xAOD::CaloCluster *ref, const xAOD::CaloCluster *clus) const
 Is clus in window center around ref?
std::unique_ptr< xAOD::CaloClustercreateNewCluster (const EventContext &ctx, const std::vector< const xAOD::CaloCluster * > &clusters, const DataLink< CaloCellContainer > &cellCont, const CaloDetDescrManager &mgr, xAOD::EgammaParameters::EgammaType egType, xAOD::CaloClusterContainer *precorrClusters) const
 Add new supercluster ,created out of the input clusters, to the newClusters collections.
bool seedClusterSelection (const xAOD::CaloCluster *clus) const
 check if we pass the basic criteria for a seed cluster
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Protected Attributes

Gaudi::Property< float > m_EtThresholdCut
 Seed selection requirements.
SG::ReadHandleKey< EgammaRecContainerm_inputEgammaRecContainerKey
 Key for input egammaRec container.
SG::ReadCondHandleKey< CaloDetDescrManagerm_caloDetDescrMgrKey
SG::WriteHandleKey< EgammaRecContainerm_outputEgammaRecContainerKey
 Key for output egammaRec container.
SG::WriteHandleKey< xAOD::CaloClusterContainerm_outputSuperClusterCollectionName
 Key for output clusters.
SG::WriteHandleKey< xAOD::CaloClusterContainerm_precorrClustersKey
 Optional key for pre-correction clusters.
float m_searchWindowEtaBarrel = 0.0F
float m_searchWindowPhiBarrel = 0.0F
float m_searchWindowEtaEndcap = 0.0F
float m_searchWindowPhiEndcap = 0.0F

Static Protected Attributes

static constexpr float s_cellEtaSize = 0.025
static constexpr float s_cellPhiSize = M_PI / 128.
static constexpr float s_TG3Run3E4cellEtaMax = 1.72
static constexpr float s_TG3Run3E3cellEtaMin = 1.2
static constexpr float s_TG3Run2E4cellEtaMax = 1.6
static constexpr float s_TG3Run2E4cellEtaMin = 1.4
static constexpr float s_ClEtaMinForTG3cell = s_TG3Run2E4cellEtaMin - 0.03
static constexpr float s_ClEtaMaxForTG3cell = s_TG3Run3E4cellEtaMax + 0.03

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

StatusCode fillClusterConstrained (xAOD::CaloCluster &tofill, const std::vector< const xAOD::CaloCluster * > &clusters, const CookieCutterHelpers::CentralPosition &cp0) const
 Fill super cluster constraining its size in eta,phi around the overall hottest cell and the its L2 size.
StatusCode addTileGap3CellsinWindow (xAOD::CaloCluster &tofill, const CaloDetDescrManager &mgr) const
 add all tile Gap 3 cells in a window.
StatusCode calibrateCluster (const EventContext &ctx, xAOD::CaloCluster *newCluster, const CaloDetDescrManager &mgr, const xAOD::EgammaParameters::EgammaType egType, xAOD::CaloClusterContainer *precorrClusters) const
 function to calibrate the new clusters energy
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

float m_addCellsWindowEtaBarrel = 0.0F
float m_addCellsWindowEtaEndcap = 0.0F
float m_extraL0L1PhiSize = 0.0F
float m_extraL3EtaSize = 0.0F
Gaudi::Property< bool > m_linkToConstituents
 Decorate the supercluster with links to the component topoclusters.
Gaudi::Property< bool > m_useExtendedTG3
 Use extended TG3 definition (only after Run 2)
Gaudi::Property< int > m_searchWindowEtaCellsBarrel
 Size of topocluster search window in eta for the barrel.
Gaudi::Property< int > m_searchWindowPhiCellsBarrel
 Size of topocluster search window in phi for the barrel.
Gaudi::Property< int > m_searchWindowEtaCellsEndcap
 Size of topocluster search window in eta for the end-cap.
Gaudi::Property< int > m_searchWindowPhiCellsEndcap
 Size of topocluster search window in phi for the end-cap.
Gaudi::Property< int > m_addCellsWindowEtaCellsBarrel
 Size of windows et eta in which cells of topoclusters are added for the barrel (units of 2nd layer cells)
Gaudi::Property< int > m_addCellsWindowEtaCellsEndcap
 Size of windows et eta in which cells of topoclusters are edded for the endcap (units of 2nd layer cells)
Gaudi::Property< int > m_extraL0L1PhiSizeCells
 "When adding L0 (PS) and L1 cells, how much wider than the L2 size of the cluster is the acceptance in phi (units of 2nd layer cells)
Gaudi::Property< int > m_extraL3EtaSizeCells
 "When adding L3 cells, how much wider in eta than the L2
ServiceHandle< IegammaMVASvcm_MVACalibSvc
 Handle to the MVA calibration service.
ToolHandle< IegammaSwToolm_clusterCorrectionTool
 Tool to handle cluster corrections.
ToolHandle< IegammaCheckEnergyDepositToolm_egammaCheckEnergyDepositTool
 Pointer to the egammaCheckEnergyDepositTool.
ToolHandle< IegammaCellRecoveryToolm_egammaCellRecoveryTool
 Pointer to the egammaCellRecoveryTool.
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Base class for electronSuperClusterBuilder photonSuperClusterBuilder egammaSuperClusterBuilder This class cannot be instantiated by itself since the execute method is not implemented.

This class provides functions which are used to build supercluster and are independet from the nature of the particles, for example a function to decide if two clusters are compatible to be added in a supercluster (egammaSuperClusterBuilderBase::matchesInWindow) and a function (egammaSuperClusterBuilderBase::createNewCluster) to create a new supercluster from a collection of clusters.

Definition at line 46 of file egammaSuperClusterBuilderBase.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ egammaSuperClusterBuilderBase()

egammaSuperClusterBuilderBase::egammaSuperClusterBuilderBase ( const std::string & name,
ISvcLocator * pSvcLocator )
protected

Protected constructor since this class should not be instantiated by itself.

Definition at line 35 of file egammaSuperClusterBuilderBase.cxx.

38 : AthReentrantAlgorithm(name, pSvcLocator)
39{
40}

Member Function Documentation

◆ addTileGap3CellsinWindow()

StatusCode egammaSuperClusterBuilderBase::addTileGap3CellsinWindow ( xAOD::CaloCluster & tofill,
const CaloDetDescrManager & mgr ) const
private

add all tile Gap 3 cells in a window.

All the cells in the TileGap3 layer which are in a eta x phi window 0.2, ~0.15 centered around the raw position of the cluster param tofill with weight 1.

Definition at line 617 of file egammaSuperClusterBuilderBase.cxx.

620{
621
622 double searchWindowEta = m_useExtendedTG3 ? 0.35 : 0.2;
623 constexpr double searchWindowPhi = 2 * M_PI / 64.0 + M_PI / 64; // ~ 0.15 rad
624 std::vector<const CaloCell*> cells;
625 cells.reserve(16);
626 const CaloCellContainer* inputcells =
627 tofill.getCellLinks()->getCellContainer();
628
629 if (!inputcells) {
630 ATH_MSG_ERROR("No cell container in addRemainingCellsToCluster?");
631 return StatusCode::FAILURE;
632 }
633
634 CaloCellList myList(&mgr, inputcells);
635
636 const std::vector<CaloSampling::CaloSample> samples = {
637 CaloSampling::TileGap3
638 };
639
640 for (auto samp : samples) {
641 // quite slow
642 myList.select(
643 tofill.eta0(), tofill.phi0(), searchWindowEta, searchWindowPhi, samp);
644 cells.insert(cells.end(), myList.begin(), myList.end());
645 }
646
647 for (const auto* cell : cells) {
648 if (!cell) {
649 continue;
650 }
651 const CaloDetDescrElement* dde = cell->caloDDE();
652 if (!dde) {
653 continue;
654 }
655
657 float minEta = s_TG3Run2E4cellEtaMin;
658 if (m_useExtendedTG3) {
659 minEta = s_TG3Run3E3cellEtaMin;
660 // if |eta2| < 1.56, keep only E3, else keep E3+E4.
661 // |eta2| uses as the eta of the highest energy cell in layer 2 as proxy
662 if (std::abs(tofill.eta0()) > 1.56) {
664 }
665 }
666 float cellaEtaRaw = std::abs(dde->eta_raw());
667 if (cellaEtaRaw >= minEta && cellaEtaRaw <= maxEta) {
668 int index = inputcells->findIndex(dde->calo_hash());
669 tofill.addCell(index, 1.);
670 }
671 }
672 return StatusCode::SUCCESS;
673}
#define M_PI
#define ATH_MSG_ERROR(x)
int findIndex(const IdentifierHash theHash) const
Return index of the cell with a given hash.
Gaudi::Property< bool > m_useExtendedTG3
Use extended TG3 definition (only after Run 2)
const CaloClusterCellLink * getCellLinks() const
Get a pointer to the CaloClusterCellLink object (const version)
flt_t eta0() const
Returns raw of cluster seed.
bool addCell(const unsigned index, const double weight)
Method to add a cell to the cluster (Beware: Kinematics not updated!)
flt_t phi0() const
Returns raw of cluster seed.
str index
Definition DeMoScan.py:362
constexpr float maxEta

◆ calibrateCluster()

StatusCode egammaSuperClusterBuilderBase::calibrateCluster ( const EventContext & ctx,
xAOD::CaloCluster * newCluster,
const CaloDetDescrManager & mgr,
const xAOD::EgammaParameters::EgammaType egType,
xAOD::CaloClusterContainer * precorrClusters ) const
private

function to calibrate the new clusters energy

Calibrate with

Definition at line 676 of file egammaSuperClusterBuilderBase.cxx.

682{
683
685 // Save the state before the corrections
686 newCluster->setAltE(newCluster->e());
687 newCluster->setAltEta(newCluster->eta());
688 newCluster->setAltPhi(newCluster->phi());
689 // first do the corrections
690 if (precorrClusters) {
691 precorrClusters->push_back(std::make_unique<xAOD::CaloCluster>());
692 *precorrClusters->back() = *newCluster;
693 }
695 ctx, newCluster, egType, xAOD::EgammaHelpers::isBarrel(newCluster)));
696 double aeta = std::abs(newCluster->eta());
697 if (aeta > 10) {
698 ATH_MSG_DEBUG("Too large eta after S-shape corrections. "
699 "SuperCluster rejected");
700 return StatusCode::FAILURE;
701 }
702 newCluster->setRawE(newCluster->e());
703 newCluster->setRawEta(newCluster->eta());
704 newCluster->setRawPhi(newCluster->phi());
705 //
707 ATH_CHECK(m_MVACalibSvc->execute(*newCluster, egType));
708
709 return StatusCode::SUCCESS;
710}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x)
const T * back() const
Access the last element in the collection as an rvalue.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
ToolHandle< IegammaSwTool > m_clusterCorrectionTool
Tool to handle cluster corrections.
ServiceHandle< IegammaMVASvc > m_MVACalibSvc
Handle to the MVA calibration service.
void setRawEta(flt_t)
Set for signal state UNCALIBRATED.
void setAltPhi(flt_t)
Set for signal state ALTCALIBRATED.
void setRawPhi(flt_t)
Set for signal state UNCALIBRATED.
void setRawE(flt_t)
Set Energy for signal state UNCALIBRATED.
virtual double eta() const
The pseudorapidity ( ) of the particle.
void setAltEta(flt_t)
Set for signal state ALTCALIBRATED.
virtual double e() const
The total energy of the particle.
virtual double phi() const
The azimuthal angle ( ) of the particle.
void setAltE(flt_t)
Set Energy for signal state ALTCALIBRATED.
void fillPositionsInCalo(xAOD::CaloCluster *cluster, const CaloDetDescrManager &mgr)
Function to decorate the calo cluster with position variables.
void refineEta1Position(xAOD::CaloCluster *cluster, const CaloDetDescrManager &mgr)
function to refine position in eta1
bool isBarrel(const xAOD::Egamma *eg)
return true if the cluster is in the barrel

◆ cardinality()

unsigned int AthCommonReentrantAlgorithm< Gaudi::Algorithm >::cardinality ( ) const
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.

64{
65 return 0;
66}

◆ createNewCluster()

std::unique_ptr< xAOD::CaloCluster > egammaSuperClusterBuilderBase::createNewCluster ( const EventContext & ctx,
const std::vector< const xAOD::CaloCluster * > & clusters,
const DataLink< CaloCellContainer > & cellCont,
const CaloDetDescrManager & mgr,
xAOD::EgammaParameters::EgammaType egType,
xAOD::CaloClusterContainer * precorrClusters ) const
protected

Add new supercluster ,created out of the input clusters, to the newClusters collections.

It decides which cells of the seed and the satellite clusters to add (boxing / cookie cutter).

The reference point is computed with findCentralPosition which returns the hottest cells looping on the cells of all the considered topo-clusters. Two references are computed, one for the barrel, one for the endcap. Computations are done in the calo-frame. Once the reference is computed the decision is made by egammaSuperClusterBuilderBase::fillClusterConstrained which add the cells for the accordeon.

Cells from the tile gap are added using egammaSuperClusterBuilderBase::addTileGap3CellsinWindow.

Kinematic properties of the cluster are computed from the property of the cells.

If the supercluster has a cluster energy less then EtThresholdCut (also used as threshould for the seed) false returned, and the cluster is not added. The supercluster need to pass egammaCheckEnergyDepositTool::checkFractioninSamplingCluster if not false is returned and the cluster is not added.

Calibrations on eta1, energy are applied with egammaSuperClusterBuilderBase::calibrateCluster

Calculate the kinematics of the new cluster, after all cells are added

Definition at line 309 of file egammaSuperClusterBuilderBase.cxx.

316{
317 if (clusters.empty()) {
318 ATH_MSG_ERROR("Missing the seed cluster! Should not happen.");
319 return nullptr;
320 }
321
322 // create a new empty cluster
323 // collection will own it if
324 auto newCluster = CaloClusterStoreHelper::makeCluster(cellCont);
325
326 if (!newCluster) {
327 ATH_MSG_ERROR("CaloClusterStoreHelper::makeCluster failed.");
328 return nullptr;
329 }
330 //
331 newCluster->setClusterSize(xAOD::CaloCluster::SuperCluster);
332 // Let's try to find the eta and phi of the hottest cell in L2.
333 // This will be used as the center for restricting the cluster size.
334 CookieCutterHelpers::CentralPosition cp0(clusters, mgr);
335
336 // Set the eta0/phi0 based on the references, but in raw coordinates
337 if (cp0.emaxB >= cp0.emaxEC) {
338 newCluster->setEta0(cp0.etaB);
339 newCluster->setPhi0(cp0.phiB);
340 } else {
341 newCluster->setEta0(cp0.etaEC);
342 newCluster->setPhi0(cp0.phiEC);
343 }
344
345 // Actually fill the cluster here
346 if (fillClusterConstrained(*newCluster, clusters, cp0).isFailure()) {
347 return nullptr;
348 }
349 // Apply SW-style summation of TileGap3 cells (if necessary).
350 float eta0 = std::abs(newCluster->eta0());
351 // In Run2, we did not impose restriction to include TG3 cells at this level.
352 // It should have been [1.37,1.63]. It has no impact on performance as TG3 was
353 // only used in energy calibration BDT in [1.4,1.6].
354 // In Run three we restrict to [1.37,1.75]
355 if (!m_useExtendedTG3 ||
356 (eta0 > s_ClEtaMinForTG3cell && eta0 < s_ClEtaMaxForTG3cell)) {
357 if (addTileGap3CellsinWindow(*newCluster, mgr).isFailure()) {
358 ATH_MSG_ERROR("Problem with the input cluster when running "
359 "AddTileGap3CellsinWindow?");
360
361 return nullptr;
362 }
363 }
365 CaloClusterKineHelper::calculateKine(newCluster.get(), true, true);
366
367 // If adding all EM cells we are somehow below the seed threshold then remove
368 if (newCluster->et() < m_EtThresholdCut) {
369 return nullptr;
370 }
371
372 // Check to see if cluster pases basic requirements. If not, kill it.
373 if (!m_egammaCheckEnergyDepositTool.empty() &&
374 !m_egammaCheckEnergyDepositTool->checkFractioninSamplingCluster(
375 newCluster.get())) {
376 return nullptr;
377 }
378
379 // Apply correction calibration
380 if (calibrateCluster(ctx, newCluster.get(), mgr, egType, precorrClusters)
381 .isFailure()) {
382 ATH_MSG_WARNING("There was problem calibrating the object");
383 return nullptr;
384 }
385
386 // Avoid negative energy clusters
387 if (newCluster->et() < 0) {
388 return nullptr;
389 }
390
392 // EDM vector to constituent clusters
393 std::vector<ElementLink<xAOD::CaloClusterContainer>> constituentLinks;
394 for (const xAOD::CaloCluster* cluster : clusters) {
395 ElementLink<xAOD::CaloClusterContainer> sisterCluster =
396 cluster->getSisterClusterLink();
397
398 // Set the element Link to the constitents
399 if (sisterCluster) {
400 constituentLinks.push_back(sisterCluster);
401 } else {
402 ATH_MSG_WARNING("No sister Link available");
403 }
404 }
405 // Set the link from the super cluster to the constituents (accumulated)
406 // clusters used.
407 static const SG::AuxElement::Accessor<
408 std::vector<ElementLink<xAOD::CaloClusterContainer>>>
409 caloClusterLinks("constituentClusterLinks");
410 caloClusterLinks(*newCluster) = constituentLinks;
411 }
412 // return the new cluster
413 return newCluster;
414}
#define ATH_MSG_WARNING(x)
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.
static std::unique_ptr< xAOD::CaloCluster > makeCluster(const CaloCellContainer *cellCont)
Creates a valid CaloCluster with a private Aux-Store and CellLink container.
SG::Accessor< T, ALLOC > Accessor
Definition AuxElement.h:573
Gaudi::Property< float > m_EtThresholdCut
Seed selection requirements.
StatusCode fillClusterConstrained(xAOD::CaloCluster &tofill, const std::vector< const xAOD::CaloCluster * > &clusters, const CookieCutterHelpers::CentralPosition &cp0) const
Fill super cluster constraining its size in eta,phi around the overall hottest cell and the its L2 si...
Gaudi::Property< bool > m_linkToConstituents
Decorate the supercluster with links to the component topoclusters.
StatusCode calibrateCluster(const EventContext &ctx, xAOD::CaloCluster *newCluster, const CaloDetDescrManager &mgr, const xAOD::EgammaParameters::EgammaType egType, xAOD::CaloClusterContainer *precorrClusters) const
function to calibrate the new clusters energy
ToolHandle< IegammaCheckEnergyDepositTool > m_egammaCheckEnergyDepositTool
Pointer to the egammaCheckEnergyDepositTool.
StatusCode addTileGap3CellsinWindow(xAOD::CaloCluster &tofill, const CaloDetDescrManager &mgr) const
add all tile Gap 3 cells in a window.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ egammaRecPassesSelection()

bool egammaSuperClusterBuilderBase::egammaRecPassesSelection ( const egammaRec * egRec) const
protectedvirtual

Reimplemented in electronSuperClusterBuilder.

Definition at line 228 of file egammaSuperClusterBuilderBase.cxx.

228 {
229 return true;
230}

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode egammaSuperClusterBuilderBase::execute ( const EventContext & ctx) const
overrideprotectedvirtual

should be called by the derived class in the execute phase

Definition at line 106 of file egammaSuperClusterBuilderBase.cxx.

107{
108 SG::ReadHandle<EgammaRecContainer> egammaRecs(m_inputEgammaRecContainerKey,
109 ctx);
110 // check is only used for serial running; remove when MT scheduler used
111 ATH_CHECK(egammaRecs.isValid());
112
113 // Have to register cluster container in order to properly get cluster
114 // links.
115 SG::WriteHandle<xAOD::CaloClusterContainer> outputClusterContainer(
117
119
120 // Create the new Electron Super Cluster based EgammaRecContainer
121 SG::WriteHandle<EgammaRecContainer> newEgammaRecs(
123 ATH_CHECK(newEgammaRecs.record(std::make_unique<EgammaRecContainer>()));
124
125 size_t inputSize = egammaRecs->size();
126 outputClusterContainer->reserve(inputSize);
127 newEgammaRecs->reserve(inputSize);
128
129 std::optional<SG::WriteHandle<xAOD::CaloClusterContainer>> precorrClustersH;
130 if (!m_precorrClustersKey.empty()) {
131 precorrClustersH.emplace(m_precorrClustersKey, ctx);
133 precorrClustersH->ptr()->reserve(inputSize);
134 }
135
136 // The calo Det Descr manager
137 SG::ReadCondHandle<CaloDetDescrManager> caloDetDescrMgrHandle{
139 };
140 ATH_CHECK(caloDetDescrMgrHandle.isValid());
141 const CaloDetDescrManager* calodetdescrmgr = *caloDetDescrMgrHandle;
142
143 // If no input return
144 if (egammaRecs->empty()) {
145 return StatusCode::SUCCESS;
146 }
147
148 // Figure the cellCont we need to point to
149 const DataLink<CaloCellContainer>& cellCont =
150 (*egammaRecs)[0]->caloCluster()->getCellLinks()->getCellContainerLink();
151
152 // Loop over input egammaRec objects, build superclusters.
153 size_t numInput = egammaRecs->size();
154 std::vector<bool> isUsed(numInput, false);
155 std::vector<bool> isUsedRevert(numInput, false);
156
157 for (std::size_t i = 0; i < egammaRecs->size(); ++i) {
158 if (isUsed[i]) {
159 continue;
160 }
161 const auto* egRec = (*egammaRecs)[i];
162 // check for good seed cluster
163 const xAOD::CaloCluster* clus = egRec->caloCluster();
164 if (!seedClusterSelection(clus)) {
165 continue;
166 }
167
168 if (!egammaRecPassesSelection(egRec)) {
169 continue;
170 }
171
172 // save status in case we fail to create supercluster
173 isUsedRevert = isUsed;
174 // Mark seed as used,
175 isUsed[i] = true;
176
177 // Start accumulating the clusters from the seed
178 std::vector<const xAOD::CaloCluster*> accumulatedClusters;
179 accumulatedClusters.push_back(clus);
180
181 // Now we find all the secondary cluster for this seed
182 // and we accumulate them
183 const std::vector<std::size_t> secondaryIndices =
184 searchForSecondaryClusters(i, egammaRecs.cptr(), isUsed);
185 for (const auto& secClusIndex : secondaryIndices) {
186 const auto* const secRec = (*egammaRecs)[secClusIndex];
187 accumulatedClusters.push_back(secRec->caloCluster());
188 }
189 ATH_MSG_DEBUG("Total clusters " << accumulatedClusters.size());
190
191 // Create the new cluster
192 std::unique_ptr<xAOD::CaloCluster> newCluster =
194 accumulatedClusters,
195 cellCont,
196 *calodetdescrmgr,
197 getEgammaRecType(egRec),
198 precorrClustersH ? precorrClustersH->ptr() : nullptr);
199
200 // If we failed to create a cluster revert isUsed for the cluster
201 if (newCluster) {
202 outputClusterContainer->push_back(std::move(newCluster));
203 }
204 else {
205 isUsed.swap(isUsedRevert);
206 continue;
207 }
208
209 // Add the cluster links to the super cluster
210 ElementLink<xAOD::CaloClusterContainer> clusterLink(
211 *outputClusterContainer, outputClusterContainer->size() - 1, ctx);
212 std::vector<ElementLink<xAOD::CaloClusterContainer>> elClusters{
213 clusterLink
214 };
215
216 // Make egammaRec object, and push it back into output container.
217 auto newEgRec = std::make_unique<egammaRec>(*egRec);
218 newEgRec->setCaloClusters(elClusters);
219 newEgammaRecs->push_back(std::move(newEgRec));
220 } // End loop on egammaRecs
221
222 ATH_CHECK(redoMatching(ctx, newEgammaRecs));
223
224 return StatusCode::SUCCESS;
225}
static StatusCode AddContainerWriteHandle(SG::WriteHandle< xAOD::CaloClusterContainer > &clusColl)
Creates a new xAOD::CaloClusterContainer in the given WriteHandle + CaloClusterAuxContainer and recor...
SG::WriteHandleKey< EgammaRecContainer > m_outputEgammaRecContainerKey
Key for output egammaRec container.
SG::ReadHandleKey< EgammaRecContainer > m_inputEgammaRecContainerKey
Key for input egammaRec container.
virtual StatusCode redoMatching(const EventContext &ctx, SG::WriteHandle< EgammaRecContainer > &newEgammaRecs) const
std::unique_ptr< xAOD::CaloCluster > createNewCluster(const EventContext &ctx, const std::vector< const xAOD::CaloCluster * > &clusters, const DataLink< CaloCellContainer > &cellCont, const CaloDetDescrManager &mgr, xAOD::EgammaParameters::EgammaType egType, xAOD::CaloClusterContainer *precorrClusters) const
Add new supercluster ,created out of the input clusters, to the newClusters collections.
SG::WriteHandleKey< xAOD::CaloClusterContainer > m_precorrClustersKey
Optional key for pre-correction clusters.
virtual bool egammaRecPassesSelection(const egammaRec *egRec) const
virtual xAOD::EgammaParameters::EgammaType getEgammaRecType(const egammaRec *egRec) const =0
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloDetDescrMgrKey
SG::WriteHandleKey< xAOD::CaloClusterContainer > m_outputSuperClusterCollectionName
Key for output clusters.
virtual std::vector< std::size_t > searchForSecondaryClusters(std::size_t egammaInd, const EgammaRecContainer *egammaRecs, std::vector< bool > &isUsed) const =0
bool seedClusterSelection(const xAOD::CaloCluster *clus) const
check if we pass the basic criteria for a seed cluster

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthCommonReentrantAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 94 of file AthCommonReentrantAlgorithm.cxx.

90{
91 // If we didn't find any symlinks to add, just return the collection
92 // from the base class. Otherwise, return the extended collection.
93 if (!m_extendedExtraObjects.empty()) {
95 }
97}
An algorithm that can be simultaneously executed in multiple threads.

◆ fillClusterConstrained()

StatusCode egammaSuperClusterBuilderBase::fillClusterConstrained ( xAOD::CaloCluster & tofill,
const std::vector< const xAOD::CaloCluster * > & clusters,
const CookieCutterHelpers::CentralPosition & cp0 ) const
private

Fill super cluster constraining its size in eta,phi around the overall hottest cell and the its L2 size.

Parameters
tofillempty cluster to be filled
clustersseed and satellite clusters
cp0this specify the eta/phi reference in the calo-frame. In egamma reconstruction the references are the hottest cells in L2, in barrel and endcap.

Cells are added if their raw coordinates are inside a window in eta and/or phi centered around the hottest cells specified by cp0. If there are two hottest cells (one in the barrel and one in the endcap) both are used in the tests and an OR of the two is considered.

First L2 and L3 LAR EM cells are considered (excluding inner wheel endcap cells). A cut in eta is used. The range of the eta-window depends if the seed cell is in barrel or endcap. For example for the barrel, cells in L2 are added if they are inside +/- (AddCellsWindowEtaCellsBarrel * s_cellEtaSize / 2) where s_cellEtaSize is the eta size of one cell in L2. For L3 the semi-window is increased by (ExtraL3EtaSizeCells * s_cellEtaSize / 2).

Then cells in PS and L1 are added if they match a window in eta and phi. The eta requiriment is the same as in L2. The window in phi is computed asymetrically using the cells in layer 2, using the function egammaSuperClusterBuilderBase::findPhiSize and increading the semi-window by (ExtraL0L1PhiSize * s_cellPhiSize) where s_cellPhiSize is the size in phi of cells in L2.

Definition at line 438 of file egammaSuperClusterBuilderBase.cxx.

442{
443 const float addCellsWindowEtaBarrel = m_addCellsWindowEtaBarrel;
444 const float addCellsWindowEtaEndcap = m_addCellsWindowEtaEndcap;
445 const float addCellsWindowL3EtaBarrel =
447 const float addCellsWindowL3EtaEndcap =
449
450 // Loop for L2/L3
451 for (const xAOD::CaloCluster* tocheck : clusters) {
452 xAOD::CaloCluster::const_cell_iterator cell_itr = tocheck->begin();
453 xAOD::CaloCluster::const_cell_iterator cell_end = tocheck->end();
454 // Loop over cells
455 for (; cell_itr != cell_end; ++cell_itr) {
456 // sanity check on the cell
457 const CaloCell* cell = *cell_itr;
458 if (!cell) {
459 continue;
460 }
461 const CaloDetDescrElement* dde = cell->caloDDE();
462 if (!dde) {
463 continue;
464 }
465 // we want only LAREM
466 if (!(dde->getSubCalo() == CaloCell_ID::LAREM)) {
467 continue;
468 }
469 // we want L2 or L3 cells
470 const auto sampling = dde->getSampling();
471 const bool isL2Cell =
472 (CaloCell_ID::EMB2 == sampling || CaloCell_ID::EME2 == sampling);
473 const bool isL3Cell =
474 (CaloCell_ID::EMB3 == sampling || CaloCell_ID::EME3 == sampling);
475
476 if ((!isL2Cell) && (!isL3Cell)) {
477 continue;
478 }
479 // Also exclude the inner wheel Endcap
480 if (dde->is_lar_em_endcap_inner()) {
481 continue;
482 }
483
484 bool inEtaRange = false;
485 // Check if is inside the eta range wrt to the hottest
486 // cell(s) for the cluster we construct
487 if (cp0.emaxB > 0) { // barrel
488 if (isL2Cell &&
489 (std::abs(cp0.etaB - dde->eta_raw()) < addCellsWindowEtaBarrel)) {
490 inEtaRange = true;
491 }
492 if (isL3Cell &&
493 (std::abs(cp0.etaB - dde->eta_raw()) < addCellsWindowL3EtaBarrel)) {
494 inEtaRange = true;
495 }
496 }
497 if (cp0.emaxEC > 0) { // endcap
498 if (isL2Cell &&
499 (std::abs(cp0.etaEC - dde->eta_raw()) < addCellsWindowEtaEndcap)) {
500 inEtaRange = true;
501 }
502 if (isL3Cell && (std::abs(cp0.etaEC - dde->eta_raw()) <
503 addCellsWindowL3EtaEndcap)) {
504 inEtaRange = true;
505 }
506 }
507 if (!inEtaRange) {
508 continue;
509 }
510 tofill.addCell(cell_itr.index(), cell_itr.weight());
511 } // Loop over cells for L2/L3
512 } // Loop over clusters for L2/L3
513
514 // We should have a size here
515 if (tofill.size() == 0) {
516 return StatusCode::FAILURE;
517 }
518 // Now calculate the cluster size in 2nd layer
519 // use that for constraining the L0/L1 cells we add
520 const CookieCutterHelpers::PhiSize phiSize(cp0, tofill);
521 const float phiPlusB = cp0.phiB + phiSize.plusB + m_extraL0L1PhiSize;
522 const float phiMinusB = cp0.phiB - phiSize.minusB - m_extraL0L1PhiSize;
523 const float phiPlusEC = cp0.phiEC + phiSize.plusEC + m_extraL0L1PhiSize;
524 const float phiMinusEC = cp0.phiEC - phiSize.minusEC - m_extraL0L1PhiSize;
525
526 // Loop for L0/L1
527 for (const xAOD::CaloCluster* tocheck : clusters) {
528 xAOD::CaloCluster::const_cell_iterator cell_itr = tocheck->begin();
529 xAOD::CaloCluster::const_cell_iterator cell_end = tocheck->end();
530 // Loop over cells
531 for (; cell_itr != cell_end; ++cell_itr) {
532 // sanity check on the cell
533 const CaloCell* cell = *cell_itr;
534 if (!cell) {
535 continue;
536 }
537 const CaloDetDescrElement* dde = cell->caloDDE();
538 if (!dde) {
539 continue;
540 }
541
542 // only deal with L1 or PS
543 const auto sampling = dde->getSampling();
544 const bool isL0L1Cell =
545 (CaloCell_ID::EMB1 == sampling || CaloCell_ID::EME1 == sampling ||
546 CaloCell_ID::PreSamplerB == sampling ||
547 CaloCell_ID::PreSamplerE == sampling);
548 if (!isL0L1Cell) {
549 continue;
550 }
551
552 bool inEtaRange = false;
553 // Check if is inside the eta range wrt to the hottest
554 // cell(s) for the cluster we construct
555 if (cp0.emaxB > 0) { // barrel
556 if (std::abs(cp0.etaB - dde->eta_raw()) < addCellsWindowEtaBarrel) {
557 inEtaRange = true;
558 }
559 }
560 if (cp0.emaxEC > 0) { // endcap
561 if (std::abs(cp0.etaEC - dde->eta_raw()) < addCellsWindowEtaEndcap) {
562 inEtaRange = true;
563 }
564 }
565 if (!inEtaRange) {
566 continue;
567 }
568
569 // Add L0/L1 when we are in the narrow range
570 bool inPhiRange = false;
571 if (cp0.emaxB > 0) { // barrel
572 const double cell_phi = proxim(dde->phi_raw(), cp0.phiB);
573 if (cell_phi > phiMinusB && cell_phi < phiPlusB) {
574 inPhiRange = true;
575 }
576 }
577 if (cp0.emaxEC > 0) { // endcap
578 const double cell_phi = proxim(dde->phi_raw(), cp0.phiEC);
579 if (cell_phi > phiMinusEC && cell_phi < phiPlusEC) {
580 inPhiRange = true;
581 }
582 }
583 if (!inPhiRange) {
584 continue;
585 }
586
587 tofill.addCell(cell_itr.index(), cell_itr.weight());
588 } // Cell Loop for L0/L1
589 } // Cluster loop for L0/L1
590
591 if (!m_egammaCellRecoveryTool.empty()) {
592 IegammaCellRecoveryTool::Info info;
593 if (cp0.emaxB > cp0.emaxEC) {
594 info.etamax = cp0.etaB;
595 info.phimax = cp0.phiB;
596 } else {
597 info.etamax = cp0.etaEC;
598 info.phimax = cp0.phiEC;
599 }
600 if (m_egammaCellRecoveryTool->execute(tofill,info).isFailure()) {
601 ATH_MSG_WARNING("Issue trying to recover cells");
602 }
603
604 // And finally add the recovered cells
605 const CaloCellContainer* inputcells =
606 tofill.getCellLinks()->getCellContainer();
607 for (const auto *c : info.addedCells) {
608 int index = inputcells->findIndex(c->caloDDE()->calo_hash());
609 tofill.addCell(index, 1.);
610 }
611 }
612
613 return StatusCode::SUCCESS;
614}
CaloCell_ID::CaloSample getSampling() const
cell sampling
bool is_lar_em_endcap_inner() const
cell belongs to the inner wheel of EM end cap
ToolHandle< IegammaCellRecoveryTool > m_egammaCellRecoveryTool
Pointer to the egammaCellRecoveryTool.
size_t size() const
size method (forwarded from CaloClusterCellLink obj)
CaloClusterCellLink::const_iterator const_cell_iterator
Iterator of the underlying CaloClusterCellLink (explicitly const version)
double proxim(double b, double a)
Definition proxim.h:17

◆ filterPassed()

virtual bool AthCommonReentrantAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Definition at line 96 of file AthCommonReentrantAlgorithm.h.

96 {
97 return execState( ctx ).filterPassed();
98 }
virtual bool filterPassed(const EventContext &ctx) const

◆ getEgammaRecType()

virtual xAOD::EgammaParameters::EgammaType egammaSuperClusterBuilderBase::getEgammaRecType ( const egammaRec * egRec) const
protectedpure virtual

◆ initialize()

StatusCode egammaSuperClusterBuilderBase::initialize ( )
overrideprotectedvirtual

should be called by the derived class in the initialize phase

Reimplemented in egammaSuperClusterBuilder, electronSuperClusterBuilder, and photonSuperClusterBuilder.

Definition at line 43 of file egammaSuperClusterBuilderBase.cxx.

44{
47 ATH_CHECK(m_caloDetDescrMgrKey.initialize());
50
55 // The +- to account for the different L3 eta granularity
57 // the + is to account for different L0/L1 phi granularity
59
64
65 if (m_addCellsWindowEtaCellsBarrel % 2 == 0 ||
67 ATH_MSG_FATAL("For adding cells relative to the hottest cell to be "
68 "symmetric in eta, the AddCells "
69 "window size needs to be odd");
70
71 return StatusCode::FAILURE;
72 }
74 ATH_CHECK(m_MVACalibSvc.retrieve());
75
76 if (!m_egammaCheckEnergyDepositTool.empty()) {
78 } else {
80 }
81 if (!m_egammaCellRecoveryTool.empty()) {
83 } else {
85 }
86
87 ATH_MSG_INFO("e/gamma super clusters"
88 << '\n'
89 << "--> Eta Window size for L0/L1/L2 cells : "
90 << " Barrel +- " << m_addCellsWindowEtaBarrel << " ,EndCap +- "
92 << "--> Eta Window size for L3 cells : "
93 << " Barrel +- "
95 << " ,EndCap +- "
97 << " -> Phi window is fully dynamic for L2/L3" << '\n'
98 << " -> L0/L1 cells in phi will be collected in a Window : "
99 << "(L2 neg extend - " << m_extraL0L1PhiSize << " , "
100 << "L2 pos extend + " << m_extraL0L1PhiSize << ")");
101
102 return StatusCode::SUCCESS;
103}
#define ATH_MSG_FATAL(x)
#define ATH_MSG_INFO(x)
Gaudi::Property< int > m_addCellsWindowEtaCellsEndcap
Size of windows et eta in which cells of topoclusters are edded for the endcap (units of 2nd layer ce...
Gaudi::Property< int > m_extraL3EtaSizeCells
"When adding L3 cells, how much wider in eta than the L2
Gaudi::Property< int > m_searchWindowEtaCellsBarrel
Size of topocluster search window in eta for the barrel.
Gaudi::Property< int > m_searchWindowPhiCellsEndcap
Size of topocluster search window in phi for the end-cap.
Gaudi::Property< int > m_extraL0L1PhiSizeCells
"When adding L0 (PS) and L1 cells, how much wider than the L2 size of the cluster is the acceptance i...
Gaudi::Property< int > m_searchWindowEtaCellsEndcap
Size of topocluster search window in eta for the end-cap.
Gaudi::Property< int > m_addCellsWindowEtaCellsBarrel
Size of windows et eta in which cells of topoclusters are added for the barrel (units of 2nd layer ce...
Gaudi::Property< int > m_searchWindowPhiCellsBarrel
Size of topocluster search window in phi for the barrel.

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ isClonable()

◆ matchesInWindow()

bool egammaSuperClusterBuilderBase::matchesInWindow ( const xAOD::CaloCluster * ref,
const xAOD::CaloCluster * clus ) const
protected

Is clus in window center around ref?

Parameters
refreference cluster
cluscluster to be tested

The matching is done using delta-eta and delta-phi comparing them with the values of SearchWindowEtaCellsBarrel, SearchWindowPhiCellsBarrel, SearchWindowEtaCellsEndcap and SearchWindowPhiCellsEndcap, depending if the seed is barrel or endcap. If it is in the crack, an OR of the conditions (using both seeds) is used.

Definition at line 241 of file egammaSuperClusterBuilderBase.cxx.

244{
245 auto inRange = [](float eta1, float phi1,
246 float eta2, float phi2,
247 float etaWindow, float phiWindow) {
248
249 const float dEta = std::abs(eta1 - eta2);
250 const float dPhi = std::abs(P4Helpers::deltaPhi(phi1, phi2));
251
252 return dEta < etaWindow && dPhi < phiWindow;
253 };
254
255 // First the case where the seed is both endcap and barrel, i.e. in the crack
256 // Check around both measurements of the seed
257 if (ref->hasSampling(CaloSampling::EMB2) &&
258 ref->hasSampling(CaloSampling::EME2)) {
259 const bool inRangeBarrel = inRange(ref->eta(),
260 ref->phi(),
261 clus->eta(),
262 clus->phi(),
265
266 const bool inRangeEndcap = inRange(ref->eta(),
267 ref->phi(),
268 clus->eta(),
269 clus->phi(),
272
273 const bool inRangeBarrelL2 = inRange(ref->etaSample(CaloSampling::EMB2),
274 ref->phiSample(CaloSampling::EMB2),
275 clus->eta(),
276 clus->phi(),
279
280 const bool inRangeEndcapL2 = inRange(ref->etaSample(CaloSampling::EME2),
281 ref->phiSample(CaloSampling::EME2),
282 clus->eta(),
283 clus->phi(),
286
287 // Matches any in case of split
288 return inRangeBarrel || inRangeEndcap || inRangeBarrelL2 || inRangeEndcapL2;
289 }
290
292 return inRange(ref->eta(),
293 ref->phi(),
294 clus->eta(),
295 clus->phi(),
298 }
299
300 return inRange(ref->eta(),
301 ref->phi(),
302 clus->eta(),
303 clus->phi(),
306}
const boost::regex ref(r_ef)
bool inRange(const double *boundaries, const double value, const double tolerance=0.02)
double deltaPhi(double phiA, double phiB)
delta Phi in range [-pi,pi[
Definition P4Helpers.h:34
bool dPhi(const xAOD::TauJet &tau, const xAOD::CaloVertexedTopoCluster &cluster, float &out)
bool dEta(const xAOD::TauJet &tau, const xAOD::CaloVertexedTopoCluster &cluster, float &out)
setEt setPhi setE277 setWeta2 eta1

◆ msg()

MsgStream & AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ redoMatching()

StatusCode egammaSuperClusterBuilderBase::redoMatching ( const EventContext & ctx,
SG::WriteHandle< EgammaRecContainer > & newEgammaRecs ) const
protectedvirtual

Reimplemented in electronSuperClusterBuilder, and photonSuperClusterBuilder.

Definition at line 233 of file egammaSuperClusterBuilderBase.cxx.

236 {
237 return StatusCode::SUCCESS;
238}

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ searchForSecondaryClusters()

virtual std::vector< std::size_t > egammaSuperClusterBuilderBase::searchForSecondaryClusters ( std::size_t egammaInd,
const EgammaRecContainer * egammaRecs,
std::vector< bool > & isUsed ) const
protectedpure virtual

◆ seedClusterSelection()

bool egammaSuperClusterBuilderBase::seedClusterSelection ( const xAOD::CaloCluster * clus) const
protected

check if we pass the basic criteria for a seed cluster

Definition at line 417 of file egammaSuperClusterBuilderBase.cxx.

419{
420 // The seed should have 2nd sampling
421 if (!clus->hasSampling(CaloSampling::EMB2) &&
422 !clus->hasSampling(CaloSampling::EME2)) {
423 return false;
424 }
425 const double eta2 = std::abs(clus->etaBE(2));
426 if (eta2 > 10) {
427 return false;
428 }
429 // Accordeon Energy samplings 1 to 3
430 const double EMAccEnergy =
431 clus->energyBE(1) + clus->energyBE(2) + clus->energyBE(3);
432 const double EMAccEt = EMAccEnergy / cosh(eta2);
433 // Require minimum energy for supercluster seeding.
434 return EMAccEt >= m_EtThresholdCut;
435}
float energyBE(const unsigned layer) const
Get the energy in one layer of the EM Calo.
bool hasSampling(const CaloSample s) const
Checks if certain smapling contributes to cluster.
float etaBE(const unsigned layer) const
Get the eta in one layer of the EM Calo.

◆ setFilterPassed()

virtual void AthCommonReentrantAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Definition at line 100 of file AthCommonReentrantAlgorithm.h.

100 {
102 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const

◆ sysExecute()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext & ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Definition at line 85 of file AthCommonReentrantAlgorithm.cxx.

77{
78 return BaseAlg::sysExecute (ctx);
79}

◆ sysInitialize()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in HypoBase, and InputMakerBase.

Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.

107 {
109
110 if (sc.isFailure()) {
111 return sc;
112 }
113
114 ServiceHandle<ICondSvc> cs("CondSvc",name());
115 for (auto h : outputHandles()) {
116 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
117 // do this inside the loop so we don't create the CondSvc until needed
118 if ( cs.retrieve().isFailure() ) {
119 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
120 return StatusCode::SUCCESS;
121 }
122 if (cs->regHandle(this,*h).isFailure()) {
124 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
125 << " with CondSvc");
126 }
127 }
128 }
129 return sc;
130}
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }

Member Data Documentation

◆ m_addCellsWindowEtaBarrel

float egammaSuperClusterBuilderBase::m_addCellsWindowEtaBarrel = 0.0F
private

Definition at line 271 of file egammaSuperClusterBuilderBase.h.

◆ m_addCellsWindowEtaCellsBarrel

Gaudi::Property<int> egammaSuperClusterBuilderBase::m_addCellsWindowEtaCellsBarrel
private
Initial value:
{
this,
"AddCellsWindowEtaCellsBarrel",
3,
"Number of cells in eta of window around topocluster center to add cells"
}

Size of windows et eta in which cells of topoclusters are added for the barrel (units of 2nd layer cells)

Definition at line 329 of file egammaSuperClusterBuilderBase.h.

329 {
330 this,
331 "AddCellsWindowEtaCellsBarrel",
332 3,
333 "Number of cells in eta of window around topocluster center to add cells"
334 };

◆ m_addCellsWindowEtaCellsEndcap

Gaudi::Property<int> egammaSuperClusterBuilderBase::m_addCellsWindowEtaCellsEndcap
private
Initial value:
{
this,
"AddCellsWindowEtaCellsEndcap",
5,
"Number of cells in eta of window around topocluster center to add cells"
}

Size of windows et eta in which cells of topoclusters are edded for the endcap (units of 2nd layer cells)

Definition at line 338 of file egammaSuperClusterBuilderBase.h.

338 {
339 this,
340 "AddCellsWindowEtaCellsEndcap",
341 5,
342 "Number of cells in eta of window around topocluster center to add cells"
343 };

◆ m_addCellsWindowEtaEndcap

float egammaSuperClusterBuilderBase::m_addCellsWindowEtaEndcap = 0.0F
private

Definition at line 272 of file egammaSuperClusterBuilderBase.h.

◆ m_caloDetDescrMgrKey

SG::ReadCondHandleKey<CaloDetDescrManager> egammaSuperClusterBuilderBase::m_caloDetDescrMgrKey
protected
Initial value:
{
this,
"CaloDetDescrManager",
"CaloDetDescrManager",
"SG Key for CaloDetDescrManager in the Condition Store"
}

Definition at line 162 of file egammaSuperClusterBuilderBase.h.

162 {
163 this,
164 "CaloDetDescrManager",
165 "CaloDetDescrManager",
166 "SG Key for CaloDetDescrManager in the Condition Store"
167 };

◆ m_clusterCorrectionTool

ToolHandle<IegammaSwTool> egammaSuperClusterBuilderBase::m_clusterCorrectionTool
private
Initial value:
{
this,
"ClusterCorrectionTool",
"egammaSwTool/egammaswtool",
"tool that applies cluster corrections"
}

Tool to handle cluster corrections.

Definition at line 375 of file egammaSuperClusterBuilderBase.h.

375 {
376 this,
377 "ClusterCorrectionTool",
378 "egammaSwTool/egammaswtool",
379 "tool that applies cluster corrections"
380 };

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_egammaCellRecoveryTool

ToolHandle<IegammaCellRecoveryTool> egammaSuperClusterBuilderBase::m_egammaCellRecoveryTool
private
Initial value:
{
this,
"egammaCellRecoveryTool",
"",
"Optional tool that adds cells in L2 or L3 "
"that could have been rejected by timing cut"
}

Pointer to the egammaCellRecoveryTool.

Definition at line 391 of file egammaSuperClusterBuilderBase.h.

391 {
392 this,
393 "egammaCellRecoveryTool",
394 "",
395 "Optional tool that adds cells in L2 or L3 "
396 "that could have been rejected by timing cut"
397 };

◆ m_egammaCheckEnergyDepositTool

ToolHandle<IegammaCheckEnergyDepositTool> egammaSuperClusterBuilderBase::m_egammaCheckEnergyDepositTool
private
Initial value:
{
this,
"egammaCheckEnergyDepositTool",
"",
"Optional tool that performs basic checks of viability of cluster"
}

Pointer to the egammaCheckEnergyDepositTool.

Definition at line 383 of file egammaSuperClusterBuilderBase.h.

383 {
384 this,
385 "egammaCheckEnergyDepositTool",
386 "",
387 "Optional tool that performs basic checks of viability of cluster"
388 };

◆ m_EtThresholdCut

Gaudi::Property<float> egammaSuperClusterBuilderBase::m_EtThresholdCut
protected
Initial value:
{
this,
"EtThresholdCut",
1.5 * Gaudi::Units::GeV,
"The minimum EM Et required of SEED clusters (not applied to secondaries)"
}

Seed selection requirements.

Definition at line 147 of file egammaSuperClusterBuilderBase.h.

147 {
148 this,
149 "EtThresholdCut",
150 1.5 * Gaudi::Units::GeV,
151 "The minimum EM Et required of SEED clusters (not applied to secondaries)"
152 };

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 114 of file AthCommonReentrantAlgorithm.h.

◆ m_extraL0L1PhiSize

float egammaSuperClusterBuilderBase::m_extraL0L1PhiSize = 0.0F
private

Definition at line 274 of file egammaSuperClusterBuilderBase.h.

◆ m_extraL0L1PhiSizeCells

Gaudi::Property<int> egammaSuperClusterBuilderBase::m_extraL0L1PhiSizeCells
private
Initial value:
{
this,
"ExtraL0L1PhiSize",
1,
"When adding L0 (PS) and L1 cells in phi, "
"how much wider (+/- of the value) than the L2 phi size of the "
"cluster (in L2 cells units) is the acceptance"
}

"When adding L0 (PS) and L1 cells, how much wider than the L2 size of the cluster is the acceptance in phi (units of 2nd layer cells)

Definition at line 348 of file egammaSuperClusterBuilderBase.h.

348 {
349 this,
350 "ExtraL0L1PhiSize",
351 1,
352 "When adding L0 (PS) and L1 cells in phi, "
353 "how much wider (+/- of the value) than the L2 phi size of the "
354 "cluster (in L2 cells units) is the acceptance"
355 };

◆ m_extraL3EtaSize

float egammaSuperClusterBuilderBase::m_extraL3EtaSize = 0.0F
private

Definition at line 276 of file egammaSuperClusterBuilderBase.h.

◆ m_extraL3EtaSizeCells

Gaudi::Property<int> egammaSuperClusterBuilderBase::m_extraL3EtaSizeCells
private
Initial value:
{
this,
"ExtraL3EtaSizeCells",
0,
"When adding L3 cells how much wider (+/- 0.5 of the value) "
"than L2 (in L2 cells "
"units) is the acceptance in eta"
}

"When adding L3 cells, how much wider in eta than the L2

Definition at line 359 of file egammaSuperClusterBuilderBase.h.

359 {
360 this,
361 "ExtraL3EtaSizeCells",
362 0,
363 "When adding L3 cells how much wider (+/- 0.5 of the value) "
364 "than L2 (in L2 cells "
365 "units) is the acceptance in eta"
366 };

◆ m_inputEgammaRecContainerKey

SG::ReadHandleKey<EgammaRecContainer> egammaSuperClusterBuilderBase::m_inputEgammaRecContainerKey
protected
Initial value:
{
this,
"InputEgammaRecContainerName",
"egammaRecCollection",
"input egammaRec container"
}

Key for input egammaRec container.

Definition at line 155 of file egammaSuperClusterBuilderBase.h.

155 {
156 this,
157 "InputEgammaRecContainerName",
158 "egammaRecCollection",
159 "input egammaRec container"
160 };

◆ m_linkToConstituents

Gaudi::Property<bool> egammaSuperClusterBuilderBase::m_linkToConstituents
private
Initial value:
{
this,
"LinkToConstituents",
true,
"Link sister clusters to new cluster"
}

Decorate the supercluster with links to the component topoclusters.

Definition at line 280 of file egammaSuperClusterBuilderBase.h.

280 {
281 this,
282 "LinkToConstituents",
283 true,
284 "Link sister clusters to new cluster"
285 };

◆ m_MVACalibSvc

ServiceHandle<IegammaMVASvc> egammaSuperClusterBuilderBase::m_MVACalibSvc
private
Initial value:
{ this,
"MVACalibSvc",
"egammaMVASvc",
"calibration service" }

Handle to the MVA calibration service.

Definition at line 369 of file egammaSuperClusterBuilderBase.h.

369 { this,
370 "MVACalibSvc",
371 "egammaMVASvc",
372 "calibration service" };

◆ m_outputEgammaRecContainerKey

SG::WriteHandleKey<EgammaRecContainer> egammaSuperClusterBuilderBase::m_outputEgammaRecContainerKey
protected
Initial value:
{
this,
"OutputEgammaRecContainerKey",
"egammaSuperRecContainer",
"output egammaRec container"
}

Key for output egammaRec container.

Definition at line 170 of file egammaSuperClusterBuilderBase.h.

170 {
171 this,
172 "OutputEgammaRecContainerKey",
173 "egammaSuperRecContainer",
174 "output egammaRec container"
175 };

◆ m_outputSuperClusterCollectionName

SG::WriteHandleKey<xAOD::CaloClusterContainer> egammaSuperClusterBuilderBase::m_outputSuperClusterCollectionName
protected
Initial value:
{
this,
"SuperClusterCollectionName",
"egammaSuperClusters",
"output calo cluster container"
}

Key for output clusters.

Definition at line 178 of file egammaSuperClusterBuilderBase.h.

178 {
179 this,
180 "SuperClusterCollectionName",
181 "egammaSuperClusters",
182 "output calo cluster container"
183 };

◆ m_precorrClustersKey

SG::WriteHandleKey<xAOD::CaloClusterContainer> egammaSuperClusterBuilderBase::m_precorrClustersKey
protected
Initial value:
{
this,
"precorrClustersName",
"",
"optional pre-correction clusters"
}

Optional key for pre-correction clusters.

Definition at line 186 of file egammaSuperClusterBuilderBase.h.

186 {
187 this,
188 "precorrClustersName",
189 "",
190 "optional pre-correction clusters"
191 };

◆ m_searchWindowEtaBarrel

float egammaSuperClusterBuilderBase::m_searchWindowEtaBarrel = 0.0F
protected

Definition at line 195 of file egammaSuperClusterBuilderBase.h.

◆ m_searchWindowEtaCellsBarrel

Gaudi::Property<int> egammaSuperClusterBuilderBase::m_searchWindowEtaCellsBarrel
private
Initial value:
{
this,
"SearchWindowEtaCellsBarrel",
5,
"Number of cells in eta of window in which to search for topoclusters"
}

Size of topocluster search window in eta for the barrel.

Definition at line 296 of file egammaSuperClusterBuilderBase.h.

296 {
297 this,
298 "SearchWindowEtaCellsBarrel",
299 5,
300 "Number of cells in eta of window in which to search for topoclusters"
301 };

◆ m_searchWindowEtaCellsEndcap

Gaudi::Property<int> egammaSuperClusterBuilderBase::m_searchWindowEtaCellsEndcap
private
Initial value:
{
this,
"SearchWindowEtaCellsEndcap",
5,
"Number of cells in eta of window in which to search for topoclusters"
}

Size of topocluster search window in eta for the end-cap.

Definition at line 312 of file egammaSuperClusterBuilderBase.h.

312 {
313 this,
314 "SearchWindowEtaCellsEndcap",
315 5,
316 "Number of cells in eta of window in which to search for topoclusters"
317 };

◆ m_searchWindowEtaEndcap

float egammaSuperClusterBuilderBase::m_searchWindowEtaEndcap = 0.0F
protected

Definition at line 197 of file egammaSuperClusterBuilderBase.h.

◆ m_searchWindowPhiBarrel

float egammaSuperClusterBuilderBase::m_searchWindowPhiBarrel = 0.0F
protected

Definition at line 196 of file egammaSuperClusterBuilderBase.h.

◆ m_searchWindowPhiCellsBarrel

Gaudi::Property<int> egammaSuperClusterBuilderBase::m_searchWindowPhiCellsBarrel
private
Initial value:
{
this,
"SearchWindowPhiCellsBarrel",
5,
"Number of cells in phi of window in which to search for topoclusters"
}

Size of topocluster search window in phi for the barrel.

Definition at line 304 of file egammaSuperClusterBuilderBase.h.

304 {
305 this,
306 "SearchWindowPhiCellsBarrel",
307 5,
308 "Number of cells in phi of window in which to search for topoclusters"
309 };

◆ m_searchWindowPhiCellsEndcap

Gaudi::Property<int> egammaSuperClusterBuilderBase::m_searchWindowPhiCellsEndcap
private
Initial value:
{
this,
"SearchWindowPhiCellsEndcap",
5,
"Number of cells in phi of window in which to search for topoclusters"
}

Size of topocluster search window in phi for the end-cap.

Definition at line 320 of file egammaSuperClusterBuilderBase.h.

320 {
321 this,
322 "SearchWindowPhiCellsEndcap",
323 5,
324 "Number of cells in phi of window in which to search for topoclusters"
325 };

◆ m_searchWindowPhiEndcap

float egammaSuperClusterBuilderBase::m_searchWindowPhiEndcap = 0.0F
protected

Definition at line 198 of file egammaSuperClusterBuilderBase.h.

◆ m_useExtendedTG3

Gaudi::Property<bool> egammaSuperClusterBuilderBase::m_useExtendedTG3
private
Initial value:
{
this,
"UseExtendedTG3",
false,
"Extend TG3 definition from |eta| = 1.2 to |eta| = 1.72"
}

Use extended TG3 definition (only after Run 2)

Definition at line 288 of file egammaSuperClusterBuilderBase.h.

288 {
289 this,
290 "UseExtendedTG3",
291 false,
292 "Extend TG3 definition from |eta| = 1.2 to |eta| = 1.72"
293 };

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ s_cellEtaSize

float egammaSuperClusterBuilderBase::s_cellEtaSize = 0.025
staticconstexprprotected

Definition at line 136 of file egammaSuperClusterBuilderBase.h.

◆ s_cellPhiSize

float egammaSuperClusterBuilderBase::s_cellPhiSize = M_PI / 128.
staticconstexprprotected

Definition at line 137 of file egammaSuperClusterBuilderBase.h.

◆ s_ClEtaMaxForTG3cell

float egammaSuperClusterBuilderBase::s_ClEtaMaxForTG3cell = s_TG3Run3E4cellEtaMax + 0.03
staticconstexprprotected

Definition at line 144 of file egammaSuperClusterBuilderBase.h.

◆ s_ClEtaMinForTG3cell

float egammaSuperClusterBuilderBase::s_ClEtaMinForTG3cell = s_TG3Run2E4cellEtaMin - 0.03
staticconstexprprotected

Definition at line 143 of file egammaSuperClusterBuilderBase.h.

◆ s_TG3Run2E4cellEtaMax

float egammaSuperClusterBuilderBase::s_TG3Run2E4cellEtaMax = 1.6
staticconstexprprotected

Definition at line 140 of file egammaSuperClusterBuilderBase.h.

◆ s_TG3Run2E4cellEtaMin

float egammaSuperClusterBuilderBase::s_TG3Run2E4cellEtaMin = 1.4
staticconstexprprotected

Definition at line 141 of file egammaSuperClusterBuilderBase.h.

◆ s_TG3Run3E3cellEtaMin

float egammaSuperClusterBuilderBase::s_TG3Run3E3cellEtaMin = 1.2
staticconstexprprotected

Definition at line 139 of file egammaSuperClusterBuilderBase.h.

◆ s_TG3Run3E4cellEtaMax

float egammaSuperClusterBuilderBase::s_TG3Run3E4cellEtaMax = 1.72
staticconstexprprotected

Definition at line 138 of file egammaSuperClusterBuilderBase.h.


The documentation for this class was generated from the following files: