ATLAS Offline Software
IPhotonVertexSelectionTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef PhotonVertexSelection_IPhotonVertexSelectionTool_h
6 #define PhotonVertexSelection_IPhotonVertexSelectionTool_h
7 
8 // Framework includes
9 #include "AsgTools/IAsgTool.h"
10 
11 // EDM includes
12 #include "xAODTracking/VertexFwd.h"
15 
16 // std includes
17 #include <vector>
18 
19 // Forward declarations
20 namespace CP {
21  class IPhotonPointingTool;
22 }
23 
24 namespace CP {
25 
26  class IPhotonVertexSelectionTool : public virtual asg::IAsgTool {
27 
30 
31  public:
33  enum FailType {
34  Unkown = -99, // Init value
35  NoFail = 0, // Ok to run the MVA algorithm
36  NoVxCont = 1, // No vertex container
37  NoEventInfo = 2, // No EventInfo
38  FailPointing = 3, // Calo pointing failed
39  FailEgamVect = 4, // No diphoton event
40  NoGdCandidate = 5, // Pointing succeded but too distant from any other vertex
41  MatchedTrack = 6, // Conversion photon has a track attached to a primary/pileup vertex
42  };
43 
44  enum yyVtxType{
45  Unknown = -1, // Init value
46  ConvTrack = 0, // conv track associated to vertex,
47  SiConvTrack = 1, // at least one conv track with Si hits,
48  NoSiTracks = 2, // no tracks with Si hits or conversions ignored
49  };
50 
52  virtual StatusCode decorateInputs(const xAOD::EgammaContainer &egammas, FailType* failType = nullptr) const = 0;
53 
55  virtual StatusCode getVertex(const xAOD::EgammaContainer &egammas, const xAOD::Vertex* &vertex, bool ignoreConv = false) const= 0;
56 
59  virtual std::vector< std::pair<const xAOD::Vertex*, float> > getVertex(const xAOD::EgammaContainer &egammas, bool ignoreConv = false, bool noDecorate = false, yyVtxType* vtxCase = nullptr, FailType* failType = nullptr) const = 0;
60 
65  virtual int getCase() const = 0;
66 
68  virtual const xAOD::Vertex* getPrimaryVertexFromConv(const xAOD::PhotonContainer *photons) const = 0;
69 
70  }; // class IPhotonVertexSelectionTool
71 
72 } // namespace CP
73 
74 
75 #endif // PhotonVertexSelection_IPhotonVertexSelectionTool_h
CP::IPhotonVertexSelectionTool::Unkown
@ Unkown
Definition: IPhotonVertexSelectionTool.h:34
CP::IPhotonVertexSelectionTool::FailPointing
@ FailPointing
Definition: IPhotonVertexSelectionTool.h:38
CP::IPhotonVertexSelectionTool::NoSiTracks
@ NoSiTracks
Definition: IPhotonVertexSelectionTool.h:48
CP::IPhotonVertexSelectionTool::Unknown
@ Unknown
Definition: IPhotonVertexSelectionTool.h:45
asg::IAsgTool
Base class for the dual-use tool interface classes.
Definition: IAsgTool.h:41
CP::IPhotonVertexSelectionTool::decorateInputs
virtual StatusCode decorateInputs(const xAOD::EgammaContainer &egammas, FailType *failType=nullptr) const =0
Given a list of photons, decorate vertex container with MVA variables.
CP::IPhotonVertexSelectionTool::NoEventInfo
@ NoEventInfo
Definition: IPhotonVertexSelectionTool.h:37
CP::IPhotonVertexSelectionTool::SiConvTrack
@ SiConvTrack
Definition: IPhotonVertexSelectionTool.h:47
CP::IPhotonVertexSelectionTool::NoGdCandidate
@ NoGdCandidate
Definition: IPhotonVertexSelectionTool.h:40
CP
Select isolated Photons, Electrons and Muons.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:48
EgammaContainer.h
CP::IPhotonVertexSelectionTool::getCase
virtual int getCase() const =0
Return the last case treated: 0=conv track associated to vertex, 1=at least one conv track with Si hi...
CP::IPhotonVertexSelectionTool
Definition: IPhotonVertexSelectionTool.h:26
CP::IPhotonVertexSelectionTool::NoVxCont
@ NoVxCont
Definition: IPhotonVertexSelectionTool.h:36
CP::IPhotonVertexSelectionTool::yyVtxType
yyVtxType
Definition: IPhotonVertexSelectionTool.h:44
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
CP::IPhotonVertexSelectionTool::getVertex
virtual StatusCode getVertex(const xAOD::EgammaContainer &egammas, const xAOD::Vertex *&vertex, bool ignoreConv=false) const =0
Given a list of photons, return the most likely vertex based on MVA likelihood.
CP::IPhotonVertexSelectionTool::FailType
FailType
Declare the interface that the class provides.
Definition: IPhotonVertexSelectionTool.h:33
CP::IPhotonVertexSelectionTool::MatchedTrack
@ MatchedTrack
Definition: IPhotonVertexSelectionTool.h:41
ASG_TOOL_INTERFACE
#define ASG_TOOL_INTERFACE(CLASSNAME)
Definition: AsgToolMacros.h:40
IAsgTool.h
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
CP::IPhotonVertexSelectionTool::getPrimaryVertexFromConv
virtual const xAOD::Vertex * getPrimaryVertexFromConv(const xAOD::PhotonContainer *photons) const =0
Get possible vertex directly associated with photon conversions.
VertexFwd.h
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
CP::IPhotonVertexSelectionTool::ConvTrack
@ ConvTrack
Definition: IPhotonVertexSelectionTool.h:46
CP::IPhotonVertexSelectionTool::NoFail
@ NoFail
Definition: IPhotonVertexSelectionTool.h:35
CP::IPhotonVertexSelectionTool::getVertex
virtual std::vector< std::pair< const xAOD::Vertex *, float > > getVertex(const xAOD::EgammaContainer &egammas, bool ignoreConv=false, bool noDecorate=false, yyVtxType *vtxCase=nullptr, FailType *failType=nullptr) const =0
Given a list of photons, return the MLPs of all vertices in the event sorted in descending order.
PhotonContainer.h
CP::IPhotonVertexSelectionTool::FailEgamVect
@ FailEgamVect
Definition: IPhotonVertexSelectionTool.h:39