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"
20 
21 #include <vector>
22 #include <string>
24 #include "xAODMuon/MuonContainer.h"
28 
29 namespace Trk {
30  class IVertexFitter;
31  class ITrackSelectorTool;
32 }
33 
34 namespace InDet { class VertexPointEstimator; }
35 
36 namespace Analysis {
37 
38  static const InterfaceID IID_JpsiFinder_ee("JpsiFinder_ee", 1, 0);
39 
40  // Struct and enum to associate muon pairs with track pairs
41  // and make the program flow more straightforward
42  enum PairTypeEE{ ELEL=0, ELTRK=1, TRK2=2};
44  {
47  const xAOD::Electron* el1{nullptr};
48  const xAOD::Electron* el2{nullptr};
52  };
53 
55  {
56  public:
57  JpsiFinder_ee(const std::string& t, const std::string& n, const IInterface* p);
59  virtual StatusCode initialize() override;
60 
61  static const InterfaceID& interfaceID() { return IID_JpsiFinder_ee;}
62 
63  //-------------------------------------------------------------------------------------
64  //Doing Calculation and inline functions
65  virtual StatusCode performSearch(const EventContext& ctx, xAOD::VertexContainer& vxContainer) const override;
66  std::vector<JpsiEECandidate> getPairs(const std::vector<const xAOD::TrackParticle*>&) const;
67  std::vector<JpsiEECandidate> getPairs(const std::vector<const xAOD::Electron*>&) const;
68  std::vector<JpsiEECandidate> getPairs2Colls(const std::vector<const xAOD::TrackParticle*>&, const std::vector<const xAOD::Electron*>&, bool) const;
69  double getInvariantMass(const JpsiEECandidate&, const std::vector<double>& ) const;
70  std::vector<JpsiEECandidate> selectCharges(const std::vector<JpsiEECandidate>& , const std::string&) const;
71  xAOD::Vertex* fit(const std::vector<const xAOD::TrackParticle*>&, const xAOD::TrackParticleContainer* importedTrackCollection) const;
72  bool passesEgammaCuts(const xAOD::Electron*) const;
74  TVector3 trackMomentum(const xAOD::Vertex * vxCandidate, int trkIndex) const;
75  //-------------------------------------------------------------------------------------
76 
77  private:
78  bool m_elel;
79  bool m_eltrk;
80  bool m_trktrk;
85  double m_trk1M;
86  double m_trk2M;
87  double m_thresholdPt;
88  double m_higherPt;
94  double m_Chi2Cut;
100  ToolHandle < Trk::IVertexFitter > m_iVertexFitter;
101  ToolHandle < Trk::IVertexFitter > m_iV0VertexFitter;
102  ToolHandle < Trk::ITrackSelectorTool > m_trkSelector;
103  ToolHandle < InDet::VertexPointEstimator > m_vertexEstimator;
104  ServiceHandle<IPartPropSvc> m_partPropSvc{this, "PartPropSvc", "PartPropSvc"};
106  std::string m_elSelection;
108  };
109 } // end of namespace
110 #endif
111 
Analysis::JpsiFinder_ee::m_invMassUpper
double m_invMassUpper
Definition: JpsiFinder_ee.h:90
Analysis::JpsiEECandidate::trackParticle1
const xAOD::TrackParticle * trackParticle1
Definition: JpsiFinder_ee.h:45
Analysis::JpsiFinder_ee::m_trkSelector
ToolHandle< Trk::ITrackSelectorTool > m_trkSelector
Definition: JpsiFinder_ee.h:102
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:499
Analysis::JpsiFinder_ee::~JpsiFinder_ee
~JpsiFinder_ee()
Definition: JpsiFinder_ee.cxx:157
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
Analysis::JpsiFinder_ee::m_TrkParticleCollection
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_TrkParticleCollection
Definition: JpsiFinder_ee.h:99
Analysis::JpsiFinder_ee::m_useTrackMeasurement
bool m_useTrackMeasurement
Definition: JpsiFinder_ee.h:82
ICandidateSearch.h
Analysis::JpsiFinder_ee::m_sameChOnly
bool m_sameChOnly
Definition: JpsiFinder_ee.h:96
Analysis::JpsiEECandidate::trackParticle2
const xAOD::TrackParticle * trackParticle2
Definition: JpsiFinder_ee.h:46
Analysis::JpsiFinder_ee::m_collAnglePhi
double m_collAnglePhi
Definition: JpsiFinder_ee.h:93
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:92
SG::ReadHandleKey< xAOD::ElectronContainer >
Analysis::JpsiFinder_ee::m_elSelection
std::string m_elSelection
Definition: JpsiFinder_ee.h:106
Analysis::JpsiFinder_ee::m_electronCollectionKey
SG::ReadHandleKey< xAOD::ElectronContainer > m_electronCollectionKey
Definition: JpsiFinder_ee.h:98
Analysis::JpsiFinder_ee::m_doTagAndProbe
bool m_doTagAndProbe
Definition: JpsiFinder_ee.h:107
Analysis::JpsiFinder_ee::initialize
virtual StatusCode initialize() override
Definition: JpsiFinder_ee.cxx:32
Analysis::JpsiEECandidate
Definition: JpsiFinder_ee.h:44
Analysis::JpsiEECandidate::el2
const xAOD::Electron * el2
Definition: JpsiFinder_ee.h:48
Analysis::JpsiFinder_ee::passesEgammaCuts
bool passesEgammaCuts(const xAOD::Electron *) const
Definition: JpsiFinder_ee.cxx:607
Analysis::JpsiFinder_ee::m_trk2M
double m_trk2M
Definition: JpsiFinder_ee.h:86
Analysis::JpsiFinder_ee::getPairs
std::vector< JpsiEECandidate > getPairs(const std::vector< const xAOD::TrackParticle * > &) const
Definition: JpsiFinder_ee.cxx:445
Analysis::JpsiFinder_ee::m_trkThresholdPt
double m_trkThresholdPt
Definition: JpsiFinder_ee.h:89
Analysis::JpsiFinder_ee::fit
xAOD::Vertex * fit(const std::vector< const xAOD::TrackParticle * > &, const xAOD::TrackParticleContainer *importedTrackCollection) const
Definition: JpsiFinder_ee.cxx:375
Analysis::ELEL
@ ELEL
Definition: JpsiFinder_ee.h:42
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
Analysis::JpsiFinder_ee::m_invMassLower
double m_invMassLower
Definition: JpsiFinder_ee.h:91
Analysis::JpsiFinder_ee::m_thresholdPt
double m_thresholdPt
Definition: JpsiFinder_ee.h:87
Analysis::JpsiFinder_ee::m_allChCombs
bool m_allChCombs
Definition: JpsiFinder_ee.h:97
Analysis::JpsiFinder_ee::performSearch
virtual StatusCode performSearch(const EventContext &ctx, xAOD::VertexContainer &vxContainer) const override
Definition: JpsiFinder_ee.cxx:164
Analysis::JpsiFinder_ee::trackMomentum
TVector3 trackMomentum(const xAOD::Vertex *vxCandidate, int trkIndex) const
Definition: JpsiFinder_ee.cxx:639
beamspotman.n
n
Definition: beamspotman.py:731
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:104
Analysis::JpsiFinder_ee::m_Chi2Cut
double m_Chi2Cut
Definition: JpsiFinder_ee.h:94
AthAlgTool.h
Analysis::JpsiFinder_ee::interfaceID
static const InterfaceID & interfaceID()
Definition: JpsiFinder_ee.h:61
Analysis::JpsiFinder_ee::m_diElectrons
bool m_diElectrons
Definition: JpsiFinder_ee.h:84
Analysis::JpsiFinder_ee::m_trktrk
bool m_trktrk
Definition: JpsiFinder_ee.h:80
ElectronFwd.h
Analysis::JpsiFinder_ee::selectCharges
std::vector< JpsiEECandidate > selectCharges(const std::vector< JpsiEECandidate > &, const std::string &) const
Definition: JpsiFinder_ee.cxx:567
Analysis::JpsiEECandidate::collection1
const xAOD::TrackParticleContainer * collection1
Definition: JpsiFinder_ee.h:49
Analysis::JpsiFinder_ee::m_vertexEstimator
ToolHandle< InDet::VertexPointEstimator > m_vertexEstimator
Definition: JpsiFinder_ee.h:103
Analysis::JpsiEECandidate::el1
const xAOD::Electron * el1
Definition: JpsiFinder_ee.h:47
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
Analysis::JpsiFinder_ee::m_iVertexFitter
ToolHandle< Trk::IVertexFitter > m_iVertexFitter
Definition: JpsiFinder_ee.h:100
Analysis::ICandidateSearch
Definition: ICandidateSearch.h:10
Analysis::JpsiFinder_ee::m_egammaCuts
bool m_egammaCuts
Definition: JpsiFinder_ee.h:105
Analysis::JpsiEECandidate::pairType
PairTypeEE pairType
Definition: JpsiFinder_ee.h:51
Analysis::JpsiFinder_ee::isContainedIn
bool isContainedIn(const xAOD::TrackParticle *, const xAOD::TrackParticleContainer *) const
Definition: JpsiFinder_ee.cxx:631
Analysis::JpsiFinder_ee::m_higherPt
double m_higherPt
Definition: JpsiFinder_ee.h:88
Analysis::JpsiFinder_ee::m_oppChOnly
bool m_oppChOnly
Definition: JpsiFinder_ee.h:95
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:85
Analysis::PairTypeEE
PairTypeEE
Definition: JpsiFinder_ee.h:42
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:545
Analysis::JpsiFinder_ee::m_collAngleTheta
double m_collAngleTheta
Definition: JpsiFinder_ee.h:92
Analysis::JpsiFinder_ee::m_elel
bool m_elel
Definition: JpsiFinder_ee.h:78
Analysis::JpsiFinder_ee
Definition: JpsiFinder_ee.h:55
Analysis::ELTRK
@ ELTRK
Definition: JpsiFinder_ee.h:42
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
Analysis::JpsiFinder_ee::m_eltrk
bool m_eltrk
Definition: JpsiFinder_ee.h:79
AthAlgTool
Definition: AthAlgTool.h:26
Analysis::JpsiFinder_ee::m_allElectrons
bool m_allElectrons
Definition: JpsiFinder_ee.h:81
Analysis::TRK2
@ TRK2
Definition: JpsiFinder_ee.h:42
Analysis::JpsiFinder_ee::m_iV0VertexFitter
ToolHandle< Trk::IVertexFitter > m_iV0VertexFitter
Definition: JpsiFinder_ee.h:101
TrackParticleContainerFwd.h
Analysis::JpsiEECandidate::collection2
const xAOD::TrackParticleContainer * collection2
Definition: JpsiFinder_ee.h:50
Analysis::JpsiFinder_ee::m_useV0Fitter
bool m_useV0Fitter
Definition: JpsiFinder_ee.h:83
ServiceHandle< IPartPropSvc >