|
ATLAS Offline Software
|
Go to the documentation of this file.
47 return StatusCode::SUCCESS;
50 if (
P == P1) {
return true; }
53 if (OrigP == OrigP1) {
return OrigP !=
nullptr; }
54 return (OrigP == P1 || OrigP1 ==
P);
59 if (!idTracks.isPresent()) {
61 return StatusCode::FAILURE;
65 if (!tracks.isPresent()) {
67 return StatusCode::FAILURE;
70 if (!vertices.isPresent()) {
72 return StatusCode::FAILURE;
83 if (vertices->empty() ||
84 std::find_if(vertices->begin(), vertices->end(), [](
const xAOD::Vertex* vtx){
85 return vtx->vertexType() == xAOD::VxType::PriVtx;
86 }) == vertices->end())
return StatusCode::SUCCESS;
91 using view_map = std::map<int, std::vector<const xAOD::TrackParticle*> >;
92 view_map track_sectors;
96 const int sec = sector_mapping.getSector(trk->phi());
97 std::vector<const xAOD::TrackParticle*>& container = track_sectors[sec];
98 if (container.empty()) container.reserve(idTracks->size());
99 container.push_back(trk);
103 std::vector<SelDecorator> selDecors;
105 selDecors.emplace_back(
key, ctx);
109 if (!selDecors.empty() && std::find_if(selDecors.begin(), selDecors.end(), [trk](
const SelDecorator& dec){
111 }) == selDecors.end())
continue;
112 std::vector<int> sectors;
113 sector_mapping.getSectors(trk->phi(), sectors);
115 iso_tracks.reserve(tracks->size());
116 for (
const int sector : sectors) {
118 if (itr == track_sectors.end())
continue;
120 if(!
isSame(trk, to_copy)) iso_tracks.push_back(to_copy);
127 decor_ptcone40(*trk) =
result.ptcones[0];
128 decor_ptcone30(*trk) =
result.ptcones[1];
129 decor_ptcone20(*trk) =
result.ptcones[2];
131 decor_ptvarcone40(*trk) =
result.ptvarcones_10GeVDivPt[0];
132 decor_ptvarcone30(*trk) =
result.ptvarcones_10GeVDivPt[1];
133 decor_ptvarcone20(*trk) =
result.ptvarcones_10GeVDivPt[2];
135 return StatusCode::SUCCESS;
JetConstituentVector::iterator iterator
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_ptcone40_key
SG::ReadDecorHandleKeyArray< xAOD::TrackParticleContainer > m_trkSel_keys
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_toDeorTrkKey
DataVector adapter that acts like it holds const pointers.
@ coreTrackPtr
tracks pointer
Iso::IsolationTrackCorrectionBitset trackbitset
ToolHandle< xAOD::ITrackIsolationTool > m_isoTool
Class providing the definition of the 4-vector interface.
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_idTrkKey
xAOD::TrackCorrection m_trk_corr
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_ptvarcone40_key
An algorithm that can be simultaneously executed in multiple threads.
StatusCode execute(const EventContext &ctx) const override
Handle class for reading a decoration on an object.
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_ptcone30_key
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_ptcone20_key
Now let's come to the WriteDecorHandleKeys.
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Property< std::vector< std::string > > m_trkSel_Decors
Optional list of decorators to select only the good tracks for the isolation decoration.
std::vector< xAOD::Iso::IsolationType > m_trk_iso_types
Handle class for adding a decoration to an object.
TrackIsolationDecorAlg(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Handle class for adding a decoration to an object.
Gaudi::Property< float > m_pt_min
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
static bool isSame(const xAOD::IParticle *a, const xAOD::IParticle *b)
Gaudi::Property< std::string > m_customName
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_ptvarcone30_key
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Class describing a Vertex.
~TrackIsolationDecorAlg()
Destructor:
#define ATH_MSG_WARNING(x)
DataVector adapter that acts like it holds const pointers.
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_ptvarcone20_key
Class describing a TrackParticle.
const IParticle * getOriginalObject(const IParticle ©)
This function can be used to conveniently get a pointer back to the original object from which a copy...
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
SG::ReadHandleKey< xAOD::VertexContainer > m_vtx_key
StatusCode initialize() override
Athena algorithm's Hooks.