ATLAS Offline Software
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
egammaSuperClusterBuilder Class Referencefinal

Create supercluster under egamma (no tracking) hypothesis Useful if you want to run calo reconstuction without tracking. More...

#include <egammaSuperClusterBuilder.h>

Inheritance diagram for egammaSuperClusterBuilder:
Collaboration diagram for egammaSuperClusterBuilder:

Public Member Functions

 egammaSuperClusterBuilder (const std::string &name, ISvcLocator *pSvcLocator)
 
virtual StatusCode initialize () override final
 should be called by the derived class in the initialize phase More...
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual bool isClonable () const override
 Specify if the algorithm is clonable. More...
 
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More...
 
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
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. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Protected Member Functions

virtual StatusCode execute (const EventContext &ctx) const override
 should be called by the derived class in the execute phase More...
 
virtual bool egammaRecPassesSelection (const egammaRec *egRec) const
 
virtual StatusCode redoMatching (const EventContext &ctx, SG::WriteHandle< EgammaRecContainer > &newEgammaRecs) const
 
bool matchesInWindow (const xAOD::CaloCluster *ref, const xAOD::CaloCluster *clus) const
 Is clus in window center around ref? More...
 
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. More...
 
bool seedClusterSelection (const xAOD::CaloCluster *clus) const
 check if we pass the basic criteria for a seed cluster More...
 
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
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. More...
 

Protected Attributes

Gaudi::Property< float > m_EtThresholdCut
 Seed selection requirements. More...
 
SG::ReadHandleKey< EgammaRecContainerm_inputEgammaRecContainerKey
 Key for input egammaRec container. More...
 
SG::ReadCondHandleKey< CaloDetDescrManagerm_caloDetDescrMgrKey
 
SG::WriteHandleKey< EgammaRecContainerm_outputEgammaRecContainerKey
 Key for output egammaRec container. More...
 
SG::WriteHandleKey< xAOD::CaloClusterContainerm_outputSuperClusterCollectionName
 Key for output clusters. More...
 
SG::WriteHandleKey< xAOD::CaloClusterContainerm_precorrClustersKey
 Optional key for pre-correction clusters. More...
 
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

virtual xAOD::EgammaParameters::EgammaType getEgammaRecType (const egammaRec *egRec) const override final
 
virtual std::vector< std::size_t > searchForSecondaryClusters (std::size_t egammaInd, const EgammaRecContainer *egammaRecs, std::vector< bool > &isUsed) const override final
 Return extra clusters that can be added to make supercluster. More...
 
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. More...
 
StatusCode addTileGap3CellsinWindow (xAOD::CaloCluster &tofill, const CaloDetDescrManager &mgr) const
 add all tile Gap 3 cells in a window. More...
 
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 More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

xAOD::EgammaParameters::EgammaType m_egTypeForCalibration
 
Gaudi::Property< std::string > m_calibrationType
 type to be assumed for calibration More...
 
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. More...
 
Gaudi::Property< bool > m_useExtendedTG3
 Use extended TG3 definition (only after Run 2) More...
 
Gaudi::Property< int > m_searchWindowEtaCellsBarrel
 Size of topocluster search window in eta for the barrel. More...
 
Gaudi::Property< int > m_searchWindowPhiCellsBarrel
 Size of topocluster search window in phi for the barrel. More...
 
Gaudi::Property< int > m_searchWindowEtaCellsEndcap
 Size of topocluster search window in eta for the end-cap. More...
 
Gaudi::Property< int > m_searchWindowPhiCellsEndcap
 Size of topocluster search window in phi for the end-cap. More...
 
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) More...
 
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) More...
 
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) More...
 
Gaudi::Property< int > m_extraL3EtaSizeCells
 "When adding L3 cells, how much wider in eta than the L2 More...
 
ServiceHandle< IegammaMVASvcm_MVACalibSvc
 Handle to the MVA calibration service. More...
 
ToolHandle< IegammaSwToolm_clusterCorrectionTool
 Tool to handle cluster corrections. More...
 
ToolHandle< IegammaCheckEnergyDepositToolm_egammaCheckEnergyDepositTool
 Pointer to the egammaCheckEnergyDepositTool. More...
 
ToolHandle< IegammaCellRecoveryToolm_egammaCellRecoveryTool
 Pointer to the egammaCellRecoveryTool. More...
 
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks. More...
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Create supercluster under egamma (no tracking) hypothesis Useful if you want to run calo reconstuction without tracking.

The algorithm creates superclusters merging topoclusters. Input containers:

Output containers:

The loop is on the clusters of the EgammaRec objects from the input container. Fist, the first cluster is considered as a seed. The cluster seed must pass some selection:

Clusters to be merged in a supercluster are selected using the egammaSuperClusterBuilder::searchForSecondaryClusters function. Then the procedure is redone, testing new seeds, for all the other clusters that have not been used to make superclusters. The building of the supercluster is done with egammaSuperClusterBuilderBase::createNewCluster which selects the cells to be used.

Definition at line 57 of file egammaSuperClusterBuilder.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

◆ egammaSuperClusterBuilder()

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

Member Function Documentation

◆ addTileGap3CellsinWindow()

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

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 785 of file egammaSuperClusterBuilderBase.cxx.

788 {
789 
790  double searchWindowEta = m_useExtendedTG3 ? 0.35 : 0.2;
791  constexpr double searchWindowPhi = 2 * M_PI / 64.0 + M_PI / 64; // ~ 0.15 rad
792  std::vector<const CaloCell*> cells;
793  cells.reserve(16);
794  const CaloCellContainer* inputcells =
795  tofill.getCellLinks()->getCellContainer();
796 
797  if (!inputcells) {
798  ATH_MSG_ERROR("No cell container in addRemainingCellsToCluster?");
799  return StatusCode::FAILURE;
800  }
801 
802  CaloCellList myList(&mgr, inputcells);
803 
804  const std::vector<CaloSampling::CaloSample> samples = {
806  };
807 
808  for (auto samp : samples) {
809  // quite slow
810  myList.select(
811  tofill.eta0(), tofill.phi0(), searchWindowEta, searchWindowPhi, samp);
812  cells.insert(cells.end(), myList.begin(), myList.end());
813  }
814 
815  for (const auto* cell : cells) {
816  if (!cell) {
817  continue;
818  }
819  const CaloDetDescrElement* dde = cell->caloDDE();
820  if (!dde) {
821  continue;
822  }
823 
825  float minEta = s_TG3Run2E4cellEtaMin;
826  if (m_useExtendedTG3) {
827  minEta = s_TG3Run3E3cellEtaMin;
828  // if |eta2| < 1.56, keep only E3, else keep E3+E4.
829  // |eta2| uses as the eta of the highest energy cell in layer 2 as proxy
830  if (std::abs(tofill.eta0()) > 1.56) {
832  }
833  }
834  float cellaEtaRaw = std::abs(dde->eta_raw());
835  if (cellaEtaRaw >= minEta && cellaEtaRaw <= maxEta) {
836  int index = inputcells->findIndex(dde->calo_hash());
837  tofill.addCell(index, 1.);
838  }
839  }
840  return StatusCode::SUCCESS;
841 }

◆ calibrateCluster()

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

function to calibrate the new clusters energy

Calibrate with

Definition at line 844 of file egammaSuperClusterBuilderBase.cxx.

850 {
851 
852  refineEta1Position(newCluster, mgr);
853  // Save the state before the corrections
854  newCluster->setAltE(newCluster->e());
855  newCluster->setAltEta(newCluster->eta());
856  newCluster->setAltPhi(newCluster->phi());
857  // first do the corrections
858  if (precorrClusters) {
859  precorrClusters->push_back(std::make_unique<xAOD::CaloCluster>());
860  *precorrClusters->back() = *newCluster;
861  }
863  ctx, newCluster, egType, xAOD::EgammaHelpers::isBarrel(newCluster)));
864  double aeta = std::abs(newCluster->eta());
865  if (aeta > 10) {
866  ATH_MSG_DEBUG("Too large eta after S-shape corrections. "
867  "SuperCluster rejected");
868  return StatusCode::FAILURE;
869  }
870  newCluster->setRawE(newCluster->e());
871  newCluster->setRawEta(newCluster->eta());
872  newCluster->setRawPhi(newCluster->phi());
873  //
874  fillPositionsInCalo(newCluster, mgr);
875  ATH_CHECK(m_MVACalibSvc->execute(*newCluster, egType));
876 
877  return StatusCode::SUCCESS;
878 }

◆ cardinality()

unsigned int AthReentrantAlgorithm::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.

Override this to return 0 for reentrant algorithms.

Definition at line 55 of file AthReentrantAlgorithm.cxx.

56 {
57  return 0;
58 }

◆ 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
protectedinherited

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 477 of file egammaSuperClusterBuilderBase.cxx.

484 {
485  if (clusters.empty()) {
486  ATH_MSG_ERROR("Missing the seed cluster! Should not happen.");
487  return nullptr;
488  }
489 
490  // create a new empty cluster
491  // collection will own it if
492  auto newCluster = CaloClusterStoreHelper::makeCluster(cellCont);
493 
494  if (!newCluster) {
495  ATH_MSG_ERROR("CaloClusterStoreHelper::makeCluster failed.");
496  return nullptr;
497  }
498  //
499  newCluster->setClusterSize(xAOD::CaloCluster::SuperCluster);
500  // Let's try to find the eta and phi of the hottest cell in L2.
501  // This will be used as the center for restricting the cluster size.
503 
504  // Set the eta0/phi0 based on the references, but in raw coordinates
505  if (cp0.emaxB >= cp0.emaxEC) {
506  newCluster->setEta0(cp0.etaB);
507  newCluster->setPhi0(cp0.phiB);
508  } else {
509  newCluster->setEta0(cp0.etaEC);
510  newCluster->setPhi0(cp0.phiEC);
511  }
512 
513  // Actually fill the cluster here
514  if (fillClusterConstrained(*newCluster, clusters, cp0).isFailure()) {
515  return nullptr;
516  }
517  // Apply SW-style summation of TileGap3 cells (if necessary).
518  float eta0 = std::abs(newCluster->eta0());
519  // In Run2, we did not impose restriction to include TG3 cells at this level.
520  // It should have been [1.37,1.63]. It has no impact on performance as TG3 was
521  // only used in energy calibration BDT in [1.4,1.6].
522  // In Run three we restrict to [1.37,1.75]
523  if (!m_useExtendedTG3 ||
524  (eta0 > s_ClEtaMinForTG3cell && eta0 < s_ClEtaMaxForTG3cell)) {
525  if (addTileGap3CellsinWindow(*newCluster, mgr).isFailure()) {
526  ATH_MSG_ERROR("Problem with the input cluster when running "
527  "AddTileGap3CellsinWindow?");
528 
529  return nullptr;
530  }
531  }
533  CaloClusterKineHelper::calculateKine(newCluster.get(), true, true);
534 
535  // If adding all EM cells we are somehow below the seed threshold then remove
536  if (newCluster->et() < m_EtThresholdCut) {
537  return nullptr;
538  }
539 
540  // Check to see if cluster pases basic requirements. If not, kill it.
541  if (!m_egammaCheckEnergyDepositTool.empty() &&
542  !m_egammaCheckEnergyDepositTool->checkFractioninSamplingCluster(
543  newCluster.get())) {
544  return nullptr;
545  }
546 
547  // Apply correction calibration
548  if (calibrateCluster(ctx, newCluster.get(), mgr, egType, precorrClusters)
549  .isFailure()) {
550  ATH_MSG_WARNING("There was problem calibrating the object");
551  return nullptr;
552  }
553 
554  // Avoid negative energy clusters
555  if (newCluster->et() < 0) {
556  return nullptr;
557  }
558 
559  if (m_linkToConstituents) {
560  // EDM vector to constituent clusters
561  std::vector<ElementLink<xAOD::CaloClusterContainer>> constituentLinks;
562  for (const xAOD::CaloCluster* cluster : clusters) {
564  cluster->getSisterClusterLink();
565 
566  // Set the element Link to the constitents
567  if (sisterCluster) {
568  constituentLinks.push_back(sisterCluster);
569  } else {
570  ATH_MSG_WARNING("No sister Link available");
571  }
572  }
573  // Set the link from the super cluster to the constituents (accumulated)
574  // clusters used.
575  static const SG::AuxElement::Accessor<
576  std::vector<ElementLink<xAOD::CaloClusterContainer>>>
577  caloClusterLinks("constituentClusterLinks");
578  caloClusterLinks(*newCluster) = constituentLinks;
579  }
580  // return the new cluster
581  return newCluster;
582 }

◆ declareGaudiProperty() [1/4]

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

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

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

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

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

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

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

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

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

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

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ 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.

95 { return m_detStore; }

◆ egammaRecPassesSelection()

bool egammaSuperClusterBuilderBase::egammaRecPassesSelection ( const egammaRec egRec) const
protectedvirtualinherited

Reimplemented in electronSuperClusterBuilder.

Definition at line 396 of file egammaSuperClusterBuilderBase.cxx.

396  {
397  return true;
398 }

◆ evtStore() [1/2]

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.

85 { return m_evtStore; }

◆ evtStore() [2/2]

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

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

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ execute()

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

should be called by the derived class in the execute phase

Definition at line 274 of file egammaSuperClusterBuilderBase.cxx.

275 {
277  ctx);
278  // check is only used for serial running; remove when MT scheduler used
279  ATH_CHECK(egammaRecs.isValid());
280 
281  // Have to register cluster container in order to properly get cluster
282  // links.
283  SG::WriteHandle<xAOD::CaloClusterContainer> outputClusterContainer(
285 
287 
288  // Create the new Electron Super Cluster based EgammaRecContainer
291  ATH_CHECK(newEgammaRecs.record(std::make_unique<EgammaRecContainer>()));
292 
293  size_t inputSize = egammaRecs->size();
294  outputClusterContainer->reserve(inputSize);
295  newEgammaRecs->reserve(inputSize);
296 
297  std::optional<SG::WriteHandle<xAOD::CaloClusterContainer>> precorrClustersH;
298  if (!m_precorrClustersKey.empty()) {
299  precorrClustersH.emplace(m_precorrClustersKey, ctx);
301  precorrClustersH->ptr()->reserve(inputSize);
302  }
303 
304  // The calo Det Descr manager
305  SG::ReadCondHandle<CaloDetDescrManager> caloDetDescrMgrHandle{
307  };
308  ATH_CHECK(caloDetDescrMgrHandle.isValid());
309  const CaloDetDescrManager* calodetdescrmgr = *caloDetDescrMgrHandle;
310 
311  // If no input return
312  if (egammaRecs->empty()) {
313  return StatusCode::SUCCESS;
314  }
315 
316  // Figure the cellCont we need to point to
317  const DataLink<CaloCellContainer>& cellCont =
318  (*egammaRecs)[0]->caloCluster()->getCellLinks()->getCellContainerLink();
319 
320  // Loop over input egammaRec objects, build superclusters.
321  size_t numInput = egammaRecs->size();
322  std::vector<bool> isUsed(numInput, false);
323  std::vector<bool> isUsedRevert(numInput, false);
324 
325  for (std::size_t i = 0; i < egammaRecs->size(); ++i) {
326  if (isUsed[i]) {
327  continue;
328  }
329  const auto* egRec = (*egammaRecs)[i];
330  // check for good seed cluster
331  const xAOD::CaloCluster* clus = egRec->caloCluster();
332  if (!seedClusterSelection(clus)) {
333  continue;
334  }
335 
336  if (!egammaRecPassesSelection(egRec)) {
337  continue;
338  }
339 
340  // save status in case we fail to create supercluster
341  isUsedRevert = isUsed;
342  // Mark seed as used,
343  isUsed[i] = true;
344 
345  // Start accumulating the clusters from the seed
346  std::vector<const xAOD::CaloCluster*> accumulatedClusters;
347  accumulatedClusters.push_back(clus);
348 
349  // Now we find all the secondary cluster for this seed
350  // and we accumulate them
351  const std::vector<std::size_t> secondaryIndices =
352  searchForSecondaryClusters(i, egammaRecs.cptr(), isUsed);
353  for (const auto& secClusIndex : secondaryIndices) {
354  const auto* const secRec = (*egammaRecs)[secClusIndex];
355  accumulatedClusters.push_back(secRec->caloCluster());
356  }
357  ATH_MSG_DEBUG("Total clusters " << accumulatedClusters.size());
358 
359  // Create the new cluster
360  std::unique_ptr<xAOD::CaloCluster> newCluster =
361  createNewCluster(ctx,
362  accumulatedClusters,
363  cellCont,
364  *calodetdescrmgr,
365  getEgammaRecType(egRec),
366  precorrClustersH ? precorrClustersH->ptr() : nullptr);
367 
368  // If we failed to create a cluster revert isUsed for the cluster
369  if (newCluster) {
370  outputClusterContainer->push_back(std::move(newCluster));
371  }
372  else {
373  isUsed.swap(isUsedRevert);
374  continue;
375  }
376 
377  // Add the cluster links to the super cluster
379  *outputClusterContainer, outputClusterContainer->size() - 1, ctx);
380  std::vector<ElementLink<xAOD::CaloClusterContainer>> elClusters{
381  clusterLink
382  };
383 
384  // Make egammaRec object, and push it back into output container.
385  auto newEgRec = std::make_unique<egammaRec>(*egRec);
386  newEgRec->setCaloClusters(elClusters);
387  newEgammaRecs->push_back(std::move(newEgRec));
388  } // End loop on egammaRecs
389 
390  ATH_CHECK(redoMatching(ctx, newEgammaRecs));
391 
392  return StatusCode::SUCCESS;
393 }

◆ 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 & AthReentrantAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

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

Definition at line 79 of file AthReentrantAlgorithm.cxx.

80 {
81  // If we didn't find any symlinks to add, just return the collection
82  // from the base class. Otherwise, return the extended collection.
83  if (!m_extendedExtraObjects.empty()) {
85  }
86  return Algorithm::extraOutputDeps();
87 }

◆ fillClusterConstrained()

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

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 606 of file egammaSuperClusterBuilderBase.cxx.

610 {
611  const float addCellsWindowEtaBarrel = m_addCellsWindowEtaBarrel;
612  const float addCellsWindowEtaEndcap = m_addCellsWindowEtaEndcap;
613  const float addCellsWindowL3EtaBarrel =
615  const float addCellsWindowL3EtaEndcap =
617 
618  // Loop for L2/L3
619  for (const xAOD::CaloCluster* tocheck : clusters) {
620  xAOD::CaloCluster::const_cell_iterator cell_itr = tocheck->begin();
621  xAOD::CaloCluster::const_cell_iterator cell_end = tocheck->end();
622  // Loop over cells
623  for (; cell_itr != cell_end; ++cell_itr) {
624  // sanity check on the cell
625  const CaloCell* cell = *cell_itr;
626  if (!cell) {
627  continue;
628  }
629  const CaloDetDescrElement* dde = cell->caloDDE();
630  if (!dde) {
631  continue;
632  }
633  // we want only LAREM
634  if (!(dde->getSubCalo() == CaloCell_ID::LAREM)) {
635  continue;
636  }
637  // we want L2 or L3 cells
638  const auto sampling = dde->getSampling();
639  const bool isL2Cell =
640  (CaloCell_ID::EMB2 == sampling || CaloCell_ID::EME2 == sampling);
641  const bool isL3Cell =
642  (CaloCell_ID::EMB3 == sampling || CaloCell_ID::EME3 == sampling);
643 
644  if ((!isL2Cell) && (!isL3Cell)) {
645  continue;
646  }
647  // Also exclude the inner wheel Endcap
648  if (dde->is_lar_em_endcap_inner()) {
649  continue;
650  }
651 
652  bool inEtaRange = false;
653  // Check if is inside the eta range wrt to the hottest
654  // cell(s) for the cluster we construct
655  if (cp0.emaxB > 0) { // barrel
656  if (isL2Cell &&
657  (std::abs(cp0.etaB - dde->eta_raw()) < addCellsWindowEtaBarrel)) {
658  inEtaRange = true;
659  }
660  if (isL3Cell &&
661  (std::abs(cp0.etaB - dde->eta_raw()) < addCellsWindowL3EtaBarrel)) {
662  inEtaRange = true;
663  }
664  }
665  if (cp0.emaxEC > 0) { // endcap
666  if (isL2Cell &&
667  (std::abs(cp0.etaEC - dde->eta_raw()) < addCellsWindowEtaEndcap)) {
668  inEtaRange = true;
669  }
670  if (isL3Cell && (std::abs(cp0.etaEC - dde->eta_raw()) <
671  addCellsWindowL3EtaEndcap)) {
672  inEtaRange = true;
673  }
674  }
675  if (!inEtaRange) {
676  continue;
677  }
678  tofill.addCell(cell_itr.index(), cell_itr.weight());
679  } // Loop over cells for L2/L3
680  } // Loop over clusters for L2/L3
681 
682  // We should have a size here
683  if (tofill.size() == 0) {
684  return StatusCode::FAILURE;
685  }
686  // Now calculate the cluster size in 2nd layer
687  // use that for constraining the L0/L1 cells we add
688  const CookieCutterHelpers::PhiSize phiSize(cp0, tofill);
689  const float phiPlusB = cp0.phiB + phiSize.plusB + m_extraL0L1PhiSize;
690  const float phiMinusB = cp0.phiB - phiSize.minusB - m_extraL0L1PhiSize;
691  const float phiPlusEC = cp0.phiEC + phiSize.plusEC + m_extraL0L1PhiSize;
692  const float phiMinusEC = cp0.phiEC - phiSize.minusEC - m_extraL0L1PhiSize;
693 
694  // Loop for L0/L1
695  for (const xAOD::CaloCluster* tocheck : clusters) {
696  xAOD::CaloCluster::const_cell_iterator cell_itr = tocheck->begin();
697  xAOD::CaloCluster::const_cell_iterator cell_end = tocheck->end();
698  // Loop over cells
699  for (; cell_itr != cell_end; ++cell_itr) {
700  // sanity check on the cell
701  const CaloCell* cell = *cell_itr;
702  if (!cell) {
703  continue;
704  }
705  const CaloDetDescrElement* dde = cell->caloDDE();
706  if (!dde) {
707  continue;
708  }
709 
710  // only deal with L1 or PS
711  const auto sampling = dde->getSampling();
712  const bool isL0L1Cell =
713  (CaloCell_ID::EMB1 == sampling || CaloCell_ID::EME1 == sampling ||
714  CaloCell_ID::PreSamplerB == sampling ||
715  CaloCell_ID::PreSamplerE == sampling);
716  if (!isL0L1Cell) {
717  continue;
718  }
719 
720  bool inEtaRange = false;
721  // Check if is inside the eta range wrt to the hottest
722  // cell(s) for the cluster we construct
723  if (cp0.emaxB > 0) { // barrel
724  if (std::abs(cp0.etaB - dde->eta_raw()) < addCellsWindowEtaBarrel) {
725  inEtaRange = true;
726  }
727  }
728  if (cp0.emaxEC > 0) { // endcap
729  if (std::abs(cp0.etaEC - dde->eta_raw()) < addCellsWindowEtaEndcap) {
730  inEtaRange = true;
731  }
732  }
733  if (!inEtaRange) {
734  continue;
735  }
736 
737  // Add L0/L1 when we are in the narrow range
738  bool inPhiRange = false;
739  if (cp0.emaxB > 0) { // barrel
740  const double cell_phi = proxim(dde->phi_raw(), cp0.phiB);
741  if (cell_phi > phiMinusB && cell_phi < phiPlusB) {
742  inPhiRange = true;
743  }
744  }
745  if (cp0.emaxEC > 0) { // endcap
746  const double cell_phi = proxim(dde->phi_raw(), cp0.phiEC);
747  if (cell_phi > phiMinusEC && cell_phi < phiPlusEC) {
748  inPhiRange = true;
749  }
750  }
751  if (!inPhiRange) {
752  continue;
753  }
754 
755  tofill.addCell(cell_itr.index(), cell_itr.weight());
756  } // Cell Loop for L0/L1
757  } // Cluster loop for L0/L1
758 
759  if (!m_egammaCellRecoveryTool.empty()) {
761  if (cp0.emaxB > cp0.emaxEC) {
762  info.etamax = cp0.etaB;
763  info.phimax = cp0.phiB;
764  } else {
765  info.etamax = cp0.etaEC;
766  info.phimax = cp0.phiEC;
767  }
768  if (m_egammaCellRecoveryTool->execute(tofill,info).isFailure()) {
769  ATH_MSG_WARNING("Issue trying to recover cells");
770  }
771 
772  // And finally add the recovered cells
773  const CaloCellContainer* inputcells =
774  tofill.getCellLinks()->getCellContainer();
775  for (const auto *c : info.addedCells) {
776  int index = inputcells->findIndex(c->caloDDE()->calo_hash());
777  tofill.addCell(index, 1.);
778  }
779  }
780 
781  return StatusCode::SUCCESS;
782 }

◆ filterPassed()

virtual bool AthReentrantAlgorithm::filterPassed ( const EventContext &  ctx) const
inlinevirtualinherited

Definition at line 135 of file AthReentrantAlgorithm.h.

135  {
136  return execState( ctx ).filterPassed();
137  }

◆ getEgammaRecType()

xAOD::EgammaParameters::EgammaType egammaSuperClusterBuilder::getEgammaRecType ( const egammaRec egRec) const
finaloverrideprivatevirtual

Implements egammaSuperClusterBuilderBase.

Definition at line 46 of file egammaSuperClusterBuilder.cxx.

46  {
48 }

◆ initialize()

StatusCode egammaSuperClusterBuilder::initialize ( )
finaloverridevirtual

should be called by the derived class in the initialize phase

Reimplemented from egammaSuperClusterBuilderBase.

Definition at line 28 of file egammaSuperClusterBuilder.cxx.

29 {
30  ATH_MSG_DEBUG(" Initializing egammaSuperClusterBuilder");
31 
32  // the data handle keys
33  if (m_calibrationType == "electron") {
35  } else if (m_calibrationType == "photon") {
37  } else {
38  ATH_MSG_ERROR("Unsupported calibration for " << m_calibrationType);
39  return StatusCode::FAILURE;
40  }
41 
43 }

◆ 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()

bool AthReentrantAlgorithm::isClonable ( ) const
overridevirtualinherited

◆ matchesInWindow()

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

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 409 of file egammaSuperClusterBuilderBase.cxx.

412 {
413  auto inRange = [](float eta1, float phi1,
414  float eta2, float phi2,
415  float etaWindow, float phiWindow) {
416 
417  const float dEta = std::abs(eta1 - eta2);
418  const float dPhi = std::abs(P4Helpers::deltaPhi(phi1, phi2));
419 
420  return dEta < etaWindow && dPhi < phiWindow;
421  };
422 
423  // First the case where the seed is both endcap and barrel, i.e. in the crack
424  // Check around both measurements of the seed
425  if (ref->hasSampling(CaloSampling::EMB2) &&
426  ref->hasSampling(CaloSampling::EME2)) {
427  const bool inRangeBarrel = inRange(ref->eta(),
428  ref->phi(),
429  clus->eta(),
430  clus->phi(),
433 
434  const bool inRangeEndcap = inRange(ref->eta(),
435  ref->phi(),
436  clus->eta(),
437  clus->phi(),
440 
441  const bool inRangeBarrelL2 = inRange(ref->etaSample(CaloSampling::EMB2),
442  ref->phiSample(CaloSampling::EMB2),
443  clus->eta(),
444  clus->phi(),
447 
448  const bool inRangeEndcapL2 = inRange(ref->etaSample(CaloSampling::EME2),
449  ref->phiSample(CaloSampling::EME2),
450  clus->eta(),
451  clus->phi(),
454 
455  // Matches any in case of split
456  return inRangeBarrel || inRangeEndcap || inRangeBarrelL2 || inRangeEndcapL2;
457  }
458 
459  if (xAOD::EgammaHelpers::isBarrel(clus)) {
460  return inRange(ref->eta(),
461  ref->phi(),
462  clus->eta(),
463  clus->phi(),
466  }
467 
468  return inRange(ref->eta(),
469  ref->phi(),
470  clus->eta(),
471  clus->phi(),
474 }

◆ msg() [1/2]

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

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

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ 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
protectedvirtualinherited

Reimplemented in electronSuperClusterBuilder, and photonSuperClusterBuilder.

Definition at line 401 of file egammaSuperClusterBuilderBase.cxx.

404  {
405  return StatusCode::SUCCESS;
406 }

◆ 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();
383  PBASE::renounce (h);
384  }

◆ 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  {
365  handlesArray.renounce();
366  }

◆ searchForSecondaryClusters()

std::vector< std::size_t > egammaSuperClusterBuilder::searchForSecondaryClusters ( std::size_t  egammaInd,
const EgammaRecContainer egammaRecs,
std::vector< bool > &  isUsed 
) const
finaloverrideprivatevirtual

Return extra clusters that can be added to make supercluster.

Parameters
egammaIndindex of the EgammaRec object in the input container corresponding to the seed
egammaRecsinput container of EgammaRec
isUsedboolean mask to avoid to reuse clusters (1=already used, 0=not used). When calling this function the element corresponding to the seed is marked as used
nWindowClustershow many clusters are added by the matchesInWindow

The function returns a vector of index corresponding to secondary clusters to be merged with the seed.

The secondary cluster is added if it pass one of the functions:

Implements egammaSuperClusterBuilderBase.

Definition at line 53 of file egammaSuperClusterBuilder.cxx.

57 {
58 
59  std::vector<std::size_t> secondaryIndices;
60 
61  const auto* const seedEgammaRec = (*egammaRecs)[seedIndex];
62  const xAOD::CaloCluster* const seedCaloClus = seedEgammaRec->caloCluster();
63 
64  // for stats
65  int nWindowClusters = 0;
66  // Now loop over the potential secondary clusters
67  for (std::size_t i = 0; i < egammaRecs->size(); ++i) {
68  // if already used continue
69  if (isUsed[i]) {
70  continue;
71  }
72  const auto* const secEgammaRec = (*egammaRecs)[i];
73  const xAOD::CaloCluster* const secClus = secEgammaRec->caloCluster();
74  if (!secClus) {
76  "The potentially secondary egammaRec does not have a cluster");
77  continue;
78  }
79  bool addCluster = false;
80  if (matchesInWindow(seedCaloClus, secClus)) {
81  ATH_MSG_DEBUG("Cluster with Et: " << secClus->et()
82  << " matched in window");
83  ++nWindowClusters;
84  addCluster = true;
85  }
86  // Add it to the list of secondary clusters if it matches.
87  if (addCluster) {
88  secondaryIndices.push_back(i);
89  isUsed[i] = true;
90  }
91  }
92  ATH_MSG_DEBUG("Found: " << secondaryIndices.size() << " secondaries");
93  ATH_MSG_DEBUG("window clusters: " << nWindowClusters);
94  return secondaryIndices;
95 }

◆ seedClusterSelection()

bool egammaSuperClusterBuilderBase::seedClusterSelection ( const xAOD::CaloCluster clus) const
protectedinherited

check if we pass the basic criteria for a seed cluster

Definition at line 585 of file egammaSuperClusterBuilderBase.cxx.

587 {
588  // The seed should have 2nd sampling
589  if (!clus->hasSampling(CaloSampling::EMB2) &&
591  return false;
592  }
593  const double eta2 = std::abs(clus->etaBE(2));
594  if (eta2 > 10) {
595  return false;
596  }
597  // Accordeon Energy samplings 1 to 3
598  const double EMAccEnergy =
599  clus->energyBE(1) + clus->energyBE(2) + clus->energyBE(3);
600  const double EMAccEt = EMAccEnergy / cosh(eta2);
601  // Require minimum energy for supercluster seeding.
602  return EMAccEt >= m_EtThresholdCut;
603 }

◆ setFilterPassed()

virtual void AthReentrantAlgorithm::setFilterPassed ( bool  state,
const EventContext &  ctx 
) const
inlinevirtualinherited

Definition at line 139 of file AthReentrantAlgorithm.h.

139  {
140  execState( ctx ).setFilterPassed( state );
141  }

◆ sysExecute()

StatusCode AthReentrantAlgorithm::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 67 of file AthReentrantAlgorithm.cxx.

68 {
69  return Gaudi::Algorithm::sysExecute (ctx);
70 }

◆ sysInitialize()

StatusCode AthReentrantAlgorithm::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 InputMakerBase, and HypoBase.

Definition at line 96 of file AthReentrantAlgorithm.cxx.

96  {
98 
99  if (sc.isFailure()) {
100  return sc;
101  }
102 
103  ServiceHandle<ICondSvc> cs("CondSvc",name());
104  for (auto h : outputHandles()) {
105  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
106  // do this inside the loop so we don't create the CondSvc until needed
107  if ( cs.retrieve().isFailure() ) {
108  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
109  return StatusCode::SUCCESS;
110  }
111  if (cs->regHandle(this,*h).isFailure()) {
112  sc = StatusCode::FAILURE;
113  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
114  << " with CondSvc");
115  }
116  }
117  }
118  return sc;
119 }

◆ 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) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_addCellsWindowEtaBarrel

float egammaSuperClusterBuilderBase::m_addCellsWindowEtaBarrel = 0.0F
privateinherited

Definition at line 271 of file egammaSuperClusterBuilderBase.h.

◆ m_addCellsWindowEtaCellsBarrel

Gaudi::Property<int> egammaSuperClusterBuilderBase::m_addCellsWindowEtaCellsBarrel
privateinherited
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.

◆ m_addCellsWindowEtaCellsEndcap

Gaudi::Property<int> egammaSuperClusterBuilderBase::m_addCellsWindowEtaCellsEndcap
privateinherited
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.

◆ m_addCellsWindowEtaEndcap

float egammaSuperClusterBuilderBase::m_addCellsWindowEtaEndcap = 0.0F
privateinherited

Definition at line 272 of file egammaSuperClusterBuilderBase.h.

◆ m_calibrationType

Gaudi::Property<std::string> egammaSuperClusterBuilder::m_calibrationType
private
Initial value:
{
this,
"CalibrationType",
"electron",
"type to be assumed for calibration: electron , photon"
}

type to be assumed for calibration

Definition at line 92 of file egammaSuperClusterBuilder.h.

◆ m_caloDetDescrMgrKey

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

Definition at line 162 of file egammaSuperClusterBuilderBase.h.

◆ m_clusterCorrectionTool

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

Tool to handle cluster corrections.

Definition at line 375 of file egammaSuperClusterBuilderBase.h.

◆ 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
privateinherited
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.

◆ m_egammaCheckEnergyDepositTool

ToolHandle<IegammaCheckEnergyDepositTool> egammaSuperClusterBuilderBase::m_egammaCheckEnergyDepositTool
privateinherited
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.

◆ m_egTypeForCalibration

xAOD::EgammaParameters::EgammaType egammaSuperClusterBuilder::m_egTypeForCalibration
private

Definition at line 89 of file egammaSuperClusterBuilder.h.

◆ m_EtThresholdCut

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

Seed selection requirements.

Definition at line 147 of file egammaSuperClusterBuilderBase.h.

◆ 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 AthReentrantAlgorithm::m_extendedExtraObjects
privateinherited

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

Empty if no symlinks were found.

Definition at line 153 of file AthReentrantAlgorithm.h.

◆ m_extraL0L1PhiSize

float egammaSuperClusterBuilderBase::m_extraL0L1PhiSize = 0.0F
privateinherited

Definition at line 274 of file egammaSuperClusterBuilderBase.h.

◆ m_extraL0L1PhiSizeCells

Gaudi::Property<int> egammaSuperClusterBuilderBase::m_extraL0L1PhiSizeCells
privateinherited
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.

◆ m_extraL3EtaSize

float egammaSuperClusterBuilderBase::m_extraL3EtaSize = 0.0F
privateinherited

Definition at line 276 of file egammaSuperClusterBuilderBase.h.

◆ m_extraL3EtaSizeCells

Gaudi::Property<int> egammaSuperClusterBuilderBase::m_extraL3EtaSizeCells
privateinherited
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.

◆ m_inputEgammaRecContainerKey

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

Key for input egammaRec container.

Definition at line 155 of file egammaSuperClusterBuilderBase.h.

◆ m_linkToConstituents

Gaudi::Property<bool> egammaSuperClusterBuilderBase::m_linkToConstituents
privateinherited
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.

◆ m_MVACalibSvc

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

Handle to the MVA calibration service.

Definition at line 369 of file egammaSuperClusterBuilderBase.h.

◆ m_outputEgammaRecContainerKey

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

Key for output egammaRec container.

Definition at line 170 of file egammaSuperClusterBuilderBase.h.

◆ m_outputSuperClusterCollectionName

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

Key for output clusters.

Definition at line 178 of file egammaSuperClusterBuilderBase.h.

◆ m_precorrClustersKey

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

Optional key for pre-correction clusters.

Definition at line 186 of file egammaSuperClusterBuilderBase.h.

◆ m_searchWindowEtaBarrel

float egammaSuperClusterBuilderBase::m_searchWindowEtaBarrel = 0.0F
protectedinherited

Definition at line 195 of file egammaSuperClusterBuilderBase.h.

◆ m_searchWindowEtaCellsBarrel

Gaudi::Property<int> egammaSuperClusterBuilderBase::m_searchWindowEtaCellsBarrel
privateinherited
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.

◆ m_searchWindowEtaCellsEndcap

Gaudi::Property<int> egammaSuperClusterBuilderBase::m_searchWindowEtaCellsEndcap
privateinherited
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.

◆ m_searchWindowEtaEndcap

float egammaSuperClusterBuilderBase::m_searchWindowEtaEndcap = 0.0F
protectedinherited

Definition at line 197 of file egammaSuperClusterBuilderBase.h.

◆ m_searchWindowPhiBarrel

float egammaSuperClusterBuilderBase::m_searchWindowPhiBarrel = 0.0F
protectedinherited

Definition at line 196 of file egammaSuperClusterBuilderBase.h.

◆ m_searchWindowPhiCellsBarrel

Gaudi::Property<int> egammaSuperClusterBuilderBase::m_searchWindowPhiCellsBarrel
privateinherited
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.

◆ m_searchWindowPhiCellsEndcap

Gaudi::Property<int> egammaSuperClusterBuilderBase::m_searchWindowPhiCellsEndcap
privateinherited
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.

◆ m_searchWindowPhiEndcap

float egammaSuperClusterBuilderBase::m_searchWindowPhiEndcap = 0.0F
protectedinherited

Definition at line 198 of file egammaSuperClusterBuilderBase.h.

◆ m_useExtendedTG3

Gaudi::Property<bool> egammaSuperClusterBuilderBase::m_useExtendedTG3
privateinherited
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.

◆ 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

constexpr float egammaSuperClusterBuilderBase::s_cellEtaSize = 0.025
staticconstexprprotectedinherited

Definition at line 136 of file egammaSuperClusterBuilderBase.h.

◆ s_cellPhiSize

constexpr float egammaSuperClusterBuilderBase::s_cellPhiSize = M_PI / 128.
staticconstexprprotectedinherited

Definition at line 137 of file egammaSuperClusterBuilderBase.h.

◆ s_ClEtaMaxForTG3cell

constexpr float egammaSuperClusterBuilderBase::s_ClEtaMaxForTG3cell = s_TG3Run3E4cellEtaMax + 0.03
staticconstexprprotectedinherited

Definition at line 144 of file egammaSuperClusterBuilderBase.h.

◆ s_ClEtaMinForTG3cell

constexpr float egammaSuperClusterBuilderBase::s_ClEtaMinForTG3cell = s_TG3Run2E4cellEtaMin - 0.03
staticconstexprprotectedinherited

Definition at line 143 of file egammaSuperClusterBuilderBase.h.

◆ s_TG3Run2E4cellEtaMax

constexpr float egammaSuperClusterBuilderBase::s_TG3Run2E4cellEtaMax = 1.6
staticconstexprprotectedinherited

Definition at line 140 of file egammaSuperClusterBuilderBase.h.

◆ s_TG3Run2E4cellEtaMin

constexpr float egammaSuperClusterBuilderBase::s_TG3Run2E4cellEtaMin = 1.4
staticconstexprprotectedinherited

Definition at line 141 of file egammaSuperClusterBuilderBase.h.

◆ s_TG3Run3E3cellEtaMin

constexpr float egammaSuperClusterBuilderBase::s_TG3Run3E3cellEtaMin = 1.2
staticconstexprprotectedinherited

Definition at line 139 of file egammaSuperClusterBuilderBase.h.

◆ s_TG3Run3E4cellEtaMax

constexpr float egammaSuperClusterBuilderBase::s_TG3Run3E4cellEtaMax = 1.72
staticconstexprprotectedinherited

Definition at line 138 of file egammaSuperClusterBuilderBase.h.


The documentation for this class was generated from the following files:
grepfile.info
info
Definition: grepfile.py:38
CaloClusterStoreHelper::makeCluster
static std::unique_ptr< xAOD::CaloCluster > makeCluster(const CaloCellContainer *cellCont)
Creates a valid CaloCluster with a private Aux-Store and CellLink container.
Definition: CaloClusterStoreHelper.cxx:13
xAOD::CaloCluster_v1::phi0
flt_t phi0() const
Returns raw of cluster seed.
CookieCutterHelpers::CentralPosition
Find the reference position (eta, phi) relative to which cells are restricted.
Definition: CookieCutterHelpers.h:19
xAOD::CaloCluster_v1::phi
virtual double phi() const
The azimuthal angle ( ) of the particle.
Definition: CaloCluster_v1.cxx:256
RunTileCalibRec.cells
cells
Definition: RunTileCalibRec.py:271
CaloDetDescrElement::is_lar_em_endcap_inner
bool is_lar_em_endcap_inner() const
cell belongs to the inner wheel of EM end cap
Definition: CaloDetDescrElement.cxx:114
egammaSuperClusterBuilderBase::m_MVACalibSvc
ServiceHandle< IegammaMVASvc > m_MVACalibSvc
Handle to the MVA calibration service.
Definition: egammaSuperClusterBuilderBase.h:369
GeV
#define GeV
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:17
egammaSuperClusterBuilderBase::m_searchWindowPhiEndcap
float m_searchWindowPhiEndcap
Definition: egammaSuperClusterBuilderBase.h:198
egammaSuperClusterBuilderBase::m_searchWindowEtaBarrel
float m_searchWindowEtaBarrel
Definition: egammaSuperClusterBuilderBase.h:195
egammaSuperClusterBuilderBase::egammaRecPassesSelection
virtual bool egammaRecPassesSelection(const egammaRec *egRec) const
Definition: egammaSuperClusterBuilderBase.cxx:396
CaloCellList
Definition: CaloCellList.h:40
constants.EMB1
int EMB1
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:53
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
egammaSuperClusterBuilderBase::m_clusterCorrectionTool
ToolHandle< IegammaSwTool > m_clusterCorrectionTool
Tool to handle cluster corrections.
Definition: egammaSuperClusterBuilderBase.h:375
ParticleGun_SamplingFraction.eta2
eta2
Definition: ParticleGun_SamplingFraction.py:96
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
CaloClusterStoreHelper::AddContainerWriteHandle
static StatusCode AddContainerWriteHandle(SG::WriteHandle< xAOD::CaloClusterContainer > &clusColl)
Creates a new xAOD::CaloClusterContainer in the given WriteHandle + CaloClusterAuxContainer and recor...
Definition: CaloClusterStoreHelper.cxx:53
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:68
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
index
Definition: index.py:1
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
egammaSuperClusterBuilderBase::s_TG3Run3E3cellEtaMin
static constexpr float s_TG3Run3E3cellEtaMin
Definition: egammaSuperClusterBuilderBase.h:139
egammaSuperClusterBuilderBase::m_addCellsWindowEtaBarrel
float m_addCellsWindowEtaBarrel
Definition: egammaSuperClusterBuilderBase.h:271
IegammaCellRecoveryTool::Info
Definition: IegammaCellRecoveryTool.h:36
egammaSuperClusterBuilderBase::initialize
virtual StatusCode initialize() override
should be called by the derived class in the initialize phase
Definition: egammaSuperClusterBuilderBase.cxx:211
CaloDetDescrElement
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:66
proxim
double proxim(double b, double a)
Definition: proxim.h:17
xAOD::CaloCluster_v1::setAltEta
void setAltEta(flt_t)
Set for signal state ALTCALIBRATED.
Definition: CaloCluster_v1.cxx:333
AthCommonDataStore::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 > renounce(T &h)
Definition: AthCommonDataStore.h:380
M_PI
#define M_PI
Definition: ActiveFraction.h:11
xAOD::CaloCluster_v1::SuperCluster
@ SuperCluster
Definition: CaloCluster_v1.h:107
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
xAOD::CaloCluster_v1::et
double et() const
Definition: CaloCluster_v1.h:856
egammaSuperClusterBuilderBase::createNewCluster
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.
Definition: egammaSuperClusterBuilderBase.cxx:477
xAOD::eta1
setEt setPhi setE277 setWeta2 eta1
Definition: TrigEMCluster_v1.cxx:41
egammaSuperClusterBuilderBase::s_TG3Run3E4cellEtaMax
static constexpr float s_TG3Run3E4cellEtaMax
Definition: egammaSuperClusterBuilderBase.h:138
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
egammaSuperClusterBuilderBase::m_outputSuperClusterCollectionName
SG::WriteHandleKey< xAOD::CaloClusterContainer > m_outputSuperClusterCollectionName
Key for output clusters.
Definition: egammaSuperClusterBuilderBase.h:178
SG::VarHandleKey::empty
bool empty() const
Test if the key is blank.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:150
egammaSuperClusterBuilderBase::getEgammaRecType
virtual xAOD::EgammaParameters::EgammaType getEgammaRecType(const egammaRec *egRec) const =0
CaloCell_ID_FCS::TileGap3
@ TileGap3
Definition: FastCaloSim_CaloCell_ID.h:36
egammaSuperClusterBuilderBase::m_egammaCheckEnergyDepositTool
ToolHandle< IegammaCheckEnergyDepositTool > m_egammaCheckEnergyDepositTool
Pointer to the egammaCheckEnergyDepositTool.
Definition: egammaSuperClusterBuilderBase.h:383
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
CaloDetDescrElement::eta_raw
float eta_raw() const
cell eta_raw
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:350
PUfitVar::maxEta
constexpr float maxEta
Definition: GepMETPufitAlg.cxx:13
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
CaloDetDescrElement::getSubCalo
CaloCell_ID::SUBCALO getSubCalo() const
cell subcalo
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:433
xAOD::EgammaHelpers::isBarrel
bool isBarrel(const xAOD::Egamma *eg)
return true if the cluster is in the barrel
Definition: EgammaxAODHelpers.cxx:33
BchCleanup.mgr
mgr
Definition: BchCleanup.py:294
xAOD::CaloCluster_v1::etaBE
float etaBE(const unsigned layer) const
Get the eta in one layer of the EM Calo.
Definition: CaloCluster_v1.cxx:644
egammaSuperClusterBuilderBase::addTileGap3CellsinWindow
StatusCode addTileGap3CellsinWindow(xAOD::CaloCluster &tofill, const CaloDetDescrManager &mgr) const
add all tile Gap 3 cells in a window.
Definition: egammaSuperClusterBuilderBase.cxx:785
egammaSuperClusterBuilderBase::m_linkToConstituents
Gaudi::Property< bool > m_linkToConstituents
Decorate the supercluster with links to the component topoclusters.
Definition: egammaSuperClusterBuilderBase.h:280
egammaSuperClusterBuilderBase::m_caloDetDescrMgrKey
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloDetDescrMgrKey
Definition: egammaSuperClusterBuilderBase.h:162
egammaSuperClusterBuilderBase::matchesInWindow
bool matchesInWindow(const xAOD::CaloCluster *ref, const xAOD::CaloCluster *clus) const
Is clus in window center around ref?
Definition: egammaSuperClusterBuilderBase.cxx:409
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:59
P4Helpers::deltaPhi
double deltaPhi(double phiA, double phiB)
delta Phi in range [-pi,pi[
Definition: P4Helpers.h:34
egammaSuperClusterBuilderBase::m_egammaCellRecoveryTool
ToolHandle< IegammaCellRecoveryTool > m_egammaCellRecoveryTool
Pointer to the egammaCellRecoveryTool.
Definition: egammaSuperClusterBuilderBase.h:391
egammaSuperClusterBuilder::m_calibrationType
Gaudi::Property< std::string > m_calibrationType
type to be assumed for calibration
Definition: egammaSuperClusterBuilder.h:92
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
CaloDetDescrElement::calo_hash
IdentifierHash calo_hash() const
cell calo hash
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:412
AthCommonDataStore
Definition: AthCommonDataStore.h:52
xAOD::CaloCluster_v1::setRawE
void setRawE(flt_t)
Set Energy for signal state UNCALIBRATED.
Definition: CaloCluster_v1.cxx:284
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
constants.EMB2
int EMB2
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:54
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
xAOD::CaloCluster_v1::eta
virtual double eta() const
The pseudorapidity ( ) of the particle.
Definition: CaloCluster_v1.cxx:251
lumiFormat.i
int i
Definition: lumiFormat.py:85
egammaSuperClusterBuilderBase::redoMatching
virtual StatusCode redoMatching(const EventContext &ctx, SG::WriteHandle< EgammaRecContainer > &newEgammaRecs) const
Definition: egammaSuperClusterBuilderBase.cxx:401
egammaSuperClusterBuilderBase::egammaSuperClusterBuilderBase
egammaSuperClusterBuilderBase(const std::string &name, ISvcLocator *pSvcLocator)
Protected constructor since this class should not be instantiated by itself.
Definition: egammaSuperClusterBuilderBase.cxx:203
CookieCutterHelpers::CentralPosition::etaB
float etaB
Definition: CookieCutterHelpers.h:20
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
TauGNNUtils::Variables::Track::dPhi
bool dPhi(const xAOD::TauJet &tau, const xAOD::TauTrack &track, double &out)
Definition: TauGNNUtils.cxx:538
xAOD::CaloCluster_v1::size
size_t size() const
size method (forwarded from CaloClusterCellLink obj)
Definition: CaloCluster_v1.cxx:996
constants.EME1
int EME1
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:55
xAOD::CaloCluster_v1::setAltE
void setAltE(flt_t)
Set Energy for signal state ALTCALIBRATED.
Definition: CaloCluster_v1.cxx:328
xAOD::CaloCluster_v1::setRawEta
void setRawEta(flt_t)
Set for signal state UNCALIBRATED.
Definition: CaloCluster_v1.cxx:289
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
egammaSuperClusterBuilderBase::m_searchWindowPhiBarrel
float m_searchWindowPhiBarrel
Definition: egammaSuperClusterBuilderBase.h:196
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
DataVector::back
const T * back() const
Access the last element in the collection as an rvalue.
egammaSuperClusterBuilderBase::s_TG3Run2E4cellEtaMin
static constexpr float s_TG3Run2E4cellEtaMin
Definition: egammaSuperClusterBuilderBase.h:141
xAOD::CaloCluster_v1::getCellLinks
const CaloClusterCellLink * getCellLinks() const
Get a pointer to the CaloClusterCellLink object (const version)
Definition: CaloCluster_v1.cxx:905
egammaSuperClusterBuilderBase::m_precorrClustersKey
SG::WriteHandleKey< xAOD::CaloClusterContainer > m_precorrClustersKey
Optional key for pre-correction clusters.
Definition: egammaSuperClusterBuilderBase.h:186
AthReentrantAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Definition: AthReentrantAlgorithm.h:153
inRange
bool inRange(const double *boundaries, const double value, const double tolerance=0.02)
Definition: LArSCIdVsIdTest.cxx:5
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
egammaSuperClusterBuilderBase::m_addCellsWindowEtaEndcap
float m_addCellsWindowEtaEndcap
Definition: egammaSuperClusterBuilderBase.h:272
egammaSuperClusterBuilderBase::m_inputEgammaRecContainerKey
SG::ReadHandleKey< EgammaRecContainer > m_inputEgammaRecContainerKey
Key for input egammaRec container.
Definition: egammaSuperClusterBuilderBase.h:155
egammaSuperClusterBuilderBase::m_extraL3EtaSize
float m_extraL3EtaSize
Definition: egammaSuperClusterBuilderBase.h:276
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
CaloCell_ID_FCS::EME3
@ EME3
Definition: FastCaloSim_CaloCell_ID.h:26
AthReentrantAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthReentrantAlgorithm.cxx:96
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
CookieCutterHelpers::CentralPosition::phiB
float phiB
Definition: CookieCutterHelpers.h:21
CookieCutterHelpers::PhiSize
Find the size of the cluster in phi using L2 cells.
Definition: CookieCutterHelpers.h:49
egammaSuperClusterBuilder::m_egTypeForCalibration
xAOD::EgammaParameters::EgammaType m_egTypeForCalibration
Definition: egammaSuperClusterBuilder.h:89
CaloCellContainer
Container class for CaloCell.
Definition: CaloCellContainer.h:55
CookieCutterHelpers::CentralPosition::phiEC
float phiEC
Definition: CookieCutterHelpers.h:24
egammaSuperClusterBuilderBase::searchForSecondaryClusters
virtual std::vector< std::size_t > searchForSecondaryClusters(std::size_t egammaInd, const EgammaRecContainer *egammaRecs, std::vector< bool > &isUsed) const =0
egammaSuperClusterBuilderBase::s_TG3Run2E4cellEtaMax
static constexpr float s_TG3Run2E4cellEtaMax
Definition: egammaSuperClusterBuilderBase.h:140
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
xAOD::CaloCluster_v1::eta0
flt_t eta0() const
Returns raw of cluster seed.
a
TList * a
Definition: liststreamerinfos.cxx:10
egammaSuperClusterBuilderBase::m_EtThresholdCut
Gaudi::Property< float > m_EtThresholdCut
Seed selection requirements.
Definition: egammaSuperClusterBuilderBase.h:147
h
CaloDetDescrManager
This class provides the client interface for accessing the detector description information common to...
Definition: CaloDetDescrManager.h:473
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
CaloDetDescrElement::getSampling
CaloCell_ID::CaloSample getSampling() const
cell sampling
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:395
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
ref
const boost::regex ref(r_ef)
CaloCell_ID_FCS::PreSamplerE
@ PreSamplerE
Definition: FastCaloSim_CaloCell_ID.h:23
CaloCell_ID_FCS::PreSamplerB
@ PreSamplerB
Definition: FastCaloSim_CaloCell_ID.h:19
egammaSuperClusterBuilderBase::m_extraL0L1PhiSize
float m_extraL0L1PhiSize
Definition: egammaSuperClusterBuilderBase.h:274
xAOD::CaloCluster_v1::addCell
bool addCell(const unsigned index, const double weight)
Method to add a cell to the cluster (Beware: Kinematics not updated!)
Definition: CaloCluster_v1.h:771
egammaSuperClusterBuilderBase::calibrateCluster
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
Definition: egammaSuperClusterBuilderBase.cxx:844
RunTileMonitoring.clusters
clusters
Definition: RunTileMonitoring.py:133
xAOD::CaloCluster_v1::energyBE
float energyBE(const unsigned layer) const
Get the energy in one layer of the EM Calo.
Definition: CaloCluster_v1.cxx:630
xAOD::EgammaParameters::electron
@ electron
Definition: EgammaEnums.h:18
CaloCellContainer::findIndex
int findIndex(const IdentifierHash theHash) const
Return index of the cell with a given hash.
Definition: CaloCellContainer.cxx:363
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
CaloClusterKineHelper::calculateKine
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.
Definition: CaloClusterKineHelper.cxx:223
CookieCutterHelpers::CentralPosition::emaxB
float emaxB
Definition: CookieCutterHelpers.h:22
egammaSuperClusterBuilderBase::seedClusterSelection
bool seedClusterSelection(const xAOD::CaloCluster *clus) const
check if we pass the basic criteria for a seed cluster
Definition: egammaSuperClusterBuilderBase.cxx:585
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
egammaSuperClusterBuilderBase::s_ClEtaMinForTG3cell
static constexpr float s_ClEtaMinForTG3cell
Definition: egammaSuperClusterBuilderBase.h:143
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
xAOD::CaloCluster_v1::hasSampling
bool hasSampling(const CaloSample s) const
Checks if certain smapling contributes to cluster.
Definition: CaloCluster_v1.h:890
CaloCell_Base_ID::LAREM
@ LAREM
Definition: CaloCell_Base_ID.h:46
TauGNNUtils::Variables::Track::dEta
bool dEta(const xAOD::TauJet &tau, const xAOD::TauTrack &track, double &out)
Definition: TauGNNUtils.cxx:527
xAOD::CaloCluster_v1::setAltPhi
void setAltPhi(flt_t)
Set for signal state ALTCALIBRATED.
Definition: CaloCluster_v1.cxx:338
CaloCell_ID_FCS::EMB3
@ EMB3
Definition: FastCaloSim_CaloCell_ID.h:22
egammaSuperClusterBuilderBase::m_useExtendedTG3
Gaudi::Property< bool > m_useExtendedTG3
Use extended TG3 definition (only after Run 2)
Definition: egammaSuperClusterBuilderBase.h:288
egammaSuperClusterBuilderBase::fillClusterConstrained
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...
Definition: egammaSuperClusterBuilderBase.cxx:606
python.compressB64.c
def c
Definition: compressB64.py:93
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
CookieCutterHelpers::CentralPosition::emaxEC
float emaxEC
Definition: CookieCutterHelpers.h:25
egammaSuperClusterBuilderBase::m_searchWindowEtaEndcap
float m_searchWindowEtaEndcap
Definition: egammaSuperClusterBuilderBase.h:197
xAOD::CaloCluster_v1::e
virtual double e() const
The total energy of the particle.
Definition: CaloCluster_v1.cxx:265
constants.EME2
int EME2
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:56
egammaSuperClusterBuilderBase::s_ClEtaMaxForTG3cell
static constexpr float s_ClEtaMaxForTG3cell
Definition: egammaSuperClusterBuilderBase.h:144
fitman.k
k
Definition: fitman.py:528
xAOD::CaloCluster_v1::setRawPhi
void setRawPhi(flt_t)
Set for signal state UNCALIBRATED.
Definition: CaloCluster_v1.cxx:294
CookieCutterHelpers::CentralPosition::etaEC
float etaEC
Definition: CookieCutterHelpers.h:23
CaloDetDescrElement::phi_raw
float phi_raw() const
cell phi_raw
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:352
ServiceHandle< ICondSvc >
egammaSuperClusterBuilderBase::m_outputEgammaRecContainerKey
SG::WriteHandleKey< EgammaRecContainer > m_outputEgammaRecContainerKey
Key for output egammaRec container.
Definition: egammaSuperClusterBuilderBase.h:170
xAOD::EgammaParameters::unconvertedPhoton
@ unconvertedPhoton
Definition: EgammaEnums.h:19