30{
31
32
33
34 SG::ThinningHandle<TrackCollection> trackCollection
37
38
39
42 {
44 << "' could not be retrieved from StoreGate!" );
45 return StatusCode::FAILURE;
46 }
47 else
48 {
50 << "' retrieved from StoreGate" );
51 }
52
53
54
57 {
59 << "' could not be retrieved from StoreGate!" );
60 return StatusCode::FAILURE;
61 }
62 else
63 {
65 << "' retrieved from StoreGate" );
66 }
67
68
69
70 std::set<int> goodTrackIDs;
71
74 for (; eleItr != eleItrEnd; ++eleItr)
75 {
77 {
78
79 ATH_MSG_DEBUG(
"Electron at eta = " << (*eleItr)->eta() <<
" phi = " << (*eleItr)->phi() );
80
81
82
83 std::set<int> eg_trackList =
findGoodTracks(trackCollection.cptr(), (*eleItr)->p4(),
m_dr );
84
85
86
87 goodTrackIDs.insert(eg_trackList.begin() , eg_trackList.end() ) ;
88
89 }
90
91 }
92
93
94
97 for (; phoItr != phoItrEnd; ++phoItr)
98 {
100 {
101
102 ATH_MSG_DEBUG(
"Photon at eta = " << (*phoItr)->eta() <<
" phi = " << (*phoItr)->phi() );
103
104
105
106 std::set<int> eg_trackList =
findGoodTracks(trackCollection.cptr(), (*phoItr)->p4(),
m_dr );
107
108
109
110 goodTrackIDs.insert(eg_trackList.begin() , eg_trackList.end() ) ;
111
112 }
113
114 }
115
116
117
119
120 ATH_MSG_DEBUG(
"Track thinning : tracks = " << trackCollection->size()
121 << " accepted = " << goodTrackIDs.size() );
122
123 return StatusCode::SUCCESS;
124}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
xAOD::ElectronContainer * electronContainer
xAOD::PhotonContainer * photonContainer
DataModel_detail::const_iterator< DataVector > const_iterator
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
SG::ThinningHandleKey< TrackCollection > m_tracksCollectionName
std::set< int > findGoodTracks(const TrackCollection *trackCont, const TLorentzVector &candHepLorentz, double maxDeltaR) const
Gaudi::Property< double > m_minEtEg
Gaudi::Property< double > m_dr
SG::ReadHandleKey< xAOD::ElectronContainer > m_electronsContainerKey
StatusCode thinTracks(SG::ThinningHandle< TrackCollection > &trackCont, const std::set< int > &goodTracks) const
SG::ReadHandleKey< xAOD::PhotonContainer > m_photonsContainerKey