ATLAS Offline Software
JpsiFinder_ee.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // ****************************************************************************
6 // ----------------------------------------------------------------------------
7 // JpsiFinder_ee header file
8 //
9 // James Catmore <James.Catmore@cern.ch>
10 
11 // ----------------------------------------------------------------------------
12 // ****************************************************************************
13 #ifndef JpsiFinder_ee_H
14 #define JpsiFinder_ee_H
16 #include "GaudiKernel/ToolHandle.h"
17 #include "GaudiKernel/IPartPropSvc.h"
18 
19 #include "xAODEgamma/ElectronFwd.h"
21 
22 #include <vector>
23 #include <string>
25 #include "xAODMuon/MuonContainer.h"
28 
32 
33 namespace Trk {
34  class IVertexFitter;
35  class ITrackSelectorTool;
36 }
37 
38 namespace InDet { class VertexPointEstimator; }
39 
40 namespace Analysis {
41 
42  static const InterfaceID IID_JpsiFinder_ee("JpsiFinder_ee", 1, 0);
43 
44  // Struct and enum to associate muon pairs with track pairs
45  // and make the program flow more straightforward
46  enum PairTypeEE{ ELEL=0, ELTRK=1, TRK2=2};
48  {
51  const xAOD::Electron* el1{nullptr};
52  const xAOD::Electron* el2{nullptr};
56  };
57 
59  {
60  public:
61  JpsiFinder_ee(const std::string& t, const std::string& n, const IInterface* p);
63  virtual StatusCode initialize() override;
64 
65  static const InterfaceID& interfaceID() { return IID_JpsiFinder_ee;}
66 
67  //-------------------------------------------------------------------------------------
68  //Doing Calculation and inline functions
69  virtual StatusCode performSearch(const EventContext& ctx, xAOD::VertexContainer& vxContainer) const override;
70  std::vector<JpsiEECandidate> getPairs(const std::vector<const xAOD::TrackParticle*>&) const;
71  std::vector<JpsiEECandidate> getPairs(const std::vector<const xAOD::Electron*>&) const;
72  std::vector<JpsiEECandidate> getPairs2Colls(const std::vector<const xAOD::TrackParticle*>&, const std::vector<const xAOD::Electron*>&, bool) const;
73  double getInvariantMass(const JpsiEECandidate&, const std::vector<double>& ) const;
74  std::vector<JpsiEECandidate> selectCharges(const std::vector<JpsiEECandidate>& , const std::string&) const;
75  xAOD::Vertex* fit(const std::vector<const xAOD::TrackParticle*>&, const xAOD::TrackParticleContainer* importedTrackCollection) const;
76  bool passesEgammaCuts(const xAOD::Electron*) const;
78  TVector3 trackMomentum(const xAOD::Vertex * vxCandidate, int trkIndex) const;
79  //-------------------------------------------------------------------------------------
80 
81  private:
82  bool m_elel;
83  bool m_eltrk;
84  bool m_trktrk;
89  double m_trk1M;
90  double m_trk2M;
91  double m_thresholdPt;
92  double m_higherPt;
98  double m_Chi2Cut;
105  this, "GSFCaloLink", "Electrons.gsfCaloTrackParticleLink",
106  "ReadHandleKey for electron link to GSFCalo refitted TrackParticle"
107  };
108 
109  ToolHandle < Trk::IVertexFitter > m_iVertexFitter;
110  ToolHandle < Trk::IVertexFitter > m_iV0VertexFitter;
111  ToolHandle < Trk::ITrackSelectorTool > m_trkSelector;
112  ToolHandle < InDet::VertexPointEstimator > m_vertexEstimator;
113  ServiceHandle<IPartPropSvc> m_partPropSvc{this, "PartPropSvc", "PartPropSvc"};
115  std::string m_elSelection;
117  };
118 } // end of namespace
119 #endif
120 
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
Analysis::JpsiFinder_ee::m_invMassUpper
double m_invMassUpper
Definition: JpsiFinder_ee.h:94
Analysis::JpsiEECandidate::trackParticle1
const xAOD::TrackParticle * trackParticle1
Definition: JpsiFinder_ee.h:49
Analysis::JpsiFinder_ee::m_trkSelector
ToolHandle< Trk::ITrackSelectorTool > m_trkSelector
Definition: JpsiFinder_ee.h:111
Analysis::JpsiFinder_ee::getPairs2Colls
std::vector< JpsiEECandidate > getPairs2Colls(const std::vector< const xAOD::TrackParticle * > &, const std::vector< const xAOD::Electron * > &, bool) const
Definition: JpsiFinder_ee.cxx:520
Analysis::JpsiFinder_ee::~JpsiFinder_ee
~JpsiFinder_ee()
Definition: JpsiFinder_ee.cxx:160
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
Analysis::JpsiFinder_ee::m_TrkParticleCollection
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_TrkParticleCollection
Definition: JpsiFinder_ee.h:103
Analysis::JpsiFinder_ee::m_useTrackMeasurement
bool m_useTrackMeasurement
Definition: JpsiFinder_ee.h:86
ICandidateSearch.h
Analysis::JpsiFinder_ee::m_sameChOnly
bool m_sameChOnly
Definition: JpsiFinder_ee.h:100
Analysis::JpsiEECandidate::trackParticle2
const xAOD::TrackParticle * trackParticle2
Definition: JpsiFinder_ee.h:50
Analysis::JpsiFinder_ee::m_collAnglePhi
double m_collAnglePhi
Definition: JpsiFinder_ee.h:97
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
Analysis::JpsiFinder_ee::JpsiFinder_ee
JpsiFinder_ee(const std::string &t, const std::string &n, const IInterface *p)
Definition: JpsiFinder_ee.cxx:95
SG::ReadHandleKey< xAOD::ElectronContainer >
Analysis::JpsiFinder_ee::m_elSelection
std::string m_elSelection
Definition: JpsiFinder_ee.h:115
Analysis::JpsiFinder_ee::m_electronCollectionKey
SG::ReadHandleKey< xAOD::ElectronContainer > m_electronCollectionKey
Definition: JpsiFinder_ee.h:102
Analysis::JpsiFinder_ee::m_doTagAndProbe
bool m_doTagAndProbe
Definition: JpsiFinder_ee.h:116
Analysis::JpsiFinder_ee::initialize
virtual StatusCode initialize() override
Definition: JpsiFinder_ee.cxx:32
Analysis::JpsiEECandidate
Definition: JpsiFinder_ee.h:48
Analysis::JpsiEECandidate::el2
const xAOD::Electron * el2
Definition: JpsiFinder_ee.h:52
Analysis::JpsiFinder_ee::passesEgammaCuts
bool passesEgammaCuts(const xAOD::Electron *) const
Definition: JpsiFinder_ee.cxx:632
Analysis::JpsiFinder_ee::m_trk2M
double m_trk2M
Definition: JpsiFinder_ee.h:90
Analysis::JpsiFinder_ee::getPairs
std::vector< JpsiEECandidate > getPairs(const std::vector< const xAOD::TrackParticle * > &) const
Definition: JpsiFinder_ee.cxx:466
Analysis::JpsiFinder_ee::m_trkThresholdPt
double m_trkThresholdPt
Definition: JpsiFinder_ee.h:93
Analysis::JpsiFinder_ee::fit
xAOD::Vertex * fit(const std::vector< const xAOD::TrackParticle * > &, const xAOD::TrackParticleContainer *importedTrackCollection) const
Definition: JpsiFinder_ee.cxx:396
Analysis::ELEL
@ ELEL
Definition: JpsiFinder_ee.h:46
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
Analysis::JpsiFinder_ee::m_invMassLower
double m_invMassLower
Definition: JpsiFinder_ee.h:95
ElectronContainer.h
Analysis::JpsiFinder_ee::m_thresholdPt
double m_thresholdPt
Definition: JpsiFinder_ee.h:91
Analysis::JpsiFinder_ee::m_allChCombs
bool m_allChCombs
Definition: JpsiFinder_ee.h:101
Analysis::JpsiFinder_ee::performSearch
virtual StatusCode performSearch(const EventContext &ctx, xAOD::VertexContainer &vxContainer) const override
Definition: JpsiFinder_ee.cxx:167
Analysis::JpsiFinder_ee::trackMomentum
TVector3 trackMomentum(const xAOD::Vertex *vxCandidate, int trkIndex) const
Definition: JpsiFinder_ee.cxx:664
beamspotman.n
n
Definition: beamspotman.py:727
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Analysis::JpsiFinder_ee::m_partPropSvc
ServiceHandle< IPartPropSvc > m_partPropSvc
Definition: JpsiFinder_ee.h:113
Analysis::JpsiFinder_ee::m_Chi2Cut
double m_Chi2Cut
Definition: JpsiFinder_ee.h:98
AthAlgTool.h
Analysis::JpsiFinder_ee::interfaceID
static const InterfaceID & interfaceID()
Definition: JpsiFinder_ee.h:65
Analysis::JpsiFinder_ee::m_diElectrons
bool m_diElectrons
Definition: JpsiFinder_ee.h:88
Analysis::JpsiFinder_ee::m_trktrk
bool m_trktrk
Definition: JpsiFinder_ee.h:84
ElectronFwd.h
Analysis::JpsiFinder_ee::selectCharges
std::vector< JpsiEECandidate > selectCharges(const std::vector< JpsiEECandidate > &, const std::string &) const
Definition: JpsiFinder_ee.cxx:592
Analysis::JpsiEECandidate::collection1
const xAOD::TrackParticleContainer * collection1
Definition: JpsiFinder_ee.h:53
Analysis::JpsiFinder_ee::m_vertexEstimator
ToolHandle< InDet::VertexPointEstimator > m_vertexEstimator
Definition: JpsiFinder_ee.h:112
Analysis::JpsiEECandidate::el1
const xAOD::Electron * el1
Definition: JpsiFinder_ee.h:51
DataVector
Derived DataVector<T>.
Definition: DataVector.h:795
Analysis::JpsiFinder_ee::m_iVertexFitter
ToolHandle< Trk::IVertexFitter > m_iVertexFitter
Definition: JpsiFinder_ee.h:109
Analysis::ICandidateSearch
Definition: ICandidateSearch.h:10
Analysis::JpsiFinder_ee::m_egammaCuts
bool m_egammaCuts
Definition: JpsiFinder_ee.h:114
Analysis::JpsiEECandidate::pairType
PairTypeEE pairType
Definition: JpsiFinder_ee.h:55
Analysis::JpsiFinder_ee::isContainedIn
bool isContainedIn(const xAOD::TrackParticle *, const xAOD::TrackParticleContainer *) const
Definition: JpsiFinder_ee.cxx:656
Analysis::JpsiFinder_ee::m_higherPt
double m_higherPt
Definition: JpsiFinder_ee.h:92
Analysis::JpsiFinder_ee::m_oppChOnly
bool m_oppChOnly
Definition: JpsiFinder_ee.h:99
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Analysis
The namespace of all packages in PhysicsAnalysis/JetTagging.
Definition: BTaggingCnvAlg.h:20
Analysis::JpsiFinder_ee::m_trk1M
double m_trk1M
Definition: JpsiFinder_ee.h:89
Analysis::PairTypeEE
PairTypeEE
Definition: JpsiFinder_ee.h:46
xAOD::Electron_v1
Definition: Electron_v1.h:34
MuonContainer.h
ElectronContainerFwd.h
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
Analysis::JpsiFinder_ee::getInvariantMass
double getInvariantMass(const JpsiEECandidate &, const std::vector< double > &) const
Definition: JpsiFinder_ee.cxx:570
Analysis::JpsiFinder_ee::m_collAngleTheta
double m_collAngleTheta
Definition: JpsiFinder_ee.h:96
Analysis::JpsiFinder_ee::m_elel
bool m_elel
Definition: JpsiFinder_ee.h:82
Analysis::JpsiFinder_ee
Definition: JpsiFinder_ee.h:59
ReadDecorHandle.h
Handle class for reading a decoration on an object.
Analysis::ELTRK
@ ELTRK
Definition: JpsiFinder_ee.h:46
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
Analysis::JpsiFinder_ee::m_eltrk
bool m_eltrk
Definition: JpsiFinder_ee.h:83
AthAlgTool
Definition: AthAlgTool.h:26
SG::ReadDecorHandleKey
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Definition: StoreGate/StoreGate/ReadDecorHandleKey.h:85
Analysis::JpsiFinder_ee::m_allElectrons
bool m_allElectrons
Definition: JpsiFinder_ee.h:85
Analysis::TRK2
@ TRK2
Definition: JpsiFinder_ee.h:46
Analysis::JpsiFinder_ee::m_iV0VertexFitter
ToolHandle< Trk::IVertexFitter > m_iV0VertexFitter
Definition: JpsiFinder_ee.h:110
Analysis::JpsiFinder_ee::m_gsfCaloLinkKey
SG::ReadDecorHandleKey< xAOD::ElectronContainer > m_gsfCaloLinkKey
Definition: JpsiFinder_ee.h:104
TrackParticleContainerFwd.h
Analysis::JpsiEECandidate::collection2
const xAOD::TrackParticleContainer * collection2
Definition: JpsiFinder_ee.h:54
Analysis::JpsiFinder_ee::m_useV0Fitter
bool m_useV0Fitter
Definition: JpsiFinder_ee.h:87
ServiceHandle< IPartPropSvc >