11 const std::string&
name,
12 const IInterface*
parent) :
18 ATH_CHECK( m_electronsContainerKey.initialize() );
19 ATH_CHECK( m_photonsContainerKey.initialize() );
20 ATH_CHECK( m_tracksCollectionName.initialize (m_streamName) );
21 return StatusCode::SUCCESS;
26 return StatusCode::SUCCESS;
31 const EventContext& ctx = Gaudi::Hive::currentContext();
36 (m_tracksCollectionName, ctx);
37 ATH_MSG_DEBUG(
"Container '" << m_tracksCollectionName.key() <<
"' retrieved from StoreGate" );
45 <<
"' could not be retrieved from StoreGate!" );
46 return StatusCode::FAILURE;
51 <<
"' retrieved from StoreGate" );
60 <<
"' could not be retrieved from StoreGate!" );
61 return StatusCode::FAILURE;
66 <<
"' retrieved from StoreGate" );
71 std::set<int> goodTrackIDs;
75 for (; eleItr != eleItrEnd; ++eleItr)
77 if ( (*eleItr)->pt() > m_minEtEg )
80 ATH_MSG_DEBUG(
"Electron at eta = " << (*eleItr)->eta() <<
" phi = " << (*eleItr)->phi() );
84 std::set<int> eg_trackList = findGoodTracks(trackCollection.cptr(), (*eleItr)->p4(), m_dr );
88 goodTrackIDs.insert(eg_trackList.begin() , eg_trackList.end() ) ;
98 for (; phoItr != phoItrEnd; ++phoItr)
100 if ( (*phoItr)->pt() > m_minEtEg )
103 ATH_MSG_DEBUG(
"Photon at eta = " << (*phoItr)->eta() <<
" phi = " << (*phoItr)->phi() );
107 std::set<int> eg_trackList = findGoodTracks(trackCollection.cptr(), (*phoItr)->p4(), m_dr );
111 goodTrackIDs.insert(eg_trackList.begin() , eg_trackList.end() ) ;
119 ATH_CHECK( thinTracks( trackCollection, goodTrackIDs ) );
121 ATH_MSG_DEBUG(
"Track thinning : tracks = " << trackCollection->size()
122 <<
" accepted = " << goodTrackIDs.size() );
124 return StatusCode::SUCCESS;
133 const TLorentzVector& candHepLorentz,
134 double maxDeltaR )
const
137 std::set<int> goodTracks;
142 for (; trackItr != trackItrEnd; ++trackItr)
146 if (!
track){
continue; }
150 double trketa = 0.,trkphi = 0;
152 trketa = startPerigee->eta();
153 trkphi = startPerigee->parameters()[
Trk::phi0];
155 double deltaEta = trketa - candHepLorentz.Eta() ;
159 ATH_MSG_DEBUG(
"Thin Tracks: eta = " << trketa <<
" phi = " << trkphi <<
" deltaR = " <<
deltaR );
162 goodTracks.insert(
i );
163 ATH_MSG_DEBUG(
" Track in the cone, adding: " <<
" eta=" << trketa <<
" phi=" << trkphi );
180 const std::set<int>& goodTrackIDs )
const
190 std::vector<bool>
mask(trackCollection->size());
193 unsigned long nTotal = 0;
194 unsigned long nKeep = 0;
195 unsigned long nReject = 0;
199 for ( std::size_t
i=0;
i<trackCollection->size(); ++
i )
202 if ( goodTrackIDs.find(
i ) != goodTrackIDs.end() )
215 ATH_MSG_DEBUG(
" EGammaTracksThinning statistics: tracks processed " << nTotal
216 <<
" kept = " << nKeep
217 <<
" rejected " << nReject );