98{
99
102
103
104 std::vector<int>
entries(toDecorate->size(), 1);
105 if (m_parser) {
106 entries = m_parser->evaluateAsVector();
107 if (
entries.size() != toDecorate->size()) {
108 ATH_MSG_ERROR(
"Sizes incompatible! Are you sure your selection string used ID TrackParticles?");
109 return StatusCode::FAILURE;
110 }
111 }
112
113
114 std::vector<SG::WriteDecorHandle<xAOD::TrackParticleContainer, float>> ptconeDecorators;
117 }
118 std::vector<SG::WriteDecorHandle<xAOD::TrackParticleContainer, float>> ptvarconeDecorators;
121 }
122 std::vector<SG::WriteDecorHandle<xAOD::TrackParticleContainer, float>> topoetconeDecorators;
125 }
126 std::vector<SG::WriteDecorHandle<xAOD::TrackParticleContainer, float>> topoetconeNonCoreConeDecorators;
129 }
130
131 SG::WriteDecorHandle<xAOD::TrackParticleContainer, int> dec_trkFlag(
m_dec_trkFlagKey, ctx);
132
134 int ipar=0;
135 for(auto particle : *toDecorate) {
136 bool IsPassed=true;
137
139 if (!
entries[ipar++]) IsPassed=
false;
140
144 }
145
147 if(IsPassed){
149 xAOD::TrackIsolation resultTrack;
150 xAOD::TrackIsolation resultTrackVar;
151 xAOD::CaloIsolation resultCalo;
152 xAOD::CaloIsolation resultCaloNonCoreCone;
154
157 ptconeDecorators[
i](*particle) = resultTrack.
ptcones[
i];
158 }
159 }else{
161 }
162 }
163
165
166 std::vector<xAOD::Iso::IsolationType> ptconeTypes = {};
168 int iso_tmp = static_cast<int>(isoType);
171 }
172
176 }
177 }else{
179 }
180 }
181
183
186 topoetconeDecorators[
i](*particle) = resultCalo.
etcones[
i];
187 }
188 }else{
190 }
191
194 topoetconeNonCoreConeDecorators[
i](*particle) = resultCaloNonCoreCone.
etcones[
i];
195 }
196 }else {
197 ATH_MSG_WARNING(
"Failed to apply the topo calo isolation for a particle ( non CoreCone )");
198 }
199
200 }
201
202 }else{
204 ptconeDecorators[
i](*particle) = -999.e3;
205 }
207 ptvarconeDecorators[
i](*particle) = -999.e3;
208 }
210 topoetconeDecorators[
i](*particle) = -999.e3;
211 topoetconeNonCoreConeDecorators[
i](*particle) = -999.e3;
212 }
213 }
214 }
215 }
216
217 return StatusCode::SUCCESS;
218}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
IntegerArrayProperty m_iso
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trackContainerKey
SG::WriteDecorHandleKey< xAOD::TrackParticleContainer > m_dec_trkFlagKey
SG::WriteDecorHandleKeyArray< xAOD::TrackParticleContainer > m_ptconeDecoratorsKey
std::vector< xAOD::Iso::IsolationType > m_ptvarconeTypes
std::vector< xAOD::Iso::IsolationType > m_topoetconeTypes
xAOD::CaloCorrection m_topoconeCorrList
ToolHandle< xAOD::ICaloTopoClusterIsolationTool > m_caloIsolationTool
SG::WriteDecorHandleKeyArray< xAOD::TrackParticleContainer > m_topoetconeDecoratorsKey
IntegerProperty m_diff_ptvarcone
SG::WriteDecorHandleKeyArray< xAOD::TrackParticleContainer > m_topoetconeNonCoreConeDecoratorsKey
IntegerProperty m_selFlagValue
xAOD::CaloCorrection m_topoclusCorrList
std::vector< xAOD::Iso::IsolationType > m_ptconeTypes
ToolHandle< xAOD::ITrackIsolationTool > m_trackIsolationTool
Athena configured tools.
xAOD::TrackCorrection m_trkCorrList
IsolationType
Overall enumeration for isolation types in xAOD files.
std::vector< float > etcones
std::vector< float > ptcones
std::vector< float > ptvarcones_10GeVDivPt