|  | ATLAS Offline Software
    | 
 
 
 
Go to the documentation of this file.
   24                                                      ISvcLocator* pSvcLocator)
 
   55   const EventContext &ctx,
 
   59     for (
auto egRec : *newEgammaRecs) {
 
   61         ATH_MSG_ERROR(
"Problem executing conversioBuilder on photonSuperRecs");
 
   62         return StatusCode::FAILURE;
 
   67   return StatusCode::SUCCESS;
 
   72 std::vector<std::size_t>
 
   74   std::size_t seedIndex,
 
   76   std::vector<bool>& isUsed)
 const 
   79   std::vector<std::size_t> secondaryIndices;
 
   81   const auto* 
const seedEgammaRec = (*egammaRecs)[seedIndex];
 
   85   std::vector<const xAOD::Vertex*> seedVertices;
 
   86   std::vector<xAOD::EgammaParameters::ConversionType> seedVertexType;
 
   87   std::vector<const xAOD::TrackParticle*>
 
   90   auto numVertices = seedEgammaRec->getNumberOfVertices();
 
   95   for (std::size_t vx = 0; vx < numVertices; ++vx) {
 
   96     const auto* 
const vertex = seedEgammaRec->vertex(vx);
 
   98     seedVertices.push_back(
vertex);
 
   99     seedVertexType.push_back(convType);
 
  104       for (
unsigned int tp = 0; 
tp < 
vertex->nTrackParticles(); ++
tp) {
 
  105         seedVertexTracks.push_back(
vertex->trackParticle(
tp));
 
  111   int nWindowClusters = 0;
 
  112   int nExtraClusters = 0;
 
  115   for (std::size_t 
i = 0; 
i < egammaRecs->
size(); ++
i) {
 
  122     const auto* 
const secEgammaRec = (*egammaRecs)[
i];
 
  126         "The potentially secondary egammaRec does not have a cluster");
 
  130     bool addCluster = 
false;
 
  134                                         << 
" matched in window");
 
  138                matchesVtx(seedVertices, seedVertexType, secEgammaRec)) {
 
  150       secondaryIndices.push_back(
i);
 
  154   ATH_MSG_DEBUG(
"Found: " << secondaryIndices.size() << 
" secondaries");
 
  158   return secondaryIndices;
 
  163   const std::vector<const xAOD::Vertex*>& seedVertices,
 
  164   const std::vector<xAOD::EgammaParameters::ConversionType>& seedVertexType,
 
  172   for (
size_t seedVx = 0; seedVx < seedVertices.size(); ++seedVx) {
 
  177       for (
size_t testVx = 0; testVx < numTestVertices; ++testVx) {
 
  178         if (seedVertices[seedVx] == egRec->
vertex(testVx)) {
 
  189   const std::vector<const xAOD::TrackParticle*>& seedVertexTracks,
 
  196   for (
const auto* seedVertexTrack : seedVertexTracks) {
 
  198     for (
size_t testTk = 0; testTk < numTestTracks; ++testTk) {
 
  
virtual xAOD::EgammaParameters::EgammaType getEgammaRecType(const egammaRec *egRec) const override final
size_t getNumberOfVertices() const
Return the number xAOD::Vertex/vertices that match the photon candidate.
bool matchesVtx(const std::vector< const xAOD::Vertex * > &seedVertices, const std::vector< xAOD::EgammaParameters::ConversionType > &seedVertexType, const egammaRec *egRec) const
Does the cluster share conversion vertex?
virtual StatusCode initialize() override
should be called by the derived class in the initialize phase
photonSuperClusterBuilder(const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode initialize() override final
should be called by the derived class in the initialize phase
ToolHandle< IEMConversionBuilder > m_conversionBuilder
Tool to retrieve the conversions.
virtual StatusCode redoMatching(const EventContext &ctx, SG::WriteHandle< EgammaRecContainer > &newEgammaRecs) const final override
Definition of CaloDetDescrManager.
Handle class for recording to StoreGate.
Gaudi::Property< bool > m_useOnlyLeadingVertex
use only the leading vertex for matching
bool matchesInWindow(const xAOD::CaloCluster *ref, const xAOD::CaloCluster *clus) const
Is clus in window center around ref?
Description of a calorimeter cluster.
virtual std::vector< std::size_t > searchForSecondaryClusters(std::size_t photonInd, const EgammaRecContainer *egammaRecs, std::vector< bool > &isUsed) const override final
Return extra clusters that can be added to make supercluster.
Gaudi::Property< bool > m_useOnlySi
use only vertices/tracks with silicon tracks
Gaudi::Property< bool > m_doConversions
private member flag to do the conversion building and matching
::StatusCode StatusCode
StatusCode definition for legacy code.
@ doubleSi
two tracks, both with Si hits
size_t getNumberOfTrackParticles() const
Return the number xAOD::TrackParticles that match the electron candidate.
const xAOD::TrackParticle * trackParticle(size_t index=0) const
Pointer to the xAOD::TrackParticle/s that match the electron candidate.
@ singleSi
one track only, with Si hits
bool matchesVtxTrack(const std::vector< const xAOD::TrackParticle * > &seedVertexTracks, const egammaRec *egRec) const
Does the cluster match a conversion vertex track with the seed?
Gaudi::Property< bool > m_addClustersMatchingVtx
add the topoclusters matching conversion vertex
const xAOD::Vertex * vertex(size_t index=0) const
Pointer to the xAOD::Vertex/es that match the photon candidate.
#define ATH_MSG_WARNING(x)
Base class for electronSuperClusterBuilder photonSuperClusterBuilder egammaSuperClusterBuilder This c...
xAOD::EgammaParameters::ConversionType conversionType(const xAOD::Photon *ph)
return the photon conversion type (see EgammaEnums)
Gaudi::Property< bool > m_addClustersMatchingVtxTracks
add the topoclusters matching conversion vertex tracks
Handle class for reading from StoreGate.
size_type size() const noexcept
Returns the number of elements in the collection.
Gaudi::Property< bool > m_useOnlyLeadingTrack
use only the leading track for matching